From 932b5c5bd2d2fab8b2e548e5ae7fb6d0c61d18eb Mon Sep 17 00:00:00 2001 From: Lud Date: Mon, 17 Jul 2023 17:48:16 +0200 Subject: [PATCH 1/6] Adds Sorbet and basic type coverage --- .github/workflows/ci.yml | 3 + .rubocop.yml | 8 + .rubocop_todo.yml | 12 + bin/lint | 20 + bin/spoom | 27 + bin/tapioca | 27 + lib/money-distributed.rb | 10 +- lib/money/distributed/fetcher/base.rb | 3 +- lib/money/distributed/fetcher/file.rb | 13 +- lib/money/distributed/redis.rb | 25 +- lib/money/distributed/storage.rb | 4 +- lib/money/distributed/version.rb | 1 + money-distributed.gemspec | 27 +- sorbet/config | 3 + sorbet/rbi/dsl/.keep | 0 sorbet/rbi/gems/ast@2.4.2.rbi | 584 + sorbet/rbi/gems/concurrent-ruby@1.2.2.rbi | 405 + sorbet/rbi/gems/connection_pool@2.4.1.rbi | 273 + sorbet/rbi/gems/diff-lcs@1.5.0.rbi | 1083 + sorbet/rbi/gems/erubi@1.12.0.rbi | 145 + sorbet/rbi/gems/i18n@1.14.1.rbi | 2174 ++ sorbet/rbi/gems/json@2.6.3.rbi | 1533 ++ .../language_server-protocol@3.17.0.3.rbi | 14237 ++++++++++++ sorbet/rbi/gems/money@6.16.0.rbi | 2226 ++ sorbet/rbi/gems/netrc@0.11.0.rbi | 158 + sorbet/rbi/gems/parallel@1.23.0.rbi | 273 + sorbet/rbi/gems/parser@3.2.2.3.rbi | 5451 +++++ sorbet/rbi/gems/prettier_print@1.2.1.rbi | 951 + sorbet/rbi/gems/rainbow@3.1.1.rbi | 402 + sorbet/rbi/gems/rake@13.0.6.rbi | 3024 +++ sorbet/rbi/gems/redis-client@0.14.1.rbi | 1123 + sorbet/rbi/gems/redis@5.0.6.rbi | 3178 +++ sorbet/rbi/gems/regexp_parser@2.8.1.rbi | 3749 ++++ sorbet/rbi/gems/rexml@3.2.5.rbi | 4717 ++++ sorbet/rbi/gems/rspec@3.12.0.rbi | 82 + sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi | 1317 ++ sorbet/rbi/gems/thor@1.2.2.rbi | 3965 ++++ sorbet/rbi/gems/timecop@0.9.6.rbi | 347 + .../rbi/gems/unicode-display_width@2.4.2.rbi | 65 + sorbet/rbi/gems/unparser@0.6.8.rbi | 8 + sorbet/rbi/gems/yard-sorbet@0.8.1.rbi | 428 + sorbet/rbi/gems/yard@0.9.34.rbi | 18219 ++++++++++++++++ sorbet/rbi/shims/.keep | 0 sorbet/tapioca/config.yml | 25 + sorbet/tapioca/require.rb | 11 + spec/redis_spec.rb | 2 +- 46 files changed, 70311 insertions(+), 27 deletions(-) create mode 100644 .rubocop_todo.yml create mode 100755 bin/lint create mode 100755 bin/spoom create mode 100755 bin/tapioca create mode 100644 sorbet/config create mode 100644 sorbet/rbi/dsl/.keep create mode 100644 sorbet/rbi/gems/ast@2.4.2.rbi create mode 100644 sorbet/rbi/gems/concurrent-ruby@1.2.2.rbi create mode 100644 sorbet/rbi/gems/connection_pool@2.4.1.rbi create mode 100644 sorbet/rbi/gems/diff-lcs@1.5.0.rbi create mode 100644 sorbet/rbi/gems/erubi@1.12.0.rbi create mode 100644 sorbet/rbi/gems/i18n@1.14.1.rbi create mode 100644 sorbet/rbi/gems/json@2.6.3.rbi create mode 100644 sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi create mode 100644 sorbet/rbi/gems/money@6.16.0.rbi create mode 100644 sorbet/rbi/gems/netrc@0.11.0.rbi create mode 100644 sorbet/rbi/gems/parallel@1.23.0.rbi create mode 100644 sorbet/rbi/gems/parser@3.2.2.3.rbi create mode 100644 sorbet/rbi/gems/prettier_print@1.2.1.rbi create mode 100644 sorbet/rbi/gems/rainbow@3.1.1.rbi create mode 100644 sorbet/rbi/gems/rake@13.0.6.rbi create mode 100644 sorbet/rbi/gems/redis-client@0.14.1.rbi create mode 100644 sorbet/rbi/gems/redis@5.0.6.rbi create mode 100644 sorbet/rbi/gems/regexp_parser@2.8.1.rbi create mode 100644 sorbet/rbi/gems/rexml@3.2.5.rbi create mode 100644 sorbet/rbi/gems/rspec@3.12.0.rbi create mode 100644 sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi create mode 100644 sorbet/rbi/gems/thor@1.2.2.rbi create mode 100644 sorbet/rbi/gems/timecop@0.9.6.rbi create mode 100644 sorbet/rbi/gems/unicode-display_width@2.4.2.rbi create mode 100644 sorbet/rbi/gems/unparser@0.6.8.rbi create mode 100644 sorbet/rbi/gems/yard-sorbet@0.8.1.rbi create mode 100644 sorbet/rbi/gems/yard@0.9.34.rbi create mode 100644 sorbet/rbi/shims/.keep create mode 100644 sorbet/tapioca/config.yml create mode 100644 sorbet/tapioca/require.rb diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8232dec..b63fde0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,3 +46,6 @@ jobs: - name: Run Rubocop run: bundle exec rubocop + + - name: Run Sorbet Typechecks + run: bundle exec spoom tc diff --git a/.rubocop.yml b/.rubocop.yml index b551d79..04750fb 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,5 +1,13 @@ +inherit_from: .rubocop_todo.yml + Style/FileName: Enabled: false Gemspec/RequiredRubyVersion: Enabled: false + +AllCops: + Exclude: + - 'bin/*' + - 'spec/*' + - 'sorbet/*' diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml new file mode 100644 index 0000000..5c5f37a --- /dev/null +++ b/.rubocop_todo.yml @@ -0,0 +1,12 @@ +# This configuration was generated by +# `rubocop --auto-gen-config` +# on 2023-07-17 15:39:56 UTC using RuboCop version 1.54.2. +# The point is for the user to remove these configuration records +# one by one as the offenses are removed from the code base. +# Note that changes in the inspected code, or installation of new +# versions of RuboCop, may require this file to be generated again. + +# Offense count: 1 +# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns. +Metrics/MethodLength: + Max: 12 diff --git a/bin/lint b/bin/lint new file mode 100755 index 0000000..51a2515 --- /dev/null +++ b/bin/lint @@ -0,0 +1,20 @@ +#!/usr/bin/env ruby + +require 'English' + +unless system('bundle exec rubocop --parallel --ignore-unrecognized-cops') + puts $CHILD_STATUS + exit(1) +end + +unless system('bundle exec spoom tc') + puts $CHILD_STATUS + exit(1) +end + +unless system('bundle exec rspec --format documentation') + puts $CHILD_STATUS + exit(1) +end + +puts "\n\n✅ ALL GOOD!" diff --git a/bin/spoom b/bin/spoom new file mode 100755 index 0000000..93784bb --- /dev/null +++ b/bin/spoom @@ -0,0 +1,27 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true + +# +# This file was generated by Bundler. +# +# The application 'spoom' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) + +bundle_binstub = File.expand_path("bundle", __dir__) + +if File.file?(bundle_binstub) + if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") + load(bundle_binstub) + else + abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. +Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") + end +end + +require "rubygems" +require "bundler/setup" + +load Gem.bin_path("spoom", "spoom") diff --git a/bin/tapioca b/bin/tapioca new file mode 100755 index 0000000..a6ae757 --- /dev/null +++ b/bin/tapioca @@ -0,0 +1,27 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true + +# +# This file was generated by Bundler. +# +# The application 'tapioca' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) + +bundle_binstub = File.expand_path("bundle", __dir__) + +if File.file?(bundle_binstub) + if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") + load(bundle_binstub) + else + abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. +Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") + end +end + +require "rubygems" +require "bundler/setup" + +load Gem.bin_path("tapioca", "tapioca") diff --git a/lib/money-distributed.rb b/lib/money-distributed.rb index b57009d..eb07ea6 100644 --- a/lib/money-distributed.rb +++ b/lib/money-distributed.rb @@ -1,5 +1,9 @@ +# typed: strict # frozen_string_literal: true -require 'money/distributed/storage' -require 'money/distributed/fetcher/base' -require 'money/distributed/fetcher/file' +require 'sorbet-runtime' +require 'redis' +require 'connection_pool' +require 'money' + +Dir[File.join(__dir__, './**/*', '*.rb')].each { require(_1) } diff --git a/lib/money/distributed/fetcher/base.rb b/lib/money/distributed/fetcher/base.rb index e907e14..00cea24 100644 --- a/lib/money/distributed/fetcher/base.rb +++ b/lib/money/distributed/fetcher/base.rb @@ -1,7 +1,6 @@ +# typed: false # frozen_string_literal: true -require 'money' - class Money module Distributed module Fetcher diff --git a/lib/money/distributed/fetcher/file.rb b/lib/money/distributed/fetcher/file.rb index f57d9b5..8eac2ab 100644 --- a/lib/money/distributed/fetcher/file.rb +++ b/lib/money/distributed/fetcher/file.rb @@ -1,3 +1,4 @@ +# typed: strict # frozen_string_literal: true require 'json' @@ -9,8 +10,15 @@ module Distributed module Fetcher # Fetcher that loads rates from a file class File + extend T::Sig include Base + sig do + params( + file_path: T.any(String, Pathname), + bank: T.untyped + ).void + end def initialize(file_path, bank = nil) super(bank) @file_path = file_path @@ -18,10 +26,13 @@ def initialize(file_path, bank = nil) private + sig { returns(T::Hash[String, BigDecimal]) } def exchange_rates ::File.open(@file_path).read.split("\n").each_with_object({}) do |line, h| code_rate = line.split(' ') - h[code_rate[0]] = BigDecimal(code_rate[1]) + currency = T.cast(code_rate[0], String) + rate = T.cast(code_rate[1], T.any(Integer, Float, Rational, BigDecimal, String)) + h[currency] = BigDecimal(rate) end end end diff --git a/lib/money/distributed/redis.rb b/lib/money/distributed/redis.rb index 6912742..7cc43e0 100644 --- a/lib/money/distributed/redis.rb +++ b/lib/money/distributed/redis.rb @@ -1,23 +1,37 @@ +# typed: true # frozen_string_literal: true -require 'redis' -require 'connection_pool' - class Money module Distributed # Wrapper over different parameters that can be provided for redis class Redis + extend T::Sig + + sig do + params( + redis: T.any(::Redis, ConnectionPool, Hash, Proc) + ).void + end def initialize(redis) @redis_proc = build_redis_proc(redis) end + sig do + params( + block: T.proc.returns(T.untyped) + ).returns(T.untyped) + end def exec(&block) @redis_proc.call(&block) end private - # rubocop: disable Metrics/MethodLength + sig do + params( + redis: T.any(::Redis, ConnectionPool, Hash, Proc) + ).returns(Proc) + end def build_redis_proc(redis) case redis when ::Redis @@ -29,10 +43,9 @@ def build_redis_proc(redis) when Proc redis else - raise ArgumentError, 'Redis, ConnectionPool, Hash or Proc is required' + T.absurd(redis) end end - # rubocop: enable Metrics/MethodLength end end end diff --git a/lib/money/distributed/storage.rb b/lib/money/distributed/storage.rb index 7aefc02..414efef 100644 --- a/lib/money/distributed/storage.rb +++ b/lib/money/distributed/storage.rb @@ -1,8 +1,6 @@ +# typed: true # frozen_string_literal: true -require 'bigdecimal' -require 'money/distributed/redis' - class Money module Distributed # Storage for `Money::Bank::VariableExchange` that stores rates in Redis diff --git a/lib/money/distributed/version.rb b/lib/money/distributed/version.rb index 6fe57ce..9fce4ca 100644 --- a/lib/money/distributed/version.rb +++ b/lib/money/distributed/version.rb @@ -1,3 +1,4 @@ +# typed: true # frozen_string_literal: true class Money diff --git a/money-distributed.gemspec b/money-distributed.gemspec index e277618..b4652b9 100644 --- a/money-distributed.gemspec +++ b/money-distributed.gemspec @@ -14,22 +14,27 @@ Gem::Specification.new do |spec| spec.homepage = 'https://github.com/DarthSim/money-distributed' spec.license = 'MIT' - spec.required_ruby_version = '>= 2.5' + spec.required_ruby_version = '>= 3.0' + spec.files = Dir[ + 'lib/**/*', + 'sorbet/rbi/dsl/**/*.rbi', + 'sorbet/rbi/shims/**/*.rbi', + 'LICENSE', + 'README.md', + ] - spec.files = `git ls-files -z`.split("\x0").reject do |f| - f.match(%r{^(test|spec|features)/}) - end - - spec.bindir = 'exe' - spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } - spec.require_paths = ['lib'] + spec.add_dependency 'connection_pool' + spec.add_dependency 'money', '>= 6.6.0' + spec.add_dependency 'redis' + spec.add_dependency 'sorbet' + spec.add_dependency 'sorbet-runtime' spec.add_development_dependency 'rake', '>= 12.3.3' spec.add_development_dependency 'rspec' spec.add_development_dependency 'rubocop' + spec.add_development_dependency 'spoom' + spec.add_development_dependency 'tapioca' spec.add_development_dependency 'timecop' - spec.add_dependency 'connection_pool' - spec.add_dependency 'money', '>= 6.6.0' - spec.add_dependency 'redis' + spec.metadata['rubygems_mfa_required'] = 'true' end diff --git a/sorbet/config b/sorbet/config new file mode 100644 index 0000000..de457cd --- /dev/null +++ b/sorbet/config @@ -0,0 +1,3 @@ +--dir +. +--ignore=vendor/ diff --git a/sorbet/rbi/dsl/.keep b/sorbet/rbi/dsl/.keep new file mode 100644 index 0000000..e69de29 diff --git a/sorbet/rbi/gems/ast@2.4.2.rbi b/sorbet/rbi/gems/ast@2.4.2.rbi new file mode 100644 index 0000000..3fc4495 --- /dev/null +++ b/sorbet/rbi/gems/ast@2.4.2.rbi @@ -0,0 +1,584 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `ast` gem. +# Please instead update this file by running `bin/tapioca gem ast`. + +# {AST} is a library for manipulating abstract syntax trees. +# +# It embraces immutability; each AST node is inherently frozen at +# creation, and updating a child node requires recreating that node +# and its every parent, recursively. +# This is a design choice. It does create some pressure on +# garbage collector, but completely eliminates all concurrency +# and aliasing problems. +# +# See also {AST::Node}, {AST::Processor::Mixin} and {AST::Sexp} for +# additional recommendations and design patterns. +# +# source://ast//lib/ast.rb#13 +module AST; end + +# Node is an immutable class, instances of which represent abstract +# syntax tree nodes. It combines semantic information (i.e. anything +# that affects the algorithmic properties of a program) with +# meta-information (line numbers or compiler intermediates). +# +# Notes on inheritance +# ==================== +# +# The distinction between semantics and metadata is important. Complete +# semantic information should be contained within just the {#type} and +# {#children} of a Node instance; in other words, if an AST was to be +# stripped of all meta-information, it should remain a valid AST which +# could be successfully processed to yield a result with the same +# algorithmic properties. +# +# Thus, Node should never be inherited in order to define methods which +# affect or return semantic information, such as getters for `class_name`, +# `superclass` and `body` in the case of a hypothetical `ClassNode`. The +# correct solution is to use a generic Node with a {#type} of `:class` +# and three children. See also {Processor} for tips on working with such +# ASTs. +# +# On the other hand, Node can and should be inherited to define +# application-specific metadata (see also {#initialize}) or customize the +# printing format. It is expected that an application would have one or two +# such classes and use them across the entire codebase. +# +# The rationale for this pattern is extensibility and maintainability. +# Unlike static ones, dynamic languages do not require the presence of a +# predefined, rigid structure, nor does it improve dispatch efficiency, +# and while such a structure can certainly be defined, it does not add +# any value but incurs a maintaining cost. +# For example, extending the AST even with a transformation-local +# temporary node type requires making globally visible changes to +# the codebase. +# +# source://ast//lib/ast/node.rb#40 +class AST::Node + # Constructs a new instance of Node. + # + # The arguments `type` and `children` are converted with `to_sym` and + # `to_a` respectively. Additionally, the result of converting `children` + # is frozen. While mutating the arguments is generally considered harmful, + # the most common case is to pass an array literal to the constructor. If + # your code does not expect the argument to be frozen, use `#dup`. + # + # The `properties` hash is passed to {#assign_properties}. + # + # @return [Node] a new instance of Node + # + # source://ast//lib/ast/node.rb#72 + def initialize(type, children = T.unsafe(nil), properties = T.unsafe(nil)); end + + # Concatenates `array` with `children` and returns the resulting node. + # + # @return [AST::Node] + # + # source://ast//lib/ast/node.rb#168 + def +(array); end + + # Appends `element` to `children` and returns the resulting node. + # + # @return [AST::Node] + # + # source://ast//lib/ast/node.rb#177 + def <<(element); end + + # Compares `self` to `other`, possibly converting with `to_ast`. Only + # `type` and `children` are compared; metadata is deliberately ignored. + # + # @return [Boolean] + # + # source://ast//lib/ast/node.rb#153 + def ==(other); end + + # Appends `element` to `children` and returns the resulting node. + # + # @return [AST::Node] + # + # source://ast//lib/ast/node.rb#177 + def append(element); end + + # Returns the children of this node. + # The returned value is frozen. + # The to_a alias is useful for decomposing nodes concisely. + # For example: + # + # node = s(:gasgn, :$foo, s(:integer, 1)) + # var_name, value = *node + # p var_name # => :$foo + # p value # => (integer 1) + # + # @return [Array] + # + # source://ast//lib/ast/node.rb#56 + def children; end + + # Nodes are already frozen, so there is no harm in returning the + # current node as opposed to initializing from scratch and freezing + # another one. + # + # @return self + # + # source://ast//lib/ast/node.rb#115 + def clone; end + + # Concatenates `array` with `children` and returns the resulting node. + # + # @return [AST::Node] + # + # source://ast//lib/ast/node.rb#168 + def concat(array); end + + # Enables matching for Node, where type is the first element + # and the children are remaining items. + # + # @return [Array] + # + # source://ast//lib/ast/node.rb#253 + def deconstruct; end + + # Nodes are already frozen, so there is no harm in returning the + # current node as opposed to initializing from scratch and freezing + # another one. + # + # @return self + # + # source://ast//lib/ast/node.rb#115 + def dup; end + + # Test if other object is equal to + # + # @param other [Object] + # @return [Boolean] + # + # source://ast//lib/ast/node.rb#85 + def eql?(other); end + + # Returns the precomputed hash value for this node + # + # @return [Fixnum] + # + # source://ast//lib/ast/node.rb#61 + def hash; end + + # Converts `self` to a s-expression ruby string. + # The code return will recreate the node, using the sexp module s() + # + # @param indent [Integer] Base indentation level. + # @return [String] + # + # source://ast//lib/ast/node.rb#211 + def inspect(indent = T.unsafe(nil)); end + + # Returns the children of this node. + # The returned value is frozen. + # The to_a alias is useful for decomposing nodes concisely. + # For example: + # + # node = s(:gasgn, :$foo, s(:integer, 1)) + # var_name, value = *node + # p var_name # => :$foo + # p value # => (integer 1) + # + # @return [Array] + # + # source://ast//lib/ast/node.rb#56 + def to_a; end + + # @return [AST::Node] self + # + # source://ast//lib/ast/node.rb#229 + def to_ast; end + + # Converts `self` to a pretty-printed s-expression. + # + # @param indent [Integer] Base indentation level. + # @return [String] + # + # source://ast//lib/ast/node.rb#187 + def to_s(indent = T.unsafe(nil)); end + + # Converts `self` to a pretty-printed s-expression. + # + # @param indent [Integer] Base indentation level. + # @return [String] + # + # source://ast//lib/ast/node.rb#187 + def to_sexp(indent = T.unsafe(nil)); end + + # Converts `self` to an Array where the first element is the type as a Symbol, + # and subsequent elements are the same representation of its children. + # + # @return [Array] + # + # source://ast//lib/ast/node.rb#237 + def to_sexp_array; end + + # Returns the type of this node. + # + # @return [Symbol] + # + # source://ast//lib/ast/node.rb#43 + def type; end + + # Returns a new instance of Node where non-nil arguments replace the + # corresponding fields of `self`. + # + # For example, `Node.new(:foo, [ 1, 2 ]).updated(:bar)` would yield + # `(bar 1 2)`, and `Node.new(:foo, [ 1, 2 ]).updated(nil, [])` would + # yield `(foo)`. + # + # If the resulting node would be identical to `self`, does nothing. + # + # @param type [Symbol, nil] + # @param children [Array, nil] + # @param properties [Hash, nil] + # @return [AST::Node] + # + # source://ast//lib/ast/node.rb#133 + def updated(type = T.unsafe(nil), children = T.unsafe(nil), properties = T.unsafe(nil)); end + + protected + + # By default, each entry in the `properties` hash is assigned to + # an instance variable in this instance of Node. A subclass should define + # attribute readers for such variables. The values passed in the hash + # are not frozen or whitelisted; such behavior can also be implemented + # by subclassing Node and overriding this method. + # + # @return [nil] + # + # source://ast//lib/ast/node.rb#98 + def assign_properties(properties); end + + # Returns `@type` with all underscores replaced by dashes. This allows + # to write symbol literals without quotes in Ruby sources and yet have + # nicely looking s-expressions. + # + # @return [String] + # + # source://ast//lib/ast/node.rb#264 + def fancy_type; end + + private + + def original_dup; end +end + +# This class includes {AST::Processor::Mixin}; however, it is +# deprecated, since the module defines all of the behaviors that +# the processor includes. Any new libraries should use +# {AST::Processor::Mixin} instead of subclassing this. +# +# @deprecated Use {AST::Processor::Mixin} instead. +# +# source://ast//lib/ast/processor.rb#8 +class AST::Processor + include ::AST::Processor::Mixin +end + +# The processor module is a module which helps transforming one +# AST into another. In a nutshell, the {#process} method accepts +# a {Node} and dispatches it to a handler corresponding to its +# type, and returns a (possibly) updated variant of the node. +# +# The processor module has a set of associated design patterns. +# They are best explained with a concrete example. Let's define a +# simple arithmetic language and an AST format for it: +# +# Terminals (AST nodes which do not have other AST nodes inside): +# +# * `(integer )`, +# +# Nonterminals (AST nodes with other nodes as children): +# +# * `(add )`, +# * `(multiply )`, +# * `(divide )`, +# * `(negate )`, +# * `(store )`: stores value of `` +# into a variable named ``, +# * `(load )`: loads value of a variable named +# ``, +# * `(each ...)`: computes each of the ``s and +# prints the result. +# +# All AST nodes have the same Ruby class, and therefore they don't +# know how to traverse themselves. (A solution which dynamically +# checks the type of children is possible, but is slow and +# error-prone.) So, a class including the module which knows how +# to traverse the entire tree should be defined. Such classes +# have a handler for each nonterminal node which recursively +# processes children nodes: +# +# require 'ast' +# +# class ArithmeticsProcessor +# include AST::Processor::Mixin +# # This method traverses any binary operators such as (add) +# # or (multiply). +# def process_binary_op(node) +# # Children aren't decomposed automatically; it is +# # suggested to use Ruby multiple assignment expansion, +# # as it is very convenient here. +# left_expr, right_expr = *node +# +# # AST::Node#updated won't change node type if nil is +# # passed as a first argument, which allows to reuse the +# # same handler for multiple node types using `alias' +# # (below). +# node.updated(nil, [ +# process(left_expr), +# process(right_expr) +# ]) +# end +# alias_method :on_add, :process_binary_op +# alias_method :on_multiply, :process_binary_op +# alias_method :on_divide, :process_binary_op +# +# def on_negate(node) +# # It is also possible to use #process_all for more +# # compact code if every child is a Node. +# node.updated(nil, process_all(node)) +# end +# +# def on_store(node) +# expr, variable_name = *node +# +# # Note that variable_name is not a Node and thus isn't +# # passed to #process. +# node.updated(nil, [ +# process(expr), +# variable_name +# ]) +# end +# +# # (load) is effectively a terminal node, and so it does +# # not need an explicit handler, as the following is the +# # default behavior. Essentially, for any nodes that don't +# # have a defined handler, the node remains unchanged. +# def on_load(node) +# nil +# end +# +# def on_each(node) +# node.updated(nil, process_all(node)) +# end +# end +# +# Let's test our ArithmeticsProcessor: +# +# include AST::Sexp +# expr = s(:add, s(:integer, 2), s(:integer, 2)) +# +# p ArithmeticsProcessor.new.process(expr) == expr # => true +# +# As expected, it does not change anything at all. This isn't +# actually very useful, so let's now define a Calculator, which +# will compute the expression values: +# +# # This Processor folds nonterminal nodes and returns an +# # (integer) terminal node. +# class ArithmeticsCalculator < ArithmeticsProcessor +# def compute_op(node) +# # First, node children are processed and then unpacked +# # to local variables. +# nodes = process_all(node) +# +# if nodes.all? { |node| node.type == :integer } +# # If each of those nodes represents a literal, we can +# # fold this node! +# values = nodes.map { |node| node.children.first } +# AST::Node.new(:integer, [ +# yield(values) +# ]) +# else +# # Otherwise, we can just leave the current node in the +# # tree and only update it with processed children +# # nodes, which can be partially folded. +# node.updated(nil, nodes) +# end +# end +# +# def on_add(node) +# compute_op(node) { |left, right| left + right } +# end +# +# def on_multiply(node) +# compute_op(node) { |left, right| left * right } +# end +# end +# +# Let's check: +# +# p ArithmeticsCalculator.new.process(expr) # => (integer 4) +# +# Excellent, the calculator works! Now, a careful reader could +# notice that the ArithmeticsCalculator does not know how to +# divide numbers. What if we pass an expression with division to +# it? +# +# expr_with_division = \ +# s(:add, +# s(:integer, 1), +# s(:divide, +# s(:add, s(:integer, 8), s(:integer, 4)), +# s(:integer, 3))) # 1 + (8 + 4) / 3 +# +# folded_expr_with_division = ArithmeticsCalculator.new.process(expr_with_division) +# p folded_expr_with_division +# # => (add +# # (integer 1) +# # (divide +# # (integer 12) +# # (integer 3))) +# +# As you can see, the expression was folded _partially_: the inner +# `(add)` node which could be computed was folded to +# `(integer 12)`, the `(divide)` node is left as-is because there +# is no computing handler for it, and the root `(add)` node was +# also left as it is because some of its children were not +# literals. +# +# Note that this partial folding is only possible because the +# _data_ format, i.e. the format in which the computed values of +# the nodes are represented, is the same as the AST itself. +# +# Let's extend our ArithmeticsCalculator class further. +# +# class ArithmeticsCalculator +# def on_divide(node) +# compute_op(node) { |left, right| left / right } +# end +# +# def on_negate(node) +# # Note how #compute_op works regardless of the operator +# # arity. +# compute_op(node) { |value| -value } +# end +# end +# +# Now, let's apply our renewed ArithmeticsCalculator to a partial +# result of previous evaluation: +# +# p ArithmeticsCalculator.new.process(expr_with_division) # => (integer 5) +# +# Five! Excellent. This is also pretty much how CRuby 1.8 executed +# its programs. +# +# Now, let's do some automated bug searching. Division by zero is +# an error, right? So if we could detect that someone has divided +# by zero before the program is even run, that could save some +# debugging time. +# +# class DivisionByZeroVerifier < ArithmeticsProcessor +# class VerificationFailure < Exception; end +# +# def on_divide(node) +# # You need to process the children to handle nested divisions +# # such as: +# # (divide +# # (integer 1) +# # (divide (integer 1) (integer 0)) +# left, right = process_all(node) +# +# if right.type == :integer && +# right.children.first == 0 +# raise VerificationFailure, "Ouch! This code divides by zero." +# end +# end +# +# def divides_by_zero?(ast) +# process(ast) +# false +# rescue VerificationFailure +# true +# end +# end +# +# nice_expr = \ +# s(:divide, +# s(:add, s(:integer, 10), s(:integer, 2)), +# s(:integer, 4)) +# +# p DivisionByZeroVerifier.new.divides_by_zero?(nice_expr) +# # => false. Good. +# +# bad_expr = \ +# s(:add, s(:integer, 10), +# s(:divide, s(:integer, 1), s(:integer, 0))) +# +# p DivisionByZeroVerifier.new.divides_by_zero?(bad_expr) +# # => true. WHOOPS. DO NOT RUN THIS. +# +# Of course, this won't detect more complex cases... unless you +# use some partial evaluation before! The possibilites are +# endless. Have fun. +# +# source://ast//lib/ast/processor/mixin.rb#240 +module AST::Processor::Mixin + # Default handler. Does nothing. + # + # @param node [AST::Node] + # @return [AST::Node, nil] + # + # source://ast//lib/ast/processor/mixin.rb#284 + def handler_missing(node); end + + # Dispatches `node`. If a node has type `:foo`, then a handler + # named `on_foo` is invoked with one argument, the `node`; if + # there isn't such a handler, {#handler_missing} is invoked + # with the same argument. + # + # If the handler returns `nil`, `node` is returned; otherwise, + # the return value of the handler is passed along. + # + # @param node [AST::Node, nil] + # @return [AST::Node, nil] + # + # source://ast//lib/ast/processor/mixin.rb#251 + def process(node); end + + # {#process}es each node from `nodes` and returns an array of + # results. + # + # @param nodes [Array] + # @return [Array] + # + # source://ast//lib/ast/processor/mixin.rb#274 + def process_all(nodes); end +end + +# This simple module is very useful in the cases where one needs +# to define deeply nested ASTs from Ruby code, for example, in +# tests. It should be used like this: +# +# describe YourLanguage::AST do +# include Sexp +# +# it "should correctly parse expressions" do +# YourLanguage.parse("1 + 2 * 3").should == +# s(:add, +# s(:integer, 1), +# s(:multiply, +# s(:integer, 2), +# s(:integer, 3))) +# end +# end +# +# This way the amount of boilerplate code is greatly reduced. +# +# source://ast//lib/ast/sexp.rb#20 +module AST::Sexp + # Creates a {Node} with type `type` and children `children`. + # Note that the resulting node is of the type AST::Node and not a + # subclass. + # This would not pose a problem with comparisons, as {Node#==} + # ignores metadata. + # + # source://ast//lib/ast/sexp.rb#26 + def s(type, *children); end +end diff --git a/sorbet/rbi/gems/concurrent-ruby@1.2.2.rbi b/sorbet/rbi/gems/concurrent-ruby@1.2.2.rbi new file mode 100644 index 0000000..bc839ff --- /dev/null +++ b/sorbet/rbi/gems/concurrent-ruby@1.2.2.rbi @@ -0,0 +1,405 @@ +# 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 +end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/map.rb#7 +module Concurrent::Collection; 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 thread-safe subclass of Hash. This version locks against the object +# itself for every method call, ensuring only one thread can be reading +# or writing at a time. This includes iteration methods like `#each`, +# which takes the lock repeatedly when reading an item. +# +# @see http://ruby-doc.org/core/Hash.html Ruby standard library `Hash` +# +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/hash.rb#47 +class Concurrent::Hash < ::Hash; end + +# source://concurrent-ruby//lib/concurrent-ruby/concurrent/hash.rb#16 +Concurrent::HashImplementation = Hash + +# `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 + +# 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) + +# 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; 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) + +# 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 diff --git a/sorbet/rbi/gems/connection_pool@2.4.1.rbi b/sorbet/rbi/gems/connection_pool@2.4.1.rbi new file mode 100644 index 0000000..9beb272 --- /dev/null +++ b/sorbet/rbi/gems/connection_pool@2.4.1.rbi @@ -0,0 +1,273 @@ +# 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`. + +# Generic connection pool class for sharing a limited number of objects or network connections +# among many threads. Note: pool elements are lazily created. +# +# Example usage with block (faster): +# +# @pool = ConnectionPool.new { Redis.new } +# @pool.with do |redis| +# redis.lpop('my-list') if redis.llen('my-list') > 0 +# end +# +# Using optional timeout override (for that single invocation) +# +# @pool.with(timeout: 2.0) do |redis| +# redis.lpop('my-list') if redis.llen('my-list') > 0 +# end +# +# Example usage replacing an existing connection (slower): +# +# $redis = ConnectionPool.wrap { Redis.new } +# +# def do_work +# $redis.lpop('my-list') if $redis.llen('my-list') > 0 +# end +# +# Accepts the following options: +# - :size - number of connections to pool, defaults to 5 +# - :timeout - amount of time to wait for a connection if none currently available, defaults to 5 seconds +# - :auto_reload_after_fork - automatically drop all connections after fork, defaults to true +# +# source://connection_pool//lib/connection_pool/version.rb#1 +class ConnectionPool + # @raise [ArgumentError] + # @return [ConnectionPool] a new instance of ConnectionPool + # + # source://connection_pool//lib/connection_pool.rb#90 + def initialize(options = T.unsafe(nil), &block); end + + # Automatically drop all connections after fork + # + # source://connection_pool//lib/connection_pool.rb#166 + def auto_reload_after_fork; end + + # Number of pool entries available for checkout at this instant. + # + # source://connection_pool//lib/connection_pool.rb#169 + def available; end + + # source://connection_pool//lib/connection_pool.rb#129 + def checkin(force: T.unsafe(nil)); end + + # source://connection_pool//lib/connection_pool.rb#119 + def checkout(options = T.unsafe(nil)); end + + # Reloads the ConnectionPool by passing each connection to +block+ and then + # removing it the pool. Subsequent checkouts will create new connections as + # needed. + # + # source://connection_pool//lib/connection_pool.rb#159 + def reload(&block); end + + # Shuts down the ConnectionPool by passing each connection to +block+ and + # then removing it from the pool. Attempting to checkout a connection after + # shutdown will raise +ConnectionPool::PoolShuttingDownError+. + # + # source://connection_pool//lib/connection_pool.rb#150 + def shutdown(&block); end + + # Size of this connection pool + # + # source://connection_pool//lib/connection_pool.rb#164 + def size; end + + # source://connection_pool//lib/connection_pool.rb#105 + def then(options = T.unsafe(nil)); end + + # source://connection_pool//lib/connection_pool.rb#105 + def with(options = T.unsafe(nil)); end + + class << self + # source://connection_pool//lib/connection_pool.rb#52 + def after_fork; end + + # source://connection_pool//lib/connection_pool.rb#44 + def wrap(options, &block); end + end +end + +# source://connection_pool//lib/connection_pool.rb#42 +ConnectionPool::DEFAULTS = T.let(T.unsafe(nil), Hash) + +# source://connection_pool//lib/connection_pool.rb#5 +class ConnectionPool::Error < ::RuntimeError; end + +# source://connection_pool//lib/connection_pool.rb#70 +module ConnectionPool::ForkTracker + # source://connection_pool//lib/connection_pool.rb#71 + def _fork; end +end + +# source://connection_pool//lib/connection_pool.rb#49 +ConnectionPool::INSTANCES = T.let(T.unsafe(nil), ObjectSpace::WeakMap) + +# source://connection_pool//lib/connection_pool.rb#7 +class ConnectionPool::PoolShuttingDownError < ::ConnectionPool::Error; end + +# Examples: +# +# ts = TimedStack.new(1) { MyConnection.new } +# +# # fetch a connection +# conn = ts.pop +# +# # return a connection +# ts.push conn +# +# conn = ts.pop +# ts.pop timeout: 5 +# #=> raises ConnectionPool::TimeoutError after 5 seconds +# +# source://connection_pool//lib/connection_pool/timed_stack.rb#20 +class ConnectionPool::TimedStack + # Creates a new pool with +size+ connections that are created from the given + # +block+. + # + # @return [TimedStack] a new instance of TimedStack + # + # source://connection_pool//lib/connection_pool/timed_stack.rb#27 + def initialize(size = T.unsafe(nil), &block); end + + # Returns +obj+ to the stack. +options+ is ignored in TimedStack but may be + # used by subclasses that extend TimedStack. + # + # source://connection_pool//lib/connection_pool/timed_stack.rb#41 + def <<(obj, options = T.unsafe(nil)); end + + # Returns +true+ if there are no available connections. + # + # @return [Boolean] + # + # source://connection_pool//lib/connection_pool/timed_stack.rb#104 + def empty?; end + + # The number of connections available on the stack. + # + # source://connection_pool//lib/connection_pool/timed_stack.rb#111 + def length; end + + # Returns the value of attribute max. + # + # source://connection_pool//lib/connection_pool/timed_stack.rb#21 + def max; end + + # Retrieves a connection from the stack. If a connection is available it is + # immediately returned. If no connection is available within the given + # timeout a ConnectionPool::TimeoutError is raised. + # + # +:timeout+ is the only checked entry in +options+ and is preferred over + # the +timeout+ argument (which will be removed in a future release). Other + # options may be used by subclasses that extend TimedStack. + # + # source://connection_pool//lib/connection_pool/timed_stack.rb#63 + def pop(timeout = T.unsafe(nil), options = T.unsafe(nil)); end + + # Returns +obj+ to the stack. +options+ is ignored in TimedStack but may be + # used by subclasses that extend TimedStack. + # + # source://connection_pool//lib/connection_pool/timed_stack.rb#41 + def push(obj, options = T.unsafe(nil)); end + + # Shuts down the TimedStack by passing each connection to +block+ and then + # removing it from the pool. Attempting to checkout a connection after + # shutdown will raise +ConnectionPool::PoolShuttingDownError+ unless + # +:reload+ is +true+. + # + # @raise [ArgumentError] + # + # source://connection_pool//lib/connection_pool/timed_stack.rb#89 + def shutdown(reload: T.unsafe(nil), &block); end + + private + + # This is an extension point for TimedStack and is called with a mutex. + # + # This method must returns true if a connection is available on the stack. + # + # @return [Boolean] + # + # source://connection_pool//lib/connection_pool/timed_stack.rb#126 + def connection_stored?(options = T.unsafe(nil)); end + + # source://connection_pool//lib/connection_pool/timed_stack.rb#117 + def current_time; end + + # This is an extension point for TimedStack and is called with a mutex. + # + # This method must return a connection from the stack. + # + # source://connection_pool//lib/connection_pool/timed_stack.rb#135 + def fetch_connection(options = T.unsafe(nil)); end + + # This is an extension point for TimedStack and is called with a mutex. + # + # This method must shut down all connections on the stack. + # + # source://connection_pool//lib/connection_pool/timed_stack.rb#144 + def shutdown_connections(options = T.unsafe(nil)); end + + # This is an extension point for TimedStack and is called with a mutex. + # + # This method must return +obj+ to the stack. + # + # source://connection_pool//lib/connection_pool/timed_stack.rb#157 + def store_connection(obj, options = T.unsafe(nil)); end + + # This is an extension point for TimedStack and is called with a mutex. + # + # This method must create a connection if and only if the total number of + # connections allowed has not been met. + # + # source://connection_pool//lib/connection_pool/timed_stack.rb#167 + def try_create(options = T.unsafe(nil)); end +end + +# source://connection_pool//lib/connection_pool.rb#9 +class ConnectionPool::TimeoutError < ::Timeout::Error; end + +# source://connection_pool//lib/connection_pool/version.rb#2 +ConnectionPool::VERSION = T.let(T.unsafe(nil), String) + +# source://connection_pool//lib/connection_pool/wrapper.rb#2 +class ConnectionPool::Wrapper < ::BasicObject + # @return [Wrapper] a new instance of Wrapper + # + # source://connection_pool//lib/connection_pool/wrapper.rb#5 + def initialize(options = T.unsafe(nil), &block); end + + # source://connection_pool//lib/connection_pool/wrapper.rb#35 + def method_missing(name, *args, **kwargs, &block); end + + # source://connection_pool//lib/connection_pool/wrapper.rb#25 + def pool_available; end + + # source://connection_pool//lib/connection_pool/wrapper.rb#17 + def pool_shutdown(&block); end + + # source://connection_pool//lib/connection_pool/wrapper.rb#21 + def pool_size; end + + # @return [Boolean] + # + # source://connection_pool//lib/connection_pool/wrapper.rb#29 + def respond_to?(id, *args); end + + # source://connection_pool//lib/connection_pool/wrapper.rb#13 + def with(&block); end + + # source://connection_pool//lib/connection_pool/wrapper.rb#9 + def wrapped_pool; end +end + +# source://connection_pool//lib/connection_pool/wrapper.rb#3 +ConnectionPool::Wrapper::METHODS = T.let(T.unsafe(nil), Array) + +module Process + extend ::RedisClient::PIDCache::CoreExt + extend ::ConnectionPool::ForkTracker +end diff --git a/sorbet/rbi/gems/diff-lcs@1.5.0.rbi b/sorbet/rbi/gems/diff-lcs@1.5.0.rbi new file mode 100644 index 0000000..4e1f791 --- /dev/null +++ b/sorbet/rbi/gems/diff-lcs@1.5.0.rbi @@ -0,0 +1,1083 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `diff-lcs` gem. +# Please instead update this file by running `bin/tapioca gem diff-lcs`. + +# source://diff-lcs//lib/diff/lcs.rb#3 +module Diff; end + +# source://diff-lcs//lib/diff/lcs.rb#51 +module Diff::LCS + # Returns the difference set between +self+ and +other+. See Diff::LCS#diff. + # + # source://diff-lcs//lib/diff/lcs.rb#75 + def diff(other, callbacks = T.unsafe(nil), &block); end + + # Returns an Array containing the longest common subsequence(s) between + # +self+ and +other+. See Diff::LCS#lcs. + # + # lcs = seq1.lcs(seq2) + # + # A note when using objects: Diff::LCS only works properly when each object + # can be used as a key in a Hash, which typically means that the objects must + # implement Object#eql? in a way that two identical values compare + # identically for key purposes. That is: + # + # O.new('a').eql?(O.new('a')) == true + # + # source://diff-lcs//lib/diff/lcs.rb#70 + def lcs(other, &block); end + + # Attempts to patch +self+ with the provided +patchset+. A new sequence based + # on +self+ and the +patchset+ will be created. See Diff::LCS#patch. Attempts + # to autodiscover the direction of the patch. + # + # source://diff-lcs//lib/diff/lcs.rb#101 + def patch(patchset); end + + # Attempts to patch +self+ with the provided +patchset+. A new sequence based + # on +self+ and the +patchset+ will be created. See Diff::LCS#patch. Does no + # patch direction autodiscovery. + # + # source://diff-lcs//lib/diff/lcs.rb#109 + def patch!(patchset); end + + # Attempts to patch +self+ with the provided +patchset+, using #patch!. If + # the sequence this is used on supports #replace, the value of +self+ will be + # replaced. See Diff::LCS#patch. Does no patch direction autodiscovery. + # + # source://diff-lcs//lib/diff/lcs.rb#123 + def patch_me(patchset); end + + # Returns the balanced ("side-by-side") difference set between +self+ and + # +other+. See Diff::LCS#sdiff. + # + # source://diff-lcs//lib/diff/lcs.rb#81 + def sdiff(other, callbacks = T.unsafe(nil), &block); end + + # Traverses the discovered longest common subsequences between +self+ and + # +other+ using the alternate, balanced algorithm. See + # Diff::LCS#traverse_balanced. + # + # source://diff-lcs//lib/diff/lcs.rb#94 + def traverse_balanced(other, callbacks = T.unsafe(nil), &block); end + + # Traverses the discovered longest common subsequences between +self+ and + # +other+. See Diff::LCS#traverse_sequences. + # + # source://diff-lcs//lib/diff/lcs.rb#87 + def traverse_sequences(other, callbacks = T.unsafe(nil), &block); end + + # Attempts to patch +self+ with the provided +patchset+. A new sequence based + # on +self+ and the +patchset+ will be created. See Diff::LCS#patch. Attempts + # to autodiscover the direction of the patch. + # + # source://diff-lcs//lib/diff/lcs.rb#101 + def unpatch(patchset); end + + # Attempts to unpatch +self+ with the provided +patchset+. A new sequence + # based on +self+ and the +patchset+ will be created. See Diff::LCS#unpatch. + # Does no patch direction autodiscovery. + # + # source://diff-lcs//lib/diff/lcs.rb#116 + def unpatch!(patchset); end + + # Attempts to unpatch +self+ with the provided +patchset+, using #unpatch!. + # If the sequence this is used on supports #replace, the value of +self+ will + # be replaced. See Diff::LCS#unpatch. Does no patch direction autodiscovery. + # + # source://diff-lcs//lib/diff/lcs.rb#134 + def unpatch_me(patchset); end + + class << self + # :yields seq1[i] for each matched: + # + # source://diff-lcs//lib/diff/lcs.rb#144 + def LCS(seq1, seq2, &block); end + + # source://diff-lcs//lib/diff/lcs/callbacks.rb#52 + def callbacks_for(callbacks); end + + # #diff computes the smallest set of additions and deletions necessary to + # turn the first sequence into the second, and returns a description of these + # changes. + # + # See Diff::LCS::DiffCallbacks for the default behaviour. An alternate + # behaviour may be implemented with Diff::LCS::ContextDiffCallbacks. If a + # Class argument is provided for +callbacks+, #diff will attempt to + # initialise it. If the +callbacks+ object (possibly initialised) responds to + # #finish, it will be called. + # + # source://diff-lcs//lib/diff/lcs.rb#168 + def diff(seq1, seq2, callbacks = T.unsafe(nil), &block); end + + # :yields seq1[i] for each matched: + # + # source://diff-lcs//lib/diff/lcs.rb#144 + def lcs(seq1, seq2, &block); end + + # Applies a +patchset+ to the sequence +src+ according to the +direction+ + # (:patch or :unpatch), producing a new sequence. + # + # If the +direction+ is not specified, Diff::LCS::patch will attempt to + # discover the direction of the +patchset+. + # + # A +patchset+ can be considered to apply forward (:patch) if the + # following expression is true: + # + # patch(s1, diff(s1, s2)) -> s2 + # + # A +patchset+ can be considered to apply backward (:unpatch) if the + # following expression is true: + # + # patch(s2, diff(s1, s2)) -> s1 + # + # If the +patchset+ contains no changes, the +src+ value will be returned as + # either src.dup or +src+. A +patchset+ can be deemed as having no + # changes if the following predicate returns true: + # + # patchset.empty? or + # patchset.flatten(1).all? { |change| change.unchanged? } + # + # === Patchsets + # + # A +patchset+ is always an enumerable sequence of changes, hunks of changes, + # or a mix of the two. A hunk of changes is an enumerable sequence of + # changes: + # + # [ # patchset + # # change + # [ # hunk + # # change + # ] + # ] + # + # The +patch+ method accepts patchsets that are enumerable sequences + # containing either Diff::LCS::Change objects (or a subclass) or the array + # representations of those objects. Prior to application, array + # representations of Diff::LCS::Change objects will be reified. + # + # source://diff-lcs//lib/diff/lcs.rb#624 + def patch(src, patchset, direction = T.unsafe(nil)); end + + # Given a set of patchset, convert the current version to the next version. + # Does no auto-discovery. + # + # source://diff-lcs//lib/diff/lcs.rb#734 + def patch!(src, patchset); end + + # #sdiff computes all necessary components to show two sequences and their + # minimized differences side by side, just like the Unix utility + # sdiff does: + # + # old < - + # same same + # before | after + # - > new + # + # See Diff::LCS::SDiffCallbacks for the default behaviour. An alternate + # behaviour may be implemented with Diff::LCS::ContextDiffCallbacks. If a + # Class argument is provided for +callbacks+, #diff will attempt to + # initialise it. If the +callbacks+ object (possibly initialised) responds to + # #finish, it will be called. + # + # Each element of a returned array is a Diff::LCS::ContextChange object, + # which can be implicitly converted to an array. + # + # Diff::LCS.sdiff(a, b).each do |action, (old_pos, old_element), (new_pos, new_element)| + # case action + # when '!' + # # replace + # when '-' + # # delete + # when '+' + # # insert + # end + # end + # + # source://diff-lcs//lib/diff/lcs.rb#200 + def sdiff(seq1, seq2, callbacks = T.unsafe(nil), &block); end + + # #traverse_balanced is an alternative to #traverse_sequences. It uses a + # different algorithm to iterate through the entries in the computed longest + # common subsequence. Instead of viewing the changes as insertions or + # deletions from one of the sequences, #traverse_balanced will report + # changes between the sequences. + # + # The arguments to #traverse_balanced are the two sequences to traverse and a + # callback object, like this: + # + # traverse_balanced(seq1, seq2, Diff::LCS::ContextDiffCallbacks.new) + # + # #sdiff is implemented with #traverse_balanced. + # + # == Callback Methods + # + # Optional callback methods are emphasized. + # + # callbacks#match:: Called when +a+ and +b+ are pointing to + # common elements in +A+ and +B+. + # callbacks#discard_a:: Called when +a+ is pointing to an + # element not in +B+. + # callbacks#discard_b:: Called when +b+ is pointing to an + # element not in +A+. + # callbacks#change:: Called when +a+ and +b+ are pointing to + # the same relative position, but + # A[a] and B[b] are not + # the same; a change has + # occurred. + # + # #traverse_balanced might be a bit slower than #traverse_sequences, + # noticable only while processing huge amounts of data. + # + # == Algorithm + # + # a---+ + # v + # A = a b c e h j l m n p + # B = b c d e f j k l m r s t + # ^ + # b---+ + # + # === Matches + # + # If there are two arrows (+a+ and +b+) pointing to elements of sequences +A+ + # and +B+, the arrows will initially point to the first elements of their + # respective sequences. #traverse_sequences will advance the arrows through + # the sequences one element at a time, calling a method on the user-specified + # callback object before each advance. It will advance the arrows in such a + # way that if there are elements A[i] and B[j] which are + # both equal and part of the longest common subsequence, there will be some + # moment during the execution of #traverse_sequences when arrow +a+ is + # pointing to A[i] and arrow +b+ is pointing to B[j]. When + # this happens, #traverse_sequences will call callbacks#match and + # then it will advance both arrows. + # + # === Discards + # + # Otherwise, one of the arrows is pointing to an element of its sequence that + # is not part of the longest common subsequence. #traverse_sequences will + # advance that arrow and will call callbacks#discard_a or + # callbacks#discard_b, depending on which arrow it advanced. + # + # === Changes + # + # If both +a+ and +b+ point to elements that are not part of the longest + # common subsequence, then #traverse_sequences will try to call + # callbacks#change and advance both arrows. If + # callbacks#change is not implemented, then + # callbacks#discard_a and callbacks#discard_b will be + # called in turn. + # + # The methods for callbacks#match, callbacks#discard_a, + # callbacks#discard_b, and callbacks#change are invoked + # with an event comprising the action ("=", "+", "-", or "!", respectively), + # the indicies +i+ and +j+, and the elements A[i] and B[j]. + # Return values are discarded by #traverse_balanced. + # + # === Context + # + # Note that +i+ and +j+ may not be the same index position, even if +a+ and + # +b+ are considered to be pointing to matching or changed elements. + # + # source://diff-lcs//lib/diff/lcs.rb#475 + def traverse_balanced(seq1, seq2, callbacks = T.unsafe(nil)); end + + # #traverse_sequences is the most general facility provided by this module; + # #diff and #lcs are implemented as calls to it. + # + # The arguments to #traverse_sequences are the two sequences to traverse, and + # a callback object, like this: + # + # traverse_sequences(seq1, seq2, Diff::LCS::ContextDiffCallbacks.new) + # + # == Callback Methods + # + # Optional callback methods are emphasized. + # + # callbacks#match:: Called when +a+ and +b+ are pointing to + # common elements in +A+ and +B+. + # callbacks#discard_a:: Called when +a+ is pointing to an + # element not in +B+. + # callbacks#discard_b:: Called when +b+ is pointing to an + # element not in +A+. + # callbacks#finished_a:: Called when +a+ has reached the end of + # sequence +A+. + # callbacks#finished_b:: Called when +b+ has reached the end of + # sequence +B+. + # + # == Algorithm + # + # a---+ + # v + # A = a b c e h j l m n p + # B = b c d e f j k l m r s t + # ^ + # b---+ + # + # If there are two arrows (+a+ and +b+) pointing to elements of sequences +A+ + # and +B+, the arrows will initially point to the first elements of their + # respective sequences. #traverse_sequences will advance the arrows through + # the sequences one element at a time, calling a method on the user-specified + # callback object before each advance. It will advance the arrows in such a + # way that if there are elements A[i] and B[j] which are + # both equal and part of the longest common subsequence, there will be some + # moment during the execution of #traverse_sequences when arrow +a+ is + # pointing to A[i] and arrow +b+ is pointing to B[j]. When + # this happens, #traverse_sequences will call callbacks#match and + # then it will advance both arrows. + # + # Otherwise, one of the arrows is pointing to an element of its sequence that + # is not part of the longest common subsequence. #traverse_sequences will + # advance that arrow and will call callbacks#discard_a or + # callbacks#discard_b, depending on which arrow it advanced. If both + # arrows point to elements that are not part of the longest common + # subsequence, then #traverse_sequences will advance arrow +a+ and call the + # appropriate callback, then it will advance arrow +b+ and call the appropriate + # callback. + # + # The methods for callbacks#match, callbacks#discard_a, and + # callbacks#discard_b are invoked with an event comprising the + # action ("=", "+", or "-", respectively), the indicies +i+ and +j+, and the + # elements A[i] and B[j]. Return values are discarded by + # #traverse_sequences. + # + # === End of Sequences + # + # If arrow +a+ reaches the end of its sequence before arrow +b+ does, + # #traverse_sequence will try to call callbacks#finished_a with the + # last index and element of +A+ (A[-1]) and the current index and + # element of +B+ (B[j]). If callbacks#finished_a does not + # exist, then callbacks#discard_b will be called on each element of + # +B+ until the end of the sequence is reached (the call will be done with + # A[-1] and B[j] for each element). + # + # If +b+ reaches the end of +B+ before +a+ reaches the end of +A+, + # callbacks#finished_b will be called with the current index and + # element of +A+ (A[i]) and the last index and element of +B+ + # (A[-1]). Again, if callbacks#finished_b does not exist on + # the callback object, then callbacks#discard_a will be called on + # each element of +A+ until the end of the sequence is reached (A[i] + # and B[-1]). + # + # There is a chance that one additional callbacks#discard_a or + # callbacks#discard_b will be called after the end of the sequence + # is reached, if +a+ has not yet reached the end of +A+ or +b+ has not yet + # reached the end of +B+. + # + # source://diff-lcs//lib/diff/lcs.rb#285 + def traverse_sequences(seq1, seq2, callbacks = T.unsafe(nil)); end + + # Given a set of patchset, convert the current version to the prior version. + # Does no auto-discovery. + # + # source://diff-lcs//lib/diff/lcs.rb#728 + def unpatch!(src, patchset); end + + private + + # source://diff-lcs//lib/diff/lcs/internals.rb#4 + def diff_traversal(method, seq1, seq2, callbacks, &block); end + end +end + +# An alias for DefaultCallbacks that is used in +# Diff::LCS#traverse_balanced. +# +# Diff::LCS.LCS(seq1, seq2, Diff::LCS::BalancedCallbacks) +# +# source://diff-lcs//lib/diff/lcs/callbacks.rb#50 +Diff::LCS::BalancedCallbacks = Diff::LCS::DefaultCallbacks + +# A block is an operation removing, adding, or changing a group of items. +# Basically, this is just a list of changes, where each change adds or +# deletes a single item. Used by bin/ldiff. +# +# source://diff-lcs//lib/diff/lcs/block.rb#6 +class Diff::LCS::Block + # @return [Block] a new instance of Block + # + # source://diff-lcs//lib/diff/lcs/block.rb#9 + def initialize(chunk); end + + # Returns the value of attribute changes. + # + # source://diff-lcs//lib/diff/lcs/block.rb#7 + def changes; end + + # source://diff-lcs//lib/diff/lcs/block.rb#21 + def diff_size; end + + # Returns the value of attribute insert. + # + # source://diff-lcs//lib/diff/lcs/block.rb#7 + def insert; end + + # source://diff-lcs//lib/diff/lcs/block.rb#25 + def op; end + + # Returns the value of attribute remove. + # + # source://diff-lcs//lib/diff/lcs/block.rb#7 + def remove; end +end + +# Represents a simplistic (non-contextual) change. Represents the removal or +# addition of an element from either the old or the new sequenced +# enumerable. +# +# source://diff-lcs//lib/diff/lcs/change.rb#6 +class Diff::LCS::Change + include ::Comparable + + # @return [Change] a new instance of Change + # + # source://diff-lcs//lib/diff/lcs/change.rb#27 + def initialize(*args); end + + # source://diff-lcs//lib/diff/lcs/change.rb#65 + def <=>(other); end + + # source://diff-lcs//lib/diff/lcs/change.rb#58 + def ==(other); end + + # Returns the action this Change represents. + # + # source://diff-lcs//lib/diff/lcs/change.rb#20 + def action; end + + # @return [Boolean] + # + # source://diff-lcs//lib/diff/lcs/change.rb#72 + def adding?; end + + # @return [Boolean] + # + # source://diff-lcs//lib/diff/lcs/change.rb#84 + def changed?; end + + # @return [Boolean] + # + # source://diff-lcs//lib/diff/lcs/change.rb#76 + def deleting?; end + + # Returns the sequence element of the Change. + # + # source://diff-lcs//lib/diff/lcs/change.rb#25 + def element; end + + # @return [Boolean] + # + # source://diff-lcs//lib/diff/lcs/change.rb#88 + def finished_a?; end + + # @return [Boolean] + # + # source://diff-lcs//lib/diff/lcs/change.rb#92 + def finished_b?; end + + # source://diff-lcs//lib/diff/lcs/change.rb#34 + def inspect(*_args); end + + # Returns the position of the Change. + # + # source://diff-lcs//lib/diff/lcs/change.rb#23 + def position; end + + # source://diff-lcs//lib/diff/lcs/change.rb#38 + def to_a; end + + # source://diff-lcs//lib/diff/lcs/change.rb#38 + def to_ary; end + + # @return [Boolean] + # + # source://diff-lcs//lib/diff/lcs/change.rb#80 + def unchanged?; end + + class << self + # source://diff-lcs//lib/diff/lcs/change.rb#44 + def from_a(arr); end + + # @return [Boolean] + # + # source://diff-lcs//lib/diff/lcs/change.rb#15 + def valid_action?(action); end + end +end + +# source://diff-lcs//lib/diff/lcs/change.rb#7 +Diff::LCS::Change::IntClass = Integer + +# The only actions valid for changes are '+' (add), '-' (delete), '=' +# (no change), '!' (changed), '<' (tail changes from first sequence), or +# '>' (tail changes from second sequence). The last two ('<>') are only +# found with Diff::LCS::diff and Diff::LCS::sdiff. +# +# source://diff-lcs//lib/diff/lcs/change.rb#13 +Diff::LCS::Change::VALID_ACTIONS = T.let(T.unsafe(nil), Array) + +# Represents a contextual change. Contains the position and values of the +# elements in the old and the new sequenced enumerables as well as the action +# taken. +# +# source://diff-lcs//lib/diff/lcs/change.rb#100 +class Diff::LCS::ContextChange < ::Diff::LCS::Change + # @return [ContextChange] a new instance of ContextChange + # + # source://diff-lcs//lib/diff/lcs/change.rb#114 + def initialize(*args); end + + # source://diff-lcs//lib/diff/lcs/change.rb#166 + def <=>(other); end + + # source://diff-lcs//lib/diff/lcs/change.rb#157 + def ==(other); end + + # Returns the new element being changed. + # + # source://diff-lcs//lib/diff/lcs/change.rb#112 + def new_element; end + + # Returns the new position being changed. + # + # source://diff-lcs//lib/diff/lcs/change.rb#108 + def new_position; end + + # Returns the old element being changed. + # + # source://diff-lcs//lib/diff/lcs/change.rb#110 + def old_element; end + + # Returns the old position being changed. + # + # source://diff-lcs//lib/diff/lcs/change.rb#106 + def old_position; end + + # source://diff-lcs//lib/diff/lcs/change.rb#122 + def to_a; end + + # source://diff-lcs//lib/diff/lcs/change.rb#122 + def to_ary; end + + class << self + # source://diff-lcs//lib/diff/lcs/change.rb#132 + def from_a(arr); end + + # Simplifies a context change for use in some diff callbacks. '<' actions + # are converted to '-' and '>' actions are converted to '+'. + # + # source://diff-lcs//lib/diff/lcs/change.rb#138 + def simplify(event); end + end +end + +# This will produce a compound array of contextual diff change objects. Each +# element in the #diffs array is a "hunk" array, where each element in each +# "hunk" array is a single change. Each change is a Diff::LCS::ContextChange +# that contains both the old index and new index values for the change. The +# "hunk" provides the full context for the changes. Both old and new objects +# will be presented for changed objects. +nil+ will be substituted for a +# discarded object. +# +# seq1 = %w(a b c e h j l m n p) +# seq2 = %w(b c d e f j k l m r s t) +# +# diffs = Diff::LCS.diff(seq1, seq2, Diff::LCS::ContextDiffCallbacks) +# # This example shows a simplified array format. +# # [ [ [ '-', [ 0, 'a' ], [ 0, nil ] ] ], # 1 +# # [ [ '+', [ 3, nil ], [ 2, 'd' ] ] ], # 2 +# # [ [ '-', [ 4, 'h' ], [ 4, nil ] ], # 3 +# # [ '+', [ 5, nil ], [ 4, 'f' ] ] ], +# # [ [ '+', [ 6, nil ], [ 6, 'k' ] ] ], # 4 +# # [ [ '-', [ 8, 'n' ], [ 9, nil ] ], # 5 +# # [ '+', [ 9, nil ], [ 9, 'r' ] ], +# # [ '-', [ 9, 'p' ], [ 10, nil ] ], +# # [ '+', [ 10, nil ], [ 10, 's' ] ], +# # [ '+', [ 10, nil ], [ 11, 't' ] ] ] ] +# +# The five hunks shown are comprised of individual changes; if there is a +# related set of changes, they are still shown individually. +# +# This callback can also be used with Diff::LCS#sdiff, which will produce +# results like: +# +# diffs = Diff::LCS.sdiff(seq1, seq2, Diff::LCS::ContextCallbacks) +# # This example shows a simplified array format. +# # [ [ [ "-", [ 0, "a" ], [ 0, nil ] ] ], # 1 +# # [ [ "+", [ 3, nil ], [ 2, "d" ] ] ], # 2 +# # [ [ "!", [ 4, "h" ], [ 4, "f" ] ] ], # 3 +# # [ [ "+", [ 6, nil ], [ 6, "k" ] ] ], # 4 +# # [ [ "!", [ 8, "n" ], [ 9, "r" ] ], # 5 +# # [ "!", [ 9, "p" ], [ 10, "s" ] ], +# # [ "+", [ 10, nil ], [ 11, "t" ] ] ] ] +# +# The five hunks are still present, but are significantly shorter in total +# presentation, because changed items are shown as changes ("!") instead of +# potentially "mismatched" pairs of additions and deletions. +# +# The result of this operation is similar to that of +# Diff::LCS::SDiffCallbacks. They may be compared as: +# +# s = Diff::LCS.sdiff(seq1, seq2).reject { |e| e.action == "=" } +# c = Diff::LCS.sdiff(seq1, seq2, Diff::LCS::ContextDiffCallbacks).flatten(1) +# +# s == c # -> true +# +# === Use +# +# This callback object must be initialised and can be used by the +# Diff::LCS#diff or Diff::LCS#sdiff methods. +# +# cbo = Diff::LCS::ContextDiffCallbacks.new +# Diff::LCS.LCS(seq1, seq2, cbo) +# cbo.finish +# +# Note that the call to #finish is absolutely necessary, or the last set of +# changes will not be visible. Alternatively, can be used as: +# +# cbo = Diff::LCS::ContextDiffCallbacks.new { |tcbo| Diff::LCS.LCS(seq1, seq2, tcbo) } +# +# The necessary #finish call will be made. +# +# === Simplified Array Format +# +# The simplified array format used in the example above can be obtained +# with: +# +# require 'pp' +# pp diffs.map { |e| e.map { |f| f.to_a } } +# +# source://diff-lcs//lib/diff/lcs/callbacks.rb#223 +class Diff::LCS::ContextDiffCallbacks < ::Diff::LCS::DiffCallbacks + # source://diff-lcs//lib/diff/lcs/callbacks.rb#232 + def change(event); end + + # source://diff-lcs//lib/diff/lcs/callbacks.rb#224 + def discard_a(event); end + + # source://diff-lcs//lib/diff/lcs/callbacks.rb#228 + def discard_b(event); end +end + +# This callback object implements the default set of callback events, +# which only returns the event itself. Note that #finished_a and +# #finished_b are not implemented -- I haven't yet figured out where they +# would be useful. +# +# Note that this is intended to be called as is, e.g., +# +# Diff::LCS.LCS(seq1, seq2, Diff::LCS::DefaultCallbacks) +# +# source://diff-lcs//lib/diff/lcs/callbacks.rb#14 +class Diff::LCS::DefaultCallbacks + class << self + # Called when both the old and new values have changed. + # + # source://diff-lcs//lib/diff/lcs/callbacks.rb#32 + def change(event); end + + # Called when the old value is discarded in favour of the new value. + # + # source://diff-lcs//lib/diff/lcs/callbacks.rb#22 + def discard_a(event); end + + # Called when the new value is discarded in favour of the old value. + # + # source://diff-lcs//lib/diff/lcs/callbacks.rb#27 + def discard_b(event); end + + # Called when two items match. + # + # source://diff-lcs//lib/diff/lcs/callbacks.rb#17 + def match(event); end + + private + + def new(*_arg0); end + end +end + +# This will produce a compound array of simple diff change objects. Each +# element in the #diffs array is a +hunk+ or +hunk+ array, where each +# element in each +hunk+ array is a single Change object representing the +# addition or removal of a single element from one of the two tested +# sequences. The +hunk+ provides the full context for the changes. +# +# diffs = Diff::LCS.diff(seq1, seq2) +# # This example shows a simplified array format. +# # [ [ [ '-', 0, 'a' ] ], # 1 +# # [ [ '+', 2, 'd' ] ], # 2 +# # [ [ '-', 4, 'h' ], # 3 +# # [ '+', 4, 'f' ] ], +# # [ [ '+', 6, 'k' ] ], # 4 +# # [ [ '-', 8, 'n' ], # 5 +# # [ '-', 9, 'p' ], +# # [ '+', 9, 'r' ], +# # [ '+', 10, 's' ], +# # [ '+', 11, 't' ] ] ] +# +# There are five hunks here. The first hunk says that the +a+ at position 0 +# of the first sequence should be deleted ('-'). The second hunk +# says that the +d+ at position 2 of the second sequence should be inserted +# ('+'). The third hunk says that the +h+ at position 4 of the +# first sequence should be removed and replaced with the +f+ from position 4 +# of the second sequence. The other two hunks are described similarly. +# +# === Use +# +# This callback object must be initialised and is used by the Diff::LCS#diff +# method. +# +# cbo = Diff::LCS::DiffCallbacks.new +# Diff::LCS.LCS(seq1, seq2, cbo) +# cbo.finish +# +# Note that the call to #finish is absolutely necessary, or the last set of +# changes will not be visible. Alternatively, can be used as: +# +# cbo = Diff::LCS::DiffCallbacks.new { |tcbo| Diff::LCS.LCS(seq1, seq2, tcbo) } +# +# The necessary #finish call will be made. +# +# === Simplified Array Format +# +# The simplified array format used in the example above can be obtained +# with: +# +# require 'pp' +# pp diffs.map { |e| e.map { |f| f.to_a } } +# +# source://diff-lcs//lib/diff/lcs/callbacks.rb#106 +class Diff::LCS::DiffCallbacks + # :yields self: + # + # @return [DiffCallbacks] a new instance of DiffCallbacks + # + # source://diff-lcs//lib/diff/lcs/callbacks.rb#110 + def initialize; end + + # Returns the difference set collected during the diff process. + # + # source://diff-lcs//lib/diff/lcs/callbacks.rb#108 + def diffs; end + + # source://diff-lcs//lib/diff/lcs/callbacks.rb#133 + def discard_a(event); end + + # source://diff-lcs//lib/diff/lcs/callbacks.rb#137 + def discard_b(event); end + + # Finalizes the diff process. If an unprocessed hunk still exists, then it + # is appended to the diff list. + # + # source://diff-lcs//lib/diff/lcs/callbacks.rb#125 + def finish; end + + # source://diff-lcs//lib/diff/lcs/callbacks.rb#129 + def match(_event); end + + private + + # source://diff-lcs//lib/diff/lcs/callbacks.rb#141 + def finish_hunk; end +end + +# A Hunk is a group of Blocks which overlap because of the context surrounding +# each block. (So if we're not using context, every hunk will contain one +# block.) Used in the diff program (bin/ldiff). +# +# source://diff-lcs//lib/diff/lcs/hunk.rb#8 +class Diff::LCS::Hunk + # Create a hunk using references to both the old and new data, as well as the + # piece of data. + # + # @return [Hunk] a new instance of Hunk + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#16 + def initialize(data_old, data_new, piece, flag_context, file_length_difference); end + + # Returns the value of attribute blocks. + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#63 + def blocks; end + + # Returns a diff string based on a format. + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#116 + def diff(format, last = T.unsafe(nil)); end + + # Returns the value of attribute end_new. + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#65 + def end_new; end + + # Returns the value of attribute end_old. + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#65 + def end_old; end + + # Returns the value of attribute file_length_difference. + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#66 + def file_length_difference; end + + # Change the "start" and "end" fields to note that context should be added + # to this hunk. + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#70 + def flag_context; end + + # source://diff-lcs//lib/diff/lcs/hunk.rb#72 + def flag_context=(context); end + + # Merges this hunk and the provided hunk together if they overlap. Returns + # a truthy value so that if there is no overlap, you can know the merge + # was skipped. + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#98 + def merge(hunk); end + + # @return [Boolean] + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#326 + def missing_last_newline?(data); end + + # Determines whether there is an overlap between this hunk and the + # provided hunk. This will be true if the difference between the two hunks + # start or end positions is within one position of each other. + # + # @return [Boolean] + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#110 + def overlaps?(hunk); end + + # Returns the value of attribute start_new. + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#64 + def start_new; end + + # Returns the value of attribute start_old. + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#64 + def start_old; end + + # Merges this hunk and the provided hunk together if they overlap. Returns + # a truthy value so that if there is no overlap, you can know the merge + # was skipped. + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#98 + def unshift(hunk); end + + private + + # source://diff-lcs//lib/diff/lcs/hunk.rb#213 + def context_diff(last = T.unsafe(nil)); end + + # Generate a range of item numbers to print. Only print 1 number if the + # range has only one item in it. Otherwise, it's 'start,end' + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#293 + def context_range(mode, op, last = T.unsafe(nil)); end + + # source://diff-lcs//lib/diff/lcs/hunk.rb#271 + def ed_diff(format, _last = T.unsafe(nil)); end + + # source://diff-lcs//lib/diff/lcs/hunk.rb#339 + def encode(literal, target_encoding = T.unsafe(nil)); end + + # source://diff-lcs//lib/diff/lcs/hunk.rb#343 + def encode_as(string, *args); end + + # Note that an old diff can't have any context. Therefore, we know that + # there's only one block in the hunk. + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#135 + def old_diff(_last = T.unsafe(nil)); end + + # source://diff-lcs//lib/diff/lcs/hunk.rb#160 + def unified_diff(last = T.unsafe(nil)); end + + # Generate a range of item numbers to print for unified diff. Print number + # where block starts, followed by number of lines in the block + # (don't print number of lines if it's 1) + # + # source://diff-lcs//lib/diff/lcs/hunk.rb#311 + def unified_range(mode, last); end +end + +# source://diff-lcs//lib/diff/lcs/hunk.rb#10 +Diff::LCS::Hunk::ED_DIFF_OP_ACTION = T.let(T.unsafe(nil), Hash) + +# source://diff-lcs//lib/diff/lcs/hunk.rb#9 +Diff::LCS::Hunk::OLD_DIFF_OP_ACTION = T.let(T.unsafe(nil), Hash) + +# source://diff-lcs//lib/diff/lcs/internals.rb#29 +module Diff::LCS::Internals + class << self + # This method will analyze the provided patchset to provide a single-pass + # normalization (conversion of the array form of Diff::LCS::Change objects to + # the object form of same) and detection of whether the patchset represents + # changes to be made. + # + # source://diff-lcs//lib/diff/lcs/internals.rb#102 + def analyze_patchset(patchset, depth = T.unsafe(nil)); end + + # Examine the patchset and the source to see in which direction the + # patch should be applied. + # + # WARNING: By default, this examines the whole patch, so this could take + # some time. This also works better with Diff::LCS::ContextChange or + # Diff::LCS::Change as its source, as an array will cause the creation + # of one of the above. + # + # source://diff-lcs//lib/diff/lcs/internals.rb#147 + def intuit_diff_direction(src, patchset, limit = T.unsafe(nil)); end + + # Compute the longest common subsequence between the sequenced + # Enumerables +a+ and +b+. The result is an array whose contents is such + # that + # + # result = Diff::LCS::Internals.lcs(a, b) + # result.each_with_index do |e, i| + # assert_equal(a[i], b[e]) unless e.nil? + # end + # + # source://diff-lcs//lib/diff/lcs/internals.rb#41 + def lcs(a, b); end + + private + + # If +vector+ maps the matching elements of another collection onto this + # Enumerable, compute the inverse of +vector+ that maps this Enumerable + # onto the collection. (Currently unused.) + # + # source://diff-lcs//lib/diff/lcs/internals.rb#286 + def inverse_vector(a, vector); end + + # Returns a hash mapping each element of an Enumerable to the set of + # positions it occupies in the Enumerable, optionally restricted to the + # elements specified in the range of indexes specified by +interval+. + # + # source://diff-lcs//lib/diff/lcs/internals.rb#298 + def position_hash(enum, interval); end + + # Find the place at which +value+ would normally be inserted into the + # Enumerable. If that place is already occupied by +value+, do nothing + # and return +nil+. If the place does not exist (i.e., it is off the end + # of the Enumerable), add it to the end. Otherwise, replace the element + # at that point with +value+. It is assumed that the Enumerable's values + # are numeric. + # + # This operation preserves the sort order. + # + # source://diff-lcs//lib/diff/lcs/internals.rb#252 + def replace_next_larger(enum, value, last_index = T.unsafe(nil)); end + end +end + +# This will produce a simple array of diff change objects. Each element in +# the #diffs array is a single ContextChange. In the set of #diffs provided +# by SDiffCallbacks, both old and new objects will be presented for both +# changed and unchanged objects. +nil+ will be substituted +# for a discarded object. +# +# The diffset produced by this callback, when provided to Diff::LCS#sdiff, +# will compute and display the necessary components to show two sequences +# and their minimized differences side by side, just like the Unix utility +# +sdiff+. +# +# same same +# before | after +# old < - +# - > new +# +# seq1 = %w(a b c e h j l m n p) +# seq2 = %w(b c d e f j k l m r s t) +# +# diffs = Diff::LCS.sdiff(seq1, seq2) +# # This example shows a simplified array format. +# # [ [ "-", [ 0, "a"], [ 0, nil ] ], +# # [ "=", [ 1, "b"], [ 0, "b" ] ], +# # [ "=", [ 2, "c"], [ 1, "c" ] ], +# # [ "+", [ 3, nil], [ 2, "d" ] ], +# # [ "=", [ 3, "e"], [ 3, "e" ] ], +# # [ "!", [ 4, "h"], [ 4, "f" ] ], +# # [ "=", [ 5, "j"], [ 5, "j" ] ], +# # [ "+", [ 6, nil], [ 6, "k" ] ], +# # [ "=", [ 6, "l"], [ 7, "l" ] ], +# # [ "=", [ 7, "m"], [ 8, "m" ] ], +# # [ "!", [ 8, "n"], [ 9, "r" ] ], +# # [ "!", [ 9, "p"], [ 10, "s" ] ], +# # [ "+", [ 10, nil], [ 11, "t" ] ] ] +# +# The result of this operation is similar to that of +# Diff::LCS::ContextDiffCallbacks. They may be compared as: +# +# s = Diff::LCS.sdiff(seq1, seq2).reject { |e| e.action == "=" } +# c = Diff::LCS.sdiff(seq1, seq2, Diff::LCS::ContextDiffCallbacks).flatten(1) +# +# s == c # -> true +# +# === Use +# +# This callback object must be initialised and is used by the Diff::LCS#sdiff +# method. +# +# cbo = Diff::LCS::SDiffCallbacks.new +# Diff::LCS.LCS(seq1, seq2, cbo) +# +# As with the other initialisable callback objects, +# Diff::LCS::SDiffCallbacks can be initialised with a block. As there is no +# "fininishing" to be done, this has no effect on the state of the object. +# +# cbo = Diff::LCS::SDiffCallbacks.new { |tcbo| Diff::LCS.LCS(seq1, seq2, tcbo) } +# +# === Simplified Array Format +# +# The simplified array format used in the example above can be obtained +# with: +# +# require 'pp' +# pp diffs.map { |e| e.to_a } +# +# source://diff-lcs//lib/diff/lcs/callbacks.rb#301 +class Diff::LCS::SDiffCallbacks + # :yields self: + # + # @return [SDiffCallbacks] a new instance of SDiffCallbacks + # @yield [_self] + # @yieldparam _self [Diff::LCS::SDiffCallbacks] the object that the method was called on + # + # source://diff-lcs//lib/diff/lcs/callbacks.rb#305 + def initialize; end + + # source://diff-lcs//lib/diff/lcs/callbacks.rb#322 + def change(event); end + + # Returns the difference set collected during the diff process. + # + # source://diff-lcs//lib/diff/lcs/callbacks.rb#303 + def diffs; end + + # source://diff-lcs//lib/diff/lcs/callbacks.rb#314 + def discard_a(event); end + + # source://diff-lcs//lib/diff/lcs/callbacks.rb#318 + def discard_b(event); end + + # source://diff-lcs//lib/diff/lcs/callbacks.rb#310 + def match(event); end +end + +# An alias for DefaultCallbacks that is used in +# Diff::LCS#traverse_sequences. +# +# Diff::LCS.LCS(seq1, seq2, Diff::LCS::SequenceCallbacks) +# +# source://diff-lcs//lib/diff/lcs/callbacks.rb#44 +Diff::LCS::SequenceCallbacks = Diff::LCS::DefaultCallbacks + +# source://diff-lcs//lib/diff/lcs.rb#52 +Diff::LCS::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/erubi@1.12.0.rbi b/sorbet/rbi/gems/erubi@1.12.0.rbi new file mode 100644 index 0000000..c52738f --- /dev/null +++ b/sorbet/rbi/gems/erubi@1.12.0.rbi @@ -0,0 +1,145 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `erubi` gem. +# Please instead update this file by running `bin/tapioca gem erubi`. + +# source://erubi//lib/erubi.rb#3 +module Erubi + class << self + def h(_arg0); end + end +end + +# source://erubi//lib/erubi.rb#54 +class Erubi::Engine + # Initialize a new Erubi::Engine. Options: + # +:bufval+ :: The value to use for the buffer variable, as a string (default '::String.new'). + # +:bufvar+ :: The variable name to use for the buffer variable, as a string. + # +:chain_appends+ :: Whether to chain << calls to the buffer variable. Offers better + # performance, but can cause issues when the buffer variable is reassigned during + # template rendering (default +false+). + # +:ensure+ :: Wrap the template in a begin/ensure block restoring the previous value of bufvar. + # +:escapefunc+ :: The function to use for escaping, as a string (default: '::Erubi.h'). + # +:escape+ :: Whether to make <%= escape by default, and <%== not escape by default. + # +:escape_html+ :: Same as +:escape+, with lower priority. + # +:filename+ :: The filename for the template. + # the resulting source code. Note this may cause problems if you are wrapping the resulting + # source code in other code, because the magic comment only has an effect at the beginning of + # the file, and having the magic comment later in the file can trigger warnings. + # +:freeze_template_literals+ :: Whether to suffix all literal strings for template code with .freeze + # (default: +true+ on Ruby 2.1+, +false+ on Ruby 2.0 and older). + # Can be set to +false+ on Ruby 2.3+ when frozen string literals are enabled + # in order to improve performance. + # +:literal_prefix+ :: The prefix to output when using escaped tag delimiters (default '<%'). + # +:literal_postfix+ :: The postfix to output when using escaped tag delimiters (default '%>'). + # +:outvar+ :: Same as +:bufvar+, with lower priority. + # +:postamble+ :: The postamble for the template, by default returns the resulting source code. + # +:preamble+ :: The preamble for the template, by default initializes the buffer variable. + # +:regexp+ :: The regexp to use for scanning. + # +:src+ :: The initial value to use for the source code, an empty string by default. + # +:trim+ :: Whether to trim leading and trailing whitespace, true by default. + # + # @return [Engine] a new instance of Engine + # + # source://erubi//lib/erubi.rb#94 + def initialize(input, properties = T.unsafe(nil)); end + + # The variable name used for the buffer variable. + # + # source://erubi//lib/erubi.rb#65 + def bufvar; end + + # The filename of the template, if one was given. + # + # source://erubi//lib/erubi.rb#62 + def filename; end + + # The frozen ruby source code generated from the template, which can be evaled. + # + # source://erubi//lib/erubi.rb#59 + def src; end + + private + + # Add ruby code to the template + # + # source://erubi//lib/erubi.rb#226 + def add_code(code); end + + # Add the given ruby expression result to the template, + # escaping it based on the indicator given and escape flag. + # + # source://erubi//lib/erubi.rb#235 + def add_expression(indicator, code); end + + # Add the result of Ruby expression to the template + # + # source://erubi//lib/erubi.rb#244 + def add_expression_result(code); end + + # Add the escaped result of Ruby expression to the template + # + # source://erubi//lib/erubi.rb#249 + def add_expression_result_escaped(code); end + + # Add the given postamble to the src. Can be overridden in subclasses + # to make additional changes to src that depend on the current state. + # + # source://erubi//lib/erubi.rb#255 + def add_postamble(postamble); end + + # Add raw text to the template. Modifies argument if argument is mutable as a memory optimization. + # Must be called with a string, cannot be called with nil (Rails's subclass depends on it). + # + # source://erubi//lib/erubi.rb#213 + def add_text(text); end + + # Raise an exception, as the base engine class does not support handling other indicators. + # + # @raise [ArgumentError] + # + # source://erubi//lib/erubi.rb#261 + def handle(indicator, code, tailch, rspace, lspace); end + + # Make sure that any current expression has been terminated. + # The default is to terminate all expressions, but when + # the chain_appends option is used, expressions may not be + # terminated. + # + # source://erubi//lib/erubi.rb#289 + def terminate_expression; end + + # Make sure the buffer variable is the target of the next append + # before yielding to the block. Mark that the buffer is the target + # of the next append after the block executes. + # + # This method should only be called if the block will result in + # code where << will append to the bufvar. + # + # source://erubi//lib/erubi.rb#271 + def with_buffer; end +end + +# The default regular expression used for scanning. +# +# source://erubi//lib/erubi.rb#56 +Erubi::Engine::DEFAULT_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://erubi//lib/erubi.rb#17 +Erubi::FREEZE_TEMPLATE_LITERALS = T.let(T.unsafe(nil), TrueClass) + +# source://erubi//lib/erubi.rb#15 +Erubi::MATCH_METHOD = T.let(T.unsafe(nil), Symbol) + +# source://erubi//lib/erubi.rb#8 +Erubi::RANGE_FIRST = T.let(T.unsafe(nil), Integer) + +# source://erubi//lib/erubi.rb#9 +Erubi::RANGE_LAST = T.let(T.unsafe(nil), Integer) + +# source://erubi//lib/erubi.rb#16 +Erubi::SKIP_DEFINED_FOR_INSTANCE_VARIABLE = T.let(T.unsafe(nil), TrueClass) + +# source://erubi//lib/erubi.rb#4 +Erubi::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/i18n@1.14.1.rbi b/sorbet/rbi/gems/i18n@1.14.1.rbi new file mode 100644 index 0000000..5cd695f --- /dev/null +++ b/sorbet/rbi/gems/i18n@1.14.1.rbi @@ -0,0 +1,2174 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `i18n` gem. +# Please instead update this file by running `bin/tapioca gem i18n`. + +# source://i18n//lib/i18n/gettext/po_parser.rb#15 +module GetText; end + +# source://i18n//lib/i18n/gettext/po_parser.rb#17 +class GetText::PoParser < ::Racc::Parser + # source://i18n//lib/i18n/gettext/po_parser.rb#19 + def _(x); end + + def _reduce_10(val, _values, result); end + def _reduce_12(val, _values, result); end + def _reduce_13(val, _values, result); end + def _reduce_14(val, _values, result); end + def _reduce_15(val, _values, result); end + def _reduce_5(val, _values, result); end + def _reduce_8(val, _values, result); end + def _reduce_9(val, _values, result); end + + # source://i18n//lib/i18n/gettext/po_parser.rb#323 + def _reduce_none(val, _values, result); end + + def next_token; end + def on_comment(comment); end + def on_message(msgid, msgstr); end + def parse(str, data, ignore_fuzzy = T.unsafe(nil)); end + def unescape(orig); end +end + +# source://i18n//lib/i18n/gettext/po_parser.rb#184 +GetText::PoParser::Racc_arg = T.let(T.unsafe(nil), Array) + +# source://i18n//lib/i18n/gettext/po_parser.rb#221 +GetText::PoParser::Racc_debug_parser = T.let(T.unsafe(nil), TrueClass) + +# source://i18n//lib/i18n/gettext/po_parser.rb#200 +GetText::PoParser::Racc_token_to_s_table = T.let(T.unsafe(nil), Array) + +# Simple Locale tag implementation that computes subtags by simply splitting +# the locale tag at '-' occurrences. +# +# source://i18n//lib/i18n/version.rb#3 +module I18n + extend ::I18n::Base + + class << self + # source://i18n//lib/i18n/backend/cache.rb#64 + def cache_key_digest; end + + # source://i18n//lib/i18n/backend/cache.rb#68 + def cache_key_digest=(key_digest); end + + # source://i18n//lib/i18n/backend/cache.rb#56 + def cache_namespace; end + + # source://i18n//lib/i18n/backend/cache.rb#60 + def cache_namespace=(namespace); end + + # source://i18n//lib/i18n/backend/cache.rb#48 + def cache_store; end + + # source://i18n//lib/i18n/backend/cache.rb#52 + def cache_store=(store); end + + # Returns the current fallbacks implementation. Defaults to +I18n::Locale::Fallbacks+. + # + # source://i18n//lib/i18n/backend/fallbacks.rb#17 + def fallbacks; end + + # Sets the current fallbacks implementation. Use this to set a different fallbacks implementation. + # + # source://i18n//lib/i18n/backend/fallbacks.rb#23 + def fallbacks=(fallbacks); end + + # Return String or raises MissingInterpolationArgument exception. + # Missing argument's logic is handled by I18n.config.missing_interpolation_argument_handler. + # + # @raise [ReservedInterpolationKey] + # + # source://i18n//lib/i18n/interpolate/ruby.rb#23 + def interpolate(string, values); end + + # source://i18n//lib/i18n/interpolate/ruby.rb#29 + def interpolate_hash(string, values); end + + # source://i18n//lib/i18n.rb#37 + def new_double_nested_cache; end + + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/cache.rb#72 + def perform_caching?; end + + # Marks a key as reserved. Reserved keys are used internally, + # and can't also be used for interpolation. If you are using any + # extra keys as I18n options, you should call I18n.reserve_key + # before any I18n.translate (etc) calls are made. + # + # source://i18n//lib/i18n.rb#45 + def reserve_key(key); end + + # source://i18n//lib/i18n.rb#50 + def reserved_keys_pattern; end + end +end + +# source://i18n//lib/i18n/exceptions.rb#16 +class I18n::ArgumentError < ::ArgumentError; end + +# source://i18n//lib/i18n/backend.rb#4 +module I18n::Backend; end + +# source://i18n//lib/i18n/backend/base.rb#8 +module I18n::Backend::Base + include ::I18n::Backend::Transliterator + + # Returns an array of locales for which translations are available + # ignoring the reserved translation meta data key :i18n. + # + # @raise [NotImplementedError] + # + # source://i18n//lib/i18n/backend/base.rb#94 + def available_locales; end + + # source://i18n//lib/i18n/backend/base.rb#102 + def eager_load!; end + + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/base.rb#68 + def exists?(locale, key, options = T.unsafe(nil)); end + + # Accepts a list of paths to translation files. Loads translations from + # plain Ruby (*.rb), YAML files (*.yml), or JSON files (*.json). See #load_rb, #load_yml, and #load_json + # for details. + # + # source://i18n//lib/i18n/backend/base.rb#14 + def load_translations(*filenames); end + + # Acts the same as +strftime+, but uses a localized version of the + # format string. Takes a key from the date/time formats translations as + # a format argument (e.g., :short in :'date.formats'). + # + # @raise [ArgumentError] + # + # source://i18n//lib/i18n/backend/base.rb#75 + def localize(locale, object, format = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://i18n//lib/i18n/backend/base.rb#98 + def reload!; end + + # This method receives a locale, a data hash and options for storing translations. + # Should be implemented + # + # @raise [NotImplementedError] + # + # source://i18n//lib/i18n/backend/base.rb#24 + def store_translations(locale, data, options = T.unsafe(nil)); end + + # @raise [I18n::ArgumentError] + # + # source://i18n//lib/i18n/backend/base.rb#28 + def translate(locale, key, options = T.unsafe(nil)); end + + protected + + # Deep interpolation + # + # deep_interpolate { people: { ann: "Ann is %{ann}", john: "John is %{john}" } }, + # ann: 'good', john: 'big' + # #=> { people: { ann: "Ann is good", john: "John is big" } } + # + # source://i18n//lib/i18n/backend/base.rb#207 + def deep_interpolate(locale, data, values = T.unsafe(nil)); end + + # Evaluates defaults. + # If given subject is an Array, it walks the array and returns the + # first translation that can be resolved. Otherwise it tries to resolve + # the translation directly. + # + # source://i18n//lib/i18n/backend/base.rb#125 + def default(locale, object, subject, options = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/base.rb#108 + def eager_loaded?; end + + # Interpolates values into a given subject. + # + # if the given subject is a string then: + # method interpolates "file %{file} opened by %%{user}", :file => 'test.txt', :user => 'Mr. X' + # # => "file test.txt opened by %{user}" + # + # if the given subject is an array then: + # each element of the array is recursively interpolated (until it finds a string) + # method interpolates ["yes, %{user}", ["maybe no, %{user}, "no, %{user}"]], :user => "bartuz" + # # => "["yes, bartuz",["maybe no, bartuz", "no, bartuz"]]" + # + # source://i18n//lib/i18n/backend/base.rb#191 + def interpolate(locale, subject, values = T.unsafe(nil)); end + + # Loads a single translations file by delegating to #load_rb or + # #load_yml depending on the file extension and directly merges the + # data to the existing translations. Raises I18n::UnknownFileType + # for all other file extensions. + # + # @raise [UnknownFileType] + # + # source://i18n//lib/i18n/backend/base.rb#230 + def load_file(filename); end + + # Loads a JSON translations file. The data must have locales as + # toplevel keys. + # + # source://i18n//lib/i18n/backend/base.rb#266 + def load_json(filename); end + + # Loads a plain Ruby translations file. eval'ing the file must yield + # a Hash containing translation data with locales as toplevel keys. + # + # source://i18n//lib/i18n/backend/base.rb#244 + def load_rb(filename); end + + # Loads a YAML translations file. The data must have locales as + # toplevel keys. + # + # source://i18n//lib/i18n/backend/base.rb#251 + def load_yaml(filename); end + + # Loads a YAML translations file. The data must have locales as + # toplevel keys. + # + # source://i18n//lib/i18n/backend/base.rb#251 + def load_yml(filename); end + + # The method which actually looks up for the translation in the store. + # + # @raise [NotImplementedError] + # + # source://i18n//lib/i18n/backend/base.rb#113 + def lookup(locale, key, scope = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://i18n//lib/i18n/backend/base.rb#298 + def pluralization_key(entry, count); end + + # Picks a translation from a pluralized mnemonic subkey according to English + # pluralization rules : + # - It will pick the :one subkey if count is equal to 1. + # - It will pick the :other subkey otherwise. + # - It will pick the :zero subkey in the special case where count is + # equal to 0 and there is a :zero subkey present. This behaviour is + # not standard with regards to the CLDR pluralization rules. + # Other backends can implement more flexible or complex pluralization rules. + # + # @raise [InvalidPluralizationData] + # + # source://i18n//lib/i18n/backend/base.rb#172 + def pluralize(locale, entry, count); end + + # Resolves a translation. + # If the given subject is a Symbol, it will be translated with the + # given options. If it is a Proc then it will be evaluated. All other + # subjects will be returned directly. + # + # source://i18n//lib/i18n/backend/base.rb#147 + def resolve(locale, object, subject, options = T.unsafe(nil)); end + + # Resolves a translation. + # If the given subject is a Symbol, it will be translated with the + # given options. If it is a Proc then it will be evaluated. All other + # subjects will be returned directly. + # + # source://i18n//lib/i18n/backend/base.rb#147 + def resolve_entry(locale, object, subject, options = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/base.rb#117 + def subtrees?; end + + # source://i18n//lib/i18n/backend/base.rb#279 + def translate_localization_format(locale, object, format, options); end +end + +# TODO Should the cache be cleared if new translations are stored? +# +# source://i18n//lib/i18n/backend/cache.rb#79 +module I18n::Backend::Cache + # source://i18n//lib/i18n/backend/cache.rb#80 + def translate(locale, key, options = T.unsafe(nil)); end + + protected + + # source://i18n//lib/i18n/backend/cache.rb#93 + def _fetch(cache_key, &block); end + + # source://i18n//lib/i18n/backend/cache.rb#101 + def cache_key(locale, key, options); end + + # source://i18n//lib/i18n/backend/cache.rb#86 + def fetch(cache_key, &block); end + + private + + # source://i18n//lib/i18n/backend/cache.rb#108 + def digest_item(key); end +end + +# Overwrites the Base load_file method to cache loaded file contents. +# +# source://i18n//lib/i18n/backend/cache_file.rb#8 +module I18n::Backend::CacheFile + # Optionally provide path_roots array to normalize filename paths, + # to make the cached i18n data portable across environments. + # + # source://i18n//lib/i18n/backend/cache_file.rb#11 + def path_roots; end + + # Optionally provide path_roots array to normalize filename paths, + # to make the cached i18n data portable across environments. + # + # source://i18n//lib/i18n/backend/cache_file.rb#11 + def path_roots=(_arg0); end + + protected + + # Track loaded translation files in the `i18n.load_file` scope, + # and skip loading the file if its contents are still up-to-date. + # + # source://i18n//lib/i18n/backend/cache_file.rb#17 + def load_file(filename); end + + # Translate absolute filename to relative path for i18n key. + # + # source://i18n//lib/i18n/backend/cache_file.rb#28 + def normalized_path(file); end +end + +# source://i18n//lib/i18n/backend/cascade.rb#35 +module I18n::Backend::Cascade + # source://i18n//lib/i18n/backend/cascade.rb#36 + def lookup(locale, key, scope = T.unsafe(nil), options = T.unsafe(nil)); end +end + +# Backend that chains multiple other backends and checks each of them when +# a translation needs to be looked up. This is useful when you want to use +# standard translations with a Simple backend but store custom application +# translations in a database or other backends. +# +# To use the Chain backend instantiate it and set it to the I18n module. +# You can add chained backends through the initializer or backends +# accessor: +# +# # preserves the existing Simple backend set to I18n.backend +# I18n.backend = I18n::Backend::Chain.new(I18n::Backend::ActiveRecord.new, I18n.backend) +# +# The implementation assumes that all backends added to the Chain implement +# a lookup method with the same API as Simple backend does. +# +# Fallback translations using the :default option are only used by the last backend of a chain. +# +# source://i18n//lib/i18n/backend/chain.rb#21 +class I18n::Backend::Chain + include ::I18n::Backend::Transliterator + include ::I18n::Backend::Base + include ::I18n::Backend::Chain::Implementation +end + +# source://i18n//lib/i18n/backend/chain.rb#22 +module I18n::Backend::Chain::Implementation + include ::I18n::Backend::Transliterator + include ::I18n::Backend::Base + + # source://i18n//lib/i18n/backend/chain.rb#27 + def initialize(*backends); end + + # source://i18n//lib/i18n/backend/chain.rb#52 + def available_locales; end + + # Returns the value of attribute backends. + # + # source://i18n//lib/i18n/backend/chain.rb#25 + def backends; end + + # Sets the attribute backends + # + # @param value the value to set the attribute backends to. + # + # source://i18n//lib/i18n/backend/chain.rb#25 + def backends=(_arg0); end + + # source://i18n//lib/i18n/backend/chain.rb#44 + def eager_load!; end + + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/chain.rb#76 + def exists?(locale, key, options = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/chain.rb#31 + def initialized?; end + + # source://i18n//lib/i18n/backend/chain.rb#82 + def localize(locale, object, format = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://i18n//lib/i18n/backend/chain.rb#40 + def reload!; end + + # source://i18n//lib/i18n/backend/chain.rb#48 + def store_translations(locale, data, options = T.unsafe(nil)); end + + # source://i18n//lib/i18n/backend/chain.rb#56 + def translate(locale, key, default_options = T.unsafe(nil)); end + + protected + + # source://i18n//lib/i18n/backend/chain.rb#92 + def init_translations; end + + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/chain.rb#108 + def namespace_lookup?(result, options); end + + # source://i18n//lib/i18n/backend/chain.rb#98 + def translations; end + + private + + # This is approximately what gets used in ActiveSupport. + # However since we are not guaranteed to run in an ActiveSupport context + # it is wise to have our own copy. We underscore it + # to not pollute the namespace of the including class. + # + # source://i18n//lib/i18n/backend/chain.rb#117 + def _deep_merge(hash, other_hash); end +end + +# source://i18n//lib/i18n/backend/fallbacks.rb#30 +module I18n::Backend::Fallbacks + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/fallbacks.rb#94 + def exists?(locale, key, options = T.unsafe(nil)); end + + # source://i18n//lib/i18n/backend/fallbacks.rb#85 + def extract_non_symbol_default!(options); end + + # source://i18n//lib/i18n/backend/fallbacks.rb#67 + def resolve_entry(locale, object, subject, options = T.unsafe(nil)); end + + # Overwrites the Base backend translate method so that it will try each + # locale given by I18n.fallbacks for the given locale. E.g. for the + # locale :"de-DE" it might try the locales :"de-DE", :de and :en + # (depends on the fallbacks implementation) until it finds a result with + # the given options. If it does not find any result for any of the + # locales it will then throw MissingTranslation as usual. + # + # The default option takes precedence over fallback locales only when + # it's a Symbol. When the default contains a String, Proc or Hash + # it is evaluated last after all the fallback locales have been tried. + # + # source://i18n//lib/i18n/backend/fallbacks.rb#41 + def translate(locale, key, options = T.unsafe(nil)); end + + private + + # Overwrite on_fallback to add specified logic when the fallback succeeds. + # + # source://i18n//lib/i18n/backend/fallbacks.rb#110 + def on_fallback(_original_locale, _fallback_locale, _key, _options); end +end + +# This module contains several helpers to assist flattening translations. +# You may want to flatten translations for: +# +# 1) speed up lookups, as in the Memoize backend; +# 2) In case you want to store translations in a data store, as in ActiveRecord backend; +# +# You can check both backends above for some examples. +# This module also keeps all links in a hash so they can be properly resolved when flattened. +# +# source://i18n//lib/i18n/backend/flatten.rb#13 +module I18n::Backend::Flatten + # Flatten keys for nested Hashes by chaining up keys: + # + # >> { "a" => { "b" => { "c" => "d", "e" => "f" }, "g" => "h" }, "i" => "j"}.wind + # => { "a.b.c" => "d", "a.b.e" => "f", "a.g" => "h", "i" => "j" } + # + # source://i18n//lib/i18n/backend/flatten.rb#59 + def flatten_keys(hash, escape, prev_key = T.unsafe(nil), &block); end + + # Receives a hash of translations (where the key is a locale and + # the value is another hash) and return a hash with all + # translations flattened. + # + # Nested hashes are included in the flattened hash just if subtree + # is true and Symbols are automatically stored as links. + # + # source://i18n//lib/i18n/backend/flatten.rb#74 + def flatten_translations(locale, data, escape, subtree); end + + # Store flattened links. + # + # source://i18n//lib/i18n/backend/flatten.rb#50 + def links; end + + # Shortcut to I18n::Backend::Flatten.normalize_flat_keys + # and then resolve_links. + # + # source://i18n//lib/i18n/backend/flatten.rb#44 + def normalize_flat_keys(locale, key, scope, separator); end + + protected + + # source://i18n//lib/i18n/backend/flatten.rb#112 + def escape_default_separator(key); end + + # source://i18n//lib/i18n/backend/flatten.rb#106 + def find_link(locale, key); end + + # source://i18n//lib/i18n/backend/flatten.rb#93 + def resolve_link(locale, key); end + + # source://i18n//lib/i18n/backend/flatten.rb#89 + def store_link(locale, key, link); end + + class << self + # Receives a string and escape the default separator. + # + # source://i18n//lib/i18n/backend/flatten.rb#38 + def escape_default_separator(key); end + + # normalize_keys the flatten way. This method is significantly faster + # and creates way less objects than the one at I18n.normalize_keys. + # It also handles escaping the translation keys. + # + # source://i18n//lib/i18n/backend/flatten.rb#20 + def normalize_flat_keys(locale, key, scope, separator); end + end +end + +# source://i18n//lib/i18n/backend/flatten.rb#15 +I18n::Backend::Flatten::FLATTEN_SEPARATOR = T.let(T.unsafe(nil), String) + +# source://i18n//lib/i18n/backend/flatten.rb#14 +I18n::Backend::Flatten::SEPARATOR_ESCAPE_CHAR = T.let(T.unsafe(nil), String) + +# Experimental support for using Gettext po files to store translations. +# +# To use this you can simply include the module to the Simple backend - or +# whatever other backend you are using. +# +# I18n::Backend::Simple.include(I18n::Backend::Gettext) +# +# Now you should be able to include your Gettext translation (*.po) files to +# the +I18n.load_path+ so they're loaded to the backend and you can use them as +# usual: +# +# I18n.load_path += Dir["path/to/locales/*.po"] +# +# Following the Gettext convention this implementation expects that your +# translation files are named by their locales. E.g. the file en.po would +# contain the translations for the English locale. +# +# To translate text you must use one of the translate methods provided by +# I18n::Gettext::Helpers. +# +# include I18n::Gettext::Helpers +# puts _("some string") +# +# Without it strings containing periods (".") will not be translated. +# +# source://i18n//lib/i18n/backend/gettext.rb#33 +module I18n::Backend::Gettext + protected + + # source://i18n//lib/i18n/backend/gettext.rb#41 + def load_po(filename); end + + # source://i18n//lib/i18n/backend/gettext.rb#51 + def normalize(locale, data); end + + # source://i18n//lib/i18n/backend/gettext.rb#68 + def normalize_pluralization(locale, key, value); end + + # source://i18n//lib/i18n/backend/gettext.rb#47 + def parse(filename); end +end + +# source://i18n//lib/i18n/backend/gettext.rb#34 +class I18n::Backend::Gettext::PoData < ::Hash + # source://i18n//lib/i18n/backend/gettext.rb#35 + def set_comment(msgid_or_sym, comment); end +end + +# source://i18n//lib/i18n/backend/interpolation_compiler.rb#20 +module I18n::Backend::InterpolationCompiler + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#99 + def interpolate(locale, string, values); end + + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#109 + def store_translations(locale, data, options = T.unsafe(nil)); end + + protected + + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#115 + def compile_all_strings_in(data); end +end + +# source://i18n//lib/i18n/backend/interpolation_compiler.rb#21 +module I18n::Backend::InterpolationCompiler::Compiler + extend ::I18n::Backend::InterpolationCompiler::Compiler + + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#27 + def compile_if_an_interpolation(string); end + + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#39 + def interpolated_str?(str); end + + protected + + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#60 + def compile_interpolation_token(key); end + + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#49 + def compiled_interpolation_body(str); end + + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#73 + def direct_key(key); end + + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#93 + def escape_key_sym(key); end + + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#89 + def escape_plain_str(str); end + + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#55 + def handle_interpolation_token(interpolation, matchdata); end + + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#69 + def interpolate_key(key); end + + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#64 + def interpolate_or_raise_missing(key); end + + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#81 + def missing_key(key); end + + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#77 + def nil_key(key); end + + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#85 + def reserved_key(key); end + + # tokenize("foo %{bar} baz %%{buz}") # => ["foo ", "%{bar}", " baz ", "%%{buz}"] + # + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#45 + def tokenize(str); end +end + +# source://i18n//lib/i18n/backend/interpolation_compiler.rb#25 +I18n::Backend::InterpolationCompiler::Compiler::INTERPOLATION_SYNTAX_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://i18n//lib/i18n/backend/interpolation_compiler.rb#24 +I18n::Backend::InterpolationCompiler::Compiler::TOKENIZER = T.let(T.unsafe(nil), Regexp) + +# source://i18n//lib/i18n/backend/lazy_loadable.rb#65 +class I18n::Backend::LazyLoadable < ::I18n::Backend::Simple + # @return [LazyLoadable] a new instance of LazyLoadable + # + # source://i18n//lib/i18n/backend/lazy_loadable.rb#66 + def initialize(lazy_load: T.unsafe(nil)); end + + # Parse the load path and extract all locales. + # + # source://i18n//lib/i18n/backend/lazy_loadable.rb#99 + def available_locales; end + + # Eager loading is not supported in the lazy context. + # + # source://i18n//lib/i18n/backend/lazy_loadable.rb#90 + def eager_load!; end + + # Returns whether the current locale is initialized. + # + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/lazy_loadable.rb#71 + def initialized?; end + + # source://i18n//lib/i18n/backend/lazy_loadable.rb#107 + def lookup(locale, key, scope = T.unsafe(nil), options = T.unsafe(nil)); end + + # Clean up translations and uninitialize all locales. + # + # source://i18n//lib/i18n/backend/lazy_loadable.rb#80 + def reload!; end + + protected + + # Load translations from files that belong to the current locale. + # + # @raise [InvalidFilenames] + # + # source://i18n//lib/i18n/backend/lazy_loadable.rb#121 + def init_translations; end + + # source://i18n//lib/i18n/backend/lazy_loadable.rb#133 + def initialized_locales; end + + private + + # Checks if a filename is named in correspondence to the translations it loaded. + # The locale extracted from the path must be the single locale loaded in the translations. + # + # @raise [FilenameIncorrect] + # + # source://i18n//lib/i18n/backend/lazy_loadable.rb#175 + def assert_file_named_correctly!(file, translations); end + + # Select all files from I18n load path that belong to current locale. + # These files must start with the locale identifier (ie. "en", "pt-BR"), + # followed by an "_" demarcation to separate proceeding text. + # + # source://i18n//lib/i18n/backend/lazy_loadable.rb#167 + def filenames_for_current_locale; end + + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/lazy_loadable.rb#139 + def lazy_load?; end + + # Loads each file supplied and asserts that the file only loads + # translations as expected by the name. The method returns a list of + # errors corresponding to offending files. + # + # source://i18n//lib/i18n/backend/lazy_loadable.rb#152 + def load_translations_and_collect_file_errors(files); end +end + +# source://i18n//lib/i18n/backend/lazy_loadable.rb#143 +class I18n::Backend::LazyLoadable::FilenameIncorrect < ::StandardError + # @return [FilenameIncorrect] a new instance of FilenameIncorrect + # + # source://i18n//lib/i18n/backend/lazy_loadable.rb#144 + def initialize(file, expected_locale, unexpected_locales); end +end + +# Backend that lazy loads translations based on the current locale. This +# implementation avoids loading all translations up front. Instead, it only +# loads the translations that belong to the current locale. This offers a +# performance incentive in local development and test environments for +# applications with many translations for many different locales. It's +# particularly useful when the application only refers to a single locales' +# translations at a time (ex. A Rails workload). The implementation +# identifies which translation files from the load path belong to the +# current locale by pattern matching against their path name. +# +# Specifically, a translation file is considered to belong to a locale if: +# a) the filename is in the I18n load path +# b) the filename ends in a supported extension (ie. .yml, .json, .po, .rb) +# c) the filename starts with the locale identifier +# d) the locale identifier and optional proceeding text is separated by an underscore, ie. "_". +# +# Examples: +# Valid files that will be selected by this backend: +# +# "files/locales/en_translation.yml" (Selected for locale "en") +# "files/locales/fr.po" (Selected for locale "fr") +# +# Invalid files that won't be selected by this backend: +# +# "files/locales/translation-file" +# "files/locales/en-translation.unsupported" +# "files/locales/french/translation.yml" +# "files/locales/fr/translation.yml" +# +# The implementation uses this assumption to defer the loading of +# translation files until the current locale actually requires them. +# +# The backend has two working modes: lazy_load and eager_load. +# +# Note: This backend should only be enabled in test environments! +# When the mode is set to false, the backend behaves exactly like the +# Simple backend, with an additional check that the paths being loaded +# abide by the format. If paths can't be matched to the format, an error is raised. +# +# You can configure lazy loaded backends through the initializer or backends +# accessor: +# +# # In test environments +# +# I18n.backend = I18n::Backend::LazyLoadable.new(lazy_load: true) +# +# # In other environments, such as production and CI +# +# I18n.backend = I18n::Backend::LazyLoadable.new(lazy_load: false) # default +# +# source://i18n//lib/i18n/backend/lazy_loadable.rb#55 +class I18n::Backend::LocaleExtractor + class << self + # source://i18n//lib/i18n/backend/lazy_loadable.rb#57 + def locale_from_path(path); end + end +end + +# source://i18n//lib/i18n/backend/memoize.rb#14 +module I18n::Backend::Memoize + # source://i18n//lib/i18n/backend/memoize.rb#15 + def available_locales; end + + # source://i18n//lib/i18n/backend/memoize.rb#29 + def eager_load!; end + + # source://i18n//lib/i18n/backend/memoize.rb#24 + def reload!; end + + # source://i18n//lib/i18n/backend/memoize.rb#19 + def store_translations(locale, data, options = T.unsafe(nil)); end + + protected + + # source://i18n//lib/i18n/backend/memoize.rb#37 + def lookup(locale, key, scope = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://i18n//lib/i18n/backend/memoize.rb#44 + def memoized_lookup; end + + # source://i18n//lib/i18n/backend/memoize.rb#48 + def reset_memoizations!(locale = T.unsafe(nil)); end +end + +# source://i18n//lib/i18n/backend/metadata.rb#21 +module I18n::Backend::Metadata + # source://i18n//lib/i18n/backend/metadata.rb#52 + def interpolate(locale, entry, values = T.unsafe(nil)); end + + # source://i18n//lib/i18n/backend/metadata.rb#57 + def pluralize(locale, entry, count); end + + # source://i18n//lib/i18n/backend/metadata.rb#40 + def translate(locale, key, options = T.unsafe(nil)); end + + protected + + # source://i18n//lib/i18n/backend/metadata.rb#63 + def with_metadata(metadata, &block); end + + class << self + # @private + # + # source://i18n//lib/i18n/backend/metadata.rb#23 + def included(base); end + end +end + +# source://i18n//lib/i18n/backend/pluralization.rb#16 +module I18n::Backend::Pluralization + # Overwrites the Base backend translate method so that it will check the + # translation meta data space (:i18n) for a locale specific pluralization + # rule and use it to pluralize the given entry. I.e., the library expects + # pluralization rules to be stored at I18n.t(:'i18n.plural.rule') + # + # Pluralization rules are expected to respond to #call(count) and + # return a pluralization key. Valid keys depend on the pluralization + # rules for the locale, as defined in the CLDR. + # As of v41, 6 locale-specific plural categories are defined: + # :few, :many, :one, :other, :two, :zero + # + # n.b., The :one plural category does not imply the number 1. + # Instead, :one is a category for any number that behaves like 1 in + # that locale. For example, in some locales, :one is used for numbers + # that end in "1" (like 1, 21, 151) but that don't end in + # 11 (like 11, 111, 10311). + # Similar notes apply to the :two, and :zero plural categories. + # + # If you want to have different strings for the categories of count == 0 + # (e.g. "I don't have any cars") or count == 1 (e.g. "I have a single car") + # use the explicit `"0"` and `"1"` keys. + # https://unicode-org.github.io/cldr/ldml/tr35-numbers.html#Explicit_0_1_rules + # + # source://i18n//lib/i18n/backend/pluralization.rb#39 + def pluralize(locale, entry, count); end + + protected + + # source://i18n//lib/i18n/backend/pluralization.rb#81 + def pluralizer(locale); end + + # source://i18n//lib/i18n/backend/pluralization.rb#77 + def pluralizers; end + + private + + # Normalizes categories of 0.0 and 1.0 + # and returns the symbolic version + # + # source://i18n//lib/i18n/backend/pluralization.rb#89 + def symbolic_count(count); end +end + +# A simple backend that reads translations from YAML files and stores them in +# an in-memory hash. Relies on the Base backend. +# +# The implementation is provided by a Implementation module allowing to easily +# extend Simple backend's behavior by including modules. E.g.: +# +# module I18n::Backend::Pluralization +# def pluralize(*args) +# # extended pluralization logic +# super +# end +# end +# +# I18n::Backend::Simple.include(I18n::Backend::Pluralization) +# +# source://i18n//lib/i18n/backend/simple.rb#21 +class I18n::Backend::Simple + include ::I18n::Backend::Transliterator + include ::I18n::Backend::Base + include ::I18n::Backend::Simple::Implementation +end + +# source://i18n//lib/i18n/backend/simple.rb#22 +module I18n::Backend::Simple::Implementation + include ::I18n::Backend::Transliterator + include ::I18n::Backend::Base + + # Get available locales from the translations hash + # + # source://i18n//lib/i18n/backend/simple.rb#49 + def available_locales; end + + # source://i18n//lib/i18n/backend/simple.rb#64 + def eager_load!; end + + # @return [Boolean] + # + # source://i18n//lib/i18n/backend/simple.rb#28 + def initialized?; end + + # Clean up translations hash and set initialized to false on reload! + # + # source://i18n//lib/i18n/backend/simple.rb#58 + def reload!; end + + # Stores translations for the given locale in memory. + # This uses a deep merge for the translations hash, so existing + # translations will be overwritten by new ones only at the deepest + # level of the hash. + # + # source://i18n//lib/i18n/backend/simple.rb#36 + def store_translations(locale, data, options = T.unsafe(nil)); end + + # source://i18n//lib/i18n/backend/simple.rb#69 + def translations(do_init: T.unsafe(nil)); end + + protected + + # source://i18n//lib/i18n/backend/simple.rb#83 + def init_translations; end + + # Looks up a translation from the translations hash. Returns nil if + # either key is nil, or locale, scope or key do not exist as a key in the + # nested translations hash. Splits keys or scopes containing dots + # into multiple keys, i.e. currency.format is regarded the same as + # %w(currency format). + # + # source://i18n//lib/i18n/backend/simple.rb#93 + def lookup(locale, key, scope = T.unsafe(nil), options = T.unsafe(nil)); end +end + +# Mutex to ensure that concurrent translations loading will be thread-safe +# +# source://i18n//lib/i18n/backend/simple.rb#26 +I18n::Backend::Simple::Implementation::MUTEX = T.let(T.unsafe(nil), Thread::Mutex) + +# source://i18n//lib/i18n/backend/transliterator.rb#6 +module I18n::Backend::Transliterator + # Given a locale and a UTF-8 string, return the locale's ASCII + # approximation for the string. + # + # source://i18n//lib/i18n/backend/transliterator.rb#11 + def transliterate(locale, string, replacement = T.unsafe(nil)); end + + class << self + # Get a transliterator instance. + # + # source://i18n//lib/i18n/backend/transliterator.rb#19 + def get(rule = T.unsafe(nil)); end + end +end + +# source://i18n//lib/i18n/backend/transliterator.rb#7 +I18n::Backend::Transliterator::DEFAULT_REPLACEMENT_CHAR = T.let(T.unsafe(nil), String) + +# A transliterator which accepts a Hash of characters as its translation +# rule. +# +# source://i18n//lib/i18n/backend/transliterator.rb#42 +class I18n::Backend::Transliterator::HashTransliterator + # @return [HashTransliterator] a new instance of HashTransliterator + # + # source://i18n//lib/i18n/backend/transliterator.rb#74 + def initialize(rule = T.unsafe(nil)); end + + # source://i18n//lib/i18n/backend/transliterator.rb#80 + def transliterate(string, replacement = T.unsafe(nil)); end + + private + + # Add transliteration rules to the approximations hash. + # + # source://i18n//lib/i18n/backend/transliterator.rb#100 + def add(hash); end + + # source://i18n//lib/i18n/backend/transliterator.rb#93 + def add_default_approximations; end + + # source://i18n//lib/i18n/backend/transliterator.rb#89 + def approximations; end +end + +# source://i18n//lib/i18n/backend/transliterator.rb#43 +I18n::Backend::Transliterator::HashTransliterator::DEFAULT_APPROXIMATIONS = T.let(T.unsafe(nil), Hash) + +# A transliterator which accepts a Proc as its transliteration rule. +# +# source://i18n//lib/i18n/backend/transliterator.rb#30 +class I18n::Backend::Transliterator::ProcTransliterator + # @return [ProcTransliterator] a new instance of ProcTransliterator + # + # source://i18n//lib/i18n/backend/transliterator.rb#31 + def initialize(rule); end + + # source://i18n//lib/i18n/backend/transliterator.rb#35 + def transliterate(string, replacement = T.unsafe(nil)); end +end + +# source://i18n//lib/i18n.rb#54 +module I18n::Base + # source://i18n//lib/i18n.rb#69 + def available_locales; end + + # source://i18n//lib/i18n.rb#73 + def available_locales=(value); end + + # @return [Boolean] + # + # source://i18n//lib/i18n.rb#355 + def available_locales_initialized?; end + + # source://i18n//lib/i18n.rb#69 + def backend; end + + # source://i18n//lib/i18n.rb#73 + def backend=(value); end + + # Gets I18n configuration object. + # + # source://i18n//lib/i18n.rb#56 + def config; end + + # Sets I18n configuration object. + # + # source://i18n//lib/i18n.rb#61 + def config=(value); end + + # source://i18n//lib/i18n.rb#69 + def default_locale; end + + # source://i18n//lib/i18n.rb#73 + def default_locale=(value); end + + # source://i18n//lib/i18n.rb#69 + def default_separator; end + + # source://i18n//lib/i18n.rb#73 + def default_separator=(value); end + + # Tells the backend to load translations now. Used in situations like the + # Rails production environment. Backends can implement whatever strategy + # is useful. + # + # source://i18n//lib/i18n.rb#90 + def eager_load!; end + + # source://i18n//lib/i18n.rb#69 + def enforce_available_locales; end + + # Raises an InvalidLocale exception when the passed locale is not available. + # + # source://i18n//lib/i18n.rb#349 + def enforce_available_locales!(locale); end + + # source://i18n//lib/i18n.rb#73 + def enforce_available_locales=(value); end + + # source://i18n//lib/i18n.rb#69 + def exception_handler; end + + # source://i18n//lib/i18n.rb#73 + def exception_handler=(value); end + + # Returns true if a translation exists for a given key, otherwise returns false. + # + # @raise [Disabled] + # @return [Boolean] + # + # source://i18n//lib/i18n.rb#235 + def exists?(key, _locale = T.unsafe(nil), locale: T.unsafe(nil), **options); end + + # Localizes certain objects, such as dates and numbers to local formatting. + # + # @raise [Disabled] + # + # source://i18n//lib/i18n.rb#304 + def l(object, locale: T.unsafe(nil), format: T.unsafe(nil), **options); end + + # source://i18n//lib/i18n.rb#69 + def load_path; end + + # source://i18n//lib/i18n.rb#73 + def load_path=(value); end + + # source://i18n//lib/i18n.rb#69 + def locale; end + + # source://i18n//lib/i18n.rb#73 + def locale=(value); end + + # Returns true when the passed locale, which can be either a String or a + # Symbol, is in the list of available locales. Returns false otherwise. + # + # @return [Boolean] + # + # source://i18n//lib/i18n.rb#344 + def locale_available?(locale); end + + # Localizes certain objects, such as dates and numbers to local formatting. + # + # @raise [Disabled] + # + # source://i18n//lib/i18n.rb#304 + def localize(object, locale: T.unsafe(nil), format: T.unsafe(nil), **options); end + + # Merges the given locale, key and scope into a single array of keys. + # Splits keys that contain dots into multiple keys. Makes sure all + # keys are Symbols. + # + # source://i18n//lib/i18n.rb#332 + def normalize_keys(locale, key, scope, separator = T.unsafe(nil)); end + + # Tells the backend to reload translations. Used in situations like the + # Rails development environment. Backends can implement whatever strategy + # is useful. + # + # source://i18n//lib/i18n.rb#82 + def reload!; end + + # Translates, pluralizes and interpolates a given key using a given locale, + # scope, and default, as well as interpolation values. + # + # *LOOKUP* + # + # Translation data is organized as a nested hash using the upper-level keys + # as namespaces. E.g., ActionView ships with the translation: + # :date => {:formats => {:short => "%b %d"}}. + # + # Translations can be looked up at any level of this hash using the key argument + # and the scope option. E.g., in this example I18n.t :date + # returns the whole translations hash {:formats => {:short => "%b %d"}}. + # + # Key can be either a single key or a dot-separated key (both Strings and Symbols + # work). E.g., the short format can be looked up using both: + # I18n.t 'date.formats.short' + # I18n.t :'date.formats.short' + # + # Scope can be either a single key, a dot-separated key or an array of keys + # or dot-separated keys. Keys and scopes can be combined freely. So these + # examples will all look up the same short date format: + # I18n.t 'date.formats.short' + # I18n.t 'formats.short', :scope => 'date' + # I18n.t 'short', :scope => 'date.formats' + # I18n.t 'short', :scope => %w(date formats) + # + # *INTERPOLATION* + # + # Translations can contain interpolation variables which will be replaced by + # values passed to #translate as part of the options hash, with the keys matching + # the interpolation variable names. + # + # E.g., with a translation :foo => "foo %{bar}" the option + # value for the key +bar+ will be interpolated into the translation: + # I18n.t :foo, :bar => 'baz' # => 'foo baz' + # + # *PLURALIZATION* + # + # Translation data can contain pluralized translations. Pluralized translations + # are arrays of singular/plural versions of translations like ['Foo', 'Foos']. + # + # Note that I18n::Backend::Simple only supports an algorithm for English + # pluralization rules. Other algorithms can be supported by custom backends. + # + # This returns the singular version of a pluralized translation: + # I18n.t :foo, :count => 1 # => 'Foo' + # + # These both return the plural version of a pluralized translation: + # I18n.t :foo, :count => 0 # => 'Foos' + # I18n.t :foo, :count => 2 # => 'Foos' + # + # The :count option can be used both for pluralization and interpolation. + # E.g., with the translation + # :foo => ['%{count} foo', '%{count} foos'], count will + # be interpolated to the pluralized translation: + # I18n.t :foo, :count => 1 # => '1 foo' + # + # *DEFAULTS* + # + # This returns the translation for :foo or default if no translation was found: + # I18n.t :foo, :default => 'default' + # + # This returns the translation for :foo or the translation for :bar if no + # translation for :foo was found: + # I18n.t :foo, :default => :bar + # + # Returns the translation for :foo or the translation for :bar + # or default if no translations for :foo and :bar were found. + # I18n.t :foo, :default => [:bar, 'default'] + # + # *BULK LOOKUP* + # + # This returns an array with the translations for :foo and :bar. + # I18n.t [:foo, :bar] + # + # Can be used with dot-separated nested keys: + # I18n.t [:'baz.foo', :'baz.bar'] + # + # Which is the same as using a scope option: + # I18n.t [:foo, :bar], :scope => :baz + # + # *LAMBDAS* + # + # Both translations and defaults can be given as Ruby lambdas. Lambdas will be + # called and passed the key and options. + # + # E.g. assuming the key :salutation resolves to: + # lambda { |key, options| options[:gender] == 'm' ? "Mr. #{options[:name]}" : "Mrs. #{options[:name]}" } + # + # Then I18n.t(:salutation, :gender => 'w', :name => 'Smith') will result in "Mrs. Smith". + # + # Note that the string returned by lambda will go through string interpolation too, + # so the following lambda would give the same result: + # lambda { |key, options| options[:gender] == 'm' ? "Mr. %{name}" : "Mrs. %{name}" } + # + # It is recommended to use/implement lambdas in an "idempotent" way. E.g. when + # a cache layer is put in front of I18n.translate it will generate a cache key + # from the argument values passed to #translate. Therefore your lambdas should + # always return the same translations/values per unique combination of argument + # values. + # + # *Ruby 2.7+ keyword arguments warning* + # + # This method uses keyword arguments. + # There is a breaking change in ruby that produces warning with ruby 2.7 and won't work as expected with ruby 3.0 + # The "hash" parameter must be passed as keyword argument. + # + # Good: + # I18n.t(:salutation, :gender => 'w', :name => 'Smith') + # I18n.t(:salutation, **{ :gender => 'w', :name => 'Smith' }) + # I18n.t(:salutation, **any_hash) + # + # Bad: + # I18n.t(:salutation, { :gender => 'w', :name => 'Smith' }) + # I18n.t(:salutation, any_hash) + # + # @raise [Disabled] + # + # source://i18n//lib/i18n.rb#210 + def t(key = T.unsafe(nil), throw: T.unsafe(nil), raise: T.unsafe(nil), locale: T.unsafe(nil), **options); end + + # Wrapper for translate that adds :raise => true. With + # this option, if no translation is found, it will raise I18n::MissingTranslationData + # + # source://i18n//lib/i18n.rb#229 + def t!(key, **options); end + + # Translates, pluralizes and interpolates a given key using a given locale, + # scope, and default, as well as interpolation values. + # + # *LOOKUP* + # + # Translation data is organized as a nested hash using the upper-level keys + # as namespaces. E.g., ActionView ships with the translation: + # :date => {:formats => {:short => "%b %d"}}. + # + # Translations can be looked up at any level of this hash using the key argument + # and the scope option. E.g., in this example I18n.t :date + # returns the whole translations hash {:formats => {:short => "%b %d"}}. + # + # Key can be either a single key or a dot-separated key (both Strings and Symbols + # work). E.g., the short format can be looked up using both: + # I18n.t 'date.formats.short' + # I18n.t :'date.formats.short' + # + # Scope can be either a single key, a dot-separated key or an array of keys + # or dot-separated keys. Keys and scopes can be combined freely. So these + # examples will all look up the same short date format: + # I18n.t 'date.formats.short' + # I18n.t 'formats.short', :scope => 'date' + # I18n.t 'short', :scope => 'date.formats' + # I18n.t 'short', :scope => %w(date formats) + # + # *INTERPOLATION* + # + # Translations can contain interpolation variables which will be replaced by + # values passed to #translate as part of the options hash, with the keys matching + # the interpolation variable names. + # + # E.g., with a translation :foo => "foo %{bar}" the option + # value for the key +bar+ will be interpolated into the translation: + # I18n.t :foo, :bar => 'baz' # => 'foo baz' + # + # *PLURALIZATION* + # + # Translation data can contain pluralized translations. Pluralized translations + # are arrays of singular/plural versions of translations like ['Foo', 'Foos']. + # + # Note that I18n::Backend::Simple only supports an algorithm for English + # pluralization rules. Other algorithms can be supported by custom backends. + # + # This returns the singular version of a pluralized translation: + # I18n.t :foo, :count => 1 # => 'Foo' + # + # These both return the plural version of a pluralized translation: + # I18n.t :foo, :count => 0 # => 'Foos' + # I18n.t :foo, :count => 2 # => 'Foos' + # + # The :count option can be used both for pluralization and interpolation. + # E.g., with the translation + # :foo => ['%{count} foo', '%{count} foos'], count will + # be interpolated to the pluralized translation: + # I18n.t :foo, :count => 1 # => '1 foo' + # + # *DEFAULTS* + # + # This returns the translation for :foo or default if no translation was found: + # I18n.t :foo, :default => 'default' + # + # This returns the translation for :foo or the translation for :bar if no + # translation for :foo was found: + # I18n.t :foo, :default => :bar + # + # Returns the translation for :foo or the translation for :bar + # or default if no translations for :foo and :bar were found. + # I18n.t :foo, :default => [:bar, 'default'] + # + # *BULK LOOKUP* + # + # This returns an array with the translations for :foo and :bar. + # I18n.t [:foo, :bar] + # + # Can be used with dot-separated nested keys: + # I18n.t [:'baz.foo', :'baz.bar'] + # + # Which is the same as using a scope option: + # I18n.t [:foo, :bar], :scope => :baz + # + # *LAMBDAS* + # + # Both translations and defaults can be given as Ruby lambdas. Lambdas will be + # called and passed the key and options. + # + # E.g. assuming the key :salutation resolves to: + # lambda { |key, options| options[:gender] == 'm' ? "Mr. #{options[:name]}" : "Mrs. #{options[:name]}" } + # + # Then I18n.t(:salutation, :gender => 'w', :name => 'Smith') will result in "Mrs. Smith". + # + # Note that the string returned by lambda will go through string interpolation too, + # so the following lambda would give the same result: + # lambda { |key, options| options[:gender] == 'm' ? "Mr. %{name}" : "Mrs. %{name}" } + # + # It is recommended to use/implement lambdas in an "idempotent" way. E.g. when + # a cache layer is put in front of I18n.translate it will generate a cache key + # from the argument values passed to #translate. Therefore your lambdas should + # always return the same translations/values per unique combination of argument + # values. + # + # *Ruby 2.7+ keyword arguments warning* + # + # This method uses keyword arguments. + # There is a breaking change in ruby that produces warning with ruby 2.7 and won't work as expected with ruby 3.0 + # The "hash" parameter must be passed as keyword argument. + # + # Good: + # I18n.t(:salutation, :gender => 'w', :name => 'Smith') + # I18n.t(:salutation, **{ :gender => 'w', :name => 'Smith' }) + # I18n.t(:salutation, **any_hash) + # + # Bad: + # I18n.t(:salutation, { :gender => 'w', :name => 'Smith' }) + # I18n.t(:salutation, any_hash) + # + # @raise [Disabled] + # + # source://i18n//lib/i18n.rb#210 + def translate(key = T.unsafe(nil), throw: T.unsafe(nil), raise: T.unsafe(nil), locale: T.unsafe(nil), **options); end + + # Wrapper for translate that adds :raise => true. With + # this option, if no translation is found, it will raise I18n::MissingTranslationData + # + # source://i18n//lib/i18n.rb#229 + def translate!(key, **options); end + + # Transliterates UTF-8 characters to ASCII. By default this method will + # transliterate only Latin strings to an ASCII approximation: + # + # I18n.transliterate("Ærøskøbing") + # # => "AEroskobing" + # + # I18n.transliterate("日本語") + # # => "???" + # + # It's also possible to add support for per-locale transliterations. I18n + # expects transliteration rules to be stored at + # i18n.transliterate.rule. + # + # Transliteration rules can either be a Hash or a Proc. Procs must accept a + # single string argument. Hash rules inherit the default transliteration + # rules, while Procs do not. + # + # *Examples* + # + # Setting a Hash in .yml: + # + # i18n: + # transliterate: + # rule: + # ü: "ue" + # ö: "oe" + # + # Setting a Hash using Ruby: + # + # store_translations(:de, i18n: { + # transliterate: { + # rule: { + # 'ü' => 'ue', + # 'ö' => 'oe' + # } + # } + # }) + # + # Setting a Proc: + # + # translit = lambda {|string| MyTransliterator.transliterate(string) } + # store_translations(:xx, :i18n => {:transliterate => {:rule => translit}) + # + # Transliterating strings: + # + # I18n.locale = :en + # I18n.transliterate("Jürgen") # => "Jurgen" + # I18n.locale = :de + # I18n.transliterate("Jürgen") # => "Juergen" + # I18n.transliterate("Jürgen", :locale => :en) # => "Jurgen" + # I18n.transliterate("Jürgen", :locale => :de) # => "Juergen" + # + # source://i18n//lib/i18n.rb#293 + def transliterate(key, throw: T.unsafe(nil), raise: T.unsafe(nil), locale: T.unsafe(nil), replacement: T.unsafe(nil), **options); end + + # Executes block with given I18n.locale set. + # + # source://i18n//lib/i18n.rb#315 + def with_locale(tmp_locale = T.unsafe(nil)); end + + private + + # Any exceptions thrown in translate will be sent to the @@exception_handler + # which can be a Symbol, a Proc or any other Object unless they're forced to + # be raised or thrown (MissingTranslation). + # + # If exception_handler is a Symbol then it will simply be sent to I18n as + # a method call. A Proc will simply be called. In any other case the + # method #call will be called on the exception_handler object. + # + # Examples: + # + # I18n.exception_handler = :custom_exception_handler # this is the default + # I18n.custom_exception_handler(exception, locale, key, options) # will be called like this + # + # I18n.exception_handler = lambda { |*args| ... } # a lambda + # I18n.exception_handler.call(exception, locale, key, options) # will be called like this + # + # I18n.exception_handler = I18nExceptionHandler.new # an object + # I18n.exception_handler.call(exception, locale, key, options) # will be called like this + # + # source://i18n//lib/i18n.rb#391 + def handle_exception(handling, exception, locale, key, options); end + + # source://i18n//lib/i18n.rb#409 + def normalize_key(key, separator); end + + # source://i18n//lib/i18n.rb#361 + def translate_key(key, throw, raise, locale, backend, options); end +end + +# source://i18n//lib/i18n/config.rb#6 +class I18n::Config + # Returns an array of locales for which translations are available. + # Unless you explicitly set these through I18n.available_locales= + # the call will be delegated to the backend. + # + # source://i18n//lib/i18n/config.rb#43 + def available_locales; end + + # Sets the available locales. + # + # source://i18n//lib/i18n/config.rb#57 + def available_locales=(locales); end + + # Returns true if the available_locales have been initialized + # + # @return [Boolean] + # + # source://i18n//lib/i18n/config.rb#64 + def available_locales_initialized?; end + + # Caches the available locales list as both strings and symbols in a Set, so + # that we can have faster lookups to do the available locales enforce check. + # + # source://i18n//lib/i18n/config.rb#50 + def available_locales_set; end + + # Returns the current backend. Defaults to +Backend::Simple+. + # + # source://i18n//lib/i18n/config.rb#20 + def backend; end + + # Sets the current backend. Used to set a custom backend. + # + # source://i18n//lib/i18n/config.rb#25 + def backend=(backend); end + + # Clears the available locales set so it can be recomputed again after I18n + # gets reloaded. + # + # source://i18n//lib/i18n/config.rb#70 + def clear_available_locales_set; end + + # Returns the current default locale. Defaults to :'en' + # + # source://i18n//lib/i18n/config.rb#30 + def default_locale; end + + # Sets the current default locale. Used to set a custom default locale. + # + # source://i18n//lib/i18n/config.rb#35 + def default_locale=(locale); end + + # Returns the current default scope separator. Defaults to '.' + # + # source://i18n//lib/i18n/config.rb#75 + def default_separator; end + + # Sets the current default scope separator. + # + # source://i18n//lib/i18n/config.rb#80 + def default_separator=(separator); end + + # source://i18n//lib/i18n/config.rb#141 + def enforce_available_locales; end + + # source://i18n//lib/i18n/config.rb#145 + def enforce_available_locales=(enforce_available_locales); end + + # Returns the current exception handler. Defaults to an instance of + # I18n::ExceptionHandler. + # + # source://i18n//lib/i18n/config.rb#86 + def exception_handler; end + + # Sets the exception handler. + # + # source://i18n//lib/i18n/config.rb#91 + def exception_handler=(exception_handler); end + + # Returns the current interpolation patterns. Defaults to + # I18n::DEFAULT_INTERPOLATION_PATTERNS. + # + # source://i18n//lib/i18n/config.rb#151 + def interpolation_patterns; end + + # Sets the current interpolation patterns. Used to set a interpolation + # patterns. + # + # E.g. using {{}} as a placeholder like "{{hello}}, world!": + # + # I18n.config.interpolation_patterns << /\{\{(\w+)\}\}/ + # + # source://i18n//lib/i18n/config.rb#161 + def interpolation_patterns=(interpolation_patterns); end + + # Allow clients to register paths providing translation data sources. The + # backend defines acceptable sources. + # + # E.g. the provided SimpleBackend accepts a list of paths to translation + # files which are either named *.rb and contain plain Ruby Hashes or are + # named *.yml and contain YAML data. So for the SimpleBackend clients may + # register translation files like this: + # I18n.load_path << 'path/to/locale/en.yml' + # + # source://i18n//lib/i18n/config.rb#126 + def load_path; end + + # Sets the load path instance. Custom implementations are expected to + # behave like a Ruby Array. + # + # source://i18n//lib/i18n/config.rb#132 + def load_path=(load_path); end + + # The only configuration value that is not global and scoped to thread is :locale. + # It defaults to the default_locale. + # + # source://i18n//lib/i18n/config.rb#9 + def locale; end + + # Sets the current locale pseudo-globally, i.e. in the Thread.current hash. + # + # source://i18n//lib/i18n/config.rb#14 + def locale=(locale); end + + # Returns the current handler for situations when interpolation argument + # is missing. MissingInterpolationArgument will be raised by default. + # + # source://i18n//lib/i18n/config.rb#97 + def missing_interpolation_argument_handler; end + + # Sets the missing interpolation argument handler. It can be any + # object that responds to #call. The arguments that will be passed to #call + # are the same as for MissingInterpolationArgument initializer. Use +Proc.new+ + # if you don't care about arity. + # + # == Example: + # You can suppress raising an exception and return string instead: + # + # I18n.config.missing_interpolation_argument_handler = Proc.new do |key| + # "#{key} is missing" + # end + # + # source://i18n//lib/i18n/config.rb#114 + def missing_interpolation_argument_handler=(exception_handler); end +end + +# source://i18n//lib/i18n/interpolate/ruby.rb#7 +I18n::DEFAULT_INTERPOLATION_PATTERNS = T.let(T.unsafe(nil), Array) + +# source://i18n//lib/i18n/exceptions.rb#18 +class I18n::Disabled < ::I18n::ArgumentError + # @return [Disabled] a new instance of Disabled + # + # source://i18n//lib/i18n/exceptions.rb#19 + def initialize(method); end +end + +# source://i18n//lib/i18n.rb#35 +I18n::EMPTY_HASH = T.let(T.unsafe(nil), Hash) + +# source://i18n//lib/i18n/exceptions.rb#6 +class I18n::ExceptionHandler + # source://i18n//lib/i18n/exceptions.rb#7 + def call(exception, _locale, _key, _options); end +end + +# source://i18n//lib/i18n/gettext.rb#4 +module I18n::Gettext + class << self + # source://i18n//lib/i18n/gettext.rb#21 + def extract_scope(msgid, separator); end + + # returns an array of plural keys for the given locale or the whole hash + # of locale mappings to plural keys so that we can convert from gettext's + # integer-index based style + # TODO move this information to the pluralization module + # + # source://i18n//lib/i18n/gettext.rb#17 + def plural_keys(*args); end + end +end + +# source://i18n//lib/i18n/gettext.rb#6 +I18n::Gettext::CONTEXT_SEPARATOR = T.let(T.unsafe(nil), String) + +# Implements classical Gettext style accessors. To use this include the +# module to the global namespace or wherever you want to use it. +# +# include I18n::Gettext::Helpers +# +# source://i18n//lib/i18n/gettext/helpers.rb#11 +module I18n::Gettext::Helpers + # Makes dynamic translation messages readable for the gettext parser. + # _(fruit) cannot be understood by the gettext parser. To help the parser find all your translations, + # you can add fruit = N_("Apple") which does not translate, but tells the parser: "Apple" needs translation. + # * msgid: the message id. + # * Returns: msgid. + # + # source://i18n//lib/i18n/gettext/helpers.rb#17 + def N_(msgsid); end + + # source://i18n//lib/i18n/gettext/helpers.rb#21 + def _(msgid, options = T.unsafe(nil)); end + + # source://i18n//lib/i18n/gettext/helpers.rb#21 + def gettext(msgid, options = T.unsafe(nil)); end + + # source://i18n//lib/i18n/gettext/helpers.rb#38 + def n_(msgid, msgid_plural, n = T.unsafe(nil)); end + + # source://i18n//lib/i18n/gettext/helpers.rb#38 + def ngettext(msgid, msgid_plural, n = T.unsafe(nil)); end + + # Method signatures: + # npgettext('Fruits', 'apple', 'apples', 2) + # npgettext('Fruits', ['apple', 'apples'], 2) + # + # source://i18n//lib/i18n/gettext/helpers.rb#61 + def np_(msgctxt, msgid, msgid_plural, n = T.unsafe(nil)); end + + # Method signatures: + # npgettext('Fruits', 'apple', 'apples', 2) + # npgettext('Fruits', ['apple', 'apples'], 2) + # + # source://i18n//lib/i18n/gettext/helpers.rb#61 + def npgettext(msgctxt, msgid, msgid_plural, n = T.unsafe(nil)); end + + # Method signatures: + # nsgettext('Fruits|apple', 'apples', 2) + # nsgettext(['Fruits|apple', 'apples'], 2) + # + # source://i18n//lib/i18n/gettext/helpers.rb#46 + def ns_(msgid, msgid_plural, n = T.unsafe(nil), separator = T.unsafe(nil)); end + + # Method signatures: + # nsgettext('Fruits|apple', 'apples', 2) + # nsgettext(['Fruits|apple', 'apples'], 2) + # + # source://i18n//lib/i18n/gettext/helpers.rb#46 + def nsgettext(msgid, msgid_plural, n = T.unsafe(nil), separator = T.unsafe(nil)); end + + # source://i18n//lib/i18n/gettext/helpers.rb#32 + def p_(msgctxt, msgid); end + + # source://i18n//lib/i18n/gettext/helpers.rb#32 + def pgettext(msgctxt, msgid); end + + # source://i18n//lib/i18n/gettext/helpers.rb#26 + def s_(msgid, separator = T.unsafe(nil)); end + + # source://i18n//lib/i18n/gettext/helpers.rb#26 + def sgettext(msgid, separator = T.unsafe(nil)); end +end + +# source://i18n//lib/i18n/gettext.rb#5 +I18n::Gettext::PLURAL_SEPARATOR = T.let(T.unsafe(nil), String) + +# source://i18n//lib/i18n/interpolate/ruby.rb#12 +I18n::INTERPOLATION_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://i18n//lib/i18n/interpolate/ruby.rb#15 +I18n::INTERPOLATION_PATTERNS_CACHE = T.let(T.unsafe(nil), Hash) + +# source://i18n//lib/i18n/exceptions.rb#134 +class I18n::InvalidFilenames < ::I18n::ArgumentError + # @return [InvalidFilenames] a new instance of InvalidFilenames + # + # source://i18n//lib/i18n/exceptions.rb#136 + def initialize(file_errors); end +end + +# source://i18n//lib/i18n/exceptions.rb#135 +I18n::InvalidFilenames::NUMBER_OF_ERRORS_SHOWN = T.let(T.unsafe(nil), Integer) + +# source://i18n//lib/i18n/exceptions.rb#32 +class I18n::InvalidLocale < ::I18n::ArgumentError + # @return [InvalidLocale] a new instance of InvalidLocale + # + # source://i18n//lib/i18n/exceptions.rb#34 + def initialize(locale); end + + # Returns the value of attribute locale. + # + # source://i18n//lib/i18n/exceptions.rb#33 + def locale; end +end + +# source://i18n//lib/i18n/exceptions.rb#40 +class I18n::InvalidLocaleData < ::I18n::ArgumentError + # @return [InvalidLocaleData] a new instance of InvalidLocaleData + # + # source://i18n//lib/i18n/exceptions.rb#42 + def initialize(filename, exception_message); end + + # Returns the value of attribute filename. + # + # source://i18n//lib/i18n/exceptions.rb#41 + def filename; end +end + +# source://i18n//lib/i18n/exceptions.rb#92 +class I18n::InvalidPluralizationData < ::I18n::ArgumentError + # @return [InvalidPluralizationData] a new instance of InvalidPluralizationData + # + # source://i18n//lib/i18n/exceptions.rb#94 + def initialize(entry, count, key); end + + # Returns the value of attribute count. + # + # source://i18n//lib/i18n/exceptions.rb#93 + def count; end + + # Returns the value of attribute entry. + # + # source://i18n//lib/i18n/exceptions.rb#93 + def entry; end + + # Returns the value of attribute key. + # + # source://i18n//lib/i18n/exceptions.rb#93 + def key; end +end + +# source://i18n//lib/i18n/locale.rb#4 +module I18n::Locale; end + +# source://i18n//lib/i18n/locale/fallbacks.rb#48 +class I18n::Locale::Fallbacks < ::Hash + # @return [Fallbacks] a new instance of Fallbacks + # + # source://i18n//lib/i18n/locale/fallbacks.rb#49 + def initialize(*mappings); end + + # @raise [InvalidLocale] + # + # source://i18n//lib/i18n/locale/fallbacks.rb#60 + def [](locale); end + + # Returns the value of attribute defaults. + # + # source://i18n//lib/i18n/locale/fallbacks.rb#58 + def defaults; end + + # source://i18n//lib/i18n/locale/fallbacks.rb#55 + def defaults=(defaults); end + + # source://i18n//lib/i18n/locale/fallbacks.rb#67 + def map(*args, &block); end + + protected + + # source://i18n//lib/i18n/locale/fallbacks.rb#84 + def compute(tags, include_defaults = T.unsafe(nil), exclude = T.unsafe(nil)); end +end + +# source://i18n//lib/i18n/locale/tag.rb#5 +module I18n::Locale::Tag + class << self + # Returns the current locale tag implementation. Defaults to +I18n::Locale::Tag::Simple+. + # + # source://i18n//lib/i18n/locale/tag.rb#12 + def implementation; end + + # Sets the current locale tag implementation. Use this to set a different locale tag implementation. + # + # source://i18n//lib/i18n/locale/tag.rb#17 + def implementation=(implementation); end + + # Factory method for locale tags. Delegates to the current locale tag implementation. + # + # source://i18n//lib/i18n/locale/tag.rb#22 + def tag(tag); end + end +end + +# source://i18n//lib/i18n/locale/tag/parents.rb#4 +module I18n::Locale::Tag::Parents + # source://i18n//lib/i18n/locale/tag/parents.rb#5 + def parent; end + + # source://i18n//lib/i18n/locale/tag/parents.rb#18 + def parents; end + + # source://i18n//lib/i18n/locale/tag/parents.rb#14 + def self_and_parents; end +end + +# source://i18n//lib/i18n/locale/tag/rfc4646.rb#12 +I18n::Locale::Tag::RFC4646_FORMATS = T.let(T.unsafe(nil), Hash) + +# source://i18n//lib/i18n/locale/tag/rfc4646.rb#11 +I18n::Locale::Tag::RFC4646_SUBTAGS = T.let(T.unsafe(nil), Array) + +# source://i18n//lib/i18n/locale/tag/rfc4646.rb#14 +class I18n::Locale::Tag::Rfc4646 < ::Struct + include ::I18n::Locale::Tag::Parents + + # source://i18n//lib/i18n/locale/tag/rfc4646.rb#35 + def language; end + + # source://i18n//lib/i18n/locale/tag/rfc4646.rb#35 + def region; end + + # source://i18n//lib/i18n/locale/tag/rfc4646.rb#35 + def script; end + + # source://i18n//lib/i18n/locale/tag/rfc4646.rb#46 + def to_a; end + + # source://i18n//lib/i18n/locale/tag/rfc4646.rb#42 + def to_s; end + + # source://i18n//lib/i18n/locale/tag/rfc4646.rb#38 + def to_sym; end + + # source://i18n//lib/i18n/locale/tag/rfc4646.rb#35 + def variant; end + + class << self + # source://i18n//lib/i18n/locale/tag/rfc4646.rb#23 + def parser; end + + # source://i18n//lib/i18n/locale/tag/rfc4646.rb#27 + def parser=(parser); end + + # Parses the given tag and returns a Tag instance if it is valid. + # Returns false if the given tag is not valid according to RFC 4646. + # + # source://i18n//lib/i18n/locale/tag/rfc4646.rb#18 + def tag(tag); end + end +end + +# source://i18n//lib/i18n/locale/tag/rfc4646.rb#50 +module I18n::Locale::Tag::Rfc4646::Parser + class << self + # source://i18n//lib/i18n/locale/tag/rfc4646.rb#63 + def match(tag); end + end +end + +# source://i18n//lib/i18n/locale/tag/rfc4646.rb#51 +I18n::Locale::Tag::Rfc4646::Parser::PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://i18n//lib/i18n/locale/tag/simple.rb#6 +class I18n::Locale::Tag::Simple + include ::I18n::Locale::Tag::Parents + + # @return [Simple] a new instance of Simple + # + # source://i18n//lib/i18n/locale/tag/simple.rb#17 + def initialize(*tag); end + + # source://i18n//lib/i18n/locale/tag/simple.rb#21 + def subtags; end + + # Returns the value of attribute tag. + # + # source://i18n//lib/i18n/locale/tag/simple.rb#15 + def tag; end + + # source://i18n//lib/i18n/locale/tag/simple.rb#33 + def to_a; end + + # source://i18n//lib/i18n/locale/tag/simple.rb#29 + def to_s; end + + # source://i18n//lib/i18n/locale/tag/simple.rb#25 + def to_sym; end + + class << self + # source://i18n//lib/i18n/locale/tag/simple.rb#8 + def tag(tag); end + end +end + +# source://i18n//lib/i18n/middleware.rb#4 +class I18n::Middleware + # @return [Middleware] a new instance of Middleware + # + # source://i18n//lib/i18n/middleware.rb#6 + def initialize(app); end + + # source://i18n//lib/i18n/middleware.rb#10 + def call(env); end +end + +# source://i18n//lib/i18n/exceptions.rb#100 +class I18n::MissingInterpolationArgument < ::I18n::ArgumentError + # @return [MissingInterpolationArgument] a new instance of MissingInterpolationArgument + # + # source://i18n//lib/i18n/exceptions.rb#102 + def initialize(key, values, string); end + + # Returns the value of attribute key. + # + # source://i18n//lib/i18n/exceptions.rb#101 + def key; end + + # Returns the value of attribute string. + # + # source://i18n//lib/i18n/exceptions.rb#101 + def string; end + + # Returns the value of attribute values. + # + # source://i18n//lib/i18n/exceptions.rb#101 + def values; end +end + +# source://i18n//lib/i18n/exceptions.rb#48 +class I18n::MissingTranslation < ::I18n::ArgumentError + include ::I18n::MissingTranslation::Base +end + +# source://i18n//lib/i18n/exceptions.rb#49 +module I18n::MissingTranslation::Base + # source://i18n//lib/i18n/exceptions.rb#54 + def initialize(locale, key, options = T.unsafe(nil)); end + + # Returns the value of attribute key. + # + # source://i18n//lib/i18n/exceptions.rb#52 + def key; end + + # source://i18n//lib/i18n/exceptions.rb#59 + def keys; end + + # Returns the value of attribute locale. + # + # source://i18n//lib/i18n/exceptions.rb#52 + def locale; end + + # source://i18n//lib/i18n/exceptions.rb#65 + def message; end + + # source://i18n//lib/i18n/exceptions.rb#74 + def normalized_option(key); end + + # Returns the value of attribute options. + # + # source://i18n//lib/i18n/exceptions.rb#52 + def options; end + + # source://i18n//lib/i18n/exceptions.rb#80 + def to_exception; end + + # source://i18n//lib/i18n/exceptions.rb#65 + def to_s; end +end + +# source://i18n//lib/i18n/exceptions.rb#50 +I18n::MissingTranslation::Base::PERMITTED_KEYS = T.let(T.unsafe(nil), Array) + +# source://i18n//lib/i18n/exceptions.rb#88 +class I18n::MissingTranslationData < ::I18n::ArgumentError + include ::I18n::MissingTranslation::Base +end + +# source://i18n//lib/i18n.rb#19 +I18n::RESERVED_KEYS = T.let(T.unsafe(nil), Array) + +# source://i18n//lib/i18n/exceptions.rb#108 +class I18n::ReservedInterpolationKey < ::I18n::ArgumentError + # @return [ReservedInterpolationKey] a new instance of ReservedInterpolationKey + # + # source://i18n//lib/i18n/exceptions.rb#110 + def initialize(key, string); end + + # Returns the value of attribute key. + # + # source://i18n//lib/i18n/exceptions.rb#109 + def key; end + + # Returns the value of attribute string. + # + # source://i18n//lib/i18n/exceptions.rb#109 + def string; end +end + +# source://i18n//lib/i18n/tests.rb#4 +module I18n::Tests; end + +# source://i18n//lib/i18n/tests/localization.rb#3 +module I18n::Tests::Localization + class << self + # @private + # + # source://i18n//lib/i18n/tests/localization.rb#9 + def included(base); end + end +end + +# source://i18n//lib/i18n/exceptions.rb#116 +class I18n::UnknownFileType < ::I18n::ArgumentError + # @return [UnknownFileType] a new instance of UnknownFileType + # + # source://i18n//lib/i18n/exceptions.rb#118 + def initialize(type, filename); end + + # Returns the value of attribute filename. + # + # source://i18n//lib/i18n/exceptions.rb#117 + def filename; end + + # Returns the value of attribute type. + # + # source://i18n//lib/i18n/exceptions.rb#117 + def type; end +end + +# source://i18n//lib/i18n/exceptions.rb#124 +class I18n::UnsupportedMethod < ::I18n::ArgumentError + # @return [UnsupportedMethod] a new instance of UnsupportedMethod + # + # source://i18n//lib/i18n/exceptions.rb#126 + def initialize(method, backend_klass, msg); end + + # Returns the value of attribute backend_klass. + # + # source://i18n//lib/i18n/exceptions.rb#125 + def backend_klass; end + + # Returns the value of attribute method. + # + # source://i18n//lib/i18n/exceptions.rb#125 + def method; end + + # Returns the value of attribute msg. + # + # source://i18n//lib/i18n/exceptions.rb#125 + def msg; end +end + +# source://i18n//lib/i18n/utils.rb#4 +module I18n::Utils + class << self + # source://i18n//lib/i18n/utils.rb#18 + def deep_merge(hash, other_hash, &block); end + + # source://i18n//lib/i18n/utils.rb#22 + def deep_merge!(hash, other_hash, &block); end + + # source://i18n//lib/i18n/utils.rb#34 + def deep_symbolize_keys(hash); end + + # source://i18n//lib/i18n/utils.rb#7 + def except(hash, *keys); end + + private + + # source://i18n//lib/i18n/utils.rb#43 + def deep_symbolize_keys_in_object(value); end + end +end + +# source://i18n//lib/i18n/version.rb#4 +I18n::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/json@2.6.3.rbi b/sorbet/rbi/gems/json@2.6.3.rbi new file mode 100644 index 0000000..259116a --- /dev/null +++ b/sorbet/rbi/gems/json@2.6.3.rbi @@ -0,0 +1,1533 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `json` gem. +# Please instead update this file by running `bin/tapioca gem json`. + +# Extends any Class to include _json_creatable?_ method. +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//json/common.rb#700 + def json_creatable?; end +end + +# = JavaScript \Object Notation (\JSON) +# +# \JSON is a lightweight data-interchange format. +# +# A \JSON value is one of the following: +# - Double-quoted text: "foo". +# - Number: +1+, +1.0+, +2.0e2+. +# - Boolean: +true+, +false+. +# - Null: +null+. +# - \Array: an ordered list of values, enclosed by square brackets: +# ["foo", 1, 1.0, 2.0e2, true, false, null] +# +# - \Object: a collection of name/value pairs, enclosed by curly braces; +# each name is double-quoted text; +# the values may be any \JSON values: +# {"a": "foo", "b": 1, "c": 1.0, "d": 2.0e2, "e": true, "f": false, "g": null} +# +# A \JSON array or object may contain nested arrays, objects, and scalars +# to any depth: +# {"foo": {"bar": 1, "baz": 2}, "bat": [0, 1, 2]} +# [{"foo": 0, "bar": 1}, ["baz", 2]] +# +# == Using \Module \JSON +# +# To make module \JSON available in your code, begin with: +# require 'json' +# +# All examples here assume that this has been done. +# +# === Parsing \JSON +# +# You can parse a \String containing \JSON data using +# either of two methods: +# - JSON.parse(source, opts) +# - JSON.parse!(source, opts) +# +# where +# - +source+ is a Ruby object. +# - +opts+ is a \Hash object containing options +# that control both input allowed and output formatting. +# +# The difference between the two methods +# is that JSON.parse! omits some checks +# and may not be safe for some +source+ data; +# use it only for data from trusted sources. +# Use the safer method JSON.parse for less trusted sources. +# +# ==== Parsing \JSON Arrays +# +# When +source+ is a \JSON array, JSON.parse by default returns a Ruby \Array: +# json = '["foo", 1, 1.0, 2.0e2, true, false, null]' +# ruby = JSON.parse(json) +# ruby # => ["foo", 1, 1.0, 200.0, true, false, nil] +# ruby.class # => Array +# +# The \JSON array may contain nested arrays, objects, and scalars +# to any depth: +# json = '[{"foo": 0, "bar": 1}, ["baz", 2]]' +# JSON.parse(json) # => [{"foo"=>0, "bar"=>1}, ["baz", 2]] +# +# ==== Parsing \JSON \Objects +# +# When the source is a \JSON object, JSON.parse by default returns a Ruby \Hash: +# json = '{"a": "foo", "b": 1, "c": 1.0, "d": 2.0e2, "e": true, "f": false, "g": null}' +# ruby = JSON.parse(json) +# ruby # => {"a"=>"foo", "b"=>1, "c"=>1.0, "d"=>200.0, "e"=>true, "f"=>false, "g"=>nil} +# ruby.class # => Hash +# +# The \JSON object may contain nested arrays, objects, and scalars +# to any depth: +# json = '{"foo": {"bar": 1, "baz": 2}, "bat": [0, 1, 2]}' +# JSON.parse(json) # => {"foo"=>{"bar"=>1, "baz"=>2}, "bat"=>[0, 1, 2]} +# +# ==== Parsing \JSON Scalars +# +# When the source is a \JSON scalar (not an array or object), +# JSON.parse returns a Ruby scalar. +# +# \String: +# ruby = JSON.parse('"foo"') +# ruby # => 'foo' +# ruby.class # => String +# \Integer: +# ruby = JSON.parse('1') +# ruby # => 1 +# ruby.class # => Integer +# \Float: +# ruby = JSON.parse('1.0') +# ruby # => 1.0 +# ruby.class # => Float +# ruby = JSON.parse('2.0e2') +# ruby # => 200 +# ruby.class # => Float +# Boolean: +# ruby = JSON.parse('true') +# ruby # => true +# ruby.class # => TrueClass +# ruby = JSON.parse('false') +# ruby # => false +# ruby.class # => FalseClass +# Null: +# ruby = JSON.parse('null') +# ruby # => nil +# ruby.class # => NilClass +# +# ==== Parsing Options +# +# ====== Input Options +# +# Option +max_nesting+ (\Integer) specifies the maximum nesting depth allowed; +# defaults to +100+; specify +false+ to disable depth checking. +# +# With the default, +false+: +# source = '[0, [1, [2, [3]]]]' +# ruby = JSON.parse(source) +# ruby # => [0, [1, [2, [3]]]] +# Too deep: +# # Raises JSON::NestingError (nesting of 2 is too deep): +# JSON.parse(source, {max_nesting: 1}) +# Bad value: +# # Raises TypeError (wrong argument type Symbol (expected Fixnum)): +# JSON.parse(source, {max_nesting: :foo}) +# +# --- +# +# Option +allow_nan+ (boolean) specifies whether to allow +# NaN, Infinity, and MinusInfinity in +source+; +# defaults to +false+. +# +# With the default, +false+: +# # Raises JSON::ParserError (225: unexpected token at '[NaN]'): +# JSON.parse('[NaN]') +# # Raises JSON::ParserError (232: unexpected token at '[Infinity]'): +# JSON.parse('[Infinity]') +# # Raises JSON::ParserError (248: unexpected token at '[-Infinity]'): +# JSON.parse('[-Infinity]') +# Allow: +# source = '[NaN, Infinity, -Infinity]' +# ruby = JSON.parse(source, {allow_nan: true}) +# ruby # => [NaN, Infinity, -Infinity] +# +# ====== Output Options +# +# Option +symbolize_names+ (boolean) specifies whether returned \Hash keys +# should be Symbols; +# defaults to +false+ (use Strings). +# +# With the default, +false+: +# source = '{"a": "foo", "b": 1.0, "c": true, "d": false, "e": null}' +# ruby = JSON.parse(source) +# ruby # => {"a"=>"foo", "b"=>1.0, "c"=>true, "d"=>false, "e"=>nil} +# Use Symbols: +# ruby = JSON.parse(source, {symbolize_names: true}) +# ruby # => {:a=>"foo", :b=>1.0, :c=>true, :d=>false, :e=>nil} +# +# --- +# +# Option +object_class+ (\Class) specifies the Ruby class to be used +# for each \JSON object; +# defaults to \Hash. +# +# With the default, \Hash: +# source = '{"a": "foo", "b": 1.0, "c": true, "d": false, "e": null}' +# ruby = JSON.parse(source) +# ruby.class # => Hash +# Use class \OpenStruct: +# ruby = JSON.parse(source, {object_class: OpenStruct}) +# ruby # => # +# +# --- +# +# Option +array_class+ (\Class) specifies the Ruby class to be used +# for each \JSON array; +# defaults to \Array. +# +# With the default, \Array: +# source = '["foo", 1.0, true, false, null]' +# ruby = JSON.parse(source) +# ruby.class # => Array +# Use class \Set: +# ruby = JSON.parse(source, {array_class: Set}) +# ruby # => # +# +# --- +# +# Option +create_additions+ (boolean) specifies whether to use \JSON additions in parsing. +# See {\JSON Additions}[#module-JSON-label-JSON+Additions]. +# +# === Generating \JSON +# +# To generate a Ruby \String containing \JSON data, +# use method JSON.generate(source, opts), where +# - +source+ is a Ruby object. +# - +opts+ is a \Hash object containing options +# that control both input allowed and output formatting. +# +# ==== Generating \JSON from Arrays +# +# When the source is a Ruby \Array, JSON.generate returns +# a \String containing a \JSON array: +# ruby = [0, 's', :foo] +# json = JSON.generate(ruby) +# json # => '[0,"s","foo"]' +# +# The Ruby \Array array may contain nested arrays, hashes, and scalars +# to any depth: +# ruby = [0, [1, 2], {foo: 3, bar: 4}] +# json = JSON.generate(ruby) +# json # => '[0,[1,2],{"foo":3,"bar":4}]' +# +# ==== Generating \JSON from Hashes +# +# When the source is a Ruby \Hash, JSON.generate returns +# a \String containing a \JSON object: +# ruby = {foo: 0, bar: 's', baz: :bat} +# json = JSON.generate(ruby) +# json # => '{"foo":0,"bar":"s","baz":"bat"}' +# +# The Ruby \Hash array may contain nested arrays, hashes, and scalars +# to any depth: +# ruby = {foo: [0, 1], bar: {baz: 2, bat: 3}, bam: :bad} +# json = JSON.generate(ruby) +# json # => '{"foo":[0,1],"bar":{"baz":2,"bat":3},"bam":"bad"}' +# +# ==== Generating \JSON from Other Objects +# +# When the source is neither an \Array nor a \Hash, +# the generated \JSON data depends on the class of the source. +# +# When the source is a Ruby \Integer or \Float, JSON.generate returns +# a \String containing a \JSON number: +# JSON.generate(42) # => '42' +# JSON.generate(0.42) # => '0.42' +# +# When the source is a Ruby \String, JSON.generate returns +# a \String containing a \JSON string (with double-quotes): +# JSON.generate('A string') # => '"A string"' +# +# When the source is +true+, +false+ or +nil+, JSON.generate returns +# a \String containing the corresponding \JSON token: +# JSON.generate(true) # => 'true' +# JSON.generate(false) # => 'false' +# JSON.generate(nil) # => 'null' +# +# When the source is none of the above, JSON.generate returns +# a \String containing a \JSON string representation of the source: +# JSON.generate(:foo) # => '"foo"' +# JSON.generate(Complex(0, 0)) # => '"0+0i"' +# JSON.generate(Dir.new('.')) # => '"#"' +# +# ==== Generating Options +# +# ====== Input Options +# +# Option +allow_nan+ (boolean) specifies whether +# +NaN+, +Infinity+, and -Infinity may be generated; +# defaults to +false+. +# +# With the default, +false+: +# # Raises JSON::GeneratorError (920: NaN not allowed in JSON): +# JSON.generate(JSON::NaN) +# # Raises JSON::GeneratorError (917: Infinity not allowed in JSON): +# JSON.generate(JSON::Infinity) +# # Raises JSON::GeneratorError (917: -Infinity not allowed in JSON): +# JSON.generate(JSON::MinusInfinity) +# +# Allow: +# ruby = [Float::NaN, Float::Infinity, Float::MinusInfinity] +# JSON.generate(ruby, allow_nan: true) # => '[NaN,Infinity,-Infinity]' +# +# --- +# +# Option +max_nesting+ (\Integer) specifies the maximum nesting depth +# in +obj+; defaults to +100+. +# +# With the default, +100+: +# obj = [[[[[[0]]]]]] +# JSON.generate(obj) # => '[[[[[[0]]]]]]' +# +# Too deep: +# # Raises JSON::NestingError (nesting of 2 is too deep): +# JSON.generate(obj, max_nesting: 2) +# +# ====== Output Options +# +# The default formatting options generate the most compact +# \JSON data, all on one line and with no whitespace. +# +# You can use these formatting options to generate +# \JSON data in a more open format, using whitespace. +# See also JSON.pretty_generate. +# +# - Option +array_nl+ (\String) specifies a string (usually a newline) +# to be inserted after each \JSON array; defaults to the empty \String, ''. +# - Option +object_nl+ (\String) specifies a string (usually a newline) +# to be inserted after each \JSON object; defaults to the empty \String, ''. +# - Option +indent+ (\String) specifies the string (usually spaces) to be +# used for indentation; defaults to the empty \String, ''; +# defaults to the empty \String, ''; +# has no effect unless options +array_nl+ or +object_nl+ specify newlines. +# - Option +space+ (\String) specifies a string (usually a space) to be +# inserted after the colon in each \JSON object's pair; +# defaults to the empty \String, ''. +# - Option +space_before+ (\String) specifies a string (usually a space) to be +# inserted before the colon in each \JSON object's pair; +# defaults to the empty \String, ''. +# +# In this example, +obj+ is used first to generate the shortest +# \JSON data (no whitespace), then again with all formatting options +# specified: +# +# obj = {foo: [:bar, :baz], bat: {bam: 0, bad: 1}} +# json = JSON.generate(obj) +# puts 'Compact:', json +# opts = { +# array_nl: "\n", +# object_nl: "\n", +# indent: ' ', +# space_before: ' ', +# space: ' ' +# } +# puts 'Open:', JSON.generate(obj, opts) +# +# Output: +# Compact: +# {"foo":["bar","baz"],"bat":{"bam":0,"bad":1}} +# Open: +# { +# "foo" : [ +# "bar", +# "baz" +# ], +# "bat" : { +# "bam" : 0, +# "bad" : 1 +# } +# } +# +# == \JSON Additions +# +# When you "round trip" a non-\String object from Ruby to \JSON and back, +# you have a new \String, instead of the object you began with: +# ruby0 = Range.new(0, 2) +# json = JSON.generate(ruby0) +# json # => '0..2"' +# ruby1 = JSON.parse(json) +# ruby1 # => '0..2' +# ruby1.class # => String +# +# You can use \JSON _additions_ to preserve the original object. +# The addition is an extension of a ruby class, so that: +# - \JSON.generate stores more information in the \JSON string. +# - \JSON.parse, called with option +create_additions+, +# uses that information to create a proper Ruby object. +# +# This example shows a \Range being generated into \JSON +# and parsed back into Ruby, both without and with +# the addition for \Range: +# ruby = Range.new(0, 2) +# # This passage does not use the addition for Range. +# json0 = JSON.generate(ruby) +# ruby0 = JSON.parse(json0) +# # This passage uses the addition for Range. +# require 'json/add/range' +# json1 = JSON.generate(ruby) +# ruby1 = JSON.parse(json1, create_additions: true) +# # Make a nice display. +# display = <require 'json/add/bigdecimal' +# - Complex: require 'json/add/complex' +# - Date: require 'json/add/date' +# - DateTime: require 'json/add/date_time' +# - Exception: require 'json/add/exception' +# - OpenStruct: require 'json/add/ostruct' +# - Range: require 'json/add/range' +# - Rational: require 'json/add/rational' +# - Regexp: require 'json/add/regexp' +# - Set: require 'json/add/set' +# - Struct: require 'json/add/struct' +# - Symbol: require 'json/add/symbol' +# - Time: require 'json/add/time' +# +# To reduce punctuation clutter, the examples below +# show the generated \JSON via +puts+, rather than the usual +inspect+, +# +# \BigDecimal: +# require 'json/add/bigdecimal' +# ruby0 = BigDecimal(0) # 0.0 +# json = JSON.generate(ruby0) # {"json_class":"BigDecimal","b":"27:0.0"} +# ruby1 = JSON.parse(json, create_additions: true) # 0.0 +# ruby1.class # => BigDecimal +# +# \Complex: +# require 'json/add/complex' +# ruby0 = Complex(1+0i) # 1+0i +# json = JSON.generate(ruby0) # {"json_class":"Complex","r":1,"i":0} +# ruby1 = JSON.parse(json, create_additions: true) # 1+0i +# ruby1.class # Complex +# +# \Date: +# require 'json/add/date' +# ruby0 = Date.today # 2020-05-02 +# json = JSON.generate(ruby0) # {"json_class":"Date","y":2020,"m":5,"d":2,"sg":2299161.0} +# ruby1 = JSON.parse(json, create_additions: true) # 2020-05-02 +# ruby1.class # Date +# +# \DateTime: +# require 'json/add/date_time' +# ruby0 = DateTime.now # 2020-05-02T10:38:13-05:00 +# json = JSON.generate(ruby0) # {"json_class":"DateTime","y":2020,"m":5,"d":2,"H":10,"M":38,"S":13,"of":"-5/24","sg":2299161.0} +# ruby1 = JSON.parse(json, create_additions: true) # 2020-05-02T10:38:13-05:00 +# ruby1.class # DateTime +# +# \Exception (and its subclasses including \RuntimeError): +# require 'json/add/exception' +# ruby0 = Exception.new('A message') # A message +# json = JSON.generate(ruby0) # {"json_class":"Exception","m":"A message","b":null} +# ruby1 = JSON.parse(json, create_additions: true) # A message +# ruby1.class # Exception +# ruby0 = RuntimeError.new('Another message') # Another message +# json = JSON.generate(ruby0) # {"json_class":"RuntimeError","m":"Another message","b":null} +# ruby1 = JSON.parse(json, create_additions: true) # Another message +# ruby1.class # RuntimeError +# +# \OpenStruct: +# require 'json/add/ostruct' +# ruby0 = OpenStruct.new(name: 'Matz', language: 'Ruby') # # +# json = JSON.generate(ruby0) # {"json_class":"OpenStruct","t":{"name":"Matz","language":"Ruby"}} +# ruby1 = JSON.parse(json, create_additions: true) # # +# ruby1.class # OpenStruct +# +# \Range: +# require 'json/add/range' +# ruby0 = Range.new(0, 2) # 0..2 +# json = JSON.generate(ruby0) # {"json_class":"Range","a":[0,2,false]} +# ruby1 = JSON.parse(json, create_additions: true) # 0..2 +# ruby1.class # Range +# +# \Rational: +# require 'json/add/rational' +# ruby0 = Rational(1, 3) # 1/3 +# json = JSON.generate(ruby0) # {"json_class":"Rational","n":1,"d":3} +# ruby1 = JSON.parse(json, create_additions: true) # 1/3 +# ruby1.class # Rational +# +# \Regexp: +# require 'json/add/regexp' +# ruby0 = Regexp.new('foo') # (?-mix:foo) +# json = JSON.generate(ruby0) # {"json_class":"Regexp","o":0,"s":"foo"} +# ruby1 = JSON.parse(json, create_additions: true) # (?-mix:foo) +# ruby1.class # Regexp +# +# \Set: +# require 'json/add/set' +# ruby0 = Set.new([0, 1, 2]) # # +# json = JSON.generate(ruby0) # {"json_class":"Set","a":[0,1,2]} +# ruby1 = JSON.parse(json, create_additions: true) # # +# ruby1.class # Set +# +# \Struct: +# require 'json/add/struct' +# Customer = Struct.new(:name, :address) # Customer +# ruby0 = Customer.new("Dave", "123 Main") # # +# json = JSON.generate(ruby0) # {"json_class":"Customer","v":["Dave","123 Main"]} +# ruby1 = JSON.parse(json, create_additions: true) # # +# ruby1.class # Customer +# +# \Symbol: +# require 'json/add/symbol' +# ruby0 = :foo # foo +# json = JSON.generate(ruby0) # {"json_class":"Symbol","s":"foo"} +# ruby1 = JSON.parse(json, create_additions: true) # foo +# ruby1.class # Symbol +# +# \Time: +# require 'json/add/time' +# ruby0 = Time.now # 2020-05-02 11:28:26 -0500 +# json = JSON.generate(ruby0) # {"json_class":"Time","s":1588436906,"n":840560000} +# ruby1 = JSON.parse(json, create_additions: true) # 2020-05-02 11:28:26 -0500 +# ruby1.class # Time +# +# +# === Custom \JSON Additions +# +# In addition to the \JSON additions provided, +# you can craft \JSON additions of your own, +# either for Ruby built-in classes or for user-defined classes. +# +# Here's a user-defined class +Foo+: +# class Foo +# attr_accessor :bar, :baz +# def initialize(bar, baz) +# self.bar = bar +# self.baz = baz +# end +# end +# +# Here's the \JSON addition for it: +# # Extend class Foo with JSON addition. +# class Foo +# # Serialize Foo object with its class name and arguments +# def to_json(*args) +# { +# JSON.create_id => self.class.name, +# 'a' => [ bar, baz ] +# }.to_json(*args) +# end +# # Deserialize JSON string by constructing new Foo object with arguments. +# def self.json_create(object) +# new(*object['a']) +# end +# end +# +# Demonstration: +# require 'json' +# # This Foo object has no custom addition. +# foo0 = Foo.new(0, 1) +# json0 = JSON.generate(foo0) +# obj0 = JSON.parse(json0) +# # Lood the custom addition. +# require_relative 'foo_addition' +# # This foo has the custom addition. +# foo1 = Foo.new(0, 1) +# json1 = JSON.generate(foo1) +# obj1 = JSON.parse(json1, create_additions: true) +# # Make a nice display. +# display = <" (String) +# With custom addition: {"json_class":"Foo","a":[0,1]} (String) +# Parsed JSON: +# Without custom addition: "#" (String) +# With custom addition: # (Foo) +module JSON + private + + # :call-seq: + # JSON.dump(obj, io = nil, limit = nil) + # + # Dumps +obj+ as a \JSON string, i.e. calls generate on the object and returns the result. + # + # The default options can be changed via method JSON.dump_default_options. + # + # - Argument +io+, if given, should respond to method +write+; + # the \JSON \String is written to +io+, and +io+ is returned. + # If +io+ is not given, the \JSON \String is returned. + # - Argument +limit+, if given, is passed to JSON.generate as option +max_nesting+. + # + # --- + # + # When argument +io+ is not given, returns the \JSON \String generated from +obj+: + # obj = {foo: [0, 1], bar: {baz: 2, bat: 3}, bam: :bad} + # json = JSON.dump(obj) + # json # => "{\"foo\":[0,1],\"bar\":{\"baz\":2,\"bat\":3},\"bam\":\"bad\"}" + # + # When argument +io+ is given, writes the \JSON \String to +io+ and returns +io+: + # path = 't.json' + # File.open(path, 'w') do |file| + # JSON.dump(obj, file) + # end # => # + # puts File.read(path) + # Output: + # {"foo":[0,1],"bar":{"baz":2,"bat":3},"bam":"bad"} + # + # source://json//json/common.rb#631 + def dump(obj, anIO = T.unsafe(nil), limit = T.unsafe(nil)); end + + # :call-seq: + # JSON.fast_generate(obj, opts) -> new_string + # + # Arguments +obj+ and +opts+ here are the same as + # arguments +obj+ and +opts+ in JSON.generate. + # + # By default, generates \JSON data without checking + # for circular references in +obj+ (option +max_nesting+ set to +false+, disabled). + # + # Raises an exception if +obj+ contains circular references: + # a = []; b = []; a.push(b); b.push(a) + # # Raises SystemStackError (stack level too deep): + # JSON.fast_generate(a) + # + # source://json//json/common.rb#335 + 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//json/common.rb#335 + def fast_unparse(obj, opts = T.unsafe(nil)); 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. + # + # Argument +obj+ is the Ruby object to be converted to \JSON. + # + # Argument +opts+, if given, contains a \Hash of options for the generation. + # See {Generating Options}[#module-JSON-label-Generating+Options]. + # + # --- + # + # When +obj+ is an \Array, returns a \String containing a \JSON array: + # obj = ["foo", 1.0, true, false, nil] + # json = JSON.generate(obj) + # json # => '["foo",1.0,true,false,null]' + # + # When +obj+ is a \Hash, returns a \String containing a \JSON object: + # obj = {foo: 0, bar: 's', baz: :bat} + # json = JSON.generate(obj) + # json # => '{"foo":0,"bar":"s","baz":"bat"}' + # + # For examples of generating from other Ruby objects, see + # {Generating \JSON from Other Objects}[#module-JSON-label-Generating+JSON+from+Other+Objects]. + # + # --- + # + # Raises an exception if any formatting option is not a \String. + # + # Raises an exception if +obj+ contains circular references: + # a = []; b = []; a.push(b); b.push(a) + # # Raises JSON::NestingError (nesting of 100 is too deep): + # JSON.generate(a) + # + # source://json//json/common.rb#296 + def generate(obj, opts = T.unsafe(nil)); end + + # :call-seq: + # JSON.load(source, proc = nil, options = {}) -> object + # + # Returns the Ruby objects created by parsing the given +source+. + # + # - 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. + # 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=. + # + # --- + # + # When no +proc+ is given, modifies +source+ as above and returns the result of + # parse(source, opts); see #parse. + # + # Source for following examples: + # source = <<-EOT + # { + # "name": "Dave", + # "age" :40, + # "hats": [ + # "Cattleman's", + # "Panama", + # "Tophat" + # ] + # } + # EOT + # + # Load a \String: + # ruby = JSON.load(source) + # ruby # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} + # + # Load an \IO object: + # require 'stringio' + # object = JSON.load(StringIO.new(source)) + # object # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} + # + # Load a \File object: + # path = 't.json' + # File.write(path, source) + # File.open(path) do |file| + # JSON.load(file) + # end # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} + # + # --- + # + # When +proc+ is given: + # - Modifies +source+ as above. + # - Gets the +result+ from calling parse(source, opts). + # - Recursively calls proc(result). + # - Returns the final result. + # + # Example: + # require 'json' + # + # # Some classes for the example. + # class Base + # def initialize(attributes) + # @attributes = attributes + # end + # end + # class User < Base; end + # class Account < Base; end + # class Admin < Base; end + # # The JSON source. + # json = <<-EOF + # { + # "users": [ + # {"type": "User", "username": "jane", "email": "jane@example.com"}, + # {"type": "User", "username": "john", "email": "john@example.com"} + # ], + # "accounts": [ + # {"account": {"type": "Account", "paid": true, "account_id": "1234"}}, + # {"account": {"type": "Account", "paid": false, "account_id": "1235"}} + # ], + # "admins": {"type": "Admin", "password": "0wn3d"} + # } + # EOF + # # Deserializer method. + # def deserialize_obj(obj, safe_types = %w(User Account Admin)) + # type = obj.is_a?(Hash) && obj["type"] + # safe_types.include?(type) ? Object.const_get(type).new(obj) : obj + # end + # # Call to JSON.load + # ruby = JSON.load(json, proc {|obj| + # case obj + # when Hash + # obj.each {|k, v| obj[k] = deserialize_obj v } + # when Array + # obj.map! {|v| deserialize_obj v } + # end + # }) + # 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"}>} + # + # source://json//json/common.rb#557 + def load(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end + + # :call-seq: + # JSON.load_file(path, opts={}) -> object + # + # Calls: + # parse(File.read(path), opts) + # + # See method #parse. + # + # source://json//json/common.rb#245 + def load_file(filespec, opts = T.unsafe(nil)); end + + # :call-seq: + # JSON.load_file!(path, opts = {}) + # + # Calls: + # JSON.parse!(File.read(path, opts)) + # + # See method #parse! + # + # source://json//json/common.rb#256 + def load_file!(filespec, opts = T.unsafe(nil)); end + + # :call-seq: + # JSON.parse(source, opts) -> object + # + # Returns the Ruby objects created by parsing the given +source+. + # + # Argument +source+ contains the \String to be parsed. + # + # Argument +opts+, if given, contains a \Hash of options for the parsing. + # See {Parsing Options}[#module-JSON-label-Parsing+Options]. + # + # --- + # + # When +source+ is a \JSON array, returns a Ruby \Array: + # source = '["foo", 1.0, true, false, null]' + # ruby = JSON.parse(source) + # ruby # => ["foo", 1.0, true, false, nil] + # ruby.class # => Array + # + # When +source+ is a \JSON object, returns a Ruby \Hash: + # source = '{"a": "foo", "b": 1.0, "c": true, "d": false, "e": null}' + # ruby = JSON.parse(source) + # ruby # => {"a"=>"foo", "b"=>1.0, "c"=>true, "d"=>false, "e"=>nil} + # ruby.class # => Hash + # + # For examples of parsing for all \JSON data types, see + # {Parsing \JSON}[#module-JSON-label-Parsing+JSON]. + # + # Parses nested JSON objects: + # source = <<-EOT + # { + # "name": "Dave", + # "age" :40, + # "hats": [ + # "Cattleman's", + # "Panama", + # "Tophat" + # ] + # } + # EOT + # ruby = JSON.parse(source) + # ruby # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} + # + # --- + # + # Raises an exception if +source+ is not valid JSON: + # # Raises JSON::ParserError (783: unexpected token at ''): + # JSON.parse('') + # + # source://json//json/common.rb#215 + def parse(source, opts = T.unsafe(nil)); end + + # :call-seq: + # JSON.parse!(source, opts) -> object + # + # Calls + # parse(source, opts) + # with +source+ and possibly modified +opts+. + # + # Differences from JSON.parse: + # - Option +max_nesting+, if not provided, defaults to +false+, + # which disables checking for nesting depth. + # - Option +allow_nan+, if not provided, defaults to +true+. + # + # source://json//json/common.rb#230 + def parse!(source, opts = T.unsafe(nil)); end + + # :call-seq: + # JSON.pretty_generate(obj, opts = nil) -> new_string + # + # Arguments +obj+ and +opts+ here are the same as + # arguments +obj+ and +opts+ in JSON.generate. + # + # Default options are: + # { + # indent: ' ', # Two spaces + # space: ' ', # One space + # array_nl: "\n", # Newline + # object_nl: "\n" # Newline + # } + # + # Example: + # obj = {foo: [:bar, :baz], bat: {bam: 0, bad: 1}} + # json = JSON.pretty_generate(obj) + # puts json + # Output: + # { + # "foo": [ + # "bar", + # "baz" + # ], + # "bat": { + # "bam": 0, + # "bad": 1 + # } + # } + # + # source://json//json/common.rb#390 + 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//json/common.rb#390 + 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//json/common.rb#575 + def recurse_proc(result, &proc); end + + # source://json//json/common.rb#557 + 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. + # + # source://json//json/common.rb#296 + def unparse(obj, opts = T.unsafe(nil)); end + + class << self + # :call-seq: + # JSON[object] -> new_array or new_string + # + # If +object+ is a \String, + # calls JSON.parse with +object+ and +opts+ (see method #parse): + # json = '[0, 1, null]' + # JSON[json]# => [0, 1, nil] + # + # Otherwise, calls JSON.generate with +object+ and +opts+ (see method #generate): + # ruby = [0, 1, nil] + # JSON[ruby] # => '[0,1,null]' + # + # source://json//json/common.rb#18 + def [](object, opts = T.unsafe(nil)); end + + # source://json//json/common.rb#81 + def create_fast_state; end + + # Returns the current create identifier. + # See also JSON.create_id=. + # + # source://json//json/common.rb#126 + 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//json/common.rb#120 + def create_id=(new_value); end + + # source://json//json/common.rb#91 + 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//json/common.rb#42 + def deep_const_get(path); end + + # :call-seq: + # JSON.dump(obj, io = nil, limit = nil) + # + # Dumps +obj+ as a \JSON string, i.e. calls generate on the object and returns the result. + # + # The default options can be changed via method JSON.dump_default_options. + # + # - Argument +io+, if given, should respond to method +write+; + # the \JSON \String is written to +io+, and +io+ is returned. + # If +io+ is not given, the \JSON \String is returned. + # - Argument +limit+, if given, is passed to JSON.generate as option +max_nesting+. + # + # --- + # + # When argument +io+ is not given, returns the \JSON \String generated from +obj+: + # obj = {foo: [0, 1], bar: {baz: 2, bat: 3}, bam: :bad} + # json = JSON.dump(obj) + # json # => "{\"foo\":[0,1],\"bar\":{\"baz\":2,\"bat\":3},\"bam\":\"bad\"}" + # + # When argument +io+ is given, writes the \JSON \String to +io+ and returns +io+: + # path = 't.json' + # File.open(path, 'w') do |file| + # JSON.dump(obj, file) + # end # => # + # puts File.read(path) + # Output: + # {"foo":[0,1],"bar":{"baz":2,"bat":3},"bam":"bad"} + # + # source://json//json/common.rb#631 + def dump(obj, anIO = T.unsafe(nil), limit = 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, :escape_slash=>false} + # + # source://json//json/common.rb#596 + 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, :escape_slash=>false} + # + # source://json//json/common.rb#596 + def dump_default_options=(_arg0); end + + # :call-seq: + # JSON.fast_generate(obj, opts) -> new_string + # + # Arguments +obj+ and +opts+ here are the same as + # arguments +obj+ and +opts+ in JSON.generate. + # + # By default, generates \JSON data without checking + # for circular references in +obj+ (option +max_nesting+ set to +false+, disabled). + # + # Raises an exception if +obj+ contains circular references: + # a = []; b = []; a.push(b); b.push(a) + # # Raises SystemStackError (stack level too deep): + # JSON.fast_generate(a) + # + # source://json//json/common.rb#335 + 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//json/common.rb#335 + def fast_unparse(obj, opts = T.unsafe(nil)); 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. + # + # Argument +obj+ is the Ruby object to be converted to \JSON. + # + # Argument +opts+, if given, contains a \Hash of options for the generation. + # See {Generating Options}[#module-JSON-label-Generating+Options]. + # + # --- + # + # When +obj+ is an \Array, returns a \String containing a \JSON array: + # obj = ["foo", 1.0, true, false, nil] + # json = JSON.generate(obj) + # json # => '["foo",1.0,true,false,null]' + # + # When +obj+ is a \Hash, returns a \String containing a \JSON object: + # obj = {foo: 0, bar: 's', baz: :bat} + # json = JSON.generate(obj) + # json # => '{"foo":0,"bar":"s","baz":"bat"}' + # + # For examples of generating from other Ruby objects, see + # {Generating \JSON from Other Objects}[#module-JSON-label-Generating+JSON+from+Other+Objects]. + # + # --- + # + # Raises an exception if any formatting option is not a \String. + # + # Raises an exception if +obj+ contains circular references: + # a = []; b = []; a.push(b); b.push(a) + # # Raises JSON::NestingError (nesting of 100 is too deep): + # JSON.generate(a) + # + # source://json//json/common.rb#296 + 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 + # + # source://json//json/common.rb#103 + def generator; end + + # Set the module _generator_ to be used by JSON. + # + # source://json//json/common.rb#58 + def generator=(generator); end + + # Encodes string using String.encode. + # + # source://json//json/common.rb#653 + def iconv(to, from, string); end + + # :call-seq: + # JSON.load(source, proc = nil, options = {}) -> object + # + # Returns the Ruby objects created by parsing the given +source+. + # + # - 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. + # 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=. + # + # --- + # + # When no +proc+ is given, modifies +source+ as above and returns the result of + # parse(source, opts); see #parse. + # + # Source for following examples: + # source = <<-EOT + # { + # "name": "Dave", + # "age" :40, + # "hats": [ + # "Cattleman's", + # "Panama", + # "Tophat" + # ] + # } + # EOT + # + # Load a \String: + # ruby = JSON.load(source) + # ruby # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} + # + # Load an \IO object: + # require 'stringio' + # object = JSON.load(StringIO.new(source)) + # object # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} + # + # Load a \File object: + # path = 't.json' + # File.write(path, source) + # File.open(path) do |file| + # JSON.load(file) + # end # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} + # + # --- + # + # When +proc+ is given: + # - Modifies +source+ as above. + # - Gets the +result+ from calling parse(source, opts). + # - Recursively calls proc(result). + # - Returns the final result. + # + # Example: + # require 'json' + # + # # Some classes for the example. + # class Base + # def initialize(attributes) + # @attributes = attributes + # end + # end + # class User < Base; end + # class Account < Base; end + # class Admin < Base; end + # # The JSON source. + # json = <<-EOF + # { + # "users": [ + # {"type": "User", "username": "jane", "email": "jane@example.com"}, + # {"type": "User", "username": "john", "email": "john@example.com"} + # ], + # "accounts": [ + # {"account": {"type": "Account", "paid": true, "account_id": "1234"}}, + # {"account": {"type": "Account", "paid": false, "account_id": "1235"}} + # ], + # "admins": {"type": "Admin", "password": "0wn3d"} + # } + # EOF + # # Deserializer method. + # def deserialize_obj(obj, safe_types = %w(User Account Admin)) + # type = obj.is_a?(Hash) && obj["type"] + # safe_types.include?(type) ? Object.const_get(type).new(obj) : obj + # end + # # Call to JSON.load + # ruby = JSON.load(json, proc {|obj| + # case obj + # when Hash + # obj.each {|k, v| obj[k] = deserialize_obj v } + # when Array + # obj.map! {|v| deserialize_obj v } + # end + # }) + # 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"}>} + # + # source://json//json/common.rb#557 + 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//json/common.rb#420 + 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//json/common.rb#420 + def load_default_options=(_arg0); end + + # :call-seq: + # JSON.load_file(path, opts={}) -> object + # + # Calls: + # parse(File.read(path), opts) + # + # See method #parse. + # + # source://json//json/common.rb#245 + def load_file(filespec, opts = T.unsafe(nil)); end + + # :call-seq: + # JSON.load_file!(path, opts = {}) + # + # Calls: + # JSON.parse!(File.read(path, opts)) + # + # See method #parse! + # + # source://json//json/common.rb#256 + def load_file!(filespec, opts = T.unsafe(nil)); end + + # :call-seq: + # JSON.parse(source, opts) -> object + # + # Returns the Ruby objects created by parsing the given +source+. + # + # Argument +source+ contains the \String to be parsed. + # + # Argument +opts+, if given, contains a \Hash of options for the parsing. + # See {Parsing Options}[#module-JSON-label-Parsing+Options]. + # + # --- + # + # When +source+ is a \JSON array, returns a Ruby \Array: + # source = '["foo", 1.0, true, false, null]' + # ruby = JSON.parse(source) + # ruby # => ["foo", 1.0, true, false, nil] + # ruby.class # => Array + # + # When +source+ is a \JSON object, returns a Ruby \Hash: + # source = '{"a": "foo", "b": 1.0, "c": true, "d": false, "e": null}' + # ruby = JSON.parse(source) + # ruby # => {"a"=>"foo", "b"=>1.0, "c"=>true, "d"=>false, "e"=>nil} + # ruby.class # => Hash + # + # For examples of parsing for all \JSON data types, see + # {Parsing \JSON}[#module-JSON-label-Parsing+JSON]. + # + # Parses nested JSON objects: + # source = <<-EOT + # { + # "name": "Dave", + # "age" :40, + # "hats": [ + # "Cattleman's", + # "Panama", + # "Tophat" + # ] + # } + # EOT + # ruby = JSON.parse(source) + # ruby # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} + # + # --- + # + # Raises an exception if +source+ is not valid JSON: + # # Raises JSON::ParserError (783: unexpected token at ''): + # JSON.parse('') + # + # source://json//json/common.rb#215 + def parse(source, opts = T.unsafe(nil)); end + + # :call-seq: + # JSON.parse!(source, opts) -> object + # + # Calls + # parse(source, opts) + # with +source+ and possibly modified +opts+. + # + # Differences from JSON.parse: + # - Option +max_nesting+, if not provided, defaults to +false+, + # which disables checking for nesting depth. + # - Option +allow_nan+, if not provided, defaults to +true+. + # + # source://json//json/common.rb#230 + 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 + # + # source://json//json/common.rb#29 + def parser; end + + # Set the JSON parser class _parser_ to be used by JSON. + # + # source://json//json/common.rb#32 + def parser=(parser); end + + # :call-seq: + # JSON.pretty_generate(obj, opts = nil) -> new_string + # + # Arguments +obj+ and +opts+ here are the same as + # arguments +obj+ and +opts+ in JSON.generate. + # + # Default options are: + # { + # indent: ' ', # Two spaces + # space: ' ', # One space + # array_nl: "\n", # Newline + # object_nl: "\n" # Newline + # } + # + # Example: + # obj = {foo: [:bar, :baz], bat: {bam: 0, bad: 1}} + # json = JSON.pretty_generate(obj) + # puts json + # Output: + # { + # "foo": [ + # "bar", + # "baz" + # ], + # "bat": { + # "bam": 0, + # "bad": 1 + # } + # } + # + # source://json//json/common.rb#390 + 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//json/common.rb#390 + 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//json/common.rb#575 + def recurse_proc(result, &proc); end + + # source://json//json/common.rb#557 + def restore(source, proc = T.unsafe(nil), options = T.unsafe(nil)); 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 + # + # source://json//json/common.rb#108 + 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 + # + # source://json//json/common.rb#108 + def state=(_arg0); end + + # :stopdoc: + # I want to deprecate these later, so I'll first be silent about them, and + # later delete them. + # + # source://json//json/common.rb#296 + def unparse(obj, opts = T.unsafe(nil)); end + end +end + +# source://json//json/common.rb#114 +JSON::CREATE_ID_TLS_KEY = T.let(T.unsafe(nil), String) + +# source://json//json/common.rb#111 +JSON::DEFAULT_CREATE_ID = T.let(T.unsafe(nil), String) + +class JSON::GenericObject < ::OpenStruct + # source://json//json/generic_object.rb#63 + def as_json(*_arg0); end + + # source://json//json/generic_object.rb#47 + def to_hash; end + + # source://json//json/generic_object.rb#67 + def to_json(*a); end + + # source://json//json/generic_object.rb#59 + def |(other); end + + class << self + # source://json//json/generic_object.rb#41 + def dump(obj, *args); end + + # source://json//json/generic_object.rb#21 + def from_hash(object); end + + # Sets the attribute json_creatable + # + # @param value the value to set the attribute json_creatable to. + # + # source://json//json/generic_object.rb#13 + def json_creatable=(_arg0); end + + # @return [Boolean] + # + # source://json//json/generic_object.rb#9 + def json_creatable?; end + + # source://json//json/generic_object.rb#15 + def json_create(data); end + + # source://json//json/generic_object.rb#36 + def load(source, proc = T.unsafe(nil), opts = T.unsafe(nil)); end + end +end + +# The base exception for JSON errors. +class JSON::JSONError < ::StandardError + class << self + # source://json//json/common.rb#138 + def wrap(exception); end + end +end + +# source://json//json/common.rb#35 +JSON::Parser = JSON::Ext::Parser + +# source://json//json/common.rb#73 +JSON::State = JSON::Ext::Generator::State + +# For backwards compatibility +# +# source://json//json/common.rb#159 +JSON::UnparserError = JSON::GeneratorError + +module Kernel + private + + # If _object_ is string-like, parse the string and return the parsed result as + # a Ruby data structure. Otherwise, generate a JSON text from the Ruby data + # structure object and return it. + # + # The _opts_ argument is passed through to generate/parse respectively. See + # generate and parse for their documentation. + # + # source://json//json/common.rb#685 + def JSON(object, *args); end + + # Outputs _objs_ to STDOUT as JSON strings in the shortest form, that is in + # one line. + # + # source://json//json/common.rb#663 + def j(*objs); end + + # Outputs _objs_ to STDOUT as JSON strings in a pretty format, with + # indentation and over many lines. + # + # source://json//json/common.rb#672 + def jj(*objs); end +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 new file mode 100644 index 0000000..f6b1d8e --- /dev/null +++ b/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi @@ -0,0 +1,14237 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `language_server-protocol` gem. +# Please instead update this file by running `bin/tapioca gem language_server-protocol`. + +# source://language_server-protocol//lib/language_server/protocol/version.rb#1 +module LanguageServer; end + +# source://language_server-protocol//lib/language_server/protocol/version.rb#2 +module LanguageServer::Protocol; end + +# source://language_server-protocol//lib/language_server/protocol/constant.rb#3 +module LanguageServer::Protocol::Constant; end + +# The kind of a code action. +# +# Kinds are a hierarchical list of identifiers separated by `.`, +# e.g. `"refactor.extract.function"`. +# +# The set of kinds is open and client needs to announce the kinds it supports +# to the server during initialization. +# A set of predefined code action kinds. +# +# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#14 +module LanguageServer::Protocol::Constant::CodeActionKind; end + +# Empty kind. +# +# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#18 +LanguageServer::Protocol::Constant::CodeActionKind::EMPTY = T.let(T.unsafe(nil), String) + +# Base kind for quickfix actions: 'quickfix'. +# +# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#22 +LanguageServer::Protocol::Constant::CodeActionKind::QUICK_FIX = T.let(T.unsafe(nil), String) + +# Base kind for refactoring actions: 'refactor'. +# +# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#26 +LanguageServer::Protocol::Constant::CodeActionKind::REFACTOR = T.let(T.unsafe(nil), String) + +# Base kind for refactoring extraction actions: 'refactor.extract'. +# +# Example extract actions: +# +# - Extract method +# - Extract function +# - Extract variable +# - Extract interface from class +# - ... +# +# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#38 +LanguageServer::Protocol::Constant::CodeActionKind::REFACTOR_EXTRACT = T.let(T.unsafe(nil), String) + +# Base kind for refactoring inline actions: 'refactor.inline'. +# +# Example inline actions: +# +# - Inline function +# - Inline variable +# - Inline constant +# - ... +# +# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#49 +LanguageServer::Protocol::Constant::CodeActionKind::REFACTOR_INLINE = T.let(T.unsafe(nil), String) + +# Base kind for refactoring rewrite actions: 'refactor.rewrite'. +# +# Example rewrite actions: +# +# - Convert JavaScript function to class +# - Add or remove parameter +# - Encapsulate field +# - Make method static +# - Move method to base class +# - ... +# +# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#62 +LanguageServer::Protocol::Constant::CodeActionKind::REFACTOR_REWRITE = T.let(T.unsafe(nil), String) + +# Base kind for source actions: `source`. +# +# Source code actions apply to the entire file. +# +# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#68 +LanguageServer::Protocol::Constant::CodeActionKind::SOURCE = T.let(T.unsafe(nil), String) + +# Base kind for a 'fix all' source action: `source.fixAll`. +# +# 'Fix all' actions automatically fix errors that have a clear fix that +# do not require user input. They should not suppress errors or perform +# unsafe fixes such as generating new types or classes. +# +# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#81 +LanguageServer::Protocol::Constant::CodeActionKind::SOURCE_FIX_ALL = T.let(T.unsafe(nil), String) + +# Base kind for an organize imports source action: +# `source.organizeImports`. +# +# source://language_server-protocol//lib/language_server/protocol/constant/code_action_kind.rb#73 +LanguageServer::Protocol::Constant::CodeActionKind::SOURCE_ORGANIZE_IMPORTS = T.let(T.unsafe(nil), String) + +# The reason why code actions were requested. +# +# source://language_server-protocol//lib/language_server/protocol/constant/code_action_trigger_kind.rb#7 +module LanguageServer::Protocol::Constant::CodeActionTriggerKind; end + +# Code actions were requested automatically. +# +# This typically happens when current selection in a file changes, but can +# also be triggered when file content changes. +# +# source://language_server-protocol//lib/language_server/protocol/constant/code_action_trigger_kind.rb#18 +LanguageServer::Protocol::Constant::CodeActionTriggerKind::AUTOMATIC = T.let(T.unsafe(nil), Integer) + +# Code actions were explicitly requested by the user or by an extension. +# +# source://language_server-protocol//lib/language_server/protocol/constant/code_action_trigger_kind.rb#11 +LanguageServer::Protocol::Constant::CodeActionTriggerKind::INVOKED = T.let(T.unsafe(nil), Integer) + +# The kind of a completion entry. +# +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#7 +module LanguageServer::Protocol::Constant::CompletionItemKind; end + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#14 +LanguageServer::Protocol::Constant::CompletionItemKind::CLASS = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#23 +LanguageServer::Protocol::Constant::CompletionItemKind::COLOR = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#28 +LanguageServer::Protocol::Constant::CompletionItemKind::CONSTANT = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#11 +LanguageServer::Protocol::Constant::CompletionItemKind::CONSTRUCTOR = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#20 +LanguageServer::Protocol::Constant::CompletionItemKind::ENUM = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#27 +LanguageServer::Protocol::Constant::CompletionItemKind::ENUM_MEMBER = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#30 +LanguageServer::Protocol::Constant::CompletionItemKind::EVENT = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#12 +LanguageServer::Protocol::Constant::CompletionItemKind::FIELD = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#24 +LanguageServer::Protocol::Constant::CompletionItemKind::FILE = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#26 +LanguageServer::Protocol::Constant::CompletionItemKind::FOLDER = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#10 +LanguageServer::Protocol::Constant::CompletionItemKind::FUNCTION = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#15 +LanguageServer::Protocol::Constant::CompletionItemKind::INTERFACE = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#21 +LanguageServer::Protocol::Constant::CompletionItemKind::KEYWORD = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#9 +LanguageServer::Protocol::Constant::CompletionItemKind::METHOD = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#16 +LanguageServer::Protocol::Constant::CompletionItemKind::MODULE = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#31 +LanguageServer::Protocol::Constant::CompletionItemKind::OPERATOR = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#17 +LanguageServer::Protocol::Constant::CompletionItemKind::PROPERTY = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#25 +LanguageServer::Protocol::Constant::CompletionItemKind::REFERENCE = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#22 +LanguageServer::Protocol::Constant::CompletionItemKind::SNIPPET = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#29 +LanguageServer::Protocol::Constant::CompletionItemKind::STRUCT = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#8 +LanguageServer::Protocol::Constant::CompletionItemKind::TEXT = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#32 +LanguageServer::Protocol::Constant::CompletionItemKind::TYPE_PARAMETER = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#18 +LanguageServer::Protocol::Constant::CompletionItemKind::UNIT = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#19 +LanguageServer::Protocol::Constant::CompletionItemKind::VALUE = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_kind.rb#13 +LanguageServer::Protocol::Constant::CompletionItemKind::VARIABLE = T.let(T.unsafe(nil), Integer) + +# Completion item tags are extra annotations that tweak the rendering of a +# completion item. +# +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_tag.rb#8 +module LanguageServer::Protocol::Constant::CompletionItemTag; end + +# Render a completion as obsolete, usually using a strike-out. +# +# source://language_server-protocol//lib/language_server/protocol/constant/completion_item_tag.rb#12 +LanguageServer::Protocol::Constant::CompletionItemTag::DEPRECATED = T.let(T.unsafe(nil), Integer) + +# How a completion was triggered +# +# source://language_server-protocol//lib/language_server/protocol/constant/completion_trigger_kind.rb#7 +module LanguageServer::Protocol::Constant::CompletionTriggerKind; end + +# Completion was triggered by typing an identifier (24x7 code +# complete), manual invocation (e.g Ctrl+Space) or via API. +# +# source://language_server-protocol//lib/language_server/protocol/constant/completion_trigger_kind.rb#12 +LanguageServer::Protocol::Constant::CompletionTriggerKind::INVOKED = T.let(T.unsafe(nil), Integer) + +# Completion was triggered by a trigger character specified by +# the `triggerCharacters` properties of the +# `CompletionRegistrationOptions`. +# +# source://language_server-protocol//lib/language_server/protocol/constant/completion_trigger_kind.rb#18 +LanguageServer::Protocol::Constant::CompletionTriggerKind::TRIGGER_CHARACTER = T.let(T.unsafe(nil), Integer) + +# Completion was re-triggered as the current completion list is incomplete. +# +# source://language_server-protocol//lib/language_server/protocol/constant/completion_trigger_kind.rb#22 +LanguageServer::Protocol::Constant::CompletionTriggerKind::TRIGGER_FOR_INCOMPLETE_COMPLETIONS = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/diagnostic_severity.rb#4 +module LanguageServer::Protocol::Constant::DiagnosticSeverity; end + +# Reports an error. +# +# source://language_server-protocol//lib/language_server/protocol/constant/diagnostic_severity.rb#8 +LanguageServer::Protocol::Constant::DiagnosticSeverity::ERROR = T.let(T.unsafe(nil), Integer) + +# Reports a hint. +# +# source://language_server-protocol//lib/language_server/protocol/constant/diagnostic_severity.rb#20 +LanguageServer::Protocol::Constant::DiagnosticSeverity::HINT = T.let(T.unsafe(nil), Integer) + +# Reports an information. +# +# source://language_server-protocol//lib/language_server/protocol/constant/diagnostic_severity.rb#16 +LanguageServer::Protocol::Constant::DiagnosticSeverity::INFORMATION = T.let(T.unsafe(nil), Integer) + +# Reports a warning. +# +# source://language_server-protocol//lib/language_server/protocol/constant/diagnostic_severity.rb#12 +LanguageServer::Protocol::Constant::DiagnosticSeverity::WARNING = T.let(T.unsafe(nil), Integer) + +# The diagnostic tags. +# +# source://language_server-protocol//lib/language_server/protocol/constant/diagnostic_tag.rb#7 +module LanguageServer::Protocol::Constant::DiagnosticTag; end + +# Deprecated or obsolete code. +# +# Clients are allowed to rendered diagnostics with this tag strike through. +# +# source://language_server-protocol//lib/language_server/protocol/constant/diagnostic_tag.rb#20 +LanguageServer::Protocol::Constant::DiagnosticTag::DEPRECATED = T.let(T.unsafe(nil), Integer) + +# Unused or unnecessary code. +# +# Clients are allowed to render diagnostics with this tag faded out +# instead of having an error squiggle. +# +# source://language_server-protocol//lib/language_server/protocol/constant/diagnostic_tag.rb#14 +LanguageServer::Protocol::Constant::DiagnosticTag::UNNECESSARY = T.let(T.unsafe(nil), Integer) + +# The document diagnostic report kinds. +# +# source://language_server-protocol//lib/language_server/protocol/constant/document_diagnostic_report_kind.rb#7 +module LanguageServer::Protocol::Constant::DocumentDiagnosticReportKind; end + +# A diagnostic report with a full +# set of problems. +# +# source://language_server-protocol//lib/language_server/protocol/constant/document_diagnostic_report_kind.rb#12 +LanguageServer::Protocol::Constant::DocumentDiagnosticReportKind::FULL = T.let(T.unsafe(nil), String) + +# A report indicating that the last +# returned report is still accurate. +# +# source://language_server-protocol//lib/language_server/protocol/constant/document_diagnostic_report_kind.rb#17 +LanguageServer::Protocol::Constant::DocumentDiagnosticReportKind::UNCHANGED = T.let(T.unsafe(nil), String) + +# A document highlight kind. +# +# source://language_server-protocol//lib/language_server/protocol/constant/document_highlight_kind.rb#7 +module LanguageServer::Protocol::Constant::DocumentHighlightKind; end + +# Read-access of a symbol, like reading a variable. +# +# source://language_server-protocol//lib/language_server/protocol/constant/document_highlight_kind.rb#15 +LanguageServer::Protocol::Constant::DocumentHighlightKind::READ = T.let(T.unsafe(nil), Integer) + +# A textual occurrence. +# +# source://language_server-protocol//lib/language_server/protocol/constant/document_highlight_kind.rb#11 +LanguageServer::Protocol::Constant::DocumentHighlightKind::TEXT = T.let(T.unsafe(nil), Integer) + +# Write-access of a symbol, like writing to a variable. +# +# source://language_server-protocol//lib/language_server/protocol/constant/document_highlight_kind.rb#19 +LanguageServer::Protocol::Constant::DocumentHighlightKind::WRITE = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#4 +module LanguageServer::Protocol::Constant::ErrorCodes; end + +# The server detected that the content of a document got +# modified outside normal conditions. A server should +# NOT send this error code if it detects a content change +# in it unprocessed messages. The result even computed +# on an older state might still be useful for the client. +# +# If a client decides that a result is not of any use anymore +# the client should cancel the request. +# +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#59 +LanguageServer::Protocol::Constant::ErrorCodes::CONTENT_MODIFIED = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#9 +LanguageServer::Protocol::Constant::ErrorCodes::INTERNAL_ERROR = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#8 +LanguageServer::Protocol::Constant::ErrorCodes::INVALID_PARAMS = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#6 +LanguageServer::Protocol::Constant::ErrorCodes::INVALID_REQUEST = T.let(T.unsafe(nil), Integer) + +# This is the end range of JSON-RPC reserved error codes. +# It doesn't denote a real error code. +# +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#29 +LanguageServer::Protocol::Constant::ErrorCodes::JSONRPC_RESERVED_ERROR_RANGE_END = T.let(T.unsafe(nil), Integer) + +# This is the start range of JSON-RPC reserved error codes. +# It doesn't denote a real error code. No LSP error codes should +# be defined between the start and end range. For backwards +# compatibility the `ServerNotInitialized` and the `UnknownErrorCode` +# are left in the range. +# +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#17 +LanguageServer::Protocol::Constant::ErrorCodes::JSONRPC_RESERVED_ERROR_RANGE_START = T.let(T.unsafe(nil), Integer) + +# This is the end range of LSP reserved error codes. +# It doesn't denote a real error code. +# +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#69 +LanguageServer::Protocol::Constant::ErrorCodes::LSP_RESERVED_ERROR_RANGE_END = T.let(T.unsafe(nil), Integer) + +# This is the start range of LSP reserved error codes. +# It doesn't denote a real error code. +# +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#35 +LanguageServer::Protocol::Constant::ErrorCodes::LSP_RESERVED_ERROR_RANGE_START = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#7 +LanguageServer::Protocol::Constant::ErrorCodes::METHOD_NOT_FOUND = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#5 +LanguageServer::Protocol::Constant::ErrorCodes::PARSE_ERROR = T.let(T.unsafe(nil), Integer) + +# The client has canceled a request and a server as detected +# the cancel. +# +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#64 +LanguageServer::Protocol::Constant::ErrorCodes::REQUEST_CANCELLED = T.let(T.unsafe(nil), Integer) + +# A request failed but it was syntactically correct, e.g the +# method name was known and the parameters were valid. The error +# message should contain human readable information about why +# the request failed. +# +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#42 +LanguageServer::Protocol::Constant::ErrorCodes::REQUEST_FAILED = T.let(T.unsafe(nil), Integer) + +# The server cancelled the request. This error code should +# only be used for requests that explicitly support being +# server cancellable. +# +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#48 +LanguageServer::Protocol::Constant::ErrorCodes::SERVER_CANCELLED = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#30 +LanguageServer::Protocol::Constant::ErrorCodes::SERVER_ERROR_END = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#18 +LanguageServer::Protocol::Constant::ErrorCodes::SERVER_ERROR_START = T.let(T.unsafe(nil), Integer) + +# Error code indicating that a server received a notification or +# request before the server has received the `initialize` request. +# +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#23 +LanguageServer::Protocol::Constant::ErrorCodes::SERVER_NOT_INITIALIZED = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/error_codes.rb#24 +LanguageServer::Protocol::Constant::ErrorCodes::UNKNOWN_ERROR_CODE = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/failure_handling_kind.rb#4 +module LanguageServer::Protocol::Constant::FailureHandlingKind; end + +# Applying the workspace change is simply aborted if one of the changes +# provided fails. All operations executed before the failing operation +# stay executed. +# +# source://language_server-protocol//lib/language_server/protocol/constant/failure_handling_kind.rb#10 +LanguageServer::Protocol::Constant::FailureHandlingKind::ABORT = T.let(T.unsafe(nil), String) + +# If the workspace edit contains only textual file changes they are +# executed transactional. If resource changes (create, rename or delete +# file) are part of the change the failure handling strategy is abort. +# +# source://language_server-protocol//lib/language_server/protocol/constant/failure_handling_kind.rb#21 +LanguageServer::Protocol::Constant::FailureHandlingKind::TEXT_ONLY_TRANSACTIONAL = T.let(T.unsafe(nil), String) + +# All operations are executed transactional. That means they either all +# succeed or no changes at all are applied to the workspace. +# +# source://language_server-protocol//lib/language_server/protocol/constant/failure_handling_kind.rb#15 +LanguageServer::Protocol::Constant::FailureHandlingKind::TRANSACTIONAL = T.let(T.unsafe(nil), String) + +# The client tries to undo the operations already executed. But there is no +# guarantee that this is succeeding. +# +# source://language_server-protocol//lib/language_server/protocol/constant/failure_handling_kind.rb#26 +LanguageServer::Protocol::Constant::FailureHandlingKind::UNDO = T.let(T.unsafe(nil), String) + +# The file event type. +# +# source://language_server-protocol//lib/language_server/protocol/constant/file_change_type.rb#7 +module LanguageServer::Protocol::Constant::FileChangeType; end + +# The file got changed. +# +# source://language_server-protocol//lib/language_server/protocol/constant/file_change_type.rb#15 +LanguageServer::Protocol::Constant::FileChangeType::CHANGED = T.let(T.unsafe(nil), Integer) + +# The file got created. +# +# source://language_server-protocol//lib/language_server/protocol/constant/file_change_type.rb#11 +LanguageServer::Protocol::Constant::FileChangeType::CREATED = T.let(T.unsafe(nil), Integer) + +# The file got deleted. +# +# source://language_server-protocol//lib/language_server/protocol/constant/file_change_type.rb#19 +LanguageServer::Protocol::Constant::FileChangeType::DELETED = T.let(T.unsafe(nil), Integer) + +# A pattern kind describing if a glob pattern matches a file a folder or +# both. +# +# source://language_server-protocol//lib/language_server/protocol/constant/file_operation_pattern_kind.rb#8 +module LanguageServer::Protocol::Constant::FileOperationPatternKind; end + +# The pattern matches a file only. +# +# source://language_server-protocol//lib/language_server/protocol/constant/file_operation_pattern_kind.rb#12 +LanguageServer::Protocol::Constant::FileOperationPatternKind::FILE = T.let(T.unsafe(nil), String) + +# The pattern matches a folder only. +# +# source://language_server-protocol//lib/language_server/protocol/constant/file_operation_pattern_kind.rb#16 +LanguageServer::Protocol::Constant::FileOperationPatternKind::FOLDER = T.let(T.unsafe(nil), String) + +# A set of predefined range kinds. +# The type is a string since the value set is extensible +# +# source://language_server-protocol//lib/language_server/protocol/constant/folding_range_kind.rb#8 +module LanguageServer::Protocol::Constant::FoldingRangeKind; end + +# Folding range for a comment +# +# source://language_server-protocol//lib/language_server/protocol/constant/folding_range_kind.rb#12 +LanguageServer::Protocol::Constant::FoldingRangeKind::COMMENT = T.let(T.unsafe(nil), String) + +# Folding range for imports or includes +# +# source://language_server-protocol//lib/language_server/protocol/constant/folding_range_kind.rb#16 +LanguageServer::Protocol::Constant::FoldingRangeKind::IMPORTS = T.let(T.unsafe(nil), String) + +# Folding range for a region (e.g. `#region`) +# +# source://language_server-protocol//lib/language_server/protocol/constant/folding_range_kind.rb#20 +LanguageServer::Protocol::Constant::FoldingRangeKind::REGION = T.let(T.unsafe(nil), String) + +# Known error codes for an `InitializeErrorCodes`; +# +# source://language_server-protocol//lib/language_server/protocol/constant/initialize_error_codes.rb#7 +module LanguageServer::Protocol::Constant::InitializeErrorCodes; end + +# If the protocol version provided by the client can't be handled by +# the server. +# +# source://language_server-protocol//lib/language_server/protocol/constant/initialize_error_codes.rb#12 +LanguageServer::Protocol::Constant::InitializeErrorCodes::UNKNOWN_PROTOCOL_VERSION = T.let(T.unsafe(nil), Integer) + +# Inlay hint kinds. +# +# source://language_server-protocol//lib/language_server/protocol/constant/inlay_hint_kind.rb#7 +module LanguageServer::Protocol::Constant::InlayHintKind; end + +# An inlay hint that is for a parameter. +# +# source://language_server-protocol//lib/language_server/protocol/constant/inlay_hint_kind.rb#15 +LanguageServer::Protocol::Constant::InlayHintKind::PARAMETER = T.let(T.unsafe(nil), Integer) + +# An inlay hint that for a type annotation. +# +# source://language_server-protocol//lib/language_server/protocol/constant/inlay_hint_kind.rb#11 +LanguageServer::Protocol::Constant::InlayHintKind::TYPE = T.let(T.unsafe(nil), Integer) + +# Defines whether the insert text in a completion item should be interpreted as +# plain text or a snippet. +# +# source://language_server-protocol//lib/language_server/protocol/constant/insert_text_format.rb#8 +module LanguageServer::Protocol::Constant::InsertTextFormat; end + +# The primary text to be inserted is treated as a plain string. +# +# source://language_server-protocol//lib/language_server/protocol/constant/insert_text_format.rb#12 +LanguageServer::Protocol::Constant::InsertTextFormat::PLAIN_TEXT = T.let(T.unsafe(nil), Integer) + +# The primary text to be inserted is treated as a snippet. +# +# A snippet can define tab stops and placeholders with `$1`, `$2` +# and `${3:foo}`. `$0` defines the final tab stop, it defaults to +# the end of the snippet. Placeholders with equal identifiers are linked, +# that is typing in one will update others too. +# +# source://language_server-protocol//lib/language_server/protocol/constant/insert_text_format.rb#21 +LanguageServer::Protocol::Constant::InsertTextFormat::SNIPPET = T.let(T.unsafe(nil), Integer) + +# How whitespace and indentation is handled during completion +# item insertion. +# +# source://language_server-protocol//lib/language_server/protocol/constant/insert_text_mode.rb#8 +module LanguageServer::Protocol::Constant::InsertTextMode; end + +# The editor adjusts leading whitespace of new lines so that +# they match the indentation up to the cursor of the line for +# which the item is accepted. +# +# Consider a line like this: <2tabs><3tabs>foo. Accepting a +# multi line completion item is indented using 2 tabs and all +# following lines inserted will be indented using 2 tabs as well. +# +# source://language_server-protocol//lib/language_server/protocol/constant/insert_text_mode.rb#26 +LanguageServer::Protocol::Constant::InsertTextMode::ADJUST_INDENTATION = T.let(T.unsafe(nil), Integer) + +# The insertion or replace strings is taken as it is. If the +# value is multi line the lines below the cursor will be +# inserted using the indentation defined in the string value. +# The client will not apply any kind of adjustments to the +# string. +# +# source://language_server-protocol//lib/language_server/protocol/constant/insert_text_mode.rb#16 +LanguageServer::Protocol::Constant::InsertTextMode::AS_IS = T.let(T.unsafe(nil), Integer) + +# Describes the content type that a client supports in various +# result literals like `Hover`, `ParameterInfo` or `CompletionItem`. +# +# Please note that `MarkupKinds` must not start with a `$`. This kinds +# are reserved for internal usage. +# +# source://language_server-protocol//lib/language_server/protocol/constant/markup_kind.rb#11 +module LanguageServer::Protocol::Constant::MarkupKind; end + +# Markdown is supported as a content format +# +# source://language_server-protocol//lib/language_server/protocol/constant/markup_kind.rb#19 +LanguageServer::Protocol::Constant::MarkupKind::MARKDOWN = T.let(T.unsafe(nil), String) + +# Plain text is supported as a content format +# +# source://language_server-protocol//lib/language_server/protocol/constant/markup_kind.rb#15 +LanguageServer::Protocol::Constant::MarkupKind::PLAIN_TEXT = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/message_type.rb#4 +module LanguageServer::Protocol::Constant::MessageType; end + +# An error message. +# +# source://language_server-protocol//lib/language_server/protocol/constant/message_type.rb#8 +LanguageServer::Protocol::Constant::MessageType::ERROR = T.let(T.unsafe(nil), Integer) + +# An information message. +# +# source://language_server-protocol//lib/language_server/protocol/constant/message_type.rb#16 +LanguageServer::Protocol::Constant::MessageType::INFO = T.let(T.unsafe(nil), Integer) + +# A log message. +# +# source://language_server-protocol//lib/language_server/protocol/constant/message_type.rb#20 +LanguageServer::Protocol::Constant::MessageType::LOG = T.let(T.unsafe(nil), Integer) + +# A warning message. +# +# source://language_server-protocol//lib/language_server/protocol/constant/message_type.rb#12 +LanguageServer::Protocol::Constant::MessageType::WARNING = T.let(T.unsafe(nil), Integer) + +# The moniker kind. +# +# source://language_server-protocol//lib/language_server/protocol/constant/moniker_kind.rb#7 +module LanguageServer::Protocol::Constant::MonikerKind; end + +# The moniker represents a symbol that is exported from a project +# +# source://language_server-protocol//lib/language_server/protocol/constant/moniker_kind.rb#15 +LanguageServer::Protocol::Constant::MonikerKind::EXPORT = T.let(T.unsafe(nil), String) + +# The moniker represent a symbol that is imported into a project +# +# source://language_server-protocol//lib/language_server/protocol/constant/moniker_kind.rb#11 +LanguageServer::Protocol::Constant::MonikerKind::IMPORT = T.let(T.unsafe(nil), String) + +# The moniker represents a symbol that is local to a project (e.g. a local +# variable of a function, a class not visible outside the project, ...) +# +# source://language_server-protocol//lib/language_server/protocol/constant/moniker_kind.rb#20 +LanguageServer::Protocol::Constant::MonikerKind::LOCAL = T.let(T.unsafe(nil), String) + +# A notebook cell kind. +# +# source://language_server-protocol//lib/language_server/protocol/constant/notebook_cell_kind.rb#7 +module LanguageServer::Protocol::Constant::NotebookCellKind; end + +# A code-cell is source code. +# +# source://language_server-protocol//lib/language_server/protocol/constant/notebook_cell_kind.rb#15 +LanguageServer::Protocol::Constant::NotebookCellKind::CODE = T.let(T.unsafe(nil), Integer) + +# A markup-cell is formatted source that is used for display. +# +# source://language_server-protocol//lib/language_server/protocol/constant/notebook_cell_kind.rb#11 +LanguageServer::Protocol::Constant::NotebookCellKind::MARKUP = T.let(T.unsafe(nil), Integer) + +# A type indicating how positions are encoded, +# specifically what column offsets mean. +# A set of predefined position encoding kinds. +# +# source://language_server-protocol//lib/language_server/protocol/constant/position_encoding_kind.rb#9 +module LanguageServer::Protocol::Constant::PositionEncodingKind; end + +# Character offsets count UTF-16 code units. +# +# This is the default and must always be supported +# by servers +# +# source://language_server-protocol//lib/language_server/protocol/constant/position_encoding_kind.rb#20 +LanguageServer::Protocol::Constant::PositionEncodingKind::UTF16 = T.let(T.unsafe(nil), String) + +# Character offsets count UTF-32 code units. +# +# Implementation note: these are the same as Unicode code points, +# so this `PositionEncodingKind` may also be used for an +# encoding-agnostic representation of character offsets. +# +# source://language_server-protocol//lib/language_server/protocol/constant/position_encoding_kind.rb#28 +LanguageServer::Protocol::Constant::PositionEncodingKind::UTF32 = T.let(T.unsafe(nil), String) + +# Character offsets count UTF-8 code units (e.g bytes). +# +# source://language_server-protocol//lib/language_server/protocol/constant/position_encoding_kind.rb#13 +LanguageServer::Protocol::Constant::PositionEncodingKind::UTF8 = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/prepare_support_default_behavior.rb#4 +module LanguageServer::Protocol::Constant::PrepareSupportDefaultBehavior; end + +# The client's default behavior is to select the identifier +# according to the language's syntax rule. +# +# source://language_server-protocol//lib/language_server/protocol/constant/prepare_support_default_behavior.rb#9 +LanguageServer::Protocol::Constant::PrepareSupportDefaultBehavior::IDENTIFIER = T.let(T.unsafe(nil), Integer) + +# The kind of resource operations supported by the client. +# +# source://language_server-protocol//lib/language_server/protocol/constant/resource_operation_kind.rb#7 +module LanguageServer::Protocol::Constant::ResourceOperationKind; end + +# Supports creating new files and folders. +# +# source://language_server-protocol//lib/language_server/protocol/constant/resource_operation_kind.rb#11 +LanguageServer::Protocol::Constant::ResourceOperationKind::CREATE = T.let(T.unsafe(nil), String) + +# Supports deleting existing files and folders. +# +# source://language_server-protocol//lib/language_server/protocol/constant/resource_operation_kind.rb#19 +LanguageServer::Protocol::Constant::ResourceOperationKind::DELETE = T.let(T.unsafe(nil), String) + +# Supports renaming existing files and folders. +# +# source://language_server-protocol//lib/language_server/protocol/constant/resource_operation_kind.rb#15 +LanguageServer::Protocol::Constant::ResourceOperationKind::RENAME = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#4 +module LanguageServer::Protocol::Constant::SemanticTokenModifiers; end + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#10 +LanguageServer::Protocol::Constant::SemanticTokenModifiers::ABSTRACT = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#11 +LanguageServer::Protocol::Constant::SemanticTokenModifiers::ASYNC = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#5 +LanguageServer::Protocol::Constant::SemanticTokenModifiers::DECLARATION = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#14 +LanguageServer::Protocol::Constant::SemanticTokenModifiers::DEFAULT_LIBRARY = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#6 +LanguageServer::Protocol::Constant::SemanticTokenModifiers::DEFINITION = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#9 +LanguageServer::Protocol::Constant::SemanticTokenModifiers::DEPRECATED = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#13 +LanguageServer::Protocol::Constant::SemanticTokenModifiers::DOCUMENTATION = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#12 +LanguageServer::Protocol::Constant::SemanticTokenModifiers::MODIFICATION = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#7 +LanguageServer::Protocol::Constant::SemanticTokenModifiers::READONLY = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_modifiers.rb#8 +LanguageServer::Protocol::Constant::SemanticTokenModifiers::STATIC = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#4 +module LanguageServer::Protocol::Constant::SemanticTokenTypes; end + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#11 +LanguageServer::Protocol::Constant::SemanticTokenTypes::CLASS = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#26 +LanguageServer::Protocol::Constant::SemanticTokenTypes::COMMENT = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#31 +LanguageServer::Protocol::Constant::SemanticTokenTypes::DECORATOR = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#12 +LanguageServer::Protocol::Constant::SemanticTokenTypes::ENUM = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#19 +LanguageServer::Protocol::Constant::SemanticTokenTypes::ENUM_MEMBER = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#20 +LanguageServer::Protocol::Constant::SemanticTokenTypes::EVENT = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#21 +LanguageServer::Protocol::Constant::SemanticTokenTypes::FUNCTION = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#13 +LanguageServer::Protocol::Constant::SemanticTokenTypes::INTERFACE = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#24 +LanguageServer::Protocol::Constant::SemanticTokenTypes::KEYWORD = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#23 +LanguageServer::Protocol::Constant::SemanticTokenTypes::MACRO = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#22 +LanguageServer::Protocol::Constant::SemanticTokenTypes::METHOD = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#25 +LanguageServer::Protocol::Constant::SemanticTokenTypes::MODIFIER = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#5 +LanguageServer::Protocol::Constant::SemanticTokenTypes::NAMESPACE = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#28 +LanguageServer::Protocol::Constant::SemanticTokenTypes::NUMBER = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#30 +LanguageServer::Protocol::Constant::SemanticTokenTypes::OPERATOR = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#16 +LanguageServer::Protocol::Constant::SemanticTokenTypes::PARAMETER = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#18 +LanguageServer::Protocol::Constant::SemanticTokenTypes::PROPERTY = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#29 +LanguageServer::Protocol::Constant::SemanticTokenTypes::REGEXP = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#27 +LanguageServer::Protocol::Constant::SemanticTokenTypes::STRING = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#14 +LanguageServer::Protocol::Constant::SemanticTokenTypes::STRUCT = T.let(T.unsafe(nil), String) + +# Represents a generic type. Acts as a fallback for types which +# can't be mapped to a specific type like class or enum. +# +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#10 +LanguageServer::Protocol::Constant::SemanticTokenTypes::TYPE = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#15 +LanguageServer::Protocol::Constant::SemanticTokenTypes::TYPE_PARAMETER = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/semantic_token_types.rb#17 +LanguageServer::Protocol::Constant::SemanticTokenTypes::VARIABLE = T.let(T.unsafe(nil), String) + +# How a signature help was triggered. +# +# source://language_server-protocol//lib/language_server/protocol/constant/signature_help_trigger_kind.rb#7 +module LanguageServer::Protocol::Constant::SignatureHelpTriggerKind; end + +# Signature help was triggered by the cursor moving or by the document +# content changing. +# +# source://language_server-protocol//lib/language_server/protocol/constant/signature_help_trigger_kind.rb#20 +LanguageServer::Protocol::Constant::SignatureHelpTriggerKind::CONTENT_CHANGE = T.let(T.unsafe(nil), Integer) + +# Signature help was invoked manually by the user or by a command. +# +# source://language_server-protocol//lib/language_server/protocol/constant/signature_help_trigger_kind.rb#11 +LanguageServer::Protocol::Constant::SignatureHelpTriggerKind::INVOKED = T.let(T.unsafe(nil), Integer) + +# Signature help was triggered by a trigger character. +# +# source://language_server-protocol//lib/language_server/protocol/constant/signature_help_trigger_kind.rb#15 +LanguageServer::Protocol::Constant::SignatureHelpTriggerKind::TRIGGER_CHARACTER = T.let(T.unsafe(nil), Integer) + +# A symbol kind. +# +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#7 +module LanguageServer::Protocol::Constant::SymbolKind; end + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#25 +LanguageServer::Protocol::Constant::SymbolKind::ARRAY = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#24 +LanguageServer::Protocol::Constant::SymbolKind::BOOLEAN = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#12 +LanguageServer::Protocol::Constant::SymbolKind::CLASS = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#21 +LanguageServer::Protocol::Constant::SymbolKind::CONSTANT = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#16 +LanguageServer::Protocol::Constant::SymbolKind::CONSTRUCTOR = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#17 +LanguageServer::Protocol::Constant::SymbolKind::ENUM = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#29 +LanguageServer::Protocol::Constant::SymbolKind::ENUM_MEMBER = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#31 +LanguageServer::Protocol::Constant::SymbolKind::EVENT = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#15 +LanguageServer::Protocol::Constant::SymbolKind::FIELD = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#8 +LanguageServer::Protocol::Constant::SymbolKind::FILE = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#19 +LanguageServer::Protocol::Constant::SymbolKind::FUNCTION = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#18 +LanguageServer::Protocol::Constant::SymbolKind::INTERFACE = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#27 +LanguageServer::Protocol::Constant::SymbolKind::KEY = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#13 +LanguageServer::Protocol::Constant::SymbolKind::METHOD = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#9 +LanguageServer::Protocol::Constant::SymbolKind::MODULE = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#10 +LanguageServer::Protocol::Constant::SymbolKind::NAMESPACE = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#28 +LanguageServer::Protocol::Constant::SymbolKind::NULL = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#23 +LanguageServer::Protocol::Constant::SymbolKind::NUMBER = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#26 +LanguageServer::Protocol::Constant::SymbolKind::OBJECT = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#32 +LanguageServer::Protocol::Constant::SymbolKind::OPERATOR = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#11 +LanguageServer::Protocol::Constant::SymbolKind::PACKAGE = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#14 +LanguageServer::Protocol::Constant::SymbolKind::PROPERTY = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#22 +LanguageServer::Protocol::Constant::SymbolKind::STRING = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#30 +LanguageServer::Protocol::Constant::SymbolKind::STRUCT = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#33 +LanguageServer::Protocol::Constant::SymbolKind::TYPE_PARAMETER = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_kind.rb#20 +LanguageServer::Protocol::Constant::SymbolKind::VARIABLE = T.let(T.unsafe(nil), Integer) + +# Symbol tags are extra annotations that tweak the rendering of a symbol. +# +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_tag.rb#7 +module LanguageServer::Protocol::Constant::SymbolTag; end + +# Render a symbol as obsolete, usually using a strike-out. +# +# source://language_server-protocol//lib/language_server/protocol/constant/symbol_tag.rb#11 +LanguageServer::Protocol::Constant::SymbolTag::DEPRECATED = T.let(T.unsafe(nil), Integer) + +# Represents reasons why a text document is saved. +# +# source://language_server-protocol//lib/language_server/protocol/constant/text_document_save_reason.rb#7 +module LanguageServer::Protocol::Constant::TextDocumentSaveReason; end + +# Automatic after a delay. +# +# source://language_server-protocol//lib/language_server/protocol/constant/text_document_save_reason.rb#16 +LanguageServer::Protocol::Constant::TextDocumentSaveReason::AFTER_DELAY = T.let(T.unsafe(nil), Integer) + +# When the editor lost focus. +# +# source://language_server-protocol//lib/language_server/protocol/constant/text_document_save_reason.rb#20 +LanguageServer::Protocol::Constant::TextDocumentSaveReason::FOCUS_OUT = T.let(T.unsafe(nil), Integer) + +# Manually triggered, e.g. by the user pressing save, by starting +# debugging, or by an API call. +# +# source://language_server-protocol//lib/language_server/protocol/constant/text_document_save_reason.rb#12 +LanguageServer::Protocol::Constant::TextDocumentSaveReason::MANUAL = T.let(T.unsafe(nil), Integer) + +# Defines how the host (editor) should sync document changes to the language +# server. +# +# source://language_server-protocol//lib/language_server/protocol/constant/text_document_sync_kind.rb#8 +module LanguageServer::Protocol::Constant::TextDocumentSyncKind; end + +# Documents are synced by always sending the full content +# of the document. +# +# source://language_server-protocol//lib/language_server/protocol/constant/text_document_sync_kind.rb#17 +LanguageServer::Protocol::Constant::TextDocumentSyncKind::FULL = T.let(T.unsafe(nil), Integer) + +# Documents are synced by sending the full content on open. +# After that only incremental updates to the document are +# sent. +# +# source://language_server-protocol//lib/language_server/protocol/constant/text_document_sync_kind.rb#23 +LanguageServer::Protocol::Constant::TextDocumentSyncKind::INCREMENTAL = T.let(T.unsafe(nil), Integer) + +# Documents should not be synced at all. +# +# source://language_server-protocol//lib/language_server/protocol/constant/text_document_sync_kind.rb#12 +LanguageServer::Protocol::Constant::TextDocumentSyncKind::NONE = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/constant/token_format.rb#4 +module LanguageServer::Protocol::Constant::TokenFormat; end + +# source://language_server-protocol//lib/language_server/protocol/constant/token_format.rb#5 +LanguageServer::Protocol::Constant::TokenFormat::RELATIVE = T.let(T.unsafe(nil), String) + +# Moniker uniqueness level to define scope of the moniker. +# +# source://language_server-protocol//lib/language_server/protocol/constant/uniqueness_level.rb#7 +module LanguageServer::Protocol::Constant::UniquenessLevel; end + +# The moniker is only unique inside a document +# +# source://language_server-protocol//lib/language_server/protocol/constant/uniqueness_level.rb#11 +LanguageServer::Protocol::Constant::UniquenessLevel::DOCUMENT = T.let(T.unsafe(nil), String) + +# The moniker is globally unique +# +# source://language_server-protocol//lib/language_server/protocol/constant/uniqueness_level.rb#27 +LanguageServer::Protocol::Constant::UniquenessLevel::GLOBAL = T.let(T.unsafe(nil), String) + +# The moniker is unique inside the group to which a project belongs +# +# source://language_server-protocol//lib/language_server/protocol/constant/uniqueness_level.rb#19 +LanguageServer::Protocol::Constant::UniquenessLevel::GROUP = T.let(T.unsafe(nil), String) + +# The moniker is unique inside a project for which a dump got created +# +# source://language_server-protocol//lib/language_server/protocol/constant/uniqueness_level.rb#15 +LanguageServer::Protocol::Constant::UniquenessLevel::PROJECT = T.let(T.unsafe(nil), String) + +# The moniker is unique inside the moniker scheme. +# +# source://language_server-protocol//lib/language_server/protocol/constant/uniqueness_level.rb#23 +LanguageServer::Protocol::Constant::UniquenessLevel::SCHEME = T.let(T.unsafe(nil), String) + +# source://language_server-protocol//lib/language_server/protocol/constant/watch_kind.rb#4 +module LanguageServer::Protocol::Constant::WatchKind; end + +# Interested in change events +# +# source://language_server-protocol//lib/language_server/protocol/constant/watch_kind.rb#12 +LanguageServer::Protocol::Constant::WatchKind::CHANGE = T.let(T.unsafe(nil), Integer) + +# Interested in create events. +# +# source://language_server-protocol//lib/language_server/protocol/constant/watch_kind.rb#8 +LanguageServer::Protocol::Constant::WatchKind::CREATE = T.let(T.unsafe(nil), Integer) + +# Interested in delete events +# +# source://language_server-protocol//lib/language_server/protocol/constant/watch_kind.rb#16 +LanguageServer::Protocol::Constant::WatchKind::DELETE = T.let(T.unsafe(nil), Integer) + +# source://language_server-protocol//lib/language_server/protocol/interface.rb#3 +module LanguageServer::Protocol::Interface; end + +# A special text edit with an additional change annotation. +# +# source://language_server-protocol//lib/language_server/protocol/interface/annotated_text_edit.rb#7 +class LanguageServer::Protocol::Interface::AnnotatedTextEdit + # @return [AnnotatedTextEdit] a new instance of AnnotatedTextEdit + # + # source://language_server-protocol//lib/language_server/protocol/interface/annotated_text_edit.rb#8 + def initialize(range:, new_text:, annotation_id:); end + + # The actual annotation identifier. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/annotated_text_edit.rb#40 + def annotation_id; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/annotated_text_edit.rb#44 + def attributes; end + + # The string to be inserted. For delete operations use an + # empty string. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/annotated_text_edit.rb#32 + def new_text; end + + # The range of the text document to be manipulated. To insert + # text into a document create a range where start === end. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/annotated_text_edit.rb#23 + def range; end + + # source://language_server-protocol//lib/language_server/protocol/interface/annotated_text_edit.rb#46 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/annotated_text_edit.rb#50 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_params.rb#4 +class LanguageServer::Protocol::Interface::ApplyWorkspaceEditParams + # @return [ApplyWorkspaceEditParams] a new instance of ApplyWorkspaceEditParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_params.rb#5 + def initialize(edit:, label: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_params.rb#32 + def attributes; end + + # The edits to apply. + # + # @return [WorkspaceEdit] + # + # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_params.rb#28 + def edit; end + + # An optional label of the workspace edit. This label is + # presented in the user interface for example on an undo + # stack to undo the workspace edit. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_params.rb#20 + def label; end + + # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_params.rb#34 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_params.rb#38 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_result.rb#4 +class LanguageServer::Protocol::Interface::ApplyWorkspaceEditResult + # @return [ApplyWorkspaceEditResult] a new instance of ApplyWorkspaceEditResult + # + # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_result.rb#5 + def initialize(applied:, failure_reason: T.unsafe(nil), failed_change: T.unsafe(nil)); end + + # Indicates whether the edit was applied or not. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_result.rb#19 + def applied; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_result.rb#44 + def attributes; end + + # Depending on the client's failure handling strategy `failedChange` + # might contain the index of the change that failed. This property is + # only available if the client signals a `failureHandling` strategy + # in its client capabilities. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_result.rb#40 + def failed_change; end + + # An optional textual description for why the edit was not applied. + # This may be used by the server for diagnostic logging or to provide + # a suitable error for a request that triggered the edit. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_result.rb#29 + def failure_reason; end + + # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_result.rb#46 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/apply_workspace_edit_result.rb#50 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::CallHierarchyClientCapabilities + # @return [CallHierarchyClientCapabilities] a new instance of CallHierarchyClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_client_capabilities.rb#24 + def attributes; end + + # Whether implementation supports dynamic registration. If this is set to + # `true` the client supports the new `(TextDocumentRegistrationOptions & + # StaticRegistrationOptions)` return value for the corresponding server + # capability as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_client_capabilities.rb#20 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_client_capabilities.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_client_capabilities.rb#30 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_call.rb#4 +class LanguageServer::Protocol::Interface::CallHierarchyIncomingCall + # @return [CallHierarchyIncomingCall] a new instance of CallHierarchyIncomingCall + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_call.rb#5 + def initialize(from:, from_ranges:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_call.rb#31 + def attributes; end + + # The item that makes the call. + # + # @return [CallHierarchyItem] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_call.rb#18 + def from; end + + # The ranges at which the calls appear. This is relative to the caller + # denoted by [`this.from`](#CallHierarchyIncomingCall.from). + # + # @return [Range[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_call.rb#27 + def from_ranges; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_call.rb#33 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_call.rb#37 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_calls_params.rb#4 +class LanguageServer::Protocol::Interface::CallHierarchyIncomingCallsParams + # @return [CallHierarchyIncomingCallsParams] a new instance of CallHierarchyIncomingCallsParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_calls_params.rb#5 + def initialize(item:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_calls_params.rb#37 + def attributes; end + + # @return [CallHierarchyItem] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_calls_params.rb#33 + def item; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_calls_params.rb#28 + def partial_result_token; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_calls_params.rb#39 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_calls_params.rb#43 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_incoming_calls_params.rb#19 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#4 +class LanguageServer::Protocol::Interface::CallHierarchyItem + # @return [CallHierarchyItem] a new instance of CallHierarchyItem + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#5 + def initialize(name:, kind:, uri:, range:, selection_range:, tags: T.unsafe(nil), detail: T.unsafe(nil), data: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#88 + def attributes; end + + # A data entry field that is preserved between a call hierarchy prepare and + # incoming calls or outgoing calls requests. + # + # @return [unknown] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#84 + def data; end + + # More detail for this item, e.g. the signature of a function. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#48 + def detail; end + + # The kind of this item. + # + # @return [SymbolKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#32 + def kind; end + + # The name of this item. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#24 + def name; end + + # The range enclosing this symbol not including leading/trailing whitespace + # but everything else, e.g. comments and code. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#65 + def range; end + + # The range that should be selected and revealed when this symbol is being + # picked, e.g. the name of a function. Must be contained by the + # [`range`](#CallHierarchyItem.range). + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#75 + def selection_range; end + + # Tags for this item. + # + # @return [1[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#40 + def tags; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#90 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#94 + def to_json(*args); end + + # The resource identifier of this item. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_item.rb#56 + def uri; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_options.rb#4 +class LanguageServer::Protocol::Interface::CallHierarchyOptions + # @return [CallHierarchyOptions] a new instance of CallHierarchyOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb#4 +class LanguageServer::Protocol::Interface::CallHierarchyOutgoingCall + # @return [CallHierarchyOutgoingCall] a new instance of CallHierarchyOutgoingCall + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb#5 + def initialize(to:, from_ranges:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb#31 + def attributes; end + + # The range at which this item is called. This is the range relative to + # the caller, e.g the item passed to `callHierarchy/outgoingCalls` request. + # + # @return [Range[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb#27 + def from_ranges; end + + # The item that is called. + # + # @return [CallHierarchyItem] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb#18 + def to; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb#33 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_call.rb#37 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb#4 +class LanguageServer::Protocol::Interface::CallHierarchyOutgoingCallsParams + # @return [CallHierarchyOutgoingCallsParams] a new instance of CallHierarchyOutgoingCallsParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb#5 + def initialize(item:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb#37 + def attributes; end + + # @return [CallHierarchyItem] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb#33 + def item; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb#28 + def partial_result_token; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb#39 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb#43 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_outgoing_calls_params.rb#19 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb#4 +class LanguageServer::Protocol::Interface::CallHierarchyPrepareParams + # @return [CallHierarchyPrepareParams] a new instance of CallHierarchyPrepareParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb#5 + def initialize(text_document:, position:, work_done_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb#39 + def attributes; end + + # The position inside the text document. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb#27 + def position; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb#19 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb#41 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb#45 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_prepare_params.rb#35 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_registration_options.rb#4 +class LanguageServer::Protocol::Interface::CallHierarchyRegistrationOptions + # @return [CallHierarchyRegistrationOptions] a new instance of CallHierarchyRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_registration_options.rb#38 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_registration_options.rb#20 + def document_selector; end + + # The id used to register the request. The id can be used to deregister + # the request again. See also Registration#id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_registration_options.rb#34 + def id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_registration_options.rb#40 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_registration_options.rb#44 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/call_hierarchy_registration_options.rb#25 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/cancel_params.rb#4 +class LanguageServer::Protocol::Interface::CancelParams + # @return [CancelParams] a new instance of CancelParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/cancel_params.rb#5 + def initialize(id:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/cancel_params.rb#21 + def attributes; end + + # The request id to cancel. + # + # @return [string | number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/cancel_params.rb#17 + def id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/cancel_params.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/cancel_params.rb#27 + def to_json(*args); end +end + +# Additional information that describes document changes. +# +# source://language_server-protocol//lib/language_server/protocol/interface/change_annotation.rb#7 +class LanguageServer::Protocol::Interface::ChangeAnnotation + # @return [ChangeAnnotation] a new instance of ChangeAnnotation + # + # source://language_server-protocol//lib/language_server/protocol/interface/change_annotation.rb#8 + def initialize(label:, needs_confirmation: T.unsafe(nil), description: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/change_annotation.rb#45 + def attributes; end + + # A human-readable string which is rendered less prominent in + # the user interface. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/change_annotation.rb#41 + def description; end + + # A human-readable string describing the actual change. The string + # is rendered prominent in the user interface. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/change_annotation.rb#23 + def label; end + + # A flag which indicates that user confirmation is needed + # before applying the change. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/change_annotation.rb#32 + def needs_confirmation; end + + # source://language_server-protocol//lib/language_server/protocol/interface/change_annotation.rb#47 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/change_annotation.rb#51 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::ClientCapabilities + # @return [ClientCapabilities] a new instance of ClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#5 + def initialize(workspace: T.unsafe(nil), text_document: T.unsafe(nil), notebook_document: T.unsafe(nil), window: T.unsafe(nil), general: T.unsafe(nil), experimental: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#66 + def attributes; end + + # Experimental client capabilities. + # + # @return [LSPAny] + # + # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#62 + def experimental; end + + # General client capabilities. + # + # @return [{ staleRequestSupport?: { cancel: boolean; retryOnContentModified: string[]; }; regularExpressions?: RegularExpressionsClientCapabilities; markdown?: any; positionEncodings?: string[]; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#54 + def general; end + + # Capabilities specific to the notebook document support. + # + # @return [NotebookDocumentClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#38 + def notebook_document; end + + # Text document specific client capabilities. + # + # @return [TextDocumentClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#30 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#68 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#72 + def to_json(*args); end + + # Window specific client capabilities. + # + # @return [{ workDoneProgress?: boolean; showMessage?: ShowMessageRequestClientCapabilities; showDocument?: ShowDocumentClientCapabilities; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#46 + def window; end + + # Workspace specific client capabilities. + # + # @return [{ applyEdit?: boolean; workspaceEdit?: WorkspaceEditClientCapabilities; didChangeConfiguration?: DidChangeConfigurationClientCapabilities; ... 10 more ...; diagnostics?: DiagnosticWorkspaceClientCapabilities; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/client_capabilities.rb#22 + def workspace; end +end + +# A code action represents a change that can be performed in code, e.g. to fix +# a problem or to refactor code. +# +# A CodeAction must set either `edit` and/or a `command`. If both are supplied, +# the `edit` is applied first, then the `command` is executed. +# +# source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#11 +class LanguageServer::Protocol::Interface::CodeAction + # @return [CodeAction] a new instance of CodeAction + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#12 + def initialize(title:, kind: T.unsafe(nil), diagnostics: T.unsafe(nil), is_preferred: T.unsafe(nil), disabled: T.unsafe(nil), edit: T.unsafe(nil), command: T.unsafe(nil), data: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#115 + def attributes; end + + # A command this code action executes. If a code action + # provides an edit and a command, first the edit is + # executed and then the command. + # + # @return [Command] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#102 + def command; end + + # A data entry field that is preserved on a code action between + # a `textDocument/codeAction` and a `codeAction/resolve` request. + # + # @return [LSPAny] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#111 + def data; end + + # The diagnostics that this code action resolves. + # + # @return [Diagnostic[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#49 + def diagnostics; end + + # Marks that the code action cannot currently be applied. + # + # Clients should follow the following guidelines regarding disabled code + # actions: + # + # - Disabled code actions are not shown in automatic lightbulbs code + # action menus. + # + # - Disabled actions are shown as faded out in the code action menu when + # the user request a more specific type of code action, such as + # refactorings. + # + # - If the user has a keybinding that auto applies a code action and only + # a disabled code actions are returned, the client should show the user + # an error message with `reason` in the editor. + # + # @return [{ reason: string; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#84 + def disabled; end + + # The workspace edit this code action performs. + # + # @return [WorkspaceEdit] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#92 + def edit; end + + # Marks this as a preferred action. Preferred actions are used by the + # `auto fix` command and can be targeted by keybindings. + # + # A quick fix should be marked preferred if it properly addresses the + # underlying error. A refactoring should be marked preferred if it is the + # most reasonable choice of actions to take. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#62 + def is_preferred; end + + # The kind of the code action. + # + # Used to filter code actions. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#41 + def kind; end + + # A short, human-readable, title for this code action. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#31 + def title; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#117 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_action.rb#121 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::CodeActionClientCapabilities + # @return [CodeActionClientCapabilities] a new instance of CodeActionClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil), code_action_literal_support: T.unsafe(nil), is_preferred_support: T.unsafe(nil), disabled_support: T.unsafe(nil), data_support: T.unsafe(nil), resolve_support: T.unsafe(nil), honors_change_annotations: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#83 + def attributes; end + + # The client supports code action literals as a valid + # response of the `textDocument/codeAction` request. + # + # @return [{ codeActionKind: { valueSet: string[]; }; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#32 + def code_action_literal_support; end + + # Whether code action supports the `data` property which is + # preserved between a `textDocument/codeAction` and a + # `codeAction/resolve` request. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#58 + def data_support; end + + # Whether code action supports the `disabled` property. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#48 + def disabled_support; end + + # Whether code action supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#23 + def dynamic_registration; end + + # Whether the client honors the change annotations in + # text edits and resource operations returned via the + # `CodeAction#edit` property by for example presenting + # the workspace edit in the user interface and asking + # for confirmation. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#79 + def honors_change_annotations; end + + # Whether code action supports the `isPreferred` property. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#40 + def is_preferred_support; end + + # Whether the client supports resolving additional code action + # properties via a separate `codeAction/resolve` request. + # + # @return [{ properties: string[]; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#67 + def resolve_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#85 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_client_capabilities.rb#89 + def to_json(*args); end +end + +# Contains additional diagnostic information about the context in which +# a code action is run. +# +# source://language_server-protocol//lib/language_server/protocol/interface/code_action_context.rb#8 +class LanguageServer::Protocol::Interface::CodeActionContext + # @return [CodeActionContext] a new instance of CodeActionContext + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_context.rb#9 + def initialize(diagnostics:, only: T.unsafe(nil), trigger_kind: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_context.rb#51 + def attributes; end + + # An array of diagnostics known on the client side overlapping the range + # provided to the `textDocument/codeAction` request. They are provided so + # that the server knows which errors are currently presented to the user + # for the given range. There is no guarantee that these accurately reflect + # the error state of the resource. The primary parameter + # to compute code actions is the provided range. + # + # @return [Diagnostic[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_context.rb#28 + def diagnostics; end + + # Requested kind of actions to return. + # + # Actions not of this kind are filtered out by the client before being + # shown. So servers can omit computing them. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_context.rb#39 + def only; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_context.rb#53 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_context.rb#57 + def to_json(*args); end + + # The reason why code actions were requested. + # + # @return [CodeActionTriggerKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_context.rb#47 + def trigger_kind; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/code_action_options.rb#4 +class LanguageServer::Protocol::Interface::CodeActionOptions + # @return [CodeActionOptions] a new instance of CodeActionOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil), code_action_kinds: T.unsafe(nil), resolve_provider: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_options.rb#40 + def attributes; end + + # CodeActionKinds that this server may return. + # + # The list of kinds may be generic, such as `CodeActionKind.Refactor`, + # or the server may list out every specific kind they provide. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_options.rb#27 + def code_action_kinds; end + + # The server provides support to resolve additional + # information for a code action. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_options.rb#36 + def resolve_provider; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_options.rb#42 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_options.rb#46 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_options.rb#16 + def work_done_progress; end +end + +# Params for the CodeActionRequest +# +# source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#7 +class LanguageServer::Protocol::Interface::CodeActionParams + # @return [CodeActionParams] a new instance of CodeActionParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#8 + def initialize(text_document:, range:, context:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#61 + def attributes; end + + # Context carrying additional information. + # + # @return [CodeActionContext] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#57 + def context; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#33 + def partial_result_token; end + + # The range for which the command was invoked. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#49 + def range; end + + # The document in which the command was invoked. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#41 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#63 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#67 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_params.rb#24 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/code_action_registration_options.rb#4 +class LanguageServer::Protocol::Interface::CodeActionRegistrationOptions + # @return [CodeActionRegistrationOptions] a new instance of CodeActionRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), code_action_kinds: T.unsafe(nil), resolve_provider: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_registration_options.rb#50 + def attributes; end + + # CodeActionKinds that this server may return. + # + # The list of kinds may be generic, such as `CodeActionKind.Refactor`, + # or the server may list out every specific kind they provide. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_registration_options.rb#37 + def code_action_kinds; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_registration_options.rb#21 + def document_selector; end + + # The server provides support to resolve additional + # information for a code action. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_registration_options.rb#46 + def resolve_provider; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_registration_options.rb#52 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_registration_options.rb#56 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_action_registration_options.rb#26 + def work_done_progress; end +end + +# Structure to capture a description for an error code. +# +# source://language_server-protocol//lib/language_server/protocol/interface/code_description.rb#7 +class LanguageServer::Protocol::Interface::CodeDescription + # @return [CodeDescription] a new instance of CodeDescription + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_description.rb#8 + def initialize(href:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_description.rb#24 + def attributes; end + + # An URI to open with more information about the diagnostic error. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_description.rb#20 + def href; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_description.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_description.rb#30 + def to_json(*args); end +end + +# A code lens represents a command that should be shown along with +# source text, like the number of references, a way to run tests, etc. +# +# A code lens is _unresolved_ when no command is associated to it. For +# performance reasons the creation of a code lens and resolving should be done +# in two stages. +# +# source://language_server-protocol//lib/language_server/protocol/interface/code_lens.rb#12 +class LanguageServer::Protocol::Interface::CodeLens + # @return [CodeLens] a new instance of CodeLens + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens.rb#13 + def initialize(range:, command: T.unsafe(nil), data: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens.rb#49 + def attributes; end + + # The command this code lens represents. + # + # @return [Command] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens.rb#36 + def command; end + + # A data entry field that is preserved on a code lens item between + # a code lens and a code lens resolve request. + # + # @return [LSPAny] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens.rb#45 + def data; end + + # The range in which this code lens is valid. Should only span a single + # line. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens.rb#28 + def range; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens.rb#51 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens.rb#55 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/code_lens_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::CodeLensClientCapabilities + # @return [CodeLensClientCapabilities] a new instance of CodeLensClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_client_capabilities.rb#21 + def attributes; end + + # Whether code lens supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_client_capabilities.rb#17 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_client_capabilities.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_client_capabilities.rb#27 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/code_lens_options.rb#4 +class LanguageServer::Protocol::Interface::CodeLensOptions + # @return [CodeLensOptions] a new instance of CodeLensOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil), resolve_provider: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_options.rb#27 + def attributes; end + + # Code lens has a resolve provider as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_options.rb#23 + def resolve_provider; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_options.rb#29 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_options.rb#33 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_options.rb#15 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/code_lens_params.rb#4 +class LanguageServer::Protocol::Interface::CodeLensParams + # @return [CodeLensParams] a new instance of CodeLensParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_params.rb#5 + def initialize(text_document:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_params.rb#40 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_params.rb#28 + def partial_result_token; end + + # The document to request code lens for. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_params.rb#36 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_params.rb#42 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_params.rb#46 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_params.rb#19 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/code_lens_registration_options.rb#4 +class LanguageServer::Protocol::Interface::CodeLensRegistrationOptions + # @return [CodeLensRegistrationOptions] a new instance of CodeLensRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), resolve_provider: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_registration_options.rb#37 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_registration_options.rb#20 + def document_selector; end + + # Code lens has a resolve provider as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_registration_options.rb#33 + def resolve_provider; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_registration_options.rb#39 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_registration_options.rb#43 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_registration_options.rb#25 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/code_lens_workspace_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::CodeLensWorkspaceClientCapabilities + # @return [CodeLensWorkspaceClientCapabilities] a new instance of CodeLensWorkspaceClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_workspace_client_capabilities.rb#5 + def initialize(refresh_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_workspace_client_capabilities.rb#27 + def attributes; end + + # Whether the client implementation supports a refresh request sent from the + # server to the client. + # + # Note that this event is global and will force the client to refresh all + # code lenses currently shown. It should be used with absolute care and is + # useful for situation where a server for example detect a project wide + # change that requires such a calculation. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_workspace_client_capabilities.rb#23 + def refresh_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_workspace_client_capabilities.rb#29 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/code_lens_workspace_client_capabilities.rb#33 + def to_json(*args); end +end + +# Represents a color in RGBA space. +# +# source://language_server-protocol//lib/language_server/protocol/interface/color.rb#7 +class LanguageServer::Protocol::Interface::Color + # @return [Color] a new instance of Color + # + # source://language_server-protocol//lib/language_server/protocol/interface/color.rb#8 + def initialize(red:, green:, blue:, alpha:); end + + # The alpha component of this color in the range [0-1]. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/color.rb#47 + def alpha; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/color.rb#51 + def attributes; end + + # The blue component of this color in the range [0-1]. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/color.rb#39 + def blue; end + + # The green component of this color in the range [0-1]. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/color.rb#31 + def green; end + + # The red component of this color in the range [0-1]. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/color.rb#23 + def red; end + + # source://language_server-protocol//lib/language_server/protocol/interface/color.rb#53 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/color.rb#57 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/color_information.rb#4 +class LanguageServer::Protocol::Interface::ColorInformation + # @return [ColorInformation] a new instance of ColorInformation + # + # source://language_server-protocol//lib/language_server/protocol/interface/color_information.rb#5 + def initialize(range:, color:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/color_information.rb#30 + def attributes; end + + # The actual color value for this color range. + # + # @return [Color] + # + # source://language_server-protocol//lib/language_server/protocol/interface/color_information.rb#26 + def color; end + + # The range in the document where this color appears. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/color_information.rb#18 + def range; end + + # source://language_server-protocol//lib/language_server/protocol/interface/color_information.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/color_information.rb#36 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/color_presentation.rb#4 +class LanguageServer::Protocol::Interface::ColorPresentation + # @return [ColorPresentation] a new instance of ColorPresentation + # + # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation.rb#5 + def initialize(label:, text_edit: T.unsafe(nil), additional_text_edits: T.unsafe(nil)); end + + # An optional array of additional [text edits](#TextEdit) that are applied + # when selecting this color presentation. Edits must not overlap with the + # main [edit](#ColorPresentation.textEdit) nor with themselves. + # + # @return [TextEdit[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation.rb#41 + def additional_text_edits; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation.rb#45 + def attributes; end + + # The label of this color presentation. It will be shown on the color + # picker header. By default this is also the text that is inserted when + # selecting this color presentation. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation.rb#21 + def label; end + + # An [edit](#TextEdit) which is applied to a document when selecting + # this presentation for the color. When `falsy` the + # [label](#ColorPresentation.label) is used. + # + # @return [TextEdit] + # + # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation.rb#31 + def text_edit; end + + # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation.rb#47 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation.rb#51 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#4 +class LanguageServer::Protocol::Interface::ColorPresentationParams + # @return [ColorPresentationParams] a new instance of ColorPresentationParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#5 + def initialize(text_document:, color:, range:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#58 + def attributes; end + + # The color information to request presentations for. + # + # @return [Color] + # + # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#46 + def color; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#30 + def partial_result_token; end + + # The range where the color would be inserted. Serves as a context. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#54 + def range; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#38 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#60 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#64 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/color_presentation_params.rb#21 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/command.rb#4 +class LanguageServer::Protocol::Interface::Command + # @return [Command] a new instance of Command + # + # source://language_server-protocol//lib/language_server/protocol/interface/command.rb#5 + def initialize(title:, command:, arguments: T.unsafe(nil)); end + + # Arguments that the command handler should be + # invoked with. + # + # @return [LSPAny[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/command.rb#36 + def arguments; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/command.rb#40 + def attributes; end + + # The identifier of the actual command handler. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/command.rb#27 + def command; end + + # Title of the command, like `save`. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/command.rb#19 + def title; end + + # source://language_server-protocol//lib/language_server/protocol/interface/command.rb#42 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/command.rb#46 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::CompletionClientCapabilities + # @return [CompletionClientCapabilities] a new instance of CompletionClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil), completion_item: T.unsafe(nil), completion_item_kind: T.unsafe(nil), context_support: T.unsafe(nil), insert_text_mode: T.unsafe(nil), completion_list: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#67 + def attributes; end + + # The client supports the following `CompletionItem` specific + # capabilities. + # + # @return [{ snippetSupport?: boolean; commitCharactersSupport?: boolean; documentationFormat?: MarkupKind[]; deprecatedSupport?: boolean; preselectSupport?: boolean; tagSupport?: { valueSet: 1[]; }; insertReplaceSupport?: boolean; resolveSupport?: { ...; }; insertTextModeSupport?: { ...; }; labelDetailsSupport?: boolean; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#31 + def completion_item; end + + # @return [{ valueSet?: CompletionItemKind[]; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#36 + def completion_item_kind; end + + # The client supports the following `CompletionList` specific + # capabilities. + # + # @return [{ itemDefaults?: string[]; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#63 + def completion_list; end + + # The client supports to send additional context information for a + # `textDocument/completion` request. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#45 + def context_support; end + + # Whether completion supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#22 + def dynamic_registration; end + + # The client's default when the completion item doesn't provide a + # `insertTextMode` property. + # + # @return [InsertTextMode] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#54 + def insert_text_mode; end + + # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#69 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/completion_client_capabilities.rb#73 + def to_json(*args); end +end + +# Contains additional information about the context in which a completion +# request is triggered. +# +# source://language_server-protocol//lib/language_server/protocol/interface/completion_context.rb#8 +class LanguageServer::Protocol::Interface::CompletionContext + # @return [CompletionContext] a new instance of CompletionContext + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_context.rb#9 + def initialize(trigger_kind:, trigger_character: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_context.rb#36 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/completion_context.rb#38 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/completion_context.rb#42 + def to_json(*args); end + + # The trigger character (a single character) that has trigger code + # complete. Is undefined if + # `triggerKind !== CompletionTriggerKind.TriggerCharacter` + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_context.rb#32 + def trigger_character; end + + # How the completion was triggered. + # + # @return [CompletionTriggerKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_context.rb#22 + def trigger_kind; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#4 +class LanguageServer::Protocol::Interface::CompletionItem + # @return [CompletionItem] a new instance of CompletionItem + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#5 + def initialize(label:, label_details: T.unsafe(nil), kind: T.unsafe(nil), tags: T.unsafe(nil), detail: T.unsafe(nil), documentation: T.unsafe(nil), deprecated: T.unsafe(nil), preselect: T.unsafe(nil), sort_text: T.unsafe(nil), filter_text: T.unsafe(nil), insert_text: T.unsafe(nil), insert_text_format: T.unsafe(nil), insert_text_mode: T.unsafe(nil), text_edit: T.unsafe(nil), text_edit_text: T.unsafe(nil), additional_text_edits: T.unsafe(nil), commit_characters: T.unsafe(nil), command: T.unsafe(nil), data: T.unsafe(nil)); end + + # An optional array of additional text edits that are applied when + # selecting this completion. Edits must not overlap (including the same + # insert position) with the main edit nor with themselves. + # + # Additional text edits should be used to change text unrelated to the + # current cursor position (for example adding an import statement at the + # top of the file if the completion item will insert an unqualified type). + # + # @return [TextEdit[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#221 + def additional_text_edits; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#255 + def attributes; end + + # An optional command that is executed *after* inserting this completion. + # *Note* that additional modifications to the current document should be + # described with the additionalTextEdits-property. + # + # @return [Command] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#242 + def command; end + + # An optional set of characters that when pressed while this completion is + # active will accept it first and then type that character. *Note* that all + # commit characters should have `length=1` and that superfluous characters + # will be ignored. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#232 + def commit_characters; end + + # A data entry field that is preserved on a completion item between + # a completion and a completion resolve request. + # + # @return [LSPAny] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#251 + def data; end + + # Indicates if this item is deprecated. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#92 + def deprecated; end + + # A human-readable string with additional information + # about this item, like type or symbol information. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#76 + def detail; end + + # A human-readable string that represents a doc-comment. + # + # @return [string | MarkupContent] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#84 + def documentation; end + + # A string that should be used when filtering a set of + # completion items. When `falsy` the label is used as the + # filter text for this item. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#124 + def filter_text; end + + # A string that should be inserted into a document when selecting + # this completion. When `falsy` the label is used as the insert text + # for this item. + # + # The `insertText` is subject to interpretation by the client side. + # Some tools might not take the string literally. For example + # VS Code when code complete is requested in this example + # `con` and a completion item with an `insertText` of + # `console` is provided it will only insert `sole`. Therefore it is + # recommended to use `textEdit` instead since it avoids additional client + # side interpretation. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#142 + def insert_text; end + + # The format of the insert text. The format applies to both the + # `insertText` property and the `newText` property of a provided + # `textEdit`. If omitted defaults to `InsertTextFormat.PlainText`. + # + # Please note that the insertTextFormat doesn't apply to + # `additionalTextEdits`. + # + # @return [InsertTextFormat] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#155 + def insert_text_format; end + + # How whitespace and indentation is handled during completion + # item insertion. If not provided the client's default value depends on + # the `textDocument.completion.insertTextMode` client capability. + # + # @return [InsertTextMode] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#165 + def insert_text_mode; end + + # The kind of this completion item. Based of the kind + # an icon is chosen by the editor. The standardized set + # of available values is defined in `CompletionItemKind`. + # + # @return [CompletionItemKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#59 + def kind; end + + # The label of this completion item. + # + # The label property is also by default the text that + # is inserted when selecting this completion. + # + # If label details are provided the label itself should + # be an unqualified name of the completion item. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#41 + def label; end + + # Additional details for the label + # + # @return [CompletionItemLabelDetails] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#49 + def label_details; end + + # Select this item when showing. + # + # *Note* that only one completion item can be selected and that the + # tool / client decides which item that is. The rule is that the *first* + # item of those that match best is selected. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#104 + def preselect; end + + # A string that should be used when comparing this item + # with other items. When `falsy` the label is used + # as the sort text for this item. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#114 + def sort_text; end + + # Tags for this completion item. + # + # @return [1[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#67 + def tags; end + + # An edit which is applied to a document when selecting this completion. + # When an edit is provided the value of `insertText` is ignored. + # + # *Note:* The range of the edit must be a single line range and it must + # contain the position at which completion has been requested. + # + # Most editors support two different operations when accepting a completion + # item. One is to insert a completion text and the other is to replace an + # existing text with a completion text. Since this can usually not be + # predetermined by a server it can report both ranges. Clients need to + # signal support for `InsertReplaceEdit`s via the + # `textDocument.completion.completionItem.insertReplaceSupport` client + # capability property. + # + # *Note 1:* The text edit's range as well as both ranges from an insert + # replace edit must be a [single line] and they must contain the position + # at which completion has been requested. + # *Note 2:* If an `InsertReplaceEdit` is returned the edit's insert range + # must be a prefix of the edit's replace range, that means it must be + # contained and starting at the same position. + # + # @return [TextEdit | InsertReplaceEdit] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#192 + def text_edit; end + + # The edit text used if the completion item is part of a CompletionList and + # CompletionList defines an item default for the text edit range. + # + # Clients will only honor this property if they opt into completion list + # item defaults using the capability `completionList.itemDefaults`. + # + # If not provided and a list's default range is provided the label + # property is used as a text. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#207 + def text_edit_text; end + + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#257 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item.rb#261 + def to_json(*args); end +end + +# Additional details for a completion item label. +# +# source://language_server-protocol//lib/language_server/protocol/interface/completion_item_label_details.rb#7 +class LanguageServer::Protocol::Interface::CompletionItemLabelDetails + # @return [CompletionItemLabelDetails] a new instance of CompletionItemLabelDetails + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item_label_details.rb#8 + def initialize(detail: T.unsafe(nil), description: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item_label_details.rb#37 + def attributes; end + + # An optional string which is rendered less prominently after + # {@link CompletionItemLabelDetails.detail}. Should be used for fully qualified + # names or file path. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item_label_details.rb#33 + def description; end + + # An optional string which is rendered less prominently directly after + # {@link CompletionItem.label label}, without any spacing. Should be + # used for function signatures or type annotations. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item_label_details.rb#23 + def detail; end + + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item_label_details.rb#39 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/completion_item_label_details.rb#43 + def to_json(*args); end +end + +# Represents a collection of [completion items](#CompletionItem) to be +# presented in the editor. +# +# source://language_server-protocol//lib/language_server/protocol/interface/completion_list.rb#8 +class LanguageServer::Protocol::Interface::CompletionList + # @return [CompletionList] a new instance of CompletionList + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_list.rb#9 + def initialize(is_incomplete:, items:, item_defaults: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_list.rb#57 + def attributes; end + + # This list is not complete. Further typing should result in recomputing + # this list. + # + # Recomputed lists have all their items replaced (not appended) in the + # incomplete completion sessions. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_list.rb#27 + def is_incomplete; end + + # In many cases the items of an actual completion result share the same + # value for properties like `commitCharacters` or the range of a text + # edit. A completion list can therefore define item defaults which will + # be used if a completion item itself doesn't specify the value. + # + # If a completion list specifies a default value and a completion item + # also specifies a corresponding value the one from the item is used. + # + # Servers are only allowed to return default values if the client + # signals support for this via the `completionList.itemDefaults` + # capability. + # + # @return [{ commitCharacters?: string[]; editRange?: Range | { insert: Range; replace: Range; }; insertTextFormat?: InsertTextFormat; insertTextMode?: InsertTextMode; data?: LSPAny; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_list.rb#45 + def item_defaults; end + + # The completion items. + # + # @return [CompletionItem[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_list.rb#53 + def items; end + + # source://language_server-protocol//lib/language_server/protocol/interface/completion_list.rb#59 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/completion_list.rb#63 + def to_json(*args); end +end + +# Completion options. +# +# source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#7 +class LanguageServer::Protocol::Interface::CompletionOptions + # @return [CompletionOptions] a new instance of CompletionOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#8 + def initialize(work_done_progress: T.unsafe(nil), trigger_characters: T.unsafe(nil), all_commit_characters: T.unsafe(nil), resolve_provider: T.unsafe(nil), completion_item: T.unsafe(nil)); end + + # The list of all possible characters that commit a completion. This field + # can be used if clients don't support individual commit characters per + # completion item. See client capability + # `completion.completionItem.commitCharactersSupport`. + # + # If a server provides both `allCommitCharacters` and commit characters on + # an individual completion item the ones on the completion item win. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#53 + def all_commit_characters; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#75 + def attributes; end + + # The server supports the following `CompletionItem` specific + # capabilities. + # + # @return [{ labelDetailsSupport?: boolean; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#71 + def completion_item; end + + # The server provides support to resolve additional + # information for a completion item. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#62 + def resolve_provider; end + + # source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#77 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#81 + def to_json(*args); end + + # The additional characters, beyond the defaults provided by the client (typically + # [a-zA-Z]), that should automatically trigger a completion request. For example + # `.` in JavaScript represents the beginning of an object property or method and is + # thus a good candidate for triggering a completion request. + # + # Most tools trigger a completion request automatically without explicitly + # requesting it using a keyboard shortcut (e.g. Ctrl+Space). Typically they + # do so when the user starts to type an identifier. For example if the user + # types `c` in a JavaScript file code complete will automatically pop up + # present `console` besides others as a completion item. Characters that + # make up identifiers don't need to be listed here. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#39 + def trigger_characters; end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_options.rb#21 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#4 +class LanguageServer::Protocol::Interface::CompletionParams + # @return [CompletionParams] a new instance of CompletionParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#5 + def initialize(text_document:, position:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil), context: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#60 + def attributes; end + + # The completion context. This is only available if the client specifies + # to send this using the client capability + # `completion.contextSupport === true` + # + # @return [CompletionContext] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#56 + def context; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#46 + def partial_result_token; end + + # The position inside the text document. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#29 + def position; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#21 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#62 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#66 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_params.rb#37 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#4 +class LanguageServer::Protocol::Interface::CompletionRegistrationOptions + # @return [CompletionRegistrationOptions] a new instance of CompletionRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), trigger_characters: T.unsafe(nil), all_commit_characters: T.unsafe(nil), resolve_provider: T.unsafe(nil), completion_item: T.unsafe(nil)); end + + # The list of all possible characters that commit a completion. This field + # can be used if clients don't support individual commit characters per + # completion item. See client capability + # `completion.completionItem.commitCharactersSupport`. + # + # If a server provides both `allCommitCharacters` and commit characters on + # an individual completion item the ones on the completion item win. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#60 + def all_commit_characters; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#82 + def attributes; end + + # The server supports the following `CompletionItem` specific + # capabilities. + # + # @return [{ labelDetailsSupport?: boolean; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#78 + def completion_item; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#23 + def document_selector; end + + # The server provides support to resolve additional + # information for a completion item. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#69 + def resolve_provider; end + + # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#84 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#88 + def to_json(*args); end + + # The additional characters, beyond the defaults provided by the client (typically + # [a-zA-Z]), that should automatically trigger a completion request. For example + # `.` in JavaScript represents the beginning of an object property or method and is + # thus a good candidate for triggering a completion request. + # + # Most tools trigger a completion request automatically without explicitly + # requesting it using a keyboard shortcut (e.g. Ctrl+Space). Typically they + # do so when the user starts to type an identifier. For example if the user + # types `c` in a JavaScript file code complete will automatically pop up + # present `console` besides others as a completion item. Characters that + # make up identifiers don't need to be listed here. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#46 + def trigger_characters; end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/completion_registration_options.rb#28 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/configuration_item.rb#4 +class LanguageServer::Protocol::Interface::ConfigurationItem + # @return [ConfigurationItem] a new instance of ConfigurationItem + # + # source://language_server-protocol//lib/language_server/protocol/interface/configuration_item.rb#5 + def initialize(scope_uri: T.unsafe(nil), section: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/configuration_item.rb#30 + def attributes; end + + # The scope to get the configuration section for. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/configuration_item.rb#18 + def scope_uri; end + + # The configuration section asked for. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/configuration_item.rb#26 + def section; end + + # source://language_server-protocol//lib/language_server/protocol/interface/configuration_item.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/configuration_item.rb#36 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/configuration_params.rb#4 +class LanguageServer::Protocol::Interface::ConfigurationParams + # @return [ConfigurationParams] a new instance of ConfigurationParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/configuration_params.rb#5 + def initialize(items:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/configuration_params.rb#18 + def attributes; end + + # @return [ConfigurationItem[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/configuration_params.rb#14 + def items; end + + # source://language_server-protocol//lib/language_server/protocol/interface/configuration_params.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/configuration_params.rb#24 + def to_json(*args); end +end + +# Create file operation +# +# source://language_server-protocol//lib/language_server/protocol/interface/create_file.rb#7 +class LanguageServer::Protocol::Interface::CreateFile + # @return [CreateFile] a new instance of CreateFile + # + # source://language_server-protocol//lib/language_server/protocol/interface/create_file.rb#8 + def initialize(kind:, uri:, options: T.unsafe(nil), annotation_id: T.unsafe(nil)); end + + # An optional annotation identifier describing the operation. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/create_file.rb#47 + def annotation_id; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/create_file.rb#51 + def attributes; end + + # A create + # + # @return ["create"] + # + # source://language_server-protocol//lib/language_server/protocol/interface/create_file.rb#23 + def kind; end + + # Additional options + # + # @return [CreateFileOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/create_file.rb#39 + def options; end + + # source://language_server-protocol//lib/language_server/protocol/interface/create_file.rb#53 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/create_file.rb#57 + def to_json(*args); end + + # The resource to create. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/create_file.rb#31 + def uri; end +end + +# Options to create a file. +# +# source://language_server-protocol//lib/language_server/protocol/interface/create_file_options.rb#7 +class LanguageServer::Protocol::Interface::CreateFileOptions + # @return [CreateFileOptions] a new instance of CreateFileOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/create_file_options.rb#8 + def initialize(overwrite: T.unsafe(nil), ignore_if_exists: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/create_file_options.rb#33 + def attributes; end + + # Ignore if exists. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/create_file_options.rb#29 + def ignore_if_exists; end + + # Overwrite existing file. Overwrite wins over `ignoreIfExists` + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/create_file_options.rb#21 + def overwrite; end + + # source://language_server-protocol//lib/language_server/protocol/interface/create_file_options.rb#35 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/create_file_options.rb#39 + def to_json(*args); end +end + +# The parameters sent in notifications/requests for user-initiated creation +# of files. +# +# source://language_server-protocol//lib/language_server/protocol/interface/create_files_params.rb#8 +class LanguageServer::Protocol::Interface::CreateFilesParams + # @return [CreateFilesParams] a new instance of CreateFilesParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/create_files_params.rb#9 + def initialize(files:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/create_files_params.rb#25 + def attributes; end + + # An array of all files/folders created in this operation. + # + # @return [FileCreate[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/create_files_params.rb#21 + def files; end + + # source://language_server-protocol//lib/language_server/protocol/interface/create_files_params.rb#27 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/create_files_params.rb#31 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/declaration_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::DeclarationClientCapabilities + # @return [DeclarationClientCapabilities] a new instance of DeclarationClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil), link_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_client_capabilities.rb#32 + def attributes; end + + # Whether declaration supports dynamic registration. If this is set to + # `true` the client supports the new `DeclarationRegistrationOptions` + # return value for the corresponding server capability as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_client_capabilities.rb#20 + def dynamic_registration; end + + # The client supports additional metadata in the form of declaration links. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_client_capabilities.rb#28 + def link_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_client_capabilities.rb#34 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_client_capabilities.rb#38 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/declaration_options.rb#4 +class LanguageServer::Protocol::Interface::DeclarationOptions + # @return [DeclarationOptions] a new instance of DeclarationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/declaration_params.rb#4 +class LanguageServer::Protocol::Interface::DeclarationParams + # @return [DeclarationParams] a new instance of DeclarationParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_params.rb#5 + def initialize(text_document:, position:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_params.rb#49 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_params.rb#45 + def partial_result_token; end + + # The position inside the text document. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_params.rb#28 + def position; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_params.rb#20 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_params.rb#51 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_params.rb#55 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_params.rb#36 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/declaration_registration_options.rb#4 +class LanguageServer::Protocol::Interface::DeclarationRegistrationOptions + # @return [DeclarationRegistrationOptions] a new instance of DeclarationRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_registration_options.rb#38 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_registration_options.rb#25 + def document_selector; end + + # The id used to register the request. The id can be used to deregister + # the request again. See also Registration#id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_registration_options.rb#34 + def id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_registration_options.rb#40 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_registration_options.rb#44 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/declaration_registration_options.rb#16 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/definition_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::DefinitionClientCapabilities + # @return [DefinitionClientCapabilities] a new instance of DefinitionClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil), link_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_client_capabilities.rb#30 + def attributes; end + + # Whether definition supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_client_capabilities.rb#18 + def dynamic_registration; end + + # The client supports additional metadata in the form of definition links. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_client_capabilities.rb#26 + def link_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/definition_client_capabilities.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/definition_client_capabilities.rb#36 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/definition_options.rb#4 +class LanguageServer::Protocol::Interface::DefinitionOptions + # @return [DefinitionOptions] a new instance of DefinitionOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/definition_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/definition_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/definition_params.rb#4 +class LanguageServer::Protocol::Interface::DefinitionParams + # @return [DefinitionParams] a new instance of DefinitionParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_params.rb#5 + def initialize(text_document:, position:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_params.rb#49 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_params.rb#45 + def partial_result_token; end + + # The position inside the text document. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_params.rb#28 + def position; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_params.rb#20 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/definition_params.rb#51 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/definition_params.rb#55 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_params.rb#36 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/definition_registration_options.rb#4 +class LanguageServer::Protocol::Interface::DefinitionRegistrationOptions + # @return [DefinitionRegistrationOptions] a new instance of DefinitionRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_registration_options.rb#28 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_registration_options.rb#19 + def document_selector; end + + # source://language_server-protocol//lib/language_server/protocol/interface/definition_registration_options.rb#30 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/definition_registration_options.rb#34 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/definition_registration_options.rb#24 + def work_done_progress; end +end + +# Delete file operation +# +# source://language_server-protocol//lib/language_server/protocol/interface/delete_file.rb#7 +class LanguageServer::Protocol::Interface::DeleteFile + # @return [DeleteFile] a new instance of DeleteFile + # + # source://language_server-protocol//lib/language_server/protocol/interface/delete_file.rb#8 + def initialize(kind:, uri:, options: T.unsafe(nil), annotation_id: T.unsafe(nil)); end + + # An optional annotation identifier describing the operation. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/delete_file.rb#47 + def annotation_id; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/delete_file.rb#51 + def attributes; end + + # A delete + # + # @return ["delete"] + # + # source://language_server-protocol//lib/language_server/protocol/interface/delete_file.rb#23 + def kind; end + + # Delete options. + # + # @return [DeleteFileOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/delete_file.rb#39 + def options; end + + # source://language_server-protocol//lib/language_server/protocol/interface/delete_file.rb#53 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/delete_file.rb#57 + def to_json(*args); end + + # The file to delete. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/delete_file.rb#31 + def uri; end +end + +# Delete file options +# +# source://language_server-protocol//lib/language_server/protocol/interface/delete_file_options.rb#7 +class LanguageServer::Protocol::Interface::DeleteFileOptions + # @return [DeleteFileOptions] a new instance of DeleteFileOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/delete_file_options.rb#8 + def initialize(recursive: T.unsafe(nil), ignore_if_not_exists: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/delete_file_options.rb#33 + def attributes; end + + # Ignore the operation if the file doesn't exist. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/delete_file_options.rb#29 + def ignore_if_not_exists; end + + # Delete the content recursively if a folder is denoted. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/delete_file_options.rb#21 + def recursive; end + + # source://language_server-protocol//lib/language_server/protocol/interface/delete_file_options.rb#35 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/delete_file_options.rb#39 + def to_json(*args); end +end + +# The parameters sent in notifications/requests for user-initiated deletes +# of files. +# +# source://language_server-protocol//lib/language_server/protocol/interface/delete_files_params.rb#8 +class LanguageServer::Protocol::Interface::DeleteFilesParams + # @return [DeleteFilesParams] a new instance of DeleteFilesParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/delete_files_params.rb#9 + def initialize(files:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/delete_files_params.rb#25 + def attributes; end + + # An array of all files/folders deleted in this operation. + # + # @return [FileDelete[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/delete_files_params.rb#21 + def files; end + + # source://language_server-protocol//lib/language_server/protocol/interface/delete_files_params.rb#27 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/delete_files_params.rb#31 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#4 +class LanguageServer::Protocol::Interface::Diagnostic + # @return [Diagnostic] a new instance of Diagnostic + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#5 + def initialize(range:, message:, severity: T.unsafe(nil), code: T.unsafe(nil), code_description: T.unsafe(nil), source: T.unsafe(nil), tags: T.unsafe(nil), related_information: T.unsafe(nil), data: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#98 + def attributes; end + + # The diagnostic's code, which might appear in the user interface. + # + # @return [string | number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#42 + def code; end + + # An optional property to describe the error code. + # + # @return [CodeDescription] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#50 + def code_description; end + + # A data entry field that is preserved between a + # `textDocument/publishDiagnostics` notification and + # `textDocument/codeAction` request. + # + # @return [unknown] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#94 + def data; end + + # The diagnostic's message. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#67 + def message; end + + # The range at which the message applies. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#25 + def range; end + + # An array of related diagnostic information, e.g. when symbol-names within + # a scope collide all definitions can be marked via this property. + # + # @return [DiagnosticRelatedInformation[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#84 + def related_information; end + + # The diagnostic's severity. Can be omitted. If omitted it is up to the + # client to interpret diagnostics as error, warning, info or hint. + # + # @return [DiagnosticSeverity] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#34 + def severity; end + + # A human-readable string describing the source of this + # diagnostic, e.g. 'typescript' or 'super lint'. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#59 + def source; end + + # Additional metadata about the diagnostic. + # + # @return [DiagnosticTag[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#75 + def tags; end + + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#100 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic.rb#104 + def to_json(*args); end +end + +# Client capabilities specific to diagnostic pull requests. +# +# source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_client_capabilities.rb#7 +class LanguageServer::Protocol::Interface::DiagnosticClientCapabilities + # @return [DiagnosticClientCapabilities] a new instance of DiagnosticClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_client_capabilities.rb#8 + def initialize(dynamic_registration: T.unsafe(nil), related_document_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_client_capabilities.rb#37 + def attributes; end + + # Whether implementation supports dynamic registration. If this is set to + # `true` the client supports the new + # `(TextDocumentRegistrationOptions & StaticRegistrationOptions)` + # return value for the corresponding server capability as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_client_capabilities.rb#24 + def dynamic_registration; end + + # Whether the clients supports related documents for document diagnostic + # pulls. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_client_capabilities.rb#33 + def related_document_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_client_capabilities.rb#39 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_client_capabilities.rb#43 + def to_json(*args); end +end + +# Diagnostic options. +# +# source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_options.rb#7 +class LanguageServer::Protocol::Interface::DiagnosticOptions + # @return [DiagnosticOptions] a new instance of DiagnosticOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_options.rb#8 + def initialize(inter_file_dependencies:, workspace_diagnostics:, work_done_progress: T.unsafe(nil), identifier: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_options.rb#52 + def attributes; end + + # An optional identifier under which the diagnostics are + # managed by the client. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_options.rb#29 + def identifier; end + + # Whether the language has inter file dependencies meaning that + # editing code in one file can result in a different diagnostic + # set in another file. Inter file dependencies are common for + # most programming languages and typically uncommon for linters. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_options.rb#40 + def inter_file_dependencies; end + + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_options.rb#54 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_options.rb#58 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_options.rb#20 + def work_done_progress; end + + # The server provides support for workspace diagnostics as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_options.rb#48 + def workspace_diagnostics; end +end + +# Diagnostic registration options. +# +# source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#7 +class LanguageServer::Protocol::Interface::DiagnosticRegistrationOptions + # @return [DiagnosticRegistrationOptions] a new instance of DiagnosticRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#8 + def initialize(document_selector:, inter_file_dependencies:, workspace_diagnostics:, work_done_progress: T.unsafe(nil), identifier: T.unsafe(nil), id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#72 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#26 + def document_selector; end + + # The id used to register the request. The id can be used to deregister + # the request again. See also Registration#id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#68 + def id; end + + # An optional identifier under which the diagnostics are + # managed by the client. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#40 + def identifier; end + + # Whether the language has inter file dependencies meaning that + # editing code in one file can result in a different diagnostic + # set in another file. Inter file dependencies are common for + # most programming languages and typically uncommon for linters. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#51 + def inter_file_dependencies; end + + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#74 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#78 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#31 + def work_done_progress; end + + # The server provides support for workspace diagnostics as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_registration_options.rb#59 + def workspace_diagnostics; end +end + +# Represents a related message and source code location for a diagnostic. +# This should be used to point to code locations that cause or are related to +# a diagnostics, e.g when duplicating a symbol in a scope. +# +# source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_related_information.rb#9 +class LanguageServer::Protocol::Interface::DiagnosticRelatedInformation + # @return [DiagnosticRelatedInformation] a new instance of DiagnosticRelatedInformation + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_related_information.rb#10 + def initialize(location:, message:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_related_information.rb#35 + def attributes; end + + # The location of this related diagnostic information. + # + # @return [Location] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_related_information.rb#23 + def location; end + + # The message of this related diagnostic information. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_related_information.rb#31 + def message; end + + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_related_information.rb#37 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_related_information.rb#41 + def to_json(*args); end +end + +# Cancellation data returned from a diagnostic request. +# +# source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_server_cancellation_data.rb#7 +class LanguageServer::Protocol::Interface::DiagnosticServerCancellationData + # @return [DiagnosticServerCancellationData] a new instance of DiagnosticServerCancellationData + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_server_cancellation_data.rb#8 + def initialize(retrigger_request:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_server_cancellation_data.rb#21 + def attributes; end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_server_cancellation_data.rb#17 + def retrigger_request; end + + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_server_cancellation_data.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_server_cancellation_data.rb#27 + def to_json(*args); end +end + +# Workspace client capabilities specific to diagnostic pull requests. +# +# source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_workspace_client_capabilities.rb#7 +class LanguageServer::Protocol::Interface::DiagnosticWorkspaceClientCapabilities + # @return [DiagnosticWorkspaceClientCapabilities] a new instance of DiagnosticWorkspaceClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_workspace_client_capabilities.rb#8 + def initialize(refresh_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_workspace_client_capabilities.rb#30 + def attributes; end + + # Whether the client implementation supports a refresh request sent from + # the server to the client. + # + # Note that this event is global and will force the client to refresh all + # pulled diagnostics currently shown. It should be used with absolute care + # and is useful for situation where a server for example detects a project + # wide change that requires such a calculation. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_workspace_client_capabilities.rb#26 + def refresh_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_workspace_client_capabilities.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/diagnostic_workspace_client_capabilities.rb#36 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::DidChangeConfigurationClientCapabilities + # @return [DidChangeConfigurationClientCapabilities] a new instance of DidChangeConfigurationClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_client_capabilities.rb#21 + def attributes; end + + # Did change configuration notification supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_client_capabilities.rb#17 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_client_capabilities.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_client_capabilities.rb#27 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_params.rb#4 +class LanguageServer::Protocol::Interface::DidChangeConfigurationParams + # @return [DidChangeConfigurationParams] a new instance of DidChangeConfigurationParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_params.rb#5 + def initialize(settings:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_params.rb#21 + def attributes; end + + # The actual changed settings + # + # @return [LSPAny] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_params.rb#17 + def settings; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_params.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_configuration_params.rb#27 + def to_json(*args); end +end + +# The params sent in a change notebook document notification. +# +# source://language_server-protocol//lib/language_server/protocol/interface/did_change_notebook_document_params.rb#7 +class LanguageServer::Protocol::Interface::DidChangeNotebookDocumentParams + # @return [DidChangeNotebookDocumentParams] a new instance of DidChangeNotebookDocumentParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_notebook_document_params.rb#8 + def initialize(notebook_document:, change:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_notebook_document_params.rb#44 + def attributes; end + + # The actual changes to the notebook document. + # + # The change describes single state change to the notebook document. + # So it moves a notebook document, its cells and its cell text document + # contents from state S to S'. + # + # To mirror the content of a notebook using change events use the + # following approach: + # - start with the same initial content + # - apply the 'notebookDocument/didChange' notifications in the order + # you receive them. + # + # @return [NotebookDocumentChangeEvent] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_notebook_document_params.rb#40 + def change; end + + # The notebook document that did change. The version number points + # to the version after all provided changes have been applied. + # + # @return [VersionedNotebookDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_notebook_document_params.rb#22 + def notebook_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_notebook_document_params.rb#46 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_notebook_document_params.rb#50 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/did_change_text_document_params.rb#4 +class LanguageServer::Protocol::Interface::DidChangeTextDocumentParams + # @return [DidChangeTextDocumentParams] a new instance of DidChangeTextDocumentParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_text_document_params.rb#5 + def initialize(text_document:, content_changes:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_text_document_params.rb#44 + def attributes; end + + # The actual content changes. The content changes describe single state + # changes to the document. So if there are two content changes c1 (at + # array index 0) and c2 (at array index 1) for a document in state S then + # c1 moves the document from S to S' and c2 from S' to S''. So c1 is + # computed on the state S and c2 is computed on the state S'. + # + # To mirror the content of a document using change events use the following + # approach: + # - start with the same initial content + # - apply the 'textDocument/didChange' notifications in the order you + # receive them. + # - apply the `TextDocumentContentChangeEvent`s in a single notification + # in the order you receive them. + # + # @return [TextDocumentContentChangeEvent[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_text_document_params.rb#40 + def content_changes; end + + # The document that did change. The version number points + # to the version after all provided content changes have + # been applied. + # + # @return [VersionedTextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_text_document_params.rb#20 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_text_document_params.rb#46 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_text_document_params.rb#50 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::DidChangeWatchedFilesClientCapabilities + # @return [DidChangeWatchedFilesClientCapabilities] a new instance of DidChangeWatchedFilesClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil), relative_pattern_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_client_capabilities.rb#33 + def attributes; end + + # Did change watched files notification supports dynamic registration. + # Please note that the current protocol doesn't support static + # configuration for file changes from the server side. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_client_capabilities.rb#20 + def dynamic_registration; end + + # Whether the client has support for relative patterns + # or not. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_client_capabilities.rb#29 + def relative_pattern_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_client_capabilities.rb#35 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_client_capabilities.rb#39 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_params.rb#4 +class LanguageServer::Protocol::Interface::DidChangeWatchedFilesParams + # @return [DidChangeWatchedFilesParams] a new instance of DidChangeWatchedFilesParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_params.rb#5 + def initialize(changes:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_params.rb#21 + def attributes; end + + # The actual file events. + # + # @return [FileEvent[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_params.rb#17 + def changes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_params.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_params.rb#27 + def to_json(*args); end +end + +# Describe options to be used when registering for file system change events. +# +# source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_registration_options.rb#7 +class LanguageServer::Protocol::Interface::DidChangeWatchedFilesRegistrationOptions + # @return [DidChangeWatchedFilesRegistrationOptions] a new instance of DidChangeWatchedFilesRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_registration_options.rb#8 + def initialize(watchers:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_registration_options.rb#24 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_registration_options.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_registration_options.rb#30 + def to_json(*args); end + + # The watchers to register. + # + # @return [FileSystemWatcher[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_watched_files_registration_options.rb#20 + def watchers; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/did_change_workspace_folders_params.rb#4 +class LanguageServer::Protocol::Interface::DidChangeWorkspaceFoldersParams + # @return [DidChangeWorkspaceFoldersParams] a new instance of DidChangeWorkspaceFoldersParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_workspace_folders_params.rb#5 + def initialize(event:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_workspace_folders_params.rb#21 + def attributes; end + + # The actual workspace folder change event. + # + # @return [WorkspaceFoldersChangeEvent] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_workspace_folders_params.rb#17 + def event; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_workspace_folders_params.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_change_workspace_folders_params.rb#27 + def to_json(*args); end +end + +# The params sent in a close notebook document notification. +# +# source://language_server-protocol//lib/language_server/protocol/interface/did_close_notebook_document_params.rb#7 +class LanguageServer::Protocol::Interface::DidCloseNotebookDocumentParams + # @return [DidCloseNotebookDocumentParams] a new instance of DidCloseNotebookDocumentParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_close_notebook_document_params.rb#8 + def initialize(notebook_document:, cell_text_documents:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_close_notebook_document_params.rb#34 + def attributes; end + + # The text documents that represent the content + # of a notebook cell that got closed. + # + # @return [TextDocumentIdentifier[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_close_notebook_document_params.rb#30 + def cell_text_documents; end + + # The notebook document that got closed. + # + # @return [NotebookDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_close_notebook_document_params.rb#21 + def notebook_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_close_notebook_document_params.rb#36 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_close_notebook_document_params.rb#40 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/did_close_text_document_params.rb#4 +class LanguageServer::Protocol::Interface::DidCloseTextDocumentParams + # @return [DidCloseTextDocumentParams] a new instance of DidCloseTextDocumentParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_close_text_document_params.rb#5 + def initialize(text_document:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_close_text_document_params.rb#21 + def attributes; end + + # The document that was closed. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_close_text_document_params.rb#17 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_close_text_document_params.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_close_text_document_params.rb#27 + def to_json(*args); end +end + +# The params sent in an open notebook document notification. +# +# source://language_server-protocol//lib/language_server/protocol/interface/did_open_notebook_document_params.rb#7 +class LanguageServer::Protocol::Interface::DidOpenNotebookDocumentParams + # @return [DidOpenNotebookDocumentParams] a new instance of DidOpenNotebookDocumentParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_open_notebook_document_params.rb#8 + def initialize(notebook_document:, cell_text_documents:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_open_notebook_document_params.rb#34 + def attributes; end + + # The text documents that represent the content + # of a notebook cell. + # + # @return [TextDocumentItem[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_open_notebook_document_params.rb#30 + def cell_text_documents; end + + # The notebook document that got opened. + # + # @return [NotebookDocument] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_open_notebook_document_params.rb#21 + def notebook_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_open_notebook_document_params.rb#36 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_open_notebook_document_params.rb#40 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/did_open_text_document_params.rb#4 +class LanguageServer::Protocol::Interface::DidOpenTextDocumentParams + # @return [DidOpenTextDocumentParams] a new instance of DidOpenTextDocumentParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_open_text_document_params.rb#5 + def initialize(text_document:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_open_text_document_params.rb#21 + def attributes; end + + # The document that was opened. + # + # @return [TextDocumentItem] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_open_text_document_params.rb#17 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_open_text_document_params.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_open_text_document_params.rb#27 + def to_json(*args); end +end + +# The params sent in a save notebook document notification. +# +# source://language_server-protocol//lib/language_server/protocol/interface/did_save_notebook_document_params.rb#7 +class LanguageServer::Protocol::Interface::DidSaveNotebookDocumentParams + # @return [DidSaveNotebookDocumentParams] a new instance of DidSaveNotebookDocumentParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_save_notebook_document_params.rb#8 + def initialize(notebook_document:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_save_notebook_document_params.rb#24 + def attributes; end + + # The notebook document that got saved. + # + # @return [NotebookDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_save_notebook_document_params.rb#20 + def notebook_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_save_notebook_document_params.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_save_notebook_document_params.rb#30 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/did_save_text_document_params.rb#4 +class LanguageServer::Protocol::Interface::DidSaveTextDocumentParams + # @return [DidSaveTextDocumentParams] a new instance of DidSaveTextDocumentParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_save_text_document_params.rb#5 + def initialize(text_document:, text: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_save_text_document_params.rb#31 + def attributes; end + + # Optional the content when saved. Depends on the includeText value + # when the save notification was requested. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_save_text_document_params.rb#27 + def text; end + + # The document that was saved. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/did_save_text_document_params.rb#18 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_save_text_document_params.rb#33 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/did_save_text_document_params.rb#37 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_color_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::DocumentColorClientCapabilities + # @return [DocumentColorClientCapabilities] a new instance of DocumentColorClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_client_capabilities.rb#21 + def attributes; end + + # Whether document color supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_client_capabilities.rb#17 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_client_capabilities.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_client_capabilities.rb#27 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_color_options.rb#4 +class LanguageServer::Protocol::Interface::DocumentColorOptions + # @return [DocumentColorOptions] a new instance of DocumentColorOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_color_params.rb#4 +class LanguageServer::Protocol::Interface::DocumentColorParams + # @return [DocumentColorParams] a new instance of DocumentColorParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_params.rb#5 + def initialize(text_document:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_params.rb#40 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_params.rb#28 + def partial_result_token; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_params.rb#36 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_params.rb#42 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_params.rb#46 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_params.rb#19 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_color_registration_options.rb#4 +class LanguageServer::Protocol::Interface::DocumentColorRegistrationOptions + # @return [DocumentColorRegistrationOptions] a new instance of DocumentColorRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_registration_options.rb#5 + def initialize(document_selector:, id: T.unsafe(nil), work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_registration_options.rb#38 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_registration_options.rb#20 + def document_selector; end + + # The id used to register the request. The id can be used to deregister + # the request again. See also Registration#id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_registration_options.rb#29 + def id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_registration_options.rb#40 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_registration_options.rb#44 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_color_registration_options.rb#34 + def work_done_progress; end +end + +# Parameters of the document diagnostic request. +# +# source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#7 +class LanguageServer::Protocol::Interface::DocumentDiagnosticParams + # @return [DocumentDiagnosticParams] a new instance of DocumentDiagnosticParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#8 + def initialize(text_document:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil), identifier: T.unsafe(nil), previous_result_id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#61 + def attributes; end + + # The additional identifier provided during registration. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#49 + def identifier; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#33 + def partial_result_token; end + + # The result id of a previous response if provided. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#57 + def previous_result_id; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#41 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#63 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#67 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_params.rb#24 + def work_done_token; end +end + +# A partial result for a document diagnostic report. +# +# source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_report_partial_result.rb#7 +class LanguageServer::Protocol::Interface::DocumentDiagnosticReportPartialResult + # @return [DocumentDiagnosticReportPartialResult] a new instance of DocumentDiagnosticReportPartialResult + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_report_partial_result.rb#8 + def initialize(related_documents:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_report_partial_result.rb#21 + def attributes; end + + # @return [{ [uri: string]: FullDocumentDiagnosticReport | UnchangedDocumentDiagnosticReport; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_report_partial_result.rb#17 + def related_documents; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_report_partial_result.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_diagnostic_report_partial_result.rb#27 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_filter.rb#4 +class LanguageServer::Protocol::Interface::DocumentFilter + # @return [DocumentFilter] a new instance of DocumentFilter + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_filter.rb#5 + def initialize(language: T.unsafe(nil), scheme: T.unsafe(nil), pattern: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_filter.rb#51 + def attributes; end + + # A language id, like `typescript`. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_filter.rb#19 + def language; end + + # A glob pattern, like `*.{ts,js}`. + # + # Glob patterns can have the following syntax: + # - `*` to match one or more characters in a path segment + # - `?` to match on one character in a path segment + # - `**` to match any number of path segments, including none + # - `{}` to group sub patterns into an OR expression. (e.g. `**​/*.{ts,js}` + # matches all TypeScript and JavaScript files) + # - `[]` to declare a range of characters to match in a path segment + # (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …) + # - `[!...]` to negate a range of characters to match in a path segment + # (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but + # not `example.0`) + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_filter.rb#47 + def pattern; end + + # A Uri [scheme](#Uri.scheme), like `file` or `untitled`. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_filter.rb#27 + def scheme; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_filter.rb#53 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_filter.rb#57 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::DocumentFormattingClientCapabilities + # @return [DocumentFormattingClientCapabilities] a new instance of DocumentFormattingClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_client_capabilities.rb#21 + def attributes; end + + # Whether formatting supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_client_capabilities.rb#17 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_client_capabilities.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_client_capabilities.rb#27 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_options.rb#4 +class LanguageServer::Protocol::Interface::DocumentFormattingOptions + # @return [DocumentFormattingOptions] a new instance of DocumentFormattingOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_params.rb#4 +class LanguageServer::Protocol::Interface::DocumentFormattingParams + # @return [DocumentFormattingParams] a new instance of DocumentFormattingParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_params.rb#5 + def initialize(text_document:, options:, work_done_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_params.rb#39 + def attributes; end + + # The format options. + # + # @return [FormattingOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_params.rb#35 + def options; end + + # The document to format. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_params.rb#27 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_params.rb#41 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_params.rb#45 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_params.rb#19 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_registration_options.rb#4 +class LanguageServer::Protocol::Interface::DocumentFormattingRegistrationOptions + # @return [DocumentFormattingRegistrationOptions] a new instance of DocumentFormattingRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_registration_options.rb#28 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_registration_options.rb#19 + def document_selector; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_registration_options.rb#30 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_registration_options.rb#34 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_formatting_registration_options.rb#24 + def work_done_progress; end +end + +# A document highlight is a range inside a text document which deserves +# special attention. Usually a document highlight is visualized by changing +# the background color of its range. +# +# source://language_server-protocol//lib/language_server/protocol/interface/document_highlight.rb#9 +class LanguageServer::Protocol::Interface::DocumentHighlight + # @return [DocumentHighlight] a new instance of DocumentHighlight + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight.rb#10 + def initialize(range:, kind: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight.rb#35 + def attributes; end + + # The highlight kind, default is DocumentHighlightKind.Text. + # + # @return [DocumentHighlightKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight.rb#31 + def kind; end + + # The range this highlight applies to. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight.rb#23 + def range; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight.rb#37 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight.rb#41 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::DocumentHighlightClientCapabilities + # @return [DocumentHighlightClientCapabilities] a new instance of DocumentHighlightClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_client_capabilities.rb#21 + def attributes; end + + # Whether document highlight supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_client_capabilities.rb#17 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_client_capabilities.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_client_capabilities.rb#27 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_options.rb#4 +class LanguageServer::Protocol::Interface::DocumentHighlightOptions + # @return [DocumentHighlightOptions] a new instance of DocumentHighlightOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_params.rb#4 +class LanguageServer::Protocol::Interface::DocumentHighlightParams + # @return [DocumentHighlightParams] a new instance of DocumentHighlightParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_params.rb#5 + def initialize(text_document:, position:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_params.rb#49 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_params.rb#45 + def partial_result_token; end + + # The position inside the text document. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_params.rb#28 + def position; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_params.rb#20 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_params.rb#51 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_params.rb#55 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_params.rb#36 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_registration_options.rb#4 +class LanguageServer::Protocol::Interface::DocumentHighlightRegistrationOptions + # @return [DocumentHighlightRegistrationOptions] a new instance of DocumentHighlightRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_registration_options.rb#28 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_registration_options.rb#19 + def document_selector; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_registration_options.rb#30 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_registration_options.rb#34 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_highlight_registration_options.rb#24 + def work_done_progress; end +end + +# A document link is a range in a text document that links to an internal or +# external resource, like another text document or a web site. +# +# source://language_server-protocol//lib/language_server/protocol/interface/document_link.rb#8 +class LanguageServer::Protocol::Interface::DocumentLink + # @return [DocumentLink] a new instance of DocumentLink + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link.rb#9 + def initialize(range:, target: T.unsafe(nil), tooltip: T.unsafe(nil), data: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link.rb#58 + def attributes; end + + # A data entry field that is preserved on a document link between a + # DocumentLinkRequest and a DocumentLinkResolveRequest. + # + # @return [LSPAny] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link.rb#54 + def data; end + + # The range this link applies to. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link.rb#24 + def range; end + + # The uri this link points to. If missing a resolve request is sent later. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link.rb#32 + def target; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_link.rb#60 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_link.rb#64 + def to_json(*args); end + + # The tooltip text when you hover over this link. + # + # If a tooltip is provided, is will be displayed in a string that includes + # instructions on how to trigger the link, such as `{0} (ctrl + click)`. + # The specific instructions vary depending on OS, user settings, and + # localization. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link.rb#45 + def tooltip; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_link_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::DocumentLinkClientCapabilities + # @return [DocumentLinkClientCapabilities] a new instance of DocumentLinkClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil), tooltip_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_client_capabilities.rb#30 + def attributes; end + + # Whether document link supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_client_capabilities.rb#18 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_client_capabilities.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_client_capabilities.rb#36 + def to_json(*args); end + + # Whether the client supports the `tooltip` property on `DocumentLink`. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_client_capabilities.rb#26 + def tooltip_support; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_link_options.rb#4 +class LanguageServer::Protocol::Interface::DocumentLinkOptions + # @return [DocumentLinkOptions] a new instance of DocumentLinkOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil), resolve_provider: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_options.rb#27 + def attributes; end + + # Document links have a resolve provider as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_options.rb#23 + def resolve_provider; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_options.rb#29 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_options.rb#33 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_options.rb#15 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_link_params.rb#4 +class LanguageServer::Protocol::Interface::DocumentLinkParams + # @return [DocumentLinkParams] a new instance of DocumentLinkParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_params.rb#5 + def initialize(text_document:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_params.rb#40 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_params.rb#28 + def partial_result_token; end + + # The document to provide document links for. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_params.rb#36 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_params.rb#42 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_params.rb#46 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_params.rb#19 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_link_registration_options.rb#4 +class LanguageServer::Protocol::Interface::DocumentLinkRegistrationOptions + # @return [DocumentLinkRegistrationOptions] a new instance of DocumentLinkRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), resolve_provider: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_registration_options.rb#37 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_registration_options.rb#20 + def document_selector; end + + # Document links have a resolve provider as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_registration_options.rb#33 + def resolve_provider; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_registration_options.rb#39 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_registration_options.rb#43 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_link_registration_options.rb#25 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::DocumentOnTypeFormattingClientCapabilities + # @return [DocumentOnTypeFormattingClientCapabilities] a new instance of DocumentOnTypeFormattingClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_client_capabilities.rb#21 + def attributes; end + + # Whether on type formatting supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_client_capabilities.rb#17 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_client_capabilities.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_client_capabilities.rb#27 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_options.rb#4 +class LanguageServer::Protocol::Interface::DocumentOnTypeFormattingOptions + # @return [DocumentOnTypeFormattingOptions] a new instance of DocumentOnTypeFormattingOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_options.rb#5 + def initialize(first_trigger_character:, more_trigger_character: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_options.rb#30 + def attributes; end + + # A character on which formatting should be triggered, like `{`. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_options.rb#18 + def first_trigger_character; end + + # More trigger characters. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_options.rb#26 + def more_trigger_character; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_options.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_options.rb#36 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_params.rb#4 +class LanguageServer::Protocol::Interface::DocumentOnTypeFormattingParams + # @return [DocumentOnTypeFormattingParams] a new instance of DocumentOnTypeFormattingParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_params.rb#5 + def initialize(text_document:, position:, ch:, options:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_params.rb#53 + def attributes; end + + # The character that has been typed that triggered the formatting + # on type request. That is not necessarily the last character that + # got inserted into the document since the client could auto insert + # characters as well (e.g. like automatic brace completion). + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_params.rb#41 + def ch; end + + # The formatting options. + # + # @return [FormattingOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_params.rb#49 + def options; end + + # The position around which the on type formatting should happen. + # This is not necessarily the exact position where the character denoted + # by the property `ch` got typed. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_params.rb#30 + def position; end + + # The document to format. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_params.rb#20 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_params.rb#55 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_params.rb#59 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb#4 +class LanguageServer::Protocol::Interface::DocumentOnTypeFormattingRegistrationOptions + # @return [DocumentOnTypeFormattingRegistrationOptions] a new instance of DocumentOnTypeFormattingRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb#5 + def initialize(document_selector:, first_trigger_character:, more_trigger_character: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb#40 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb#20 + def document_selector; end + + # A character on which formatting should be triggered, like `{`. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb#28 + def first_trigger_character; end + + # More trigger characters. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb#36 + def more_trigger_character; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb#42 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_on_type_formatting_registration_options.rb#46 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::DocumentRangeFormattingClientCapabilities + # @return [DocumentRangeFormattingClientCapabilities] a new instance of DocumentRangeFormattingClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_client_capabilities.rb#21 + def attributes; end + + # Whether formatting supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_client_capabilities.rb#17 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_client_capabilities.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_client_capabilities.rb#27 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_options.rb#4 +class LanguageServer::Protocol::Interface::DocumentRangeFormattingOptions + # @return [DocumentRangeFormattingOptions] a new instance of DocumentRangeFormattingOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_params.rb#4 +class LanguageServer::Protocol::Interface::DocumentRangeFormattingParams + # @return [DocumentRangeFormattingParams] a new instance of DocumentRangeFormattingParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_params.rb#5 + def initialize(text_document:, range:, options:, work_done_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_params.rb#48 + def attributes; end + + # The format options + # + # @return [FormattingOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_params.rb#44 + def options; end + + # The range to format + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_params.rb#36 + def range; end + + # The document to format. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_params.rb#28 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_params.rb#50 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_params.rb#54 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_params.rb#20 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_registration_options.rb#4 +class LanguageServer::Protocol::Interface::DocumentRangeFormattingRegistrationOptions + # @return [DocumentRangeFormattingRegistrationOptions] a new instance of DocumentRangeFormattingRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_registration_options.rb#28 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_registration_options.rb#19 + def document_selector; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_registration_options.rb#30 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_registration_options.rb#34 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_range_formatting_registration_options.rb#24 + def work_done_progress; end +end + +# Represents programming constructs like variables, classes, interfaces etc. +# that appear in a document. Document symbols can be hierarchical and they +# have two ranges: one that encloses its definition and one that points to its +# most interesting range, e.g. the range of an identifier. +# +# source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#10 +class LanguageServer::Protocol::Interface::DocumentSymbol + # @return [DocumentSymbol] a new instance of DocumentSymbol + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#11 + def initialize(name:, kind:, range:, selection_range:, detail: T.unsafe(nil), tags: T.unsafe(nil), deprecated: T.unsafe(nil), children: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#96 + def attributes; end + + # Children of this symbol, e.g. properties of a class. + # + # @return [DocumentSymbol[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#92 + def children; end + + # Indicates if this symbol is deprecated. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#64 + def deprecated; end + + # More detail for this symbol, e.g the signature of a function. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#40 + def detail; end + + # The kind of this symbol. + # + # @return [SymbolKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#48 + def kind; end + + # The name of this symbol. Will be displayed in the user interface and + # therefore must not be an empty string or a string only consisting of + # white spaces. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#32 + def name; end + + # The range enclosing this symbol not including leading/trailing whitespace + # but everything else like comments. This information is typically used to + # determine if the clients cursor is inside the symbol to reveal in the + # symbol in the UI. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#75 + def range; end + + # The range that should be selected and revealed when this symbol is being + # picked, e.g. the name of a function. Must be contained by the `range`. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#84 + def selection_range; end + + # Tags for this document symbol. + # + # @return [1[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#56 + def tags; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#98 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol.rb#102 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::DocumentSymbolClientCapabilities + # @return [DocumentSymbolClientCapabilities] a new instance of DocumentSymbolClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil), symbol_kind: T.unsafe(nil), hierarchical_document_symbol_support: T.unsafe(nil), tag_support: T.unsafe(nil), label_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#61 + def attributes; end + + # Whether document symbol supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#21 + def dynamic_registration; end + + # The client supports hierarchical document symbols. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#38 + def hierarchical_document_symbol_support; end + + # The client supports an additional label presented in the UI when + # registering a document symbol provider. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#57 + def label_support; end + + # Specific capabilities for the `SymbolKind` in the + # `textDocument/documentSymbol` request. + # + # @return [{ valueSet?: SymbolKind[]; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#30 + def symbol_kind; end + + # The client supports tags on `SymbolInformation`. Tags are supported on + # `DocumentSymbol` if `hierarchicalDocumentSymbolSupport` is set to true. + # Clients supporting tags have to handle unknown tags gracefully. + # + # @return [{ valueSet: 1[]; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#48 + def tag_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#63 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_client_capabilities.rb#67 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_options.rb#4 +class LanguageServer::Protocol::Interface::DocumentSymbolOptions + # @return [DocumentSymbolOptions] a new instance of DocumentSymbolOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil), label: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_options.rb#28 + def attributes; end + + # A human-readable string that is shown when multiple outlines trees + # are shown for the same document. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_options.rb#24 + def label; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_options.rb#30 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_options.rb#34 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_options.rb#15 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_params.rb#4 +class LanguageServer::Protocol::Interface::DocumentSymbolParams + # @return [DocumentSymbolParams] a new instance of DocumentSymbolParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_params.rb#5 + def initialize(text_document:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_params.rb#40 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_params.rb#28 + def partial_result_token; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_params.rb#36 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_params.rb#42 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_params.rb#46 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_params.rb#19 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_registration_options.rb#4 +class LanguageServer::Protocol::Interface::DocumentSymbolRegistrationOptions + # @return [DocumentSymbolRegistrationOptions] a new instance of DocumentSymbolRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), label: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_registration_options.rb#38 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_registration_options.rb#20 + def document_selector; end + + # A human-readable string that is shown when multiple outlines trees + # are shown for the same document. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_registration_options.rb#34 + def label; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_registration_options.rb#40 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_registration_options.rb#44 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/document_symbol_registration_options.rb#25 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/execute_command_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::ExecuteCommandClientCapabilities + # @return [ExecuteCommandClientCapabilities] a new instance of ExecuteCommandClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_client_capabilities.rb#21 + def attributes; end + + # Execute command supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_client_capabilities.rb#17 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_client_capabilities.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_client_capabilities.rb#27 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/execute_command_options.rb#4 +class LanguageServer::Protocol::Interface::ExecuteCommandOptions + # @return [ExecuteCommandOptions] a new instance of ExecuteCommandOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_options.rb#5 + def initialize(commands:, work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_options.rb#27 + def attributes; end + + # The commands to be executed on the server + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_options.rb#23 + def commands; end + + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_options.rb#29 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_options.rb#33 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_options.rb#15 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/execute_command_params.rb#4 +class LanguageServer::Protocol::Interface::ExecuteCommandParams + # @return [ExecuteCommandParams] a new instance of ExecuteCommandParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_params.rb#5 + def initialize(command:, work_done_token: T.unsafe(nil), arguments: T.unsafe(nil)); end + + # Arguments that the command should be invoked with. + # + # @return [LSPAny[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_params.rb#35 + def arguments; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_params.rb#39 + def attributes; end + + # The identifier of the actual command handler. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_params.rb#27 + def command; end + + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_params.rb#41 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_params.rb#45 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_params.rb#19 + def work_done_token; end +end + +# Execute command registration options. +# +# source://language_server-protocol//lib/language_server/protocol/interface/execute_command_registration_options.rb#7 +class LanguageServer::Protocol::Interface::ExecuteCommandRegistrationOptions + # @return [ExecuteCommandRegistrationOptions] a new instance of ExecuteCommandRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_registration_options.rb#8 + def initialize(commands:, work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_registration_options.rb#30 + def attributes; end + + # The commands to be executed on the server + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_registration_options.rb#26 + def commands; end + + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_registration_options.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_registration_options.rb#36 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/execute_command_registration_options.rb#18 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/execution_summary.rb#4 +class LanguageServer::Protocol::Interface::ExecutionSummary + # @return [ExecutionSummary] a new instance of ExecutionSummary + # + # source://language_server-protocol//lib/language_server/protocol/interface/execution_summary.rb#5 + def initialize(execution_order:, success: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/execution_summary.rb#33 + def attributes; end + + # A strict monotonically increasing value + # indicating the execution order of a cell + # inside a notebook. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/execution_summary.rb#20 + def execution_order; end + + # Whether the execution was successful or + # not if known by the client. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/execution_summary.rb#29 + def success; end + + # source://language_server-protocol//lib/language_server/protocol/interface/execution_summary.rb#35 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/execution_summary.rb#39 + def to_json(*args); end +end + +# Represents information on a file/folder create. +# +# source://language_server-protocol//lib/language_server/protocol/interface/file_create.rb#7 +class LanguageServer::Protocol::Interface::FileCreate + # @return [FileCreate] a new instance of FileCreate + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_create.rb#8 + def initialize(uri:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_create.rb#24 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_create.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_create.rb#30 + def to_json(*args); end + + # A file:// URI for the location of the file/folder being created. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_create.rb#20 + def uri; end +end + +# Represents information on a file/folder delete. +# +# source://language_server-protocol//lib/language_server/protocol/interface/file_delete.rb#7 +class LanguageServer::Protocol::Interface::FileDelete + # @return [FileDelete] a new instance of FileDelete + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_delete.rb#8 + def initialize(uri:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_delete.rb#24 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_delete.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_delete.rb#30 + def to_json(*args); end + + # A file:// URI for the location of the file/folder being deleted. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_delete.rb#20 + def uri; end +end + +# An event describing a file change. +# +# source://language_server-protocol//lib/language_server/protocol/interface/file_event.rb#7 +class LanguageServer::Protocol::Interface::FileEvent + # @return [FileEvent] a new instance of FileEvent + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_event.rb#8 + def initialize(uri:, type:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_event.rb#33 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_event.rb#35 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_event.rb#39 + def to_json(*args); end + + # The change type. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_event.rb#29 + def type; end + + # The file's URI. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_event.rb#21 + def uri; end +end + +# A filter to describe in which file operation requests or notifications +# the server is interested in. +# +# source://language_server-protocol//lib/language_server/protocol/interface/file_operation_filter.rb#8 +class LanguageServer::Protocol::Interface::FileOperationFilter + # @return [FileOperationFilter] a new instance of FileOperationFilter + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_filter.rb#9 + def initialize(pattern:, scheme: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_filter.rb#34 + def attributes; end + + # The actual file operation pattern. + # + # @return [FileOperationPattern] + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_filter.rb#30 + def pattern; end + + # A Uri like `file` or `untitled`. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_filter.rb#22 + def scheme; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_filter.rb#36 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_filter.rb#40 + def to_json(*args); end +end + +# A pattern to describe in which file operation requests or notifications +# the server is interested in. +# +# source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern.rb#8 +class LanguageServer::Protocol::Interface::FileOperationPattern + # @return [FileOperationPattern] a new instance of FileOperationPattern + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern.rb#9 + def initialize(glob:, matches: T.unsafe(nil), options: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern.rb#55 + def attributes; end + + # The glob pattern to match. Glob patterns can have the following syntax: + # - `*` to match one or more characters in a path segment + # - `?` to match on one character in a path segment + # - `**` to match any number of path segments, including none + # - `{}` to group sub patterns into an OR expression. (e.g. `**​/*.{ts,js}` + # matches all TypeScript and JavaScript files) + # - `[]` to declare a range of characters to match in a path segment + # (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …) + # - `[!...]` to negate a range of characters to match in a path segment + # (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but + # not `example.0`) + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern.rb#33 + def glob; end + + # Whether to match files or folders with this pattern. + # + # Matches both if undefined. + # + # @return [FileOperationPatternKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern.rb#43 + def matches; end + + # Additional options used during matching. + # + # @return [FileOperationPatternOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern.rb#51 + def options; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern.rb#57 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern.rb#61 + def to_json(*args); end +end + +# Matching options for the file operation pattern. +# +# source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern_options.rb#7 +class LanguageServer::Protocol::Interface::FileOperationPatternOptions + # @return [FileOperationPatternOptions] a new instance of FileOperationPatternOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern_options.rb#8 + def initialize(ignore_case: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern_options.rb#24 + def attributes; end + + # The pattern should be matched ignoring casing. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern_options.rb#20 + def ignore_case; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern_options.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_pattern_options.rb#30 + def to_json(*args); end +end + +# The options to register for file operations. +# +# source://language_server-protocol//lib/language_server/protocol/interface/file_operation_registration_options.rb#7 +class LanguageServer::Protocol::Interface::FileOperationRegistrationOptions + # @return [FileOperationRegistrationOptions] a new instance of FileOperationRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_registration_options.rb#8 + def initialize(filters:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_registration_options.rb#24 + def attributes; end + + # The actual filters. + # + # @return [FileOperationFilter[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_registration_options.rb#20 + def filters; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_registration_options.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_operation_registration_options.rb#30 + def to_json(*args); end +end + +# Represents information on a file/folder rename. +# +# source://language_server-protocol//lib/language_server/protocol/interface/file_rename.rb#7 +class LanguageServer::Protocol::Interface::FileRename + # @return [FileRename] a new instance of FileRename + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_rename.rb#8 + def initialize(old_uri:, new_uri:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_rename.rb#33 + def attributes; end + + # A file:// URI for the new location of the file/folder being renamed. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_rename.rb#29 + def new_uri; end + + # A file:// URI for the original location of the file/folder being renamed. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_rename.rb#21 + def old_uri; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_rename.rb#35 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_rename.rb#39 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/file_system_watcher.rb#4 +class LanguageServer::Protocol::Interface::FileSystemWatcher + # @return [FileSystemWatcher] a new instance of FileSystemWatcher + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_system_watcher.rb#5 + def initialize(glob_pattern:, kind: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_system_watcher.rb#33 + def attributes; end + + # The glob pattern to watch. See {@link GlobPattern glob pattern} + # for more detail. + # + # @return [GlobPattern] + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_system_watcher.rb#19 + def glob_pattern; end + + # The kind of events of interest. If omitted it defaults + # to WatchKind.Create | WatchKind.Change | WatchKind.Delete + # which is 7. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/file_system_watcher.rb#29 + def kind; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_system_watcher.rb#35 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/file_system_watcher.rb#39 + def to_json(*args); end +end + +# Represents a folding range. To be valid, start and end line must be bigger +# than zero and smaller than the number of lines in the document. Clients +# are free to ignore invalid ranges. +# +# source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#9 +class LanguageServer::Protocol::Interface::FoldingRange + # @return [FoldingRange] a new instance of FoldingRange + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#10 + def initialize(start_line:, end_line:, start_character: T.unsafe(nil), end_character: T.unsafe(nil), kind: T.unsafe(nil), collapsed_text: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#82 + def attributes; end + + # The text that the client should show when the specified range is + # collapsed. If not defined or not supported by the client, a default + # will be chosen by the client. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#78 + def collapsed_text; end + + # The zero-based character offset before the folded range ends. If not + # defined, defaults to the length of the end line. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#57 + def end_character; end + + # The zero-based end line of the range to fold. The folded area ends with + # the line's last character. To be valid, the end must be zero or larger + # and smaller than the number of lines in the document. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#48 + def end_line; end + + # Describes the kind of the folding range such as `comment` or `region`. + # The kind is used to categorize folding ranges and used by commands like + # 'Fold all comments'. See [FoldingRangeKind](#FoldingRangeKind) for an + # enumeration of standardized kinds. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#68 + def kind; end + + # The zero-based character offset from where the folded range starts. If + # not defined, defaults to the length of the start line. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#38 + def start_character; end + + # The zero-based start line of the range to fold. The folded area starts + # after the line's last character. To be valid, the end must be zero or + # larger and smaller than the number of lines in the document. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#29 + def start_line; end + + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#84 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range.rb#88 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::FoldingRangeClientCapabilities + # @return [FoldingRangeClientCapabilities] a new instance of FoldingRangeClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil), range_limit: T.unsafe(nil), line_folding_only: T.unsafe(nil), folding_range_kind: T.unsafe(nil), folding_range: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#64 + def attributes; end + + # Whether implementation supports dynamic registration for folding range + # providers. If this is set to `true` the client supports the new + # `FoldingRangeRegistrationOptions` return value for the corresponding + # server capability as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#24 + def dynamic_registration; end + + # Specific options for the folding range. + # + # @return [{ collapsedText?: boolean; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#60 + def folding_range; end + + # Specific options for the folding range kind. + # + # @return [{ valueSet?: string[]; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#52 + def folding_range_kind; end + + # If set, the client signals that it only supports folding complete lines. + # If set, client will ignore specified `startCharacter` and `endCharacter` + # properties in a FoldingRange. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#44 + def line_folding_only; end + + # The maximum number of folding ranges that the client prefers to receive + # per document. The value serves as a hint, servers are free to follow the + # limit. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#34 + def range_limit; end + + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#66 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_client_capabilities.rb#70 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/folding_range_options.rb#4 +class LanguageServer::Protocol::Interface::FoldingRangeOptions + # @return [FoldingRangeOptions] a new instance of FoldingRangeOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/folding_range_params.rb#4 +class LanguageServer::Protocol::Interface::FoldingRangeParams + # @return [FoldingRangeParams] a new instance of FoldingRangeParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_params.rb#5 + def initialize(text_document:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_params.rb#40 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_params.rb#28 + def partial_result_token; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_params.rb#36 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_params.rb#42 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_params.rb#46 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_params.rb#19 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/folding_range_registration_options.rb#4 +class LanguageServer::Protocol::Interface::FoldingRangeRegistrationOptions + # @return [FoldingRangeRegistrationOptions] a new instance of FoldingRangeRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_registration_options.rb#38 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_registration_options.rb#20 + def document_selector; end + + # The id used to register the request. The id can be used to deregister + # the request again. See also Registration#id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_registration_options.rb#34 + def id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_registration_options.rb#40 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_registration_options.rb#44 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/folding_range_registration_options.rb#25 + def work_done_progress; end +end + +# Value-object describing what options formatting should use. +# +# source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#7 +class LanguageServer::Protocol::Interface::FormattingOptions + # @return [FormattingOptions] a new instance of FormattingOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#8 + def initialize(tab_size:, insert_spaces:, trim_trailing_whitespace: T.unsafe(nil), insert_final_newline: T.unsafe(nil), trim_final_newlines: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#60 + def attributes; end + + # Insert a newline character at the end of the file if one does not exist. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#48 + def insert_final_newline; end + + # Prefer spaces over tabs. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#32 + def insert_spaces; end + + # Size of a tab in spaces. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#24 + def tab_size; end + + # source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#62 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#66 + def to_json(*args); end + + # Trim all newlines after the final newline at the end of the file. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#56 + def trim_final_newlines; end + + # Trim trailing whitespace on a line. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/formatting_options.rb#40 + def trim_trailing_whitespace; end +end + +# A diagnostic report with a full set of problems. +# +# source://language_server-protocol//lib/language_server/protocol/interface/full_document_diagnostic_report.rb#7 +class LanguageServer::Protocol::Interface::FullDocumentDiagnosticReport + # @return [FullDocumentDiagnosticReport] a new instance of FullDocumentDiagnosticReport + # + # source://language_server-protocol//lib/language_server/protocol/interface/full_document_diagnostic_report.rb#8 + def initialize(kind:, items:, result_id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/full_document_diagnostic_report.rb#44 + def attributes; end + + # The actual items. + # + # @return [Diagnostic[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/full_document_diagnostic_report.rb#40 + def items; end + + # A full document diagnostic report. + # + # @return [any] + # + # source://language_server-protocol//lib/language_server/protocol/interface/full_document_diagnostic_report.rb#22 + def kind; end + + # An optional result id. If provided it will + # be sent on the next diagnostic request for the + # same document. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/full_document_diagnostic_report.rb#32 + def result_id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/full_document_diagnostic_report.rb#46 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/full_document_diagnostic_report.rb#50 + def to_json(*args); end +end + +# The result of a hover request. +# +# source://language_server-protocol//lib/language_server/protocol/interface/hover.rb#7 +class LanguageServer::Protocol::Interface::Hover + # @return [Hover] a new instance of Hover + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover.rb#8 + def initialize(contents:, range: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover.rb#34 + def attributes; end + + # The hover's content + # + # @return [MarkupContent | MarkedString | MarkedString[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover.rb#21 + def contents; end + + # An optional range is a range inside a text document + # that is used to visualize a hover, e.g. by changing the background color. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover.rb#30 + def range; end + + # source://language_server-protocol//lib/language_server/protocol/interface/hover.rb#36 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/hover.rb#40 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/hover_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::HoverClientCapabilities + # @return [HoverClientCapabilities] a new instance of HoverClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil), content_format: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_client_capabilities.rb#32 + def attributes; end + + # Client supports the follow content formats if the content + # property refers to a `literal of type MarkupContent`. + # The order describes the preferred format of the client. + # + # @return [MarkupKind[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_client_capabilities.rb#28 + def content_format; end + + # Whether hover supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_client_capabilities.rb#18 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/hover_client_capabilities.rb#34 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/hover_client_capabilities.rb#38 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/hover_options.rb#4 +class LanguageServer::Protocol::Interface::HoverOptions + # @return [HoverOptions] a new instance of HoverOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/hover_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/hover_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/hover_params.rb#4 +class LanguageServer::Protocol::Interface::HoverParams + # @return [HoverParams] a new instance of HoverParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_params.rb#5 + def initialize(text_document:, position:, work_done_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_params.rb#39 + def attributes; end + + # The position inside the text document. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_params.rb#27 + def position; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_params.rb#19 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/hover_params.rb#41 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/hover_params.rb#45 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_params.rb#35 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/hover_registration_options.rb#4 +class LanguageServer::Protocol::Interface::HoverRegistrationOptions + # @return [HoverRegistrationOptions] a new instance of HoverRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_registration_options.rb#28 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_registration_options.rb#19 + def document_selector; end + + # source://language_server-protocol//lib/language_server/protocol/interface/hover_registration_options.rb#30 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/hover_registration_options.rb#34 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_registration_options.rb#24 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/hover_result.rb#4 +class LanguageServer::Protocol::Interface::HoverResult + # @return [HoverResult] a new instance of HoverResult + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_result.rb#5 + def initialize(value:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_result.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/hover_result.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/hover_result.rb#24 + def to_json(*args); end + + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/hover_result.rb#14 + def value; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/implementation_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::ImplementationClientCapabilities + # @return [ImplementationClientCapabilities] a new instance of ImplementationClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil), link_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_client_capabilities.rb#32 + def attributes; end + + # Whether implementation supports dynamic registration. If this is set to + # `true` the client supports the new `ImplementationRegistrationOptions` + # return value for the corresponding server capability as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_client_capabilities.rb#20 + def dynamic_registration; end + + # The client supports additional metadata in the form of definition links. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_client_capabilities.rb#28 + def link_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_client_capabilities.rb#34 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_client_capabilities.rb#38 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/implementation_options.rb#4 +class LanguageServer::Protocol::Interface::ImplementationOptions + # @return [ImplementationOptions] a new instance of ImplementationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/implementation_params.rb#4 +class LanguageServer::Protocol::Interface::ImplementationParams + # @return [ImplementationParams] a new instance of ImplementationParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_params.rb#5 + def initialize(text_document:, position:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_params.rb#49 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_params.rb#45 + def partial_result_token; end + + # The position inside the text document. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_params.rb#28 + def position; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_params.rb#20 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_params.rb#51 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_params.rb#55 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_params.rb#36 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/implementation_registration_options.rb#4 +class LanguageServer::Protocol::Interface::ImplementationRegistrationOptions + # @return [ImplementationRegistrationOptions] a new instance of ImplementationRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_registration_options.rb#38 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_registration_options.rb#20 + def document_selector; end + + # The id used to register the request. The id can be used to deregister + # the request again. See also Registration#id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_registration_options.rb#34 + def id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_registration_options.rb#40 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_registration_options.rb#44 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/implementation_registration_options.rb#25 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/initialize_error.rb#4 +class LanguageServer::Protocol::Interface::InitializeError + # @return [InitializeError] a new instance of InitializeError + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_error.rb#5 + def initialize(retry:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_error.rb#24 + def attributes; end + + # Indicates whether the client execute the following retry logic: + # (1) show the message provided by the ResponseError to the user + # (2) user selects retry or cancel + # (3) if user selected retry the initialize method is sent again. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_error.rb#20 + def retry; end + + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_error.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_error.rb#30 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#4 +class LanguageServer::Protocol::Interface::InitializeParams + # @return [InitializeParams] a new instance of InitializeParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#5 + def initialize(process_id:, root_uri:, capabilities:, work_done_token: T.unsafe(nil), client_info: T.unsafe(nil), locale: T.unsafe(nil), root_path: T.unsafe(nil), initialization_options: T.unsafe(nil), trace: T.unsafe(nil), workspace_folders: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#116 + def attributes; end + + # The capabilities provided by the client (editor or tool) + # + # @return [ClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#93 + def capabilities; end + + # Information about the client + # + # @return [{ name: string; version?: string; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#45 + def client_info; end + + # User provided initialization options. + # + # @return [LSPAny] + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#85 + def initialization_options; end + + # The locale the client is currently showing the user interface + # in. This must not necessarily be the locale of the operating + # system. + # + # Uses IETF language tags as the value's syntax + # (See https://en.wikipedia.org/wiki/IETF_language_tag) + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#58 + def locale; end + + # The process Id of the parent process that started the server. Is null if + # the process has not been started by another process. If the parent + # process is not alive then the server should exit (see exit notification) + # its process. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#37 + def process_id; end + + # The rootPath of the workspace. Is null + # if no folder is open. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#67 + def root_path; end + + # The rootUri of the workspace. Is null if no + # folder is open. If both `rootPath` and `rootUri` are set + # `rootUri` wins. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#77 + def root_uri; end + + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#118 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#122 + def to_json(*args); end + + # The initial trace setting. If omitted trace is disabled ('off'). + # + # @return [TraceValue] + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#101 + def trace; end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#26 + def work_done_token; end + + # The workspace folders configured in the client when the server starts. + # This property is only available if the client supports workspace folders. + # It can be `null` if the client supports workspace folders but none are + # configured. + # + # @return [WorkspaceFolder[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_params.rb#112 + def workspace_folders; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/initialize_result.rb#4 +class LanguageServer::Protocol::Interface::InitializeResult + # @return [InitializeResult] a new instance of InitializeResult + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_result.rb#5 + def initialize(capabilities:, server_info: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_result.rb#30 + def attributes; end + + # The capabilities the language server provides. + # + # @return [ServerCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_result.rb#18 + def capabilities; end + + # Information about the server. + # + # @return [{ name: string; version?: string; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_result.rb#26 + def server_info; end + + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_result.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/initialize_result.rb#36 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/initialized_params.rb#4 +class LanguageServer::Protocol::Interface::InitializedParams + # @return [InitializedParams] a new instance of InitializedParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialized_params.rb#5 + def initialize; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/initialized_params.rb#12 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/initialized_params.rb#14 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/initialized_params.rb#18 + def to_json(*args); end +end + +# Inlay hint information. +# +# source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#7 +class LanguageServer::Protocol::Interface::InlayHint + # @return [InlayHint] a new instance of InlayHint + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#8 + def initialize(position:, label:, kind: T.unsafe(nil), text_edits: T.unsafe(nil), tooltip: T.unsafe(nil), padding_left: T.unsafe(nil), padding_right: T.unsafe(nil), data: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#110 + def attributes; end + + # A data entry field that is preserved on an inlay hint between + # a `textDocument/inlayHint` and a `inlayHint/resolve` request. + # + # @return [LSPAny] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#106 + def data; end + + # The kind of this hint. Can be omitted in which case the client + # should fall back to a reasonable default. + # + # @return [InlayHintKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#47 + def kind; end + + # The label of this hint. A human readable string or an array of + # InlayHintLabelPart label parts. + # + # *Note* that neither the string nor the label part can be empty. + # + # @return [string | InlayHintLabelPart[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#38 + def label; end + + # Render padding before the hint. + # + # Note: Padding should use the editor's background color, not the + # background color of the hint itself. That means padding can be used + # to visually align/separate an inlay hint. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#85 + def padding_left; end + + # Render padding after the hint. + # + # Note: Padding should use the editor's background color, not the + # background color of the hint itself. That means padding can be used + # to visually align/separate an inlay hint. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#97 + def padding_right; end + + # The position of this hint. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#27 + def position; end + + # Optional text edits that are performed when accepting this inlay hint. + # + # *Note* that edits are expected to change the document so that the inlay + # hint (or its nearest variant) is now part of the document and the inlay + # hint itself is now obsolete. + # + # Depending on the client capability `inlayHint.resolveSupport` clients + # might resolve this property late using the resolve request. + # + # @return [TextEdit[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#62 + def text_edits; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#112 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#116 + def to_json(*args); end + + # The tooltip text when you hover over this item. + # + # Depending on the client capability `inlayHint.resolveSupport` clients + # might resolve this property late using the resolve request. + # + # @return [string | MarkupContent] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint.rb#73 + def tooltip; end +end + +# Inlay hint client capabilities. +# +# source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_client_capabilities.rb#7 +class LanguageServer::Protocol::Interface::InlayHintClientCapabilities + # @return [InlayHintClientCapabilities] a new instance of InlayHintClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_client_capabilities.rb#8 + def initialize(dynamic_registration: T.unsafe(nil), resolve_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_client_capabilities.rb#34 + def attributes; end + + # Whether inlay hints support dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_client_capabilities.rb#21 + def dynamic_registration; end + + # Indicates which properties a client can resolve lazily on an inlay + # hint. + # + # @return [{ properties: string[]; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_client_capabilities.rb#30 + def resolve_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_client_capabilities.rb#36 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_client_capabilities.rb#40 + def to_json(*args); end +end + +# An inlay hint label part allows for interactive and composite labels +# of inlay hints. +# +# source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_label_part.rb#8 +class LanguageServer::Protocol::Interface::InlayHintLabelPart + # @return [InlayHintLabelPart] a new instance of InlayHintLabelPart + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_label_part.rb#9 + def initialize(value:, tooltip: T.unsafe(nil), location: T.unsafe(nil), command: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_label_part.rb#67 + def attributes; end + + # An optional command for this label part. + # + # Depending on the client capability `inlayHint.resolveSupport` clients + # might resolve this property late using the resolve request. + # + # @return [Command] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_label_part.rb#63 + def command; end + + # An optional source code location that represents this + # label part. + # + # The editor will use this location for the hover and for code navigation + # features: This part will become a clickable link that resolves to the + # definition of the symbol at the given location (not necessarily the + # location itself), it shows the hover that shows at the given location, + # and it shows a context menu with further code navigation commands. + # + # Depending on the client capability `inlayHint.resolveSupport` clients + # might resolve this property late using the resolve request. + # + # @return [Location] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_label_part.rb#52 + def location; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_label_part.rb#69 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_label_part.rb#73 + def to_json(*args); end + + # The tooltip text when you hover over this label part. Depending on + # the client capability `inlayHint.resolveSupport` clients might resolve + # this property late using the resolve request. + # + # @return [string | MarkupContent] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_label_part.rb#34 + def tooltip; end + + # The value of this label part. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_label_part.rb#24 + def value; end +end + +# Inlay hint options used during static registration. +# +# source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_options.rb#7 +class LanguageServer::Protocol::Interface::InlayHintOptions + # @return [InlayHintOptions] a new instance of InlayHintOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_options.rb#8 + def initialize(work_done_progress: T.unsafe(nil), resolve_provider: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_options.rb#31 + def attributes; end + + # The server provides support to resolve additional + # information for an inlay hint item. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_options.rb#27 + def resolve_provider; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_options.rb#33 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_options.rb#37 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_options.rb#18 + def work_done_progress; end +end + +# A parameter literal used in inlay hint requests. +# +# source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_params.rb#7 +class LanguageServer::Protocol::Interface::InlayHintParams + # @return [InlayHintParams] a new instance of InlayHintParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_params.rb#8 + def initialize(text_document:, range:, work_done_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_params.rb#42 + def attributes; end + + # The visible document range for which inlay hints should be computed. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_params.rb#38 + def range; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_params.rb#30 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_params.rb#44 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_params.rb#48 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_params.rb#22 + def work_done_token; end +end + +# Inlay hint options used during static or dynamic registration. +# +# source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_registration_options.rb#7 +class LanguageServer::Protocol::Interface::InlayHintRegistrationOptions + # @return [InlayHintRegistrationOptions] a new instance of InlayHintRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_registration_options.rb#8 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), resolve_provider: T.unsafe(nil), id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_registration_options.rb#51 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_registration_options.rb#38 + def document_selector; end + + # The id used to register the request. The id can be used to deregister + # the request again. See also Registration#id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_registration_options.rb#47 + def id; end + + # The server provides support to resolve additional + # information for an inlay hint item. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_registration_options.rb#29 + def resolve_provider; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_registration_options.rb#53 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_registration_options.rb#57 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_registration_options.rb#20 + def work_done_progress; end +end + +# Client workspace capabilities specific to inlay hints. +# +# source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_workspace_client_capabilities.rb#7 +class LanguageServer::Protocol::Interface::InlayHintWorkspaceClientCapabilities + # @return [InlayHintWorkspaceClientCapabilities] a new instance of InlayHintWorkspaceClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_workspace_client_capabilities.rb#8 + def initialize(refresh_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_workspace_client_capabilities.rb#30 + def attributes; end + + # Whether the client implementation supports a refresh request sent from + # the server to the client. + # + # Note that this event is global and will force the client to refresh all + # inlay hints currently shown. It should be used with absolute care and + # is useful for situation where a server for example detects a project wide + # change that requires such a calculation. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_workspace_client_capabilities.rb#26 + def refresh_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_workspace_client_capabilities.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inlay_hint_workspace_client_capabilities.rb#36 + def to_json(*args); end +end + +# Client capabilities specific to inline values. +# +# source://language_server-protocol//lib/language_server/protocol/interface/inline_value_client_capabilities.rb#7 +class LanguageServer::Protocol::Interface::InlineValueClientCapabilities + # @return [InlineValueClientCapabilities] a new instance of InlineValueClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_client_capabilities.rb#8 + def initialize(dynamic_registration: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_client_capabilities.rb#25 + def attributes; end + + # Whether implementation supports dynamic registration for inline + # value providers. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_client_capabilities.rb#21 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_client_capabilities.rb#27 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_client_capabilities.rb#31 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/inline_value_context.rb#4 +class LanguageServer::Protocol::Interface::InlineValueContext + # @return [InlineValueContext] a new instance of InlineValueContext + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_context.rb#5 + def initialize(frame_id:, stopped_location:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_context.rb#32 + def attributes; end + + # The stack frame (as a DAP Id) where the execution has stopped. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_context.rb#18 + def frame_id; end + + # The document range where execution has stopped. + # Typically the end position of the range denotes the line where the + # inline values are shown. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_context.rb#28 + def stopped_location; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_context.rb#34 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_context.rb#38 + def to_json(*args); end +end + +# Provide an inline value through an expression evaluation. +# +# If only a range is specified, the expression will be extracted from the +# underlying document. +# +# An optional expression can be used to override the extracted expression. +# +# source://language_server-protocol//lib/language_server/protocol/interface/inline_value_evaluatable_expression.rb#12 +class LanguageServer::Protocol::Interface::InlineValueEvaluatableExpression + # @return [InlineValueEvaluatableExpression] a new instance of InlineValueEvaluatableExpression + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_evaluatable_expression.rb#13 + def initialize(range:, expression: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_evaluatable_expression.rb#40 + def attributes; end + + # If specified the expression overrides the extracted expression. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_evaluatable_expression.rb#36 + def expression; end + + # The document range for which the inline value applies. + # The range is used to extract the evaluatable expression from the + # underlying document. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_evaluatable_expression.rb#28 + def range; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_evaluatable_expression.rb#42 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_evaluatable_expression.rb#46 + def to_json(*args); end +end + +# Inline value options used during static registration. +# +# source://language_server-protocol//lib/language_server/protocol/interface/inline_value_options.rb#7 +class LanguageServer::Protocol::Interface::InlineValueOptions + # @return [InlineValueOptions] a new instance of InlineValueOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_options.rb#8 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_options.rb#21 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_options.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_options.rb#27 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_options.rb#17 + def work_done_progress; end +end + +# A parameter literal used in inline value requests. +# +# source://language_server-protocol//lib/language_server/protocol/interface/inline_value_params.rb#7 +class LanguageServer::Protocol::Interface::InlineValueParams + # @return [InlineValueParams] a new instance of InlineValueParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_params.rb#8 + def initialize(text_document:, range:, context:, work_done_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_params.rb#52 + def attributes; end + + # Additional information about the context in which inline values were + # requested. + # + # @return [InlineValueContext] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_params.rb#48 + def context; end + + # The document range for which inline values should be computed. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_params.rb#39 + def range; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_params.rb#31 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_params.rb#54 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_params.rb#58 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_params.rb#23 + def work_done_token; end +end + +# Inline value options used during static or dynamic registration. +# +# source://language_server-protocol//lib/language_server/protocol/interface/inline_value_registration_options.rb#7 +class LanguageServer::Protocol::Interface::InlineValueRegistrationOptions + # @return [InlineValueRegistrationOptions] a new instance of InlineValueRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_registration_options.rb#8 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_registration_options.rb#41 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_registration_options.rb#28 + def document_selector; end + + # The id used to register the request. The id can be used to deregister + # the request again. See also Registration#id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_registration_options.rb#37 + def id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_registration_options.rb#43 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_registration_options.rb#47 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_registration_options.rb#19 + def work_done_progress; end +end + +# Provide inline value as text. +# +# source://language_server-protocol//lib/language_server/protocol/interface/inline_value_text.rb#7 +class LanguageServer::Protocol::Interface::InlineValueText + # @return [InlineValueText] a new instance of InlineValueText + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_text.rb#8 + def initialize(range:, text:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_text.rb#33 + def attributes; end + + # The document range for which the inline value applies. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_text.rb#21 + def range; end + + # The text of the inline value. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_text.rb#29 + def text; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_text.rb#35 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_text.rb#39 + def to_json(*args); end +end + +# Provide inline value through a variable lookup. +# +# If only a range is specified, the variable name will be extracted from +# the underlying document. +# +# An optional variable name can be used to override the extracted name. +# +# source://language_server-protocol//lib/language_server/protocol/interface/inline_value_variable_lookup.rb#12 +class LanguageServer::Protocol::Interface::InlineValueVariableLookup + # @return [InlineValueVariableLookup] a new instance of InlineValueVariableLookup + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_variable_lookup.rb#13 + def initialize(range:, case_sensitive_lookup:, variable_name: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_variable_lookup.rb#49 + def attributes; end + + # How to perform the lookup. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_variable_lookup.rb#45 + def case_sensitive_lookup; end + + # The document range for which the inline value applies. + # The range is used to extract the variable name from the underlying + # document. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_variable_lookup.rb#29 + def range; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_variable_lookup.rb#51 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_variable_lookup.rb#55 + def to_json(*args); end + + # If specified the name of the variable to look up. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_variable_lookup.rb#37 + def variable_name; end +end + +# Client workspace capabilities specific to inline values. +# +# source://language_server-protocol//lib/language_server/protocol/interface/inline_value_workspace_client_capabilities.rb#7 +class LanguageServer::Protocol::Interface::InlineValueWorkspaceClientCapabilities + # @return [InlineValueWorkspaceClientCapabilities] a new instance of InlineValueWorkspaceClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_workspace_client_capabilities.rb#8 + def initialize(refresh_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_workspace_client_capabilities.rb#30 + def attributes; end + + # Whether the client implementation supports a refresh request sent from + # the server to the client. + # + # Note that this event is global and will force the client to refresh all + # inline values currently shown. It should be used with absolute care and + # is useful for situation where a server for example detect a project wide + # change that requires such a calculation. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_workspace_client_capabilities.rb#26 + def refresh_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_workspace_client_capabilities.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/inline_value_workspace_client_capabilities.rb#36 + def to_json(*args); end +end + +# A special text edit to provide an insert and a replace operation. +# +# source://language_server-protocol//lib/language_server/protocol/interface/insert_replace_edit.rb#7 +class LanguageServer::Protocol::Interface::InsertReplaceEdit + # @return [InsertReplaceEdit] a new instance of InsertReplaceEdit + # + # source://language_server-protocol//lib/language_server/protocol/interface/insert_replace_edit.rb#8 + def initialize(new_text:, insert:, replace:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/insert_replace_edit.rb#42 + def attributes; end + + # The range if the insert is requested + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/insert_replace_edit.rb#30 + def insert; end + + # The string to be inserted. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/insert_replace_edit.rb#22 + def new_text; end + + # The range if the replace is requested. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/insert_replace_edit.rb#38 + def replace; end + + # source://language_server-protocol//lib/language_server/protocol/interface/insert_replace_edit.rb#44 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/insert_replace_edit.rb#48 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::LinkedEditingRangeClientCapabilities + # @return [LinkedEditingRangeClientCapabilities] a new instance of LinkedEditingRangeClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_client_capabilities.rb#24 + def attributes; end + + # Whether the implementation supports dynamic registration. + # If this is set to `true` the client supports the new + # `(TextDocumentRegistrationOptions & StaticRegistrationOptions)` + # return value for the corresponding server capability as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_client_capabilities.rb#20 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_client_capabilities.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_client_capabilities.rb#30 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_options.rb#4 +class LanguageServer::Protocol::Interface::LinkedEditingRangeOptions + # @return [LinkedEditingRangeOptions] a new instance of LinkedEditingRangeOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_params.rb#4 +class LanguageServer::Protocol::Interface::LinkedEditingRangeParams + # @return [LinkedEditingRangeParams] a new instance of LinkedEditingRangeParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_params.rb#5 + def initialize(text_document:, position:, work_done_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_params.rb#39 + def attributes; end + + # The position inside the text document. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_params.rb#27 + def position; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_params.rb#19 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_params.rb#41 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_params.rb#45 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_params.rb#35 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_registration_options.rb#4 +class LanguageServer::Protocol::Interface::LinkedEditingRangeRegistrationOptions + # @return [LinkedEditingRangeRegistrationOptions] a new instance of LinkedEditingRangeRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_registration_options.rb#38 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_registration_options.rb#20 + def document_selector; end + + # The id used to register the request. The id can be used to deregister + # the request again. See also Registration#id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_registration_options.rb#34 + def id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_registration_options.rb#40 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_registration_options.rb#44 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_range_registration_options.rb#25 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_ranges.rb#4 +class LanguageServer::Protocol::Interface::LinkedEditingRanges + # @return [LinkedEditingRanges] a new instance of LinkedEditingRanges + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_ranges.rb#5 + def initialize(ranges:, word_pattern: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_ranges.rb#34 + def attributes; end + + # A list of ranges that can be renamed together. The ranges must have + # identical length and contain identical text content. The ranges cannot + # overlap. + # + # @return [Range[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_ranges.rb#20 + def ranges; end + + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_ranges.rb#36 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_ranges.rb#40 + def to_json(*args); end + + # An optional word pattern (regular expression) that describes valid + # contents for the given ranges. If no pattern is provided, the client + # configuration's word pattern will be used. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/linked_editing_ranges.rb#30 + def word_pattern; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/location.rb#4 +class LanguageServer::Protocol::Interface::Location + # @return [Location] a new instance of Location + # + # source://language_server-protocol//lib/language_server/protocol/interface/location.rb#5 + def initialize(uri:, range:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/location.rb#24 + def attributes; end + + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/location.rb#20 + def range; end + + # source://language_server-protocol//lib/language_server/protocol/interface/location.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/location.rb#30 + def to_json(*args); end + + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/location.rb#15 + def uri; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/location_link.rb#4 +class LanguageServer::Protocol::Interface::LocationLink + # @return [LocationLink] a new instance of LocationLink + # + # source://language_server-protocol//lib/language_server/protocol/interface/location_link.rb#5 + def initialize(target_uri:, target_range:, target_selection_range:, origin_selection_range: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/location_link.rb#56 + def attributes; end + + # Span of the origin of this link. + # + # Used as the underlined span for mouse interaction. Defaults to the word + # range at the mouse position. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/location_link.rb#23 + def origin_selection_range; end + + # The full target range of this link. If the target for example is a symbol + # then target range is the range enclosing this symbol not including + # leading/trailing whitespace but everything else like comments. This + # information is typically used to highlight the range in the editor. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/location_link.rb#42 + def target_range; end + + # The range that should be selected and revealed when this link is being + # followed, e.g the name of a function. Must be contained by the + # `targetRange`. See also `DocumentSymbol#range` + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/location_link.rb#52 + def target_selection_range; end + + # The target resource identifier of this link. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/location_link.rb#31 + def target_uri; end + + # source://language_server-protocol//lib/language_server/protocol/interface/location_link.rb#58 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/location_link.rb#62 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/log_message_params.rb#4 +class LanguageServer::Protocol::Interface::LogMessageParams + # @return [LogMessageParams] a new instance of LogMessageParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/log_message_params.rb#5 + def initialize(type:, message:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/log_message_params.rb#30 + def attributes; end + + # The actual message + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/log_message_params.rb#26 + def message; end + + # source://language_server-protocol//lib/language_server/protocol/interface/log_message_params.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/log_message_params.rb#36 + def to_json(*args); end + + # The message type. See {@link MessageType} + # + # @return [MessageType] + # + # source://language_server-protocol//lib/language_server/protocol/interface/log_message_params.rb#18 + def type; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/log_trace_params.rb#4 +class LanguageServer::Protocol::Interface::LogTraceParams + # @return [LogTraceParams] a new instance of LogTraceParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/log_trace_params.rb#5 + def initialize(message:, verbose: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/log_trace_params.rb#31 + def attributes; end + + # The message to be logged. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/log_trace_params.rb#18 + def message; end + + # source://language_server-protocol//lib/language_server/protocol/interface/log_trace_params.rb#33 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/log_trace_params.rb#37 + def to_json(*args); end + + # Additional information that can be computed if the `trace` configuration + # is set to `'verbose'` + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/log_trace_params.rb#27 + def verbose; end +end + +# A `MarkupContent` literal represents a string value which content is +# interpreted base on its kind flag. Currently the protocol supports +# `plaintext` and `markdown` as markup kinds. +# +# If the kind is `markdown` then the value can contain fenced code blocks like +# in GitHub issues. +# +# Here is an example how such a string can be constructed using +# JavaScript / TypeScript: +# ```typescript +# let markdown: MarkdownContent = { +# kind: MarkupKind.Markdown, +# value: [ +# '# Header', +# 'Some text', +# '```typescript', +# 'someCode();', +# '```' +# ].join('\n') +# }; +# ``` +# +# *Please Note* that clients might sanitize the return markdown. A client could +# decide to remove HTML from the markdown to avoid script execution. +# +# source://language_server-protocol//lib/language_server/protocol/interface/markup_content.rb#30 +class LanguageServer::Protocol::Interface::MarkupContent + # @return [MarkupContent] a new instance of MarkupContent + # + # source://language_server-protocol//lib/language_server/protocol/interface/markup_content.rb#31 + def initialize(kind:, value:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/markup_content.rb#56 + def attributes; end + + # The type of the Markup + # + # @return [MarkupKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/markup_content.rb#44 + def kind; end + + # source://language_server-protocol//lib/language_server/protocol/interface/markup_content.rb#58 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/markup_content.rb#62 + def to_json(*args); end + + # The content itself + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/markup_content.rb#52 + def value; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/message.rb#4 +class LanguageServer::Protocol::Interface::Message + # @return [Message] a new instance of Message + # + # source://language_server-protocol//lib/language_server/protocol/interface/message.rb#5 + def initialize(jsonrpc:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/message.rb#18 + def attributes; end + + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/message.rb#14 + def jsonrpc; end + + # source://language_server-protocol//lib/language_server/protocol/interface/message.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/message.rb#24 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/message_action_item.rb#4 +class LanguageServer::Protocol::Interface::MessageActionItem + # @return [MessageActionItem] a new instance of MessageActionItem + # + # source://language_server-protocol//lib/language_server/protocol/interface/message_action_item.rb#5 + def initialize(title:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/message_action_item.rb#21 + def attributes; end + + # A short title like 'Retry', 'Open Log' etc. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/message_action_item.rb#17 + def title; end + + # source://language_server-protocol//lib/language_server/protocol/interface/message_action_item.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/message_action_item.rb#27 + def to_json(*args); end +end + +# Moniker definition to match LSIF 0.5 moniker definition. +# +# source://language_server-protocol//lib/language_server/protocol/interface/moniker.rb#7 +class LanguageServer::Protocol::Interface::Moniker + # @return [Moniker] a new instance of Moniker + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker.rb#8 + def initialize(scheme:, identifier:, unique:, kind: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker.rb#52 + def attributes; end + + # The identifier of the moniker. The value is opaque in LSIF however + # schema owners are allowed to define the structure if they want. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker.rb#32 + def identifier; end + + # The moniker kind if known. + # + # @return [MonikerKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker.rb#48 + def kind; end + + # The scheme of the moniker. For example tsc or .Net + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker.rb#23 + def scheme; end + + # source://language_server-protocol//lib/language_server/protocol/interface/moniker.rb#54 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/moniker.rb#58 + def to_json(*args); end + + # The scope in which the moniker is unique + # + # @return [UniquenessLevel] + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker.rb#40 + def unique; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/moniker_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::MonikerClientCapabilities + # @return [MonikerClientCapabilities] a new instance of MonikerClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_client_capabilities.rb#24 + def attributes; end + + # Whether implementation supports dynamic registration. If this is set to + # `true` the client supports the new `(TextDocumentRegistrationOptions & + # StaticRegistrationOptions)` return value for the corresponding server + # capability as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_client_capabilities.rb#20 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_client_capabilities.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_client_capabilities.rb#30 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/moniker_options.rb#4 +class LanguageServer::Protocol::Interface::MonikerOptions + # @return [MonikerOptions] a new instance of MonikerOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/moniker_params.rb#4 +class LanguageServer::Protocol::Interface::MonikerParams + # @return [MonikerParams] a new instance of MonikerParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_params.rb#5 + def initialize(text_document:, position:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_params.rb#49 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_params.rb#45 + def partial_result_token; end + + # The position inside the text document. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_params.rb#28 + def position; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_params.rb#20 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_params.rb#51 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_params.rb#55 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_params.rb#36 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/moniker_registration_options.rb#4 +class LanguageServer::Protocol::Interface::MonikerRegistrationOptions + # @return [MonikerRegistrationOptions] a new instance of MonikerRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_registration_options.rb#28 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_registration_options.rb#19 + def document_selector; end + + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_registration_options.rb#30 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_registration_options.rb#34 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/moniker_registration_options.rb#24 + def work_done_progress; end +end + +# A notebook cell. +# +# A cell's document URI must be unique across ALL notebook +# cells and can therefore be used to uniquely identify a +# notebook cell or the cell's text document. +# +# source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell.rb#11 +class LanguageServer::Protocol::Interface::NotebookCell + # @return [NotebookCell] a new instance of NotebookCell + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell.rb#12 + def initialize(kind:, document:, metadata: T.unsafe(nil), execution_summary: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell.rb#57 + def attributes; end + + # The URI of the cell's text document + # content. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell.rb#36 + def document; end + + # Additional execution summary information + # if supported by the client. + # + # @return [ExecutionSummary] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell.rb#53 + def execution_summary; end + + # The cell's kind + # + # @return [any] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell.rb#27 + def kind; end + + # Additional metadata stored with the cell. + # + # @return [LSPObject] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell.rb#44 + def metadata; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell.rb#59 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell.rb#63 + def to_json(*args); end +end + +# A change describing how to move a `NotebookCell` +# array from state S to S'. +# +# source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_array_change.rb#8 +class LanguageServer::Protocol::Interface::NotebookCellArrayChange + # @return [NotebookCellArrayChange] a new instance of NotebookCellArrayChange + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_array_change.rb#9 + def initialize(start:, delete_count:, cells: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_array_change.rb#43 + def attributes; end + + # The new cells, if any + # + # @return [NotebookCell[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_array_change.rb#39 + def cells; end + + # The deleted cells + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_array_change.rb#31 + def delete_count; end + + # The start offset of the cell that changed. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_array_change.rb#23 + def start; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_array_change.rb#45 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_array_change.rb#49 + def to_json(*args); end +end + +# A notebook cell text document filter denotes a cell text +# document by different properties. +# +# source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_text_document_filter.rb#8 +class LanguageServer::Protocol::Interface::NotebookCellTextDocumentFilter + # @return [NotebookCellTextDocumentFilter] a new instance of NotebookCellTextDocumentFilter + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_text_document_filter.rb#9 + def initialize(notebook:, language: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_text_document_filter.rb#40 + def attributes; end + + # A language id like `python`. + # + # Will be matched against the language id of the + # notebook cell document. '*' matches every language. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_text_document_filter.rb#36 + def language; end + + # A filter that matches against the notebook + # containing the notebook cell. If a string + # value is provided it matches against the + # notebook type. '*' matches every notebook. + # + # @return [string | NotebookDocumentFilter] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_text_document_filter.rb#25 + def notebook; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_text_document_filter.rb#42 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_cell_text_document_filter.rb#46 + def to_json(*args); end +end + +# A notebook document. +# +# source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#7 +class LanguageServer::Protocol::Interface::NotebookDocument + # @return [NotebookDocument] a new instance of NotebookDocument + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#8 + def initialize(uri:, notebook_type:, version:, cells:, metadata: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#62 + def attributes; end + + # The cells of a notebook. + # + # @return [NotebookCell[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#58 + def cells; end + + # Additional metadata stored with the notebook + # document. + # + # @return [LSPObject] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#50 + def metadata; end + + # The type of the notebook. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#32 + def notebook_type; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#64 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#68 + def to_json(*args); end + + # The notebook document's URI. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#24 + def uri; end + + # The version number of this document (it will increase after each + # change, including undo/redo). + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document.rb#41 + def version; end +end + +# A change event for a notebook document. +# +# source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_change_event.rb#7 +class LanguageServer::Protocol::Interface::NotebookDocumentChangeEvent + # @return [NotebookDocumentChangeEvent] a new instance of NotebookDocumentChangeEvent + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_change_event.rb#8 + def initialize(metadata: T.unsafe(nil), cells: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_change_event.rb#33 + def attributes; end + + # Changes to cells + # + # @return [{ structure?: { array: NotebookCellArrayChange; didOpen?: TextDocumentItem[]; didClose?: TextDocumentIdentifier[]; }; data?: NotebookCell[]; textContent?: { ...; }[]; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_change_event.rb#29 + def cells; end + + # The changed meta data if any. + # + # @return [LSPObject] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_change_event.rb#21 + def metadata; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_change_event.rb#35 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_change_event.rb#39 + def to_json(*args); end +end + +# Capabilities specific to the notebook document support. +# +# source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_client_capabilities.rb#7 +class LanguageServer::Protocol::Interface::NotebookDocumentClientCapabilities + # @return [NotebookDocumentClientCapabilities] a new instance of NotebookDocumentClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_client_capabilities.rb#8 + def initialize(synchronization:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_client_capabilities.rb#24 + def attributes; end + + # Capabilities specific to notebook document synchronization + # + # @return [NotebookDocumentSyncClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_client_capabilities.rb#20 + def synchronization; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_client_capabilities.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_client_capabilities.rb#30 + def to_json(*args); end +end + +# A notebook document filter denotes a notebook document by +# different properties. +# +# source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_filter.rb#8 +class LanguageServer::Protocol::Interface::NotebookDocumentFilter + # @return [NotebookDocumentFilter] a new instance of NotebookDocumentFilter + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_filter.rb#9 + def initialize(notebook_type: T.unsafe(nil), scheme: T.unsafe(nil), pattern: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_filter.rb#67 + def attributes; end + + # The type of the enclosing notebook. + # + # --- OR --- + # + # The type of the enclosing notebook. + # + # --- OR --- + # + # The type of the enclosing notebook. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_filter.rb#31 + def notebook_type; end + + # A glob pattern. + # + # --- OR --- + # + # A glob pattern. + # + # --- OR --- + # + # A glob pattern. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_filter.rb#63 + def pattern; end + + # A Uri [scheme](#Uri.scheme), like `file` or `untitled`. + # + # --- OR --- + # + # A Uri [scheme](#Uri.scheme), like `file` or `untitled`. + # + # --- OR --- + # + # A Uri [scheme](#Uri.scheme), like `file` or `untitled`. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_filter.rb#47 + def scheme; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_filter.rb#69 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_filter.rb#73 + def to_json(*args); end +end + +# A literal to identify a notebook document in the client. +# +# source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_identifier.rb#7 +class LanguageServer::Protocol::Interface::NotebookDocumentIdentifier + # @return [NotebookDocumentIdentifier] a new instance of NotebookDocumentIdentifier + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_identifier.rb#8 + def initialize(uri:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_identifier.rb#24 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_identifier.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_identifier.rb#30 + def to_json(*args); end + + # The notebook document's URI. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_identifier.rb#20 + def uri; end +end + +# Notebook specific client capabilities. +# +# source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_client_capabilities.rb#7 +class LanguageServer::Protocol::Interface::NotebookDocumentSyncClientCapabilities + # @return [NotebookDocumentSyncClientCapabilities] a new instance of NotebookDocumentSyncClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_client_capabilities.rb#8 + def initialize(dynamic_registration: T.unsafe(nil), execution_summary_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_client_capabilities.rb#36 + def attributes; end + + # Whether implementation supports dynamic registration. If this is + # set to `true` the client supports the new + # `(TextDocumentRegistrationOptions & StaticRegistrationOptions)` + # return value for the corresponding server capability as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_client_capabilities.rb#24 + def dynamic_registration; end + + # The client supports sending execution summary data per cell. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_client_capabilities.rb#32 + def execution_summary_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_client_capabilities.rb#38 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_client_capabilities.rb#42 + def to_json(*args); end +end + +# Options specific to a notebook plus its cells +# to be synced to the server. +# +# If a selector provides a notebook document +# filter but no cell selector all cells of a +# matching notebook document will be synced. +# +# If a selector provides no notebook document +# filter but only a cell selector all notebook +# documents that contain at least one matching +# cell will be synced. +# +# source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_options.rb#17 +class LanguageServer::Protocol::Interface::NotebookDocumentSyncOptions + # @return [NotebookDocumentSyncOptions] a new instance of NotebookDocumentSyncOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_options.rb#18 + def initialize(notebook_selector:, save: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_options.rb#44 + def attributes; end + + # The notebooks to be synced + # + # @return [({ notebook: string | NotebookDocumentFilter; cells?: { language: string; }[]; } | { notebook?: string | NotebookDocumentFilter; cells: { ...; }[]; })[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_options.rb#31 + def notebook_selector; end + + # Whether save notification should be forwarded to + # the server. Will only be honored if mode === `notebook`. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_options.rb#40 + def save; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_options.rb#46 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_options.rb#50 + def to_json(*args); end +end + +# Registration options specific to a notebook. +# +# source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb#7 +class LanguageServer::Protocol::Interface::NotebookDocumentSyncRegistrationOptions + # @return [NotebookDocumentSyncRegistrationOptions] a new instance of NotebookDocumentSyncRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb#8 + def initialize(notebook_selector:, save: T.unsafe(nil), id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb#44 + def attributes; end + + # The id used to register the request. The id can be used to deregister + # the request again. See also Registration#id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb#40 + def id; end + + # The notebooks to be synced + # + # @return [({ notebook: string | NotebookDocumentFilter; cells?: { language: string; }[]; } | { notebook?: string | NotebookDocumentFilter; cells: { ...; }[]; })[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb#22 + def notebook_selector; end + + # Whether save notification should be forwarded to + # the server. Will only be honored if mode === `notebook`. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb#31 + def save; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb#46 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notebook_document_sync_registration_options.rb#50 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/notification_message.rb#4 +class LanguageServer::Protocol::Interface::NotificationMessage + # @return [NotificationMessage] a new instance of NotificationMessage + # + # source://language_server-protocol//lib/language_server/protocol/interface/notification_message.rb#5 + def initialize(jsonrpc:, method:, params: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/notification_message.rb#36 + def attributes; end + + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notification_message.rb#16 + def jsonrpc; end + + # The method to be invoked. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notification_message.rb#24 + def method; end + + # The notification's params. + # + # @return [any] + # + # source://language_server-protocol//lib/language_server/protocol/interface/notification_message.rb#32 + def params; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notification_message.rb#38 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/notification_message.rb#42 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/optional_versioned_text_document_identifier.rb#4 +class LanguageServer::Protocol::Interface::OptionalVersionedTextDocumentIdentifier + # @return [OptionalVersionedTextDocumentIdentifier] a new instance of OptionalVersionedTextDocumentIdentifier + # + # source://language_server-protocol//lib/language_server/protocol/interface/optional_versioned_text_document_identifier.rb#5 + def initialize(uri:, version:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/optional_versioned_text_document_identifier.rb#38 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/optional_versioned_text_document_identifier.rb#40 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/optional_versioned_text_document_identifier.rb#44 + def to_json(*args); end + + # The text document's URI. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/optional_versioned_text_document_identifier.rb#18 + def uri; end + + # The version number of this document. If an optional versioned text document + # identifier is sent from the server to the client and the file is not + # open in the editor (the server has not received an open notification + # before) the server can send `null` to indicate that the version is + # known and the content on disk is the master (as specified with document + # content ownership). + # + # The version number of a document will increase after each change, + # including undo/redo. The number doesn't need to be consecutive. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/optional_versioned_text_document_identifier.rb#34 + def version; end +end + +# Represents a parameter of a callable-signature. A parameter can +# have a label and a doc-comment. +# +# source://language_server-protocol//lib/language_server/protocol/interface/parameter_information.rb#8 +class LanguageServer::Protocol::Interface::ParameterInformation + # @return [ParameterInformation] a new instance of ParameterInformation + # + # source://language_server-protocol//lib/language_server/protocol/interface/parameter_information.rb#9 + def initialize(label:, documentation: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/parameter_information.rb#44 + def attributes; end + + # The human-readable doc-comment of this parameter. Will be shown + # in the UI but can be omitted. + # + # @return [string | MarkupContent] + # + # source://language_server-protocol//lib/language_server/protocol/interface/parameter_information.rb#40 + def documentation; end + + # The label of this parameter information. + # + # Either a string or an inclusive start and exclusive end offsets within + # its containing signature label. (see SignatureInformation.label). The + # offsets are based on a UTF-16 string representation as `Position` and + # `Range` does. + # + # *Note*: a label of type string should be a substring of its containing + # signature label. Its intended use case is to highlight the parameter + # label part in the `SignatureInformation.label`. + # + # @return [string | [number, number]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/parameter_information.rb#31 + def label; end + + # source://language_server-protocol//lib/language_server/protocol/interface/parameter_information.rb#46 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/parameter_information.rb#50 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/partial_result_params.rb#4 +class LanguageServer::Protocol::Interface::PartialResultParams + # @return [PartialResultParams] a new instance of PartialResultParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/partial_result_params.rb#5 + def initialize(partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/partial_result_params.rb#22 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/partial_result_params.rb#18 + def partial_result_token; end + + # source://language_server-protocol//lib/language_server/protocol/interface/partial_result_params.rb#24 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/partial_result_params.rb#28 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/position.rb#4 +class LanguageServer::Protocol::Interface::Position + # @return [Position] a new instance of Position + # + # source://language_server-protocol//lib/language_server/protocol/interface/position.rb#5 + def initialize(line:, character:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/position.rb#34 + def attributes; end + + # Character offset on a line in a document (zero-based). The meaning of this + # offset is determined by the negotiated `PositionEncodingKind`. + # + # If the character value is greater than the line length it defaults back + # to the line length. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/position.rb#30 + def character; end + + # Line position in a document (zero-based). + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/position.rb#18 + def line; end + + # source://language_server-protocol//lib/language_server/protocol/interface/position.rb#36 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/position.rb#40 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/prepare_rename_params.rb#4 +class LanguageServer::Protocol::Interface::PrepareRenameParams + # @return [PrepareRenameParams] a new instance of PrepareRenameParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/prepare_rename_params.rb#5 + def initialize(text_document:, position:, work_done_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/prepare_rename_params.rb#39 + def attributes; end + + # The position inside the text document. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/prepare_rename_params.rb#27 + def position; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/prepare_rename_params.rb#19 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/prepare_rename_params.rb#41 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/prepare_rename_params.rb#45 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/prepare_rename_params.rb#35 + def work_done_token; end +end + +# A previous result id in a workspace pull request. +# +# source://language_server-protocol//lib/language_server/protocol/interface/previous_result_id.rb#7 +class LanguageServer::Protocol::Interface::PreviousResultId + # @return [PreviousResultId] a new instance of PreviousResultId + # + # source://language_server-protocol//lib/language_server/protocol/interface/previous_result_id.rb#8 + def initialize(uri:, value:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/previous_result_id.rb#34 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/previous_result_id.rb#36 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/previous_result_id.rb#40 + def to_json(*args); end + + # The URI for which the client knows a + # result id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/previous_result_id.rb#22 + def uri; end + + # The value of the previous result id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/previous_result_id.rb#30 + def value; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/progress_params.rb#4 +class LanguageServer::Protocol::Interface::ProgressParams + # @return [ProgressParams] a new instance of ProgressParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/progress_params.rb#5 + def initialize(token:, value:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/progress_params.rb#30 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/progress_params.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/progress_params.rb#36 + def to_json(*args); end + + # The progress token provided by the client or server. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/progress_params.rb#18 + def token; end + + # The progress data. + # + # @return [T] + # + # source://language_server-protocol//lib/language_server/protocol/interface/progress_params.rb#26 + def value; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::PublishDiagnosticsClientCapabilities + # @return [PublishDiagnosticsClientCapabilities] a new instance of PublishDiagnosticsClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#5 + def initialize(related_information: T.unsafe(nil), tag_support: T.unsafe(nil), version_support: T.unsafe(nil), code_description_support: T.unsafe(nil), data_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#61 + def attributes; end + + # Client supports a codeDescription property + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#47 + def code_description_support; end + + # Whether code action supports the `data` property which is + # preserved between a `textDocument/publishDiagnostics` and + # `textDocument/codeAction` request. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#57 + def data_support; end + + # Whether the clients accepts diagnostics with related information. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#21 + def related_information; end + + # Client supports the tag property to provide meta data about a diagnostic. + # Clients supporting tags have to handle unknown tags gracefully. + # + # @return [{ valueSet: DiagnosticTag[]; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#30 + def tag_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#63 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#67 + def to_json(*args); end + + # Whether the client interprets the version property of the + # `textDocument/publishDiagnostics` notification's parameter. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_client_capabilities.rb#39 + def version_support; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_params.rb#4 +class LanguageServer::Protocol::Interface::PublishDiagnosticsParams + # @return [PublishDiagnosticsParams] a new instance of PublishDiagnosticsParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_params.rb#5 + def initialize(uri:, diagnostics:, version: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_params.rb#40 + def attributes; end + + # An array of diagnostic information items. + # + # @return [Diagnostic[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_params.rb#36 + def diagnostics; end + + # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_params.rb#42 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_params.rb#46 + def to_json(*args); end + + # The URI for which diagnostic information is reported. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_params.rb#19 + def uri; end + + # Optional the version number of the document the diagnostics are published + # for. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/publish_diagnostics_params.rb#28 + def version; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/range.rb#4 +class LanguageServer::Protocol::Interface::Range + # @return [Range] a new instance of Range + # + # source://language_server-protocol//lib/language_server/protocol/interface/range.rb#5 + def initialize(start:, end:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/range.rb#30 + def attributes; end + + # The range's end position. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/range.rb#26 + def end; end + + # The range's start position. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/range.rb#18 + def start; end + + # source://language_server-protocol//lib/language_server/protocol/interface/range.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/range.rb#36 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/reference_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::ReferenceClientCapabilities + # @return [ReferenceClientCapabilities] a new instance of ReferenceClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_client_capabilities.rb#21 + def attributes; end + + # Whether references supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_client_capabilities.rb#17 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/reference_client_capabilities.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/reference_client_capabilities.rb#27 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/reference_context.rb#4 +class LanguageServer::Protocol::Interface::ReferenceContext + # @return [ReferenceContext] a new instance of ReferenceContext + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_context.rb#5 + def initialize(include_declaration:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_context.rb#21 + def attributes; end + + # Include the declaration of the current symbol. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_context.rb#17 + def include_declaration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/reference_context.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/reference_context.rb#27 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/reference_options.rb#4 +class LanguageServer::Protocol::Interface::ReferenceOptions + # @return [ReferenceOptions] a new instance of ReferenceOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/reference_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/reference_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#4 +class LanguageServer::Protocol::Interface::ReferenceParams + # @return [ReferenceParams] a new instance of ReferenceParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#5 + def initialize(text_document:, position:, context:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#55 + def attributes; end + + # @return [ReferenceContext] + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#51 + def context; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#46 + def partial_result_token; end + + # The position inside the text document. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#29 + def position; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#21 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#57 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#61 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_params.rb#37 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/reference_registration_options.rb#4 +class LanguageServer::Protocol::Interface::ReferenceRegistrationOptions + # @return [ReferenceRegistrationOptions] a new instance of ReferenceRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_registration_options.rb#28 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_registration_options.rb#19 + def document_selector; end + + # source://language_server-protocol//lib/language_server/protocol/interface/reference_registration_options.rb#30 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/reference_registration_options.rb#34 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/reference_registration_options.rb#24 + def work_done_progress; end +end + +# General parameters to register for a capability. +# +# source://language_server-protocol//lib/language_server/protocol/interface/registration.rb#7 +class LanguageServer::Protocol::Interface::Registration + # @return [Registration] a new instance of Registration + # + # source://language_server-protocol//lib/language_server/protocol/interface/registration.rb#8 + def initialize(id:, method:, register_options: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/registration.rb#43 + def attributes; end + + # The id used to register the request. The id can be used to deregister + # the request again. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/registration.rb#23 + def id; end + + # The method / capability to register for. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/registration.rb#31 + def method; end + + # Options necessary for the registration. + # + # @return [LSPAny] + # + # source://language_server-protocol//lib/language_server/protocol/interface/registration.rb#39 + def register_options; end + + # source://language_server-protocol//lib/language_server/protocol/interface/registration.rb#45 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/registration.rb#49 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/registration_params.rb#4 +class LanguageServer::Protocol::Interface::RegistrationParams + # @return [RegistrationParams] a new instance of RegistrationParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/registration_params.rb#5 + def initialize(registrations:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/registration_params.rb#18 + def attributes; end + + # @return [Registration[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/registration_params.rb#14 + def registrations; end + + # source://language_server-protocol//lib/language_server/protocol/interface/registration_params.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/registration_params.rb#24 + def to_json(*args); end +end + +# Client capabilities specific to regular expressions. +# +# source://language_server-protocol//lib/language_server/protocol/interface/regular_expressions_client_capabilities.rb#7 +class LanguageServer::Protocol::Interface::RegularExpressionsClientCapabilities + # @return [RegularExpressionsClientCapabilities] a new instance of RegularExpressionsClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/regular_expressions_client_capabilities.rb#8 + def initialize(engine:, version: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/regular_expressions_client_capabilities.rb#33 + def attributes; end + + # The engine's name. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/regular_expressions_client_capabilities.rb#21 + def engine; end + + # source://language_server-protocol//lib/language_server/protocol/interface/regular_expressions_client_capabilities.rb#35 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/regular_expressions_client_capabilities.rb#39 + def to_json(*args); end + + # The engine's version. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/regular_expressions_client_capabilities.rb#29 + def version; end +end + +# A full diagnostic report with a set of related documents. +# +# source://language_server-protocol//lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb#7 +class LanguageServer::Protocol::Interface::RelatedFullDocumentDiagnosticReport + # @return [RelatedFullDocumentDiagnosticReport] a new instance of RelatedFullDocumentDiagnosticReport + # + # source://language_server-protocol//lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb#8 + def initialize(kind:, items:, result_id: T.unsafe(nil), related_documents: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb#57 + def attributes; end + + # The actual items. + # + # @return [Diagnostic[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb#41 + def items; end + + # A full document diagnostic report. + # + # @return [any] + # + # source://language_server-protocol//lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb#23 + def kind; end + + # Diagnostics of related documents. This information is useful + # in programming languages where code in a file A can generate + # diagnostics in a file B which A depends on. An example of + # such a language is C/C++ where marco definitions in a file + # a.cpp and result in errors in a header file b.hpp. + # + # @return [{ [uri: string]: FullDocumentDiagnosticReport | UnchangedDocumentDiagnosticReport; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb#53 + def related_documents; end + + # An optional result id. If provided it will + # be sent on the next diagnostic request for the + # same document. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb#33 + def result_id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb#59 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/related_full_document_diagnostic_report.rb#63 + def to_json(*args); end +end + +# An unchanged diagnostic report with a set of related documents. +# +# source://language_server-protocol//lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb#7 +class LanguageServer::Protocol::Interface::RelatedUnchangedDocumentDiagnosticReport + # @return [RelatedUnchangedDocumentDiagnosticReport] a new instance of RelatedUnchangedDocumentDiagnosticReport + # + # source://language_server-protocol//lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb#8 + def initialize(kind:, result_id:, related_documents: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb#50 + def attributes; end + + # A document diagnostic report indicating + # no changes to the last result. A server can + # only return `unchanged` if result ids are + # provided. + # + # @return [any] + # + # source://language_server-protocol//lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb#25 + def kind; end + + # Diagnostics of related documents. This information is useful + # in programming languages where code in a file A can generate + # diagnostics in a file B which A depends on. An example of + # such a language is C/C++ where marco definitions in a file + # a.cpp and result in errors in a header file b.hpp. + # + # @return [{ [uri: string]: FullDocumentDiagnosticReport | UnchangedDocumentDiagnosticReport; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb#46 + def related_documents; end + + # A result id which will be sent on the next + # diagnostic request for the same document. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb#34 + def result_id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb#52 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/related_unchanged_document_diagnostic_report.rb#56 + def to_json(*args); end +end + +# A relative pattern is a helper to construct glob patterns that are matched +# relatively to a base URI. The common value for a `baseUri` is a workspace +# folder root, but it can be another absolute URI as well. +# +# source://language_server-protocol//lib/language_server/protocol/interface/relative_pattern.rb#9 +class LanguageServer::Protocol::Interface::RelativePattern + # @return [RelativePattern] a new instance of RelativePattern + # + # source://language_server-protocol//lib/language_server/protocol/interface/relative_pattern.rb#10 + def initialize(base_uri:, pattern:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/relative_pattern.rb#36 + def attributes; end + + # A workspace folder or a base URI to which this pattern will be matched + # against relatively. + # + # @return [string | WorkspaceFolder] + # + # source://language_server-protocol//lib/language_server/protocol/interface/relative_pattern.rb#24 + def base_uri; end + + # The actual glob pattern; + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/relative_pattern.rb#32 + def pattern; end + + # source://language_server-protocol//lib/language_server/protocol/interface/relative_pattern.rb#38 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/relative_pattern.rb#42 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/rename_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::RenameClientCapabilities + # @return [RenameClientCapabilities] a new instance of RenameClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil), prepare_support: T.unsafe(nil), prepare_support_default_behavior: T.unsafe(nil), honors_change_annotations: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_client_capabilities.rb#57 + def attributes; end + + # Whether rename supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_client_capabilities.rb#20 + def dynamic_registration; end + + # Whether the client honors the change annotations in + # text edits and resource operations returned via the + # rename request's workspace edit by for example presenting + # the workspace edit in the user interface and asking + # for confirmation. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_client_capabilities.rb#53 + def honors_change_annotations; end + + # Client supports testing for validity of rename operations + # before execution. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_client_capabilities.rb#29 + def prepare_support; end + + # Client supports the default behavior result + # (`{ defaultBehavior: boolean }`). + # + # The value indicates the default behavior used by the + # client. + # + # @return [1] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_client_capabilities.rb#41 + def prepare_support_default_behavior; end + + # source://language_server-protocol//lib/language_server/protocol/interface/rename_client_capabilities.rb#59 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/rename_client_capabilities.rb#63 + def to_json(*args); end +end + +# Rename file operation +# +# source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#7 +class LanguageServer::Protocol::Interface::RenameFile + # @return [RenameFile] a new instance of RenameFile + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#8 + def initialize(kind:, old_uri:, new_uri:, options: T.unsafe(nil), annotation_id: T.unsafe(nil)); end + + # An optional annotation identifier describing the operation. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#56 + def annotation_id; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#60 + def attributes; end + + # A rename + # + # @return ["rename"] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#24 + def kind; end + + # The new location. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#40 + def new_uri; end + + # The old (existing) location. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#32 + def old_uri; end + + # Rename options. + # + # @return [RenameFileOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#48 + def options; end + + # source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#62 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/rename_file.rb#66 + def to_json(*args); end +end + +# Rename file options +# +# source://language_server-protocol//lib/language_server/protocol/interface/rename_file_options.rb#7 +class LanguageServer::Protocol::Interface::RenameFileOptions + # @return [RenameFileOptions] a new instance of RenameFileOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_file_options.rb#8 + def initialize(overwrite: T.unsafe(nil), ignore_if_exists: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_file_options.rb#33 + def attributes; end + + # Ignores if target exists. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_file_options.rb#29 + def ignore_if_exists; end + + # Overwrite target if existing. Overwrite wins over `ignoreIfExists` + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_file_options.rb#21 + def overwrite; end + + # source://language_server-protocol//lib/language_server/protocol/interface/rename_file_options.rb#35 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/rename_file_options.rb#39 + def to_json(*args); end +end + +# The parameters sent in notifications/requests for user-initiated renames +# of files. +# +# source://language_server-protocol//lib/language_server/protocol/interface/rename_files_params.rb#8 +class LanguageServer::Protocol::Interface::RenameFilesParams + # @return [RenameFilesParams] a new instance of RenameFilesParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_files_params.rb#9 + def initialize(files:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_files_params.rb#26 + def attributes; end + + # An array of all files/folders renamed in this operation. When a folder + # is renamed, only the folder will be included, and not its children. + # + # @return [FileRename[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_files_params.rb#22 + def files; end + + # source://language_server-protocol//lib/language_server/protocol/interface/rename_files_params.rb#28 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/rename_files_params.rb#32 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/rename_options.rb#4 +class LanguageServer::Protocol::Interface::RenameOptions + # @return [RenameOptions] a new instance of RenameOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil), prepare_provider: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_options.rb#27 + def attributes; end + + # Renames should be checked and tested before being executed. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_options.rb#23 + def prepare_provider; end + + # source://language_server-protocol//lib/language_server/protocol/interface/rename_options.rb#29 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/rename_options.rb#33 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_options.rb#15 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/rename_params.rb#4 +class LanguageServer::Protocol::Interface::RenameParams + # @return [RenameParams] a new instance of RenameParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_params.rb#5 + def initialize(text_document:, position:, new_name:, work_done_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_params.rb#50 + def attributes; end + + # The new name of the symbol. If the given name is not valid the + # request must return a [ResponseError](#ResponseError) with an + # appropriate message set. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_params.rb#46 + def new_name; end + + # The position inside the text document. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_params.rb#28 + def position; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_params.rb#20 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/rename_params.rb#52 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/rename_params.rb#56 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_params.rb#36 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/rename_registration_options.rb#4 +class LanguageServer::Protocol::Interface::RenameRegistrationOptions + # @return [RenameRegistrationOptions] a new instance of RenameRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), prepare_provider: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_registration_options.rb#37 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_registration_options.rb#20 + def document_selector; end + + # Renames should be checked and tested before being executed. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_registration_options.rb#33 + def prepare_provider; end + + # source://language_server-protocol//lib/language_server/protocol/interface/rename_registration_options.rb#39 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/rename_registration_options.rb#43 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/rename_registration_options.rb#25 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/request_message.rb#4 +class LanguageServer::Protocol::Interface::RequestMessage + # @return [RequestMessage] a new instance of RequestMessage + # + # source://language_server-protocol//lib/language_server/protocol/interface/request_message.rb#5 + def initialize(jsonrpc:, id:, method:, params: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/request_message.rb#45 + def attributes; end + + # The request id. + # + # @return [string | number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/request_message.rb#25 + def id; end + + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/request_message.rb#17 + def jsonrpc; end + + # The method to be invoked. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/request_message.rb#33 + def method; end + + # The method's params. + # + # @return [any] + # + # source://language_server-protocol//lib/language_server/protocol/interface/request_message.rb#41 + def params; end + + # source://language_server-protocol//lib/language_server/protocol/interface/request_message.rb#47 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/request_message.rb#51 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/response_error.rb#4 +class LanguageServer::Protocol::Interface::ResponseError + # @return [ResponseError] a new instance of ResponseError + # + # source://language_server-protocol//lib/language_server/protocol/interface/response_error.rb#5 + def initialize(code:, message:, data: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/response_error.rb#40 + def attributes; end + + # A number indicating the error type that occurred. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/response_error.rb#19 + def code; end + + # A primitive or structured value that contains additional + # information about the error. Can be omitted. + # + # @return [any] + # + # source://language_server-protocol//lib/language_server/protocol/interface/response_error.rb#36 + def data; end + + # A string providing a short description of the error. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/response_error.rb#27 + def message; end + + # source://language_server-protocol//lib/language_server/protocol/interface/response_error.rb#42 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/response_error.rb#46 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/response_message.rb#4 +class LanguageServer::Protocol::Interface::ResponseMessage + # @return [ResponseMessage] a new instance of ResponseMessage + # + # source://language_server-protocol//lib/language_server/protocol/interface/response_message.rb#5 + def initialize(jsonrpc:, id:, result: T.unsafe(nil), error: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/response_message.rb#46 + def attributes; end + + # The error object in case a request fails. + # + # @return [ResponseError] + # + # source://language_server-protocol//lib/language_server/protocol/interface/response_message.rb#42 + def error; end + + # The request id. + # + # @return [string | number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/response_message.rb#25 + def id; end + + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/response_message.rb#17 + def jsonrpc; end + + # The result of a request. This member is REQUIRED on success. + # This member MUST NOT exist if there was an error invoking the method. + # + # @return [string | number | boolean | object] + # + # source://language_server-protocol//lib/language_server/protocol/interface/response_message.rb#34 + def result; end + + # source://language_server-protocol//lib/language_server/protocol/interface/response_message.rb#48 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/response_message.rb#52 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/save_options.rb#4 +class LanguageServer::Protocol::Interface::SaveOptions + # @return [SaveOptions] a new instance of SaveOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/save_options.rb#5 + def initialize(include_text: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/save_options.rb#21 + def attributes; end + + # The client is supposed to include the content on save. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/save_options.rb#17 + def include_text; end + + # source://language_server-protocol//lib/language_server/protocol/interface/save_options.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/save_options.rb#27 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/selection_range.rb#4 +class LanguageServer::Protocol::Interface::SelectionRange + # @return [SelectionRange] a new instance of SelectionRange + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range.rb#5 + def initialize(range:, parent: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range.rb#31 + def attributes; end + + # The parent selection range containing this range. Therefore + # `parent.range` must contain `this.range`. + # + # @return [SelectionRange] + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range.rb#27 + def parent; end + + # The [range](#Range) of this selection range. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range.rb#18 + def range; end + + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range.rb#33 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range.rb#37 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/selection_range_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::SelectionRangeClientCapabilities + # @return [SelectionRangeClientCapabilities] a new instance of SelectionRangeClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_client_capabilities.rb#24 + def attributes; end + + # Whether implementation supports dynamic registration for selection range + # providers. If this is set to `true` the client supports the new + # `SelectionRangeRegistrationOptions` return value for the corresponding + # server capability as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_client_capabilities.rb#20 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_client_capabilities.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_client_capabilities.rb#30 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/selection_range_options.rb#4 +class LanguageServer::Protocol::Interface::SelectionRangeOptions + # @return [SelectionRangeOptions] a new instance of SelectionRangeOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/selection_range_params.rb#4 +class LanguageServer::Protocol::Interface::SelectionRangeParams + # @return [SelectionRangeParams] a new instance of SelectionRangeParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_params.rb#5 + def initialize(text_document:, positions:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_params.rb#49 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_params.rb#29 + def partial_result_token; end + + # The positions inside the text document. + # + # @return [Position[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_params.rb#45 + def positions; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_params.rb#37 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_params.rb#51 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_params.rb#55 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_params.rb#20 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/selection_range_registration_options.rb#4 +class LanguageServer::Protocol::Interface::SelectionRangeRegistrationOptions + # @return [SelectionRangeRegistrationOptions] a new instance of SelectionRangeRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_registration_options.rb#38 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_registration_options.rb#25 + def document_selector; end + + # The id used to register the request. The id can be used to deregister + # the request again. See also Registration#id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_registration_options.rb#34 + def id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_registration_options.rb#40 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_registration_options.rb#44 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/selection_range_registration_options.rb#16 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens.rb#4 +class LanguageServer::Protocol::Interface::SemanticTokens + # @return [SemanticTokens] a new instance of SemanticTokens + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens.rb#5 + def initialize(data:, result_id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens.rb#33 + def attributes; end + + # The actual tokens. + # + # @return [number[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens.rb#29 + def data; end + + # An optional result id. If provided and clients support delta updating + # the client will include the result id in the next semantic token request. + # A server can then instead of computing all semantic tokens again simply + # send a delta. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens.rb#21 + def result_id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens.rb#35 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens.rb#39 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::SemanticTokensClientCapabilities + # @return [SemanticTokensClientCapabilities] a new instance of SemanticTokensClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#5 + def initialize(requests:, token_types:, token_modifiers:, formats:, dynamic_registration: T.unsafe(nil), overlapping_token_support: T.unsafe(nil), multiline_token_support: T.unsafe(nil), server_cancel_support: T.unsafe(nil), augments_syntax_tokens: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#113 + def attributes; end + + # Whether the client uses semantic tokens to augment existing + # syntax tokens. If set to `true` client side created syntax + # tokens and semantic tokens are both used for colorization. If + # set to `false` the client only uses the returned semantic tokens + # for colorization. + # + # If the value is `undefined` then the client behavior is not + # specified. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#109 + def augments_syntax_tokens; end + + # Whether implementation supports dynamic registration. If this is set to + # `true` the client supports the new `(TextDocumentRegistrationOptions & + # StaticRegistrationOptions)` return value for the corresponding server + # capability as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#28 + def dynamic_registration; end + + # The formats the clients supports. + # + # @return ["relative"[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#67 + def formats; end + + # Whether the client supports tokens that can span multiple lines. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#83 + def multiline_token_support; end + + # Whether the client supports tokens that can overlap each other. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#75 + def overlapping_token_support; end + + # Which requests the client supports and might send to the server + # depending on the server's capability. Please note that clients might not + # show semantic tokens or degrade some of the user experience if a range + # or full request is advertised by the client but not provided by the + # server. If for example the client capability `requests.full` and + # `request.range` are both set to true but the server only provides a + # range provider the client might not render a minimap correctly or might + # even decide to not show any semantic tokens at all. + # + # @return [{ range?: boolean | {}; full?: boolean | { delta?: boolean; }; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#43 + def requests; end + + # Whether the client allows the server to actively cancel a + # semantic token request, e.g. supports returning + # ErrorCodes.ServerCancelled. If a server does the client + # needs to retrigger the request. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#94 + def server_cancel_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#115 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#119 + def to_json(*args); end + + # The token modifiers that the client supports. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#59 + def token_modifiers; end + + # The token types that the client supports. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_client_capabilities.rb#51 + def token_types; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta.rb#4 +class LanguageServer::Protocol::Interface::SemanticTokensDelta + # @return [SemanticTokensDelta] a new instance of SemanticTokensDelta + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta.rb#5 + def initialize(edits:, result_id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta.rb#28 + def attributes; end + + # The semantic token edits to transform a previous result into a new + # result. + # + # @return [SemanticTokensEdit[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta.rb#24 + def edits; end + + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta.rb#15 + def result_id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta.rb#30 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta.rb#34 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_params.rb#4 +class LanguageServer::Protocol::Interface::SemanticTokensDeltaParams + # @return [SemanticTokensDeltaParams] a new instance of SemanticTokensDeltaParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_params.rb#5 + def initialize(text_document:, previous_result_id:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_params.rb#50 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_params.rb#29 + def partial_result_token; end + + # The result id of a previous response. The result Id can either point to + # a full response or a delta response depending on what was received last. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_params.rb#46 + def previous_result_id; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_params.rb#37 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_params.rb#52 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_params.rb#56 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_params.rb#20 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_partial_result.rb#4 +class LanguageServer::Protocol::Interface::SemanticTokensDeltaPartialResult + # @return [SemanticTokensDeltaPartialResult] a new instance of SemanticTokensDeltaPartialResult + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_partial_result.rb#5 + def initialize(edits:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_partial_result.rb#18 + def attributes; end + + # @return [SemanticTokensEdit[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_partial_result.rb#14 + def edits; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_partial_result.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_delta_partial_result.rb#24 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_edit.rb#4 +class LanguageServer::Protocol::Interface::SemanticTokensEdit + # @return [SemanticTokensEdit] a new instance of SemanticTokensEdit + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_edit.rb#5 + def initialize(start:, delete_count:, data: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_edit.rb#39 + def attributes; end + + # The elements to insert. + # + # @return [number[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_edit.rb#35 + def data; end + + # The count of elements to remove. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_edit.rb#27 + def delete_count; end + + # The start offset of the edit. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_edit.rb#19 + def start; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_edit.rb#41 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_edit.rb#45 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_legend.rb#4 +class LanguageServer::Protocol::Interface::SemanticTokensLegend + # @return [SemanticTokensLegend] a new instance of SemanticTokensLegend + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_legend.rb#5 + def initialize(token_types:, token_modifiers:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_legend.rb#30 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_legend.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_legend.rb#36 + def to_json(*args); end + + # The token modifiers a server uses. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_legend.rb#26 + def token_modifiers; end + + # The token types a server uses. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_legend.rb#18 + def token_types; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_options.rb#4 +class LanguageServer::Protocol::Interface::SemanticTokensOptions + # @return [SemanticTokensOptions] a new instance of SemanticTokensOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_options.rb#5 + def initialize(legend:, work_done_progress: T.unsafe(nil), range: T.unsafe(nil), full: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_options.rb#46 + def attributes; end + + # Server supports providing semantic tokens for a full document. + # + # @return [boolean | { delta?: boolean; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_options.rb#42 + def full; end + + # The legend used by the server + # + # @return [SemanticTokensLegend] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_options.rb#25 + def legend; end + + # Server supports providing semantic tokens for a specific range + # of a document. + # + # @return [boolean | {}] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_options.rb#34 + def range; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_options.rb#48 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_options.rb#52 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_options.rb#17 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_params.rb#4 +class LanguageServer::Protocol::Interface::SemanticTokensParams + # @return [SemanticTokensParams] a new instance of SemanticTokensParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_params.rb#5 + def initialize(text_document:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_params.rb#40 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_params.rb#28 + def partial_result_token; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_params.rb#36 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_params.rb#42 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_params.rb#46 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_params.rb#19 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_partial_result.rb#4 +class LanguageServer::Protocol::Interface::SemanticTokensPartialResult + # @return [SemanticTokensPartialResult] a new instance of SemanticTokensPartialResult + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_partial_result.rb#5 + def initialize(data:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_partial_result.rb#18 + def attributes; end + + # @return [number[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_partial_result.rb#14 + def data; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_partial_result.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_partial_result.rb#24 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_range_params.rb#4 +class LanguageServer::Protocol::Interface::SemanticTokensRangeParams + # @return [SemanticTokensRangeParams] a new instance of SemanticTokensRangeParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_range_params.rb#5 + def initialize(text_document:, range:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_range_params.rb#49 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_range_params.rb#29 + def partial_result_token; end + + # The range the semantic tokens are requested for. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_range_params.rb#45 + def range; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_range_params.rb#37 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_range_params.rb#51 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_range_params.rb#55 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_range_params.rb#20 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#4 +class LanguageServer::Protocol::Interface::SemanticTokensRegistrationOptions + # @return [SemanticTokensRegistrationOptions] a new instance of SemanticTokensRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#5 + def initialize(document_selector:, legend:, work_done_progress: T.unsafe(nil), range: T.unsafe(nil), full: T.unsafe(nil), id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#66 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#23 + def document_selector; end + + # Server supports providing semantic tokens for a full document. + # + # @return [boolean | { delta?: boolean; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#53 + def full; end + + # The id used to register the request. The id can be used to deregister + # the request again. See also Registration#id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#62 + def id; end + + # The legend used by the server + # + # @return [SemanticTokensLegend] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#36 + def legend; end + + # Server supports providing semantic tokens for a specific range + # of a document. + # + # @return [boolean | {}] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#45 + def range; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#68 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#72 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_registration_options.rb#28 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_workspace_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::SemanticTokensWorkspaceClientCapabilities + # @return [SemanticTokensWorkspaceClientCapabilities] a new instance of SemanticTokensWorkspaceClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_workspace_client_capabilities.rb#5 + def initialize(refresh_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_workspace_client_capabilities.rb#27 + def attributes; end + + # Whether the client implementation supports a refresh request sent from + # the server to the client. + # + # Note that this event is global and will force the client to refresh all + # semantic tokens currently shown. It should be used with absolute care + # and is useful for situation where a server for example detect a project + # wide change that requires such a calculation. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_workspace_client_capabilities.rb#23 + def refresh_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_workspace_client_capabilities.rb#29 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/semantic_tokens_workspace_client_capabilities.rb#33 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#4 +class LanguageServer::Protocol::Interface::ServerCapabilities + # @return [ServerCapabilities] a new instance of ServerCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#5 + def initialize(position_encoding: T.unsafe(nil), text_document_sync: T.unsafe(nil), notebook_document_sync: T.unsafe(nil), completion_provider: T.unsafe(nil), hover_provider: T.unsafe(nil), signature_help_provider: T.unsafe(nil), declaration_provider: T.unsafe(nil), definition_provider: T.unsafe(nil), type_definition_provider: T.unsafe(nil), implementation_provider: T.unsafe(nil), references_provider: T.unsafe(nil), document_highlight_provider: T.unsafe(nil), document_symbol_provider: T.unsafe(nil), code_action_provider: T.unsafe(nil), code_lens_provider: T.unsafe(nil), document_link_provider: T.unsafe(nil), color_provider: T.unsafe(nil), document_formatting_provider: T.unsafe(nil), document_range_formatting_provider: T.unsafe(nil), document_on_type_formatting_provider: T.unsafe(nil), rename_provider: T.unsafe(nil), folding_range_provider: T.unsafe(nil), execute_command_provider: T.unsafe(nil), selection_range_provider: T.unsafe(nil), linked_editing_range_provider: T.unsafe(nil), call_hierarchy_provider: T.unsafe(nil), semantic_tokens_provider: T.unsafe(nil), moniker_provider: T.unsafe(nil), type_hierarchy_provider: T.unsafe(nil), inline_value_provider: T.unsafe(nil), inlay_hint_provider: T.unsafe(nil), diagnostic_provider: T.unsafe(nil), workspace_symbol_provider: T.unsafe(nil), workspace: T.unsafe(nil), experimental: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#340 + def attributes; end + + # The server provides call hierarchy support. + # + # @return [boolean | CallHierarchyOptions | CallHierarchyRegistrationOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#264 + def call_hierarchy_provider; end + + # The server provides code actions. The `CodeActionOptions` return type is + # only valid if the client signals code action literal support via the + # property `textDocument.codeAction.codeActionLiteralSupport`. + # + # @return [boolean | CodeActionOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#166 + def code_action_provider; end + + # The server provides code lens. + # + # @return [CodeLensOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#174 + def code_lens_provider; end + + # The server provides color provider support. + # + # @return [boolean | DocumentColorOptions | DocumentColorRegistrationOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#190 + def color_provider; end + + # The server provides completion support. + # + # @return [CompletionOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#84 + def completion_provider; end + + # The server provides go to declaration support. + # + # @return [boolean | DeclarationOptions | DeclarationRegistrationOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#108 + def declaration_provider; end + + # The server provides goto definition support. + # + # @return [boolean | DefinitionOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#116 + def definition_provider; end + + # The server has support for pull model diagnostics. + # + # @return [DiagnosticOptions | DiagnosticRegistrationOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#312 + def diagnostic_provider; end + + # The server provides document formatting. + # + # @return [boolean | DocumentFormattingOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#198 + def document_formatting_provider; end + + # The server provides document highlight support. + # + # @return [boolean | DocumentHighlightOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#148 + def document_highlight_provider; end + + # The server provides document link support. + # + # @return [DocumentLinkOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#182 + def document_link_provider; end + + # The server provides document formatting on typing. + # + # @return [DocumentOnTypeFormattingOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#214 + def document_on_type_formatting_provider; end + + # The server provides document range formatting. + # + # @return [boolean | DocumentRangeFormattingOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#206 + def document_range_formatting_provider; end + + # The server provides document symbol support. + # + # @return [boolean | DocumentSymbolOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#156 + def document_symbol_provider; end + + # The server provides execute command support. + # + # @return [ExecuteCommandOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#240 + def execute_command_provider; end + + # Experimental server capabilities. + # + # @return [LSPAny] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#336 + def experimental; end + + # The server provides folding provider support. + # + # @return [boolean | FoldingRangeOptions | FoldingRangeRegistrationOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#232 + def folding_range_provider; end + + # The server provides hover support. + # + # @return [boolean | HoverOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#92 + def hover_provider; end + + # The server provides goto implementation support. + # + # @return [boolean | ImplementationOptions | ImplementationRegistrationOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#132 + def implementation_provider; end + + # The server provides inlay hints. + # + # @return [boolean | InlayHintOptions | InlayHintRegistrationOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#304 + def inlay_hint_provider; end + + # The server provides inline values. + # + # @return [boolean | InlineValueOptions | InlineValueRegistrationOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#296 + def inline_value_provider; end + + # The server provides linked editing range support. + # + # @return [boolean | LinkedEditingRangeOptions | LinkedEditingRangeRegistrationOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#256 + def linked_editing_range_provider; end + + # Whether server provides moniker support. + # + # @return [boolean | MonikerOptions | MonikerRegistrationOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#280 + def moniker_provider; end + + # Defines how notebook documents are synced. + # + # @return [NotebookDocumentSyncOptions | NotebookDocumentSyncRegistrationOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#76 + def notebook_document_sync; end + + # The position encoding the server picked from the encodings offered + # by the client via the client capability `general.positionEncodings`. + # + # If the client didn't provide any position encodings the only valid + # value that a server can return is 'utf-16'. + # + # If omitted it defaults to 'utf-16'. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#57 + def position_encoding; end + + # The server provides find references support. + # + # @return [boolean | ReferenceOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#140 + def references_provider; end + + # The server provides rename support. RenameOptions may only be + # specified if the client states that it supports + # `prepareSupport` in its initial `initialize` request. + # + # @return [boolean | RenameOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#224 + def rename_provider; end + + # The server provides selection range support. + # + # @return [boolean | SelectionRangeOptions | SelectionRangeRegistrationOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#248 + def selection_range_provider; end + + # The server provides semantic tokens support. + # + # @return [SemanticTokensOptions | SemanticTokensRegistrationOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#272 + def semantic_tokens_provider; end + + # The server provides signature help support. + # + # @return [SignatureHelpOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#100 + def signature_help_provider; end + + # Defines how text documents are synced. Is either a detailed structure + # defining each notification or for backwards compatibility the + # TextDocumentSyncKind number. If omitted it defaults to + # `TextDocumentSyncKind.None`. + # + # @return [TextDocumentSyncOptions | TextDocumentSyncKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#68 + def text_document_sync; end + + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#342 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#346 + def to_json(*args); end + + # The server provides goto type definition support. + # + # @return [boolean | TypeDefinitionOptions | TypeDefinitionRegistrationOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#124 + def type_definition_provider; end + + # The server provides type hierarchy support. + # + # @return [boolean | TypeHierarchyOptions | TypeHierarchyRegistrationOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#288 + def type_hierarchy_provider; end + + # Workspace specific server capabilities + # + # @return [{ workspaceFolders?: WorkspaceFoldersServerCapabilities; fileOperations?: { didCreate?: FileOperationRegistrationOptions; ... 4 more ...; willDelete?: FileOperationRegistrationOptions; }; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#328 + def workspace; end + + # The server provides workspace symbol support. + # + # @return [boolean | WorkspaceSymbolOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/server_capabilities.rb#320 + def workspace_symbol_provider; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/set_trace_params.rb#4 +class LanguageServer::Protocol::Interface::SetTraceParams + # @return [SetTraceParams] a new instance of SetTraceParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/set_trace_params.rb#5 + def initialize(value:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/set_trace_params.rb#21 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/set_trace_params.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/set_trace_params.rb#27 + def to_json(*args); end + + # The new value that should be assigned to the trace setting. + # + # @return [TraceValue] + # + # source://language_server-protocol//lib/language_server/protocol/interface/set_trace_params.rb#17 + def value; end +end + +# Client capabilities for the show document request. +# +# source://language_server-protocol//lib/language_server/protocol/interface/show_document_client_capabilities.rb#7 +class LanguageServer::Protocol::Interface::ShowDocumentClientCapabilities + # @return [ShowDocumentClientCapabilities] a new instance of ShowDocumentClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_client_capabilities.rb#8 + def initialize(support:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_client_capabilities.rb#25 + def attributes; end + + # The client has support for the show document + # request. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_client_capabilities.rb#21 + def support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_client_capabilities.rb#27 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_client_capabilities.rb#31 + def to_json(*args); end +end + +# Params to show a resource. +# +# source://language_server-protocol//lib/language_server/protocol/interface/show_document_params.rb#7 +class LanguageServer::Protocol::Interface::ShowDocumentParams + # @return [ShowDocumentParams] a new instance of ShowDocumentParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_params.rb#8 + def initialize(uri:, external: T.unsafe(nil), take_focus: T.unsafe(nil), selection: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_params.rb#59 + def attributes; end + + # Indicates to show the resource in an external program. + # To show, for example, `https://code.visualstudio.com/` + # in the default WEB browser set `external` to `true`. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_params.rb#33 + def external; end + + # An optional selection range if the document is a text + # document. Clients might ignore the property if an + # external program is started or the file is not a text + # file. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_params.rb#55 + def selection; end + + # An optional property to indicate whether the editor + # showing the document should take focus or not. + # Clients might ignore this property if an external + # program is started. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_params.rb#44 + def take_focus; end + + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_params.rb#61 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_params.rb#65 + def to_json(*args); end + + # The uri to show. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_params.rb#23 + def uri; end +end + +# The result of an show document request. +# +# source://language_server-protocol//lib/language_server/protocol/interface/show_document_result.rb#7 +class LanguageServer::Protocol::Interface::ShowDocumentResult + # @return [ShowDocumentResult] a new instance of ShowDocumentResult + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_result.rb#8 + def initialize(success:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_result.rb#24 + def attributes; end + + # A boolean indicating if the show was successful. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_result.rb#20 + def success; end + + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_result.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/show_document_result.rb#30 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/show_message_params.rb#4 +class LanguageServer::Protocol::Interface::ShowMessageParams + # @return [ShowMessageParams] a new instance of ShowMessageParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_params.rb#5 + def initialize(type:, message:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_params.rb#30 + def attributes; end + + # The actual message. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_params.rb#26 + def message; end + + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_params.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_params.rb#36 + def to_json(*args); end + + # The message type. See {@link MessageType}. + # + # @return [MessageType] + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_params.rb#18 + def type; end +end + +# Show message request client capabilities +# +# source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_client_capabilities.rb#7 +class LanguageServer::Protocol::Interface::ShowMessageRequestClientCapabilities + # @return [ShowMessageRequestClientCapabilities] a new instance of ShowMessageRequestClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_client_capabilities.rb#8 + def initialize(message_action_item: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_client_capabilities.rb#24 + def attributes; end + + # Capabilities specific to the `MessageActionItem` type. + # + # @return [{ additionalPropertiesSupport?: boolean; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_client_capabilities.rb#20 + def message_action_item; end + + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_client_capabilities.rb#26 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_client_capabilities.rb#30 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_params.rb#4 +class LanguageServer::Protocol::Interface::ShowMessageRequestParams + # @return [ShowMessageRequestParams] a new instance of ShowMessageRequestParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_params.rb#5 + def initialize(type:, message:, actions: T.unsafe(nil)); end + + # The message action items to present. + # + # @return [MessageActionItem[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_params.rb#35 + def actions; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_params.rb#39 + def attributes; end + + # The actual message + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_params.rb#27 + def message; end + + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_params.rb#41 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_params.rb#45 + def to_json(*args); end + + # The message type. See {@link MessageType} + # + # @return [MessageType] + # + # source://language_server-protocol//lib/language_server/protocol/interface/show_message_request_params.rb#19 + def type; end +end + +# Signature help represents the signature of something +# callable. There can be multiple signature but only one +# active and only one active parameter. +# +# source://language_server-protocol//lib/language_server/protocol/interface/signature_help.rb#9 +class LanguageServer::Protocol::Interface::SignatureHelp + # @return [SignatureHelp] a new instance of SignatureHelp + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help.rb#10 + def initialize(signatures:, active_signature: T.unsafe(nil), active_parameter: T.unsafe(nil)); end + + # The active parameter of the active signature. If omitted or the value + # lies outside the range of `signatures[activeSignature].parameters` + # defaults to 0 if the active signature has parameters. If + # the active signature has no parameters it is ignored. + # In future version of the protocol this property might become + # mandatory to better express the active parameter if the + # active signature does have any. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help.rb#55 + def active_parameter; end + + # The active signature. If omitted or the value lies outside the + # range of `signatures` the value defaults to zero or is ignore if + # the `SignatureHelp` as no signatures. + # + # Whenever possible implementors should make an active decision about + # the active signature and shouldn't rely on a default value. + # + # In future version of the protocol this property might become + # mandatory to better express this. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help.rb#41 + def active_signature; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help.rb#59 + def attributes; end + + # One or more signatures. If no signatures are available the signature help + # request should return `null`. + # + # @return [SignatureInformation[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help.rb#25 + def signatures; end + + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help.rb#61 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help.rb#65 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/signature_help_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::SignatureHelpClientCapabilities + # @return [SignatureHelpClientCapabilities] a new instance of SignatureHelpClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil), signature_information: T.unsafe(nil), context_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_client_capabilities.rb#43 + def attributes; end + + # The client supports to send additional context information for a + # `textDocument/signatureHelp` request. A client that opts into + # contextSupport will also support the `retriggerCharacters` on + # `SignatureHelpOptions`. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_client_capabilities.rb#39 + def context_support; end + + # Whether signature help supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_client_capabilities.rb#19 + def dynamic_registration; end + + # The client supports the following `SignatureInformation` + # specific properties. + # + # @return [{ documentationFormat?: MarkupKind[]; parameterInformation?: { labelOffsetSupport?: boolean; }; activeParameterSupport?: boolean; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_client_capabilities.rb#28 + def signature_information; end + + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_client_capabilities.rb#45 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_client_capabilities.rb#49 + def to_json(*args); end +end + +# Additional information about the context in which a signature help request +# was triggered. +# +# source://language_server-protocol//lib/language_server/protocol/interface/signature_help_context.rb#8 +class LanguageServer::Protocol::Interface::SignatureHelpContext + # @return [SignatureHelpContext] a new instance of SignatureHelpContext + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_context.rb#9 + def initialize(trigger_kind:, is_retrigger:, trigger_character: T.unsafe(nil), active_signature_help: T.unsafe(nil)); end + + # The currently active `SignatureHelp`. + # + # The `activeSignatureHelp` has its `SignatureHelp.activeSignature` field + # updated based on the user navigating through available signatures. + # + # @return [SignatureHelp] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_context.rb#58 + def active_signature_help; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_context.rb#62 + def attributes; end + + # `true` if signature help was already showing when it was triggered. + # + # Retriggers occur when the signature help is already active and can be + # caused by actions such as typing a trigger character, a cursor move, or + # document content changes. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_context.rb#47 + def is_retrigger; end + + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_context.rb#64 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_context.rb#68 + def to_json(*args); end + + # Character that caused signature help to be triggered. + # + # This is undefined when triggerKind !== + # SignatureHelpTriggerKind.TriggerCharacter + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_context.rb#35 + def trigger_character; end + + # Action that caused signature help to be triggered. + # + # @return [SignatureHelpTriggerKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_context.rb#24 + def trigger_kind; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/signature_help_options.rb#4 +class LanguageServer::Protocol::Interface::SignatureHelpOptions + # @return [SignatureHelpOptions] a new instance of SignatureHelpOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil), trigger_characters: T.unsafe(nil), retrigger_characters: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_options.rb#41 + def attributes; end + + # List of characters that re-trigger signature help. + # + # These trigger characters are only active when signature help is already + # showing. All trigger characters are also counted as re-trigger + # characters. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_options.rb#37 + def retrigger_characters; end + + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_options.rb#43 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_options.rb#47 + def to_json(*args); end + + # The characters that trigger signature help + # automatically. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_options.rb#25 + def trigger_characters; end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_options.rb#16 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/signature_help_params.rb#4 +class LanguageServer::Protocol::Interface::SignatureHelpParams + # @return [SignatureHelpParams] a new instance of SignatureHelpParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_params.rb#5 + def initialize(text_document:, position:, work_done_token: T.unsafe(nil), context: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_params.rb#50 + def attributes; end + + # The signature help context. This is only available if the client + # specifies to send this using the client capability + # `textDocument.signatureHelp.contextSupport === true` + # + # @return [SignatureHelpContext] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_params.rb#46 + def context; end + + # The position inside the text document. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_params.rb#28 + def position; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_params.rb#20 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_params.rb#52 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_params.rb#56 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_params.rb#36 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/signature_help_registration_options.rb#4 +class LanguageServer::Protocol::Interface::SignatureHelpRegistrationOptions + # @return [SignatureHelpRegistrationOptions] a new instance of SignatureHelpRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), trigger_characters: T.unsafe(nil), retrigger_characters: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_registration_options.rb#51 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_registration_options.rb#21 + def document_selector; end + + # List of characters that re-trigger signature help. + # + # These trigger characters are only active when signature help is already + # showing. All trigger characters are also counted as re-trigger + # characters. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_registration_options.rb#47 + def retrigger_characters; end + + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_registration_options.rb#53 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_registration_options.rb#57 + def to_json(*args); end + + # The characters that trigger signature help + # automatically. + # + # @return [string[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_registration_options.rb#35 + def trigger_characters; end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_help_registration_options.rb#26 + def work_done_progress; end +end + +# Represents the signature of something callable. A signature +# can have a label, like a function-name, a doc-comment, and +# a set of parameters. +# +# source://language_server-protocol//lib/language_server/protocol/interface/signature_information.rb#9 +class LanguageServer::Protocol::Interface::SignatureInformation + # @return [SignatureInformation] a new instance of SignatureInformation + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_information.rb#10 + def initialize(label:, documentation: T.unsafe(nil), parameters: T.unsafe(nil), active_parameter: T.unsafe(nil)); end + + # The index of the active parameter. + # + # If provided, this is used in place of `SignatureHelp.activeParameter`. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_information.rb#53 + def active_parameter; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_information.rb#57 + def attributes; end + + # The human-readable doc-comment of this signature. Will be shown + # in the UI but can be omitted. + # + # @return [string | MarkupContent] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_information.rb#35 + def documentation; end + + # The label of this signature. Will be shown in + # the UI. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_information.rb#26 + def label; end + + # The parameters of this signature. + # + # @return [ParameterInformation[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/signature_information.rb#43 + def parameters; end + + # source://language_server-protocol//lib/language_server/protocol/interface/signature_information.rb#59 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/signature_information.rb#63 + def to_json(*args); end +end + +# Static registration options to be returned in the initialize request. +# +# source://language_server-protocol//lib/language_server/protocol/interface/static_registration_options.rb#7 +class LanguageServer::Protocol::Interface::StaticRegistrationOptions + # @return [StaticRegistrationOptions] a new instance of StaticRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/static_registration_options.rb#8 + def initialize(id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/static_registration_options.rb#25 + def attributes; end + + # The id used to register the request. The id can be used to deregister + # the request again. See also Registration#id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/static_registration_options.rb#21 + def id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/static_registration_options.rb#27 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/static_registration_options.rb#31 + def to_json(*args); end +end + +# Represents information about programming constructs like variables, classes, +# interfaces etc. +# +# source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#8 +class LanguageServer::Protocol::Interface::SymbolInformation + # @return [SymbolInformation] a new instance of SymbolInformation + # + # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#9 + def initialize(name:, kind:, location:, tags: T.unsafe(nil), deprecated: T.unsafe(nil), container_name: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#81 + def attributes; end + + # The name of the symbol containing this symbol. This information is for + # user interface purposes (e.g. to render a qualifier in the user interface + # if necessary). It can't be used to re-infer a hierarchy for the document + # symbols. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#77 + def container_name; end + + # Indicates if this symbol is deprecated. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#50 + def deprecated; end + + # The kind of this symbol. + # + # @return [SymbolKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#34 + def kind; end + + # The location of this symbol. The location's range is used by a tool + # to reveal the location in the editor. If the symbol is selected in the + # tool the range's start information is used to position the cursor. So + # the range usually spans more then the actual symbol's name and does + # normally include things like visibility modifiers. + # + # The range doesn't have to denote a node range in the sense of an abstract + # syntax tree. It can therefore not be used to re-construct a hierarchy of + # the symbols. + # + # @return [Location] + # + # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#66 + def location; end + + # The name of this symbol. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#26 + def name; end + + # Tags for this symbol. + # + # @return [1[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#42 + def tags; end + + # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#83 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/symbol_information.rb#87 + def to_json(*args); end +end + +# Describe options to be used when registering for text document change events. +# +# source://language_server-protocol//lib/language_server/protocol/interface/text_document_change_registration_options.rb#7 +class LanguageServer::Protocol::Interface::TextDocumentChangeRegistrationOptions + # @return [TextDocumentChangeRegistrationOptions] a new instance of TextDocumentChangeRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_change_registration_options.rb#8 + def initialize(document_selector:, sync_kind:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_change_registration_options.rb#35 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_change_registration_options.rb#22 + def document_selector; end + + # How documents are synced to the server. See TextDocumentSyncKind.Full + # and TextDocumentSyncKind.Incremental. + # + # @return [TextDocumentSyncKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_change_registration_options.rb#31 + def sync_kind; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_change_registration_options.rb#37 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_change_registration_options.rb#41 + def to_json(*args); end +end + +# Text document specific client capabilities. +# +# source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#7 +class LanguageServer::Protocol::Interface::TextDocumentClientCapabilities + # @return [TextDocumentClientCapabilities] a new instance of TextDocumentClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#8 + def initialize(synchronization: T.unsafe(nil), completion: T.unsafe(nil), hover: T.unsafe(nil), signature_help: T.unsafe(nil), declaration: T.unsafe(nil), definition: T.unsafe(nil), type_definition: T.unsafe(nil), implementation: T.unsafe(nil), references: T.unsafe(nil), document_highlight: T.unsafe(nil), document_symbol: T.unsafe(nil), code_action: T.unsafe(nil), code_lens: T.unsafe(nil), document_link: T.unsafe(nil), color_provider: T.unsafe(nil), formatting: T.unsafe(nil), range_formatting: T.unsafe(nil), on_type_formatting: T.unsafe(nil), rename: T.unsafe(nil), publish_diagnostics: T.unsafe(nil), folding_range: T.unsafe(nil), selection_range: T.unsafe(nil), linked_editing_range: T.unsafe(nil), call_hierarchy: T.unsafe(nil), semantic_tokens: T.unsafe(nil), moniker: T.unsafe(nil), type_hierarchy: T.unsafe(nil), inline_value: T.unsafe(nil), inlay_hint: T.unsafe(nil), diagnostic: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#285 + def attributes; end + + # Capabilities specific to the various call hierarchy requests. + # + # @return [CallHierarchyClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#233 + def call_hierarchy; end + + # Capabilities specific to the `textDocument/codeAction` request. + # + # @return [CodeActionClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#134 + def code_action; end + + # Capabilities specific to the `textDocument/codeLens` request. + # + # @return [CodeLensClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#142 + def code_lens; end + + # Capabilities specific to the `textDocument/documentColor` and the + # `textDocument/colorPresentation` request. + # + # @return [DocumentColorClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#159 + def color_provider; end + + # Capabilities specific to the `textDocument/completion` request. + # + # @return [CompletionClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#54 + def completion; end + + # Capabilities specific to the `textDocument/declaration` request. + # + # @return [DeclarationClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#78 + def declaration; end + + # Capabilities specific to the `textDocument/definition` request. + # + # @return [DefinitionClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#86 + def definition; end + + # Capabilities specific to the diagnostic pull model. + # + # @return [DiagnosticClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#281 + def diagnostic; end + + # Capabilities specific to the `textDocument/documentHighlight` request. + # + # @return [DocumentHighlightClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#118 + def document_highlight; end + + # Capabilities specific to the `textDocument/documentLink` request. + # + # @return [DocumentLinkClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#150 + def document_link; end + + # Capabilities specific to the `textDocument/documentSymbol` request. + # + # @return [DocumentSymbolClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#126 + def document_symbol; end + + # Capabilities specific to the `textDocument/foldingRange` request. + # + # @return [FoldingRangeClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#209 + def folding_range; end + + # Capabilities specific to the `textDocument/formatting` request. + # + # @return [DocumentFormattingClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#167 + def formatting; end + + # Capabilities specific to the `textDocument/hover` request. + # + # @return [HoverClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#62 + def hover; end + + # Capabilities specific to the `textDocument/implementation` request. + # + # @return [ImplementationClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#102 + def implementation; end + + # Capabilities specific to the `textDocument/inlayHint` request. + # + # @return [InlayHintClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#273 + def inlay_hint; end + + # Capabilities specific to the `textDocument/inlineValue` request. + # + # @return [InlineValueClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#265 + def inline_value; end + + # Capabilities specific to the `textDocument/linkedEditingRange` request. + # + # @return [LinkedEditingRangeClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#225 + def linked_editing_range; end + + # Capabilities specific to the `textDocument/moniker` request. + # + # @return [MonikerClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#249 + def moniker; end + + # request. + # Capabilities specific to the `textDocument/onTypeFormatting` request. + # + # @return [DocumentOnTypeFormattingClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#184 + def on_type_formatting; end + + # Capabilities specific to the `textDocument/publishDiagnostics` + # notification. + # + # @return [PublishDiagnosticsClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#201 + def publish_diagnostics; end + + # Capabilities specific to the `textDocument/rangeFormatting` request. + # + # @return [DocumentRangeFormattingClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#175 + def range_formatting; end + + # Capabilities specific to the `textDocument/references` request. + # + # @return [ReferenceClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#110 + def references; end + + # Capabilities specific to the `textDocument/rename` request. + # + # @return [RenameClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#192 + def rename; end + + # Capabilities specific to the `textDocument/selectionRange` request. + # + # @return [SelectionRangeClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#217 + def selection_range; end + + # Capabilities specific to the various semantic token requests. + # + # @return [SemanticTokensClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#241 + def semantic_tokens; end + + # Capabilities specific to the `textDocument/signatureHelp` request. + # + # @return [SignatureHelpClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#70 + def signature_help; end + + # @return [TextDocumentSyncClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#46 + def synchronization; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#287 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#291 + def to_json(*args); end + + # Capabilities specific to the `textDocument/typeDefinition` request. + # + # @return [TypeDefinitionClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#94 + def type_definition; end + + # Capabilities specific to the various type hierarchy requests. + # + # @return [TypeHierarchyClientCapabilities] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_client_capabilities.rb#257 + def type_hierarchy; end +end + +# An event describing a change to a text document. If only a text is provided +# it is considered to be the full content of the document. +# +# source://language_server-protocol//lib/language_server/protocol/interface/text_document_content_change_event.rb#8 +class LanguageServer::Protocol::Interface::TextDocumentContentChangeEvent + # @return [TextDocumentContentChangeEvent] a new instance of TextDocumentContentChangeEvent + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_content_change_event.rb#9 + def initialize(text:, range: T.unsafe(nil), range_length: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_content_change_event.rb#47 + def attributes; end + + # The range of the document that changed. + # + # @return [Range, nil] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_content_change_event.rb#23 + def range; end + + # The optional length of the range that got replaced. + # + # @return [number, nil] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_content_change_event.rb#31 + def range_length; end + + # The new text for the provided range. + # + # --- OR --- + # + # The new text of the whole document. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_content_change_event.rb#43 + def text; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_content_change_event.rb#49 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_content_change_event.rb#53 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/text_document_edit.rb#4 +class LanguageServer::Protocol::Interface::TextDocumentEdit + # @return [TextDocumentEdit] a new instance of TextDocumentEdit + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_edit.rb#5 + def initialize(text_document:, edits:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_edit.rb#30 + def attributes; end + + # The edits to be applied. + # + # @return [(TextEdit | AnnotatedTextEdit)[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_edit.rb#26 + def edits; end + + # The text document to change. + # + # @return [OptionalVersionedTextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_edit.rb#18 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_edit.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_edit.rb#36 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/text_document_identifier.rb#4 +class LanguageServer::Protocol::Interface::TextDocumentIdentifier + # @return [TextDocumentIdentifier] a new instance of TextDocumentIdentifier + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_identifier.rb#5 + def initialize(uri:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_identifier.rb#21 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_identifier.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_identifier.rb#27 + def to_json(*args); end + + # The text document's URI. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_identifier.rb#17 + def uri; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/text_document_item.rb#4 +class LanguageServer::Protocol::Interface::TextDocumentItem + # @return [TextDocumentItem] a new instance of TextDocumentItem + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_item.rb#5 + def initialize(uri:, language_id:, version:, text:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_item.rb#49 + def attributes; end + + # The text document's language identifier. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_item.rb#28 + def language_id; end + + # The content of the opened text document. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_item.rb#45 + def text; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_item.rb#51 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_item.rb#55 + def to_json(*args); end + + # The text document's URI. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_item.rb#20 + def uri; end + + # The version number of this document (it will increase after each + # change, including undo/redo). + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_item.rb#37 + def version; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/text_document_position_params.rb#4 +class LanguageServer::Protocol::Interface::TextDocumentPositionParams + # @return [TextDocumentPositionParams] a new instance of TextDocumentPositionParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_position_params.rb#5 + def initialize(text_document:, position:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_position_params.rb#30 + def attributes; end + + # The position inside the text document. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_position_params.rb#26 + def position; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_position_params.rb#18 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_position_params.rb#32 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_position_params.rb#36 + def to_json(*args); end +end + +# General text document registration options. +# +# source://language_server-protocol//lib/language_server/protocol/interface/text_document_registration_options.rb#7 +class LanguageServer::Protocol::Interface::TextDocumentRegistrationOptions + # @return [TextDocumentRegistrationOptions] a new instance of TextDocumentRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_registration_options.rb#8 + def initialize(document_selector:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_registration_options.rb#25 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_registration_options.rb#21 + def document_selector; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_registration_options.rb#27 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_registration_options.rb#31 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/text_document_save_registration_options.rb#4 +class LanguageServer::Protocol::Interface::TextDocumentSaveRegistrationOptions + # @return [TextDocumentSaveRegistrationOptions] a new instance of TextDocumentSaveRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_save_registration_options.rb#5 + def initialize(document_selector:, include_text: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_save_registration_options.rb#31 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_save_registration_options.rb#19 + def document_selector; end + + # The client is supposed to include the content on save. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_save_registration_options.rb#27 + def include_text; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_save_registration_options.rb#33 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_save_registration_options.rb#37 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::TextDocumentSyncClientCapabilities + # @return [TextDocumentSyncClientCapabilities] a new instance of TextDocumentSyncClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil), will_save: T.unsafe(nil), will_save_wait_until: T.unsafe(nil), did_save: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb#50 + def attributes; end + + # The client supports did save notifications. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb#46 + def did_save; end + + # Whether text document synchronization supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb#20 + def dynamic_registration; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb#52 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb#56 + def to_json(*args); end + + # The client supports sending will save notifications. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb#28 + def will_save; end + + # The client supports sending a will save request and + # waits for a response providing text edits which will + # be applied to the document before it is saved. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_client_capabilities.rb#38 + def will_save_wait_until; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#4 +class LanguageServer::Protocol::Interface::TextDocumentSyncOptions + # @return [TextDocumentSyncOptions] a new instance of TextDocumentSyncOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#5 + def initialize(open_close: T.unsafe(nil), change: T.unsafe(nil), will_save: T.unsafe(nil), will_save_wait_until: T.unsafe(nil), save: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#66 + def attributes; end + + # Change notifications are sent to the server. See + # TextDocumentSyncKind.None, TextDocumentSyncKind.Full and + # TextDocumentSyncKind.Incremental. If omitted it defaults to + # TextDocumentSyncKind.None. + # + # @return [TextDocumentSyncKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#35 + def change; end + + # Open and close notifications are sent to the server. If omitted open + # close notifications should not be sent. + # Open and close notifications are sent to the server. If omitted open + # close notification should not be sent. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#24 + def open_close; end + + # If present save notifications are sent to the server. If omitted the + # notification should not be sent. + # + # @return [boolean | SaveOptions] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#62 + def save; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#68 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#72 + def to_json(*args); end + + # If present will save notifications are sent to the server. If omitted + # the notification should not be sent. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#44 + def will_save; end + + # If present will save wait until requests are sent to the server. If + # omitted the request should not be sent. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_document_sync_options.rb#53 + def will_save_wait_until; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/text_edit.rb#4 +class LanguageServer::Protocol::Interface::TextEdit + # @return [TextEdit] a new instance of TextEdit + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_edit.rb#5 + def initialize(range:, new_text:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_edit.rb#32 + def attributes; end + + # The string to be inserted. For delete operations use an + # empty string. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_edit.rb#28 + def new_text; end + + # The range of the text document to be manipulated. To insert + # text into a document create a range where start === end. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/text_edit.rb#19 + def range; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_edit.rb#34 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/text_edit.rb#38 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/type_definition_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::TypeDefinitionClientCapabilities + # @return [TypeDefinitionClientCapabilities] a new instance of TypeDefinitionClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil), link_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_client_capabilities.rb#32 + def attributes; end + + # Whether implementation supports dynamic registration. If this is set to + # `true` the client supports the new `TypeDefinitionRegistrationOptions` + # return value for the corresponding server capability as well. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_client_capabilities.rb#20 + def dynamic_registration; end + + # The client supports additional metadata in the form of definition links. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_client_capabilities.rb#28 + def link_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_client_capabilities.rb#34 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_client_capabilities.rb#38 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/type_definition_options.rb#4 +class LanguageServer::Protocol::Interface::TypeDefinitionOptions + # @return [TypeDefinitionOptions] a new instance of TypeDefinitionOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/type_definition_params.rb#4 +class LanguageServer::Protocol::Interface::TypeDefinitionParams + # @return [TypeDefinitionParams] a new instance of TypeDefinitionParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_params.rb#5 + def initialize(text_document:, position:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_params.rb#49 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_params.rb#45 + def partial_result_token; end + + # The position inside the text document. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_params.rb#28 + def position; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_params.rb#20 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_params.rb#51 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_params.rb#55 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_params.rb#36 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/type_definition_registration_options.rb#4 +class LanguageServer::Protocol::Interface::TypeDefinitionRegistrationOptions + # @return [TypeDefinitionRegistrationOptions] a new instance of TypeDefinitionRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_registration_options.rb#38 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_registration_options.rb#20 + def document_selector; end + + # The id used to register the request. The id can be used to deregister + # the request again. See also Registration#id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_registration_options.rb#34 + def id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_registration_options.rb#40 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_registration_options.rb#44 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_definition_registration_options.rb#25 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#4 +class LanguageServer::Protocol::Interface::TypeHierarchyItem + # @return [TypeHierarchyItem] a new instance of TypeHierarchyItem + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#5 + def initialize(name:, kind:, uri:, range:, selection_range:, tags: T.unsafe(nil), detail: T.unsafe(nil), data: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#90 + def attributes; end + + # A data entry field that is preserved between a type hierarchy prepare and + # supertypes or subtypes requests. It could also be used to identify the + # type hierarchy in the server, helping improve the performance on + # resolving supertypes and subtypes. + # + # @return [LSPAny] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#86 + def data; end + + # More detail for this item, e.g. the signature of a function. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#48 + def detail; end + + # The kind of this item. + # + # @return [SymbolKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#32 + def kind; end + + # The name of this item. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#24 + def name; end + + # The range enclosing this symbol not including leading/trailing whitespace + # but everything else, e.g. comments and code. + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#65 + def range; end + + # The range that should be selected and revealed when this symbol is being + # picked, e.g. the name of a function. Must be contained by the + # [`range`](#TypeHierarchyItem.range). + # + # @return [Range] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#75 + def selection_range; end + + # Tags for this item. + # + # @return [1[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#40 + def tags; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#92 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#96 + def to_json(*args); end + + # The resource identifier of this item. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_item.rb#56 + def uri; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_options.rb#4 +class LanguageServer::Protocol::Interface::TypeHierarchyOptions + # @return [TypeHierarchyOptions] a new instance of TypeHierarchyOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_prepare_params.rb#4 +class LanguageServer::Protocol::Interface::TypeHierarchyPrepareParams + # @return [TypeHierarchyPrepareParams] a new instance of TypeHierarchyPrepareParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_prepare_params.rb#5 + def initialize(text_document:, position:, work_done_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_prepare_params.rb#39 + def attributes; end + + # The position inside the text document. + # + # @return [Position] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_prepare_params.rb#27 + def position; end + + # The text document. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_prepare_params.rb#19 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_prepare_params.rb#41 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_prepare_params.rb#45 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_prepare_params.rb#35 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_registration_options.rb#4 +class LanguageServer::Protocol::Interface::TypeHierarchyRegistrationOptions + # @return [TypeHierarchyRegistrationOptions] a new instance of TypeHierarchyRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_registration_options.rb#5 + def initialize(document_selector:, work_done_progress: T.unsafe(nil), id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_registration_options.rb#38 + def attributes; end + + # A document selector to identify the scope of the registration. If set to + # null the document selector provided on the client side will be used. + # + # @return [DocumentSelector] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_registration_options.rb#20 + def document_selector; end + + # The id used to register the request. The id can be used to deregister + # the request again. See also Registration#id. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_registration_options.rb#34 + def id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_registration_options.rb#40 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_registration_options.rb#44 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_registration_options.rb#25 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb#4 +class LanguageServer::Protocol::Interface::TypeHierarchySubtypesParams + # @return [TypeHierarchySubtypesParams] a new instance of TypeHierarchySubtypesParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb#5 + def initialize(item:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb#37 + def attributes; end + + # @return [TypeHierarchyItem] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb#33 + def item; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb#28 + def partial_result_token; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb#39 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb#43 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_subtypes_params.rb#19 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_supertypes_params.rb#4 +class LanguageServer::Protocol::Interface::TypeHierarchySupertypesParams + # @return [TypeHierarchySupertypesParams] a new instance of TypeHierarchySupertypesParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_supertypes_params.rb#5 + def initialize(item:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_supertypes_params.rb#37 + def attributes; end + + # @return [TypeHierarchyItem] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_supertypes_params.rb#33 + def item; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_supertypes_params.rb#28 + def partial_result_token; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_supertypes_params.rb#39 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_supertypes_params.rb#43 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/type_hierarchy_supertypes_params.rb#19 + def work_done_token; end +end + +# A diagnostic report indicating that the last returned +# report is still accurate. +# +# source://language_server-protocol//lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb#8 +class LanguageServer::Protocol::Interface::UnchangedDocumentDiagnosticReport + # @return [UnchangedDocumentDiagnosticReport] a new instance of UnchangedDocumentDiagnosticReport + # + # source://language_server-protocol//lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb#9 + def initialize(kind:, result_id:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb#38 + def attributes; end + + # A document diagnostic report indicating + # no changes to the last result. A server can + # only return `unchanged` if result ids are + # provided. + # + # @return [any] + # + # source://language_server-protocol//lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb#25 + def kind; end + + # A result id which will be sent on the next + # diagnostic request for the same document. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb#34 + def result_id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb#40 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/unchanged_document_diagnostic_report.rb#44 + def to_json(*args); end +end + +# General parameters to unregister a capability. +# +# source://language_server-protocol//lib/language_server/protocol/interface/unregistration.rb#7 +class LanguageServer::Protocol::Interface::Unregistration + # @return [Unregistration] a new instance of Unregistration + # + # source://language_server-protocol//lib/language_server/protocol/interface/unregistration.rb#8 + def initialize(id:, method:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/unregistration.rb#34 + def attributes; end + + # The id used to unregister the request or notification. Usually an id + # provided during the register request. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/unregistration.rb#22 + def id; end + + # The method / capability to unregister for. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/unregistration.rb#30 + def method; end + + # source://language_server-protocol//lib/language_server/protocol/interface/unregistration.rb#36 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/unregistration.rb#40 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/unregistration_params.rb#4 +class LanguageServer::Protocol::Interface::UnregistrationParams + # @return [UnregistrationParams] a new instance of UnregistrationParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/unregistration_params.rb#5 + def initialize(unregisterations:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/unregistration_params.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/unregistration_params.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/unregistration_params.rb#24 + def to_json(*args); end + + # @return [Unregistration[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/unregistration_params.rb#14 + def unregisterations; end +end + +# A versioned notebook document identifier. +# +# source://language_server-protocol//lib/language_server/protocol/interface/versioned_notebook_document_identifier.rb#7 +class LanguageServer::Protocol::Interface::VersionedNotebookDocumentIdentifier + # @return [VersionedNotebookDocumentIdentifier] a new instance of VersionedNotebookDocumentIdentifier + # + # source://language_server-protocol//lib/language_server/protocol/interface/versioned_notebook_document_identifier.rb#8 + def initialize(version:, uri:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/versioned_notebook_document_identifier.rb#33 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/versioned_notebook_document_identifier.rb#35 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/versioned_notebook_document_identifier.rb#39 + def to_json(*args); end + + # The notebook document's URI. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/versioned_notebook_document_identifier.rb#29 + def uri; end + + # The version number of this notebook document. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/versioned_notebook_document_identifier.rb#21 + def version; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/versioned_text_document_identifier.rb#4 +class LanguageServer::Protocol::Interface::VersionedTextDocumentIdentifier + # @return [VersionedTextDocumentIdentifier] a new instance of VersionedTextDocumentIdentifier + # + # source://language_server-protocol//lib/language_server/protocol/interface/versioned_text_document_identifier.rb#5 + def initialize(uri:, version:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/versioned_text_document_identifier.rb#33 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/versioned_text_document_identifier.rb#35 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/versioned_text_document_identifier.rb#39 + def to_json(*args); end + + # The text document's URI. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/versioned_text_document_identifier.rb#18 + def uri; end + + # The version number of this document. + # + # The version number of a document will increase after each change, + # including undo/redo. The number doesn't need to be consecutive. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/versioned_text_document_identifier.rb#29 + def version; end +end + +# The parameters send in a will save text document notification. +# +# source://language_server-protocol//lib/language_server/protocol/interface/will_save_text_document_params.rb#7 +class LanguageServer::Protocol::Interface::WillSaveTextDocumentParams + # @return [WillSaveTextDocumentParams] a new instance of WillSaveTextDocumentParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/will_save_text_document_params.rb#8 + def initialize(text_document:, reason:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/will_save_text_document_params.rb#33 + def attributes; end + + # The 'TextDocumentSaveReason'. + # + # @return [TextDocumentSaveReason] + # + # source://language_server-protocol//lib/language_server/protocol/interface/will_save_text_document_params.rb#29 + def reason; end + + # The document that will be saved. + # + # @return [TextDocumentIdentifier] + # + # source://language_server-protocol//lib/language_server/protocol/interface/will_save_text_document_params.rb#21 + def text_document; end + + # source://language_server-protocol//lib/language_server/protocol/interface/will_save_text_document_params.rb#35 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/will_save_text_document_params.rb#39 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#4 +class LanguageServer::Protocol::Interface::WorkDoneProgressBegin + # @return [WorkDoneProgressBegin] a new instance of WorkDoneProgressBegin + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#5 + def initialize(kind:, title:, cancellable: T.unsafe(nil), message: T.unsafe(nil), percentage: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#68 + def attributes; end + + # Controls if a cancel button should show to allow the user to cancel the + # long running operation. Clients that don't support cancellation are + # allowed to ignore the setting. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#39 + def cancellable; end + + # @return ["begin"] + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#18 + def kind; end + + # Optional, more detailed associated progress message. Contains + # complementary information to the `title`. + # + # Examples: "3/25 files", "project/src/module2", "node_modules/some_dep". + # If unset, the previous progress message (if any) is still valid. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#51 + def message; end + + # Optional progress percentage to display (value 100 is considered 100%). + # If not provided infinite progress is assumed and clients are allowed + # to ignore the `percentage` value in subsequent in report notifications. + # + # The value should be steadily rising. Clients are free to ignore values + # that are not following this rule. The value range is [0, 100] + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#64 + def percentage; end + + # Mandatory title of the progress operation. Used to briefly inform about + # the kind of operation being performed. + # + # Examples: "Indexing" or "Linking dependencies". + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#29 + def title; end + + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#70 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_begin.rb#74 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_cancel_params.rb#4 +class LanguageServer::Protocol::Interface::WorkDoneProgressCancelParams + # @return [WorkDoneProgressCancelParams] a new instance of WorkDoneProgressCancelParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_cancel_params.rb#5 + def initialize(token:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_cancel_params.rb#21 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_cancel_params.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_cancel_params.rb#27 + def to_json(*args); end + + # The token to be used to report progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_cancel_params.rb#17 + def token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_create_params.rb#4 +class LanguageServer::Protocol::Interface::WorkDoneProgressCreateParams + # @return [WorkDoneProgressCreateParams] a new instance of WorkDoneProgressCreateParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_create_params.rb#5 + def initialize(token:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_create_params.rb#21 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_create_params.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_create_params.rb#27 + def to_json(*args); end + + # The token to be used to report progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_create_params.rb#17 + def token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_end.rb#4 +class LanguageServer::Protocol::Interface::WorkDoneProgressEnd + # @return [WorkDoneProgressEnd] a new instance of WorkDoneProgressEnd + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_end.rb#5 + def initialize(kind:, message: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_end.rb#28 + def attributes; end + + # @return ["end"] + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_end.rb#15 + def kind; end + + # Optional, a final message indicating to for example indicate the outcome + # of the operation. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_end.rb#24 + def message; end + + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_end.rb#30 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_end.rb#34 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_options.rb#4 +class LanguageServer::Protocol::Interface::WorkDoneProgressOptions + # @return [WorkDoneProgressOptions] a new instance of WorkDoneProgressOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_options.rb#18 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_options.rb#20 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_options.rb#24 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_options.rb#14 + def work_done_progress; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_params.rb#4 +class LanguageServer::Protocol::Interface::WorkDoneProgressParams + # @return [WorkDoneProgressParams] a new instance of WorkDoneProgressParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_params.rb#5 + def initialize(work_done_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_params.rb#21 + def attributes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_params.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_params.rb#27 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_params.rb#17 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_report.rb#4 +class LanguageServer::Protocol::Interface::WorkDoneProgressReport + # @return [WorkDoneProgressReport] a new instance of WorkDoneProgressReport + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_report.rb#5 + def initialize(kind:, cancellable: T.unsafe(nil), message: T.unsafe(nil), percentage: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_report.rb#58 + def attributes; end + + # Controls enablement state of a cancel button. This property is only valid + # if a cancel button got requested in the `WorkDoneProgressBegin` payload. + # + # Clients that don't support cancellation or don't support control the + # button's enablement state are allowed to ignore the setting. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_report.rb#29 + def cancellable; end + + # @return ["report"] + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_report.rb#17 + def kind; end + + # Optional, more detailed associated progress message. Contains + # complementary information to the `title`. + # + # Examples: "3/25 files", "project/src/module2", "node_modules/some_dep". + # If unset, the previous progress message (if any) is still valid. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_report.rb#41 + def message; end + + # Optional progress percentage to display (value 100 is considered 100%). + # If not provided infinite progress is assumed and clients are allowed + # to ignore the `percentage` value in subsequent in report notifications. + # + # The value should be steadily rising. Clients are free to ignore values + # that are not following this rule. The value range is [0, 100] + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_report.rb#54 + def percentage; end + + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_report.rb#60 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/work_done_progress_report.rb#64 + def to_json(*args); end +end + +# Parameters of the workspace diagnostic request. +# +# source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_params.rb#7 +class LanguageServer::Protocol::Interface::WorkspaceDiagnosticParams + # @return [WorkspaceDiagnosticParams] a new instance of WorkspaceDiagnosticParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_params.rb#8 + def initialize(previous_result_ids:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil), identifier: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_params.rb#53 + def attributes; end + + # The additional identifier provided during registration. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_params.rb#40 + def identifier; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_params.rb#32 + def partial_result_token; end + + # The currently known diagnostic reports with their + # previous result ids. + # + # @return [PreviousResultId[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_params.rb#49 + def previous_result_ids; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_params.rb#55 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_params.rb#59 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_params.rb#23 + def work_done_token; end +end + +# A workspace diagnostic report. +# +# source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report.rb#7 +class LanguageServer::Protocol::Interface::WorkspaceDiagnosticReport + # @return [WorkspaceDiagnosticReport] a new instance of WorkspaceDiagnosticReport + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report.rb#8 + def initialize(items:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report.rb#21 + def attributes; end + + # @return [WorkspaceDocumentDiagnosticReport[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report.rb#17 + def items; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report.rb#27 + def to_json(*args); end +end + +# A partial result for a workspace diagnostic report. +# +# source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report_partial_result.rb#7 +class LanguageServer::Protocol::Interface::WorkspaceDiagnosticReportPartialResult + # @return [WorkspaceDiagnosticReportPartialResult] a new instance of WorkspaceDiagnosticReportPartialResult + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report_partial_result.rb#8 + def initialize(items:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report_partial_result.rb#21 + def attributes; end + + # @return [WorkspaceDocumentDiagnosticReport[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report_partial_result.rb#17 + def items; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report_partial_result.rb#23 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_diagnostic_report_partial_result.rb#27 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit.rb#4 +class LanguageServer::Protocol::Interface::WorkspaceEdit + # @return [WorkspaceEdit] a new instance of WorkspaceEdit + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit.rb#5 + def initialize(changes: T.unsafe(nil), document_changes: T.unsafe(nil), change_annotations: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit.rb#56 + def attributes; end + + # A map of change annotations that can be referenced in + # `AnnotatedTextEdit`s or create, rename and delete file / folder + # operations. + # + # Whether clients honor this property depends on the client capability + # `workspace.changeAnnotationSupport`. + # + # @return [{ [id: string]: ChangeAnnotation; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit.rb#52 + def change_annotations; end + + # Holds changes to existing resources. + # + # @return [{}] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit.rb#19 + def changes; end + + # Depending on the client capability + # `workspace.workspaceEdit.resourceOperations` document changes are either + # an array of `TextDocumentEdit`s to express changes to n different text + # documents where each text document edit addresses a specific version of + # a text document. Or it can contain above `TextDocumentEdit`s mixed with + # create, rename and delete file / folder operations. + # + # Whether a client supports versioned document edits is expressed via + # `workspace.workspaceEdit.documentChanges` client capability. + # + # If a client neither supports `documentChanges` nor + # `workspace.workspaceEdit.resourceOperations` then only plain `TextEdit`s + # using the `changes` property are supported. + # + # @return [TextDocumentEdit[] | (TextDocumentEdit | CreateFile | RenameFile | DeleteFile)[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit.rb#39 + def document_changes; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit.rb#58 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit.rb#62 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::WorkspaceEditClientCapabilities + # @return [WorkspaceEditClientCapabilities] a new instance of WorkspaceEditClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#5 + def initialize(document_changes: T.unsafe(nil), resource_operations: T.unsafe(nil), failure_handling: T.unsafe(nil), normalizes_line_endings: T.unsafe(nil), change_annotation_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#63 + def attributes; end + + # Whether the client in general supports change annotations on text edits, + # create file, rename file and delete file changes. + # + # @return [{ groupsOnLabel?: boolean; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#59 + def change_annotation_support; end + + # The client supports versioned document changes in `WorkspaceEdit`s + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#21 + def document_changes; end + + # The failure handling strategy of a client if applying the workspace edit + # fails. + # + # @return [FailureHandlingKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#39 + def failure_handling; end + + # Whether the client normalizes line endings to the client specific + # setting. + # If set to `true` the client will normalize line ending characters + # in a workspace edit to the client specific new line character(s). + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#50 + def normalizes_line_endings; end + + # The resource operations the client supports. Clients should at least + # support 'create', 'rename' and 'delete' files and folders. + # + # @return [ResourceOperationKind[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#30 + def resource_operations; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#65 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_edit_client_capabilities.rb#69 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/workspace_folder.rb#4 +class LanguageServer::Protocol::Interface::WorkspaceFolder + # @return [WorkspaceFolder] a new instance of WorkspaceFolder + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folder.rb#5 + def initialize(uri:, name:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folder.rb#31 + def attributes; end + + # The name of the workspace folder. Used to refer to this + # workspace folder in the user interface. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folder.rb#27 + def name; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folder.rb#33 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folder.rb#37 + def to_json(*args); end + + # The associated URI for this workspace folder. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folder.rb#18 + def uri; end +end + +# The workspace folder change event. +# +# source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_change_event.rb#7 +class LanguageServer::Protocol::Interface::WorkspaceFoldersChangeEvent + # @return [WorkspaceFoldersChangeEvent] a new instance of WorkspaceFoldersChangeEvent + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_change_event.rb#8 + def initialize(added:, removed:); end + + # The array of added workspace folders + # + # @return [WorkspaceFolder[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_change_event.rb#21 + def added; end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_change_event.rb#33 + def attributes; end + + # The array of the removed workspace folders + # + # @return [WorkspaceFolder[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_change_event.rb#29 + def removed; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_change_event.rb#35 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_change_event.rb#39 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_server_capabilities.rb#4 +class LanguageServer::Protocol::Interface::WorkspaceFoldersServerCapabilities + # @return [WorkspaceFoldersServerCapabilities] a new instance of WorkspaceFoldersServerCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_server_capabilities.rb#5 + def initialize(supported: T.unsafe(nil), change_notifications: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_server_capabilities.rb#36 + def attributes; end + + # Whether the server wants to receive workspace folder + # change notifications. + # + # If a string is provided, the string is treated as an ID + # under which the notification is registered on the client + # side. The ID can be used to unregister for these events + # using the `client/unregisterCapability` request. + # + # @return [string | boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_server_capabilities.rb#32 + def change_notifications; end + + # The server has support for workspace folders + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_server_capabilities.rb#18 + def supported; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_server_capabilities.rb#38 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_folders_server_capabilities.rb#42 + def to_json(*args); end +end + +# A full document diagnostic report for a workspace diagnostic result. +# +# source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#7 +class LanguageServer::Protocol::Interface::WorkspaceFullDocumentDiagnosticReport + # @return [WorkspaceFullDocumentDiagnosticReport] a new instance of WorkspaceFullDocumentDiagnosticReport + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#8 + def initialize(kind:, items:, uri:, version:, result_id: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#63 + def attributes; end + + # The actual items. + # + # @return [Diagnostic[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#42 + def items; end + + # A full document diagnostic report. + # + # @return [any] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#24 + def kind; end + + # An optional result id. If provided it will + # be sent on the next diagnostic request for the + # same document. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#34 + def result_id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#65 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#69 + def to_json(*args); end + + # The URI for which diagnostic information is reported. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#50 + def uri; end + + # The version number for which the diagnostics are reported. + # If the document is not marked as open `null` can be provided. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_full_document_diagnostic_report.rb#59 + def version; end +end + +# A special workspace symbol that supports locations without a range +# +# source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#7 +class LanguageServer::Protocol::Interface::WorkspaceSymbol + # @return [WorkspaceSymbol] a new instance of WorkspaceSymbol + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#8 + def initialize(name:, kind:, location:, tags: T.unsafe(nil), container_name: T.unsafe(nil), data: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#77 + def attributes; end + + # The name of the symbol containing this symbol. This information is for + # user interface purposes (e.g. to render a qualifier in the user interface + # if necessary). It can't be used to re-infer a hierarchy for the document + # symbols. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#52 + def container_name; end + + # A data entry field that is preserved on a workspace symbol between a + # workspace symbol request and a workspace symbol resolve request. + # + # @return [LSPAny] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#73 + def data; end + + # The kind of this symbol. + # + # @return [SymbolKind] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#33 + def kind; end + + # The location of this symbol. Whether a server is allowed to + # return a location without a range depends on the client + # capability `workspace.symbol.resolveSupport`. + # + # See also `SymbolInformation.location`. + # + # @return [Location | { uri: string; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#64 + def location; end + + # The name of this symbol. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#25 + def name; end + + # Tags for this completion item. + # + # @return [1[]] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#41 + def tags; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#79 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol.rb#83 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb#4 +class LanguageServer::Protocol::Interface::WorkspaceSymbolClientCapabilities + # @return [WorkspaceSymbolClientCapabilities] a new instance of WorkspaceSymbolClientCapabilities + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb#5 + def initialize(dynamic_registration: T.unsafe(nil), symbol_kind: T.unsafe(nil), tag_support: T.unsafe(nil), resolve_support: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb#52 + def attributes; end + + # Symbol request supports dynamic registration. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb#20 + def dynamic_registration; end + + # The client support partial workspace symbols. The client will send the + # request `workspaceSymbol/resolve` to the server to resolve additional + # properties. + # + # @return [{ properties: string[]; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb#48 + def resolve_support; end + + # Specific capabilities for the `SymbolKind` in the `workspace/symbol` + # request. + # + # @return [{ valueSet?: SymbolKind[]; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb#29 + def symbol_kind; end + + # The client supports tags on `SymbolInformation` and `WorkspaceSymbol`. + # Clients supporting tags have to handle unknown tags gracefully. + # + # @return [{ valueSet: 1[]; }] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb#38 + def tag_support; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb#54 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_client_capabilities.rb#58 + def to_json(*args); end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_options.rb#4 +class LanguageServer::Protocol::Interface::WorkspaceSymbolOptions + # @return [WorkspaceSymbolOptions] a new instance of WorkspaceSymbolOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil), resolve_provider: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_options.rb#28 + def attributes; end + + # The server provides support to resolve additional + # information for a workspace symbol. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_options.rb#24 + def resolve_provider; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_options.rb#30 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_options.rb#34 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_options.rb#15 + def work_done_progress; end +end + +# The parameters of a Workspace Symbol Request. +# +# source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_params.rb#7 +class LanguageServer::Protocol::Interface::WorkspaceSymbolParams + # @return [WorkspaceSymbolParams] a new instance of WorkspaceSymbolParams + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_params.rb#8 + def initialize(query:, work_done_token: T.unsafe(nil), partial_result_token: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_params.rb#44 + def attributes; end + + # An optional token that a server can use to report partial results (e.g. + # streaming) to the client. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_params.rb#31 + def partial_result_token; end + + # A query string to filter symbols by. Clients may send an empty + # string here to request all symbols. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_params.rb#40 + def query; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_params.rb#46 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_params.rb#50 + def to_json(*args); end + + # An optional token that a server can use to report work done progress. + # + # @return [ProgressToken] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_params.rb#22 + def work_done_token; end +end + +# source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_registration_options.rb#4 +class LanguageServer::Protocol::Interface::WorkspaceSymbolRegistrationOptions + # @return [WorkspaceSymbolRegistrationOptions] a new instance of WorkspaceSymbolRegistrationOptions + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_registration_options.rb#5 + def initialize(work_done_progress: T.unsafe(nil), resolve_provider: T.unsafe(nil)); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_registration_options.rb#28 + def attributes; end + + # The server provides support to resolve additional + # information for a workspace symbol. + # + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_registration_options.rb#24 + def resolve_provider; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_registration_options.rb#30 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_registration_options.rb#34 + def to_json(*args); end + + # @return [boolean] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_symbol_registration_options.rb#15 + def work_done_progress; end +end + +# An unchanged document diagnostic report for a workspace diagnostic result. +# +# source://language_server-protocol//lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb#7 +class LanguageServer::Protocol::Interface::WorkspaceUnchangedDocumentDiagnosticReport + # @return [WorkspaceUnchangedDocumentDiagnosticReport] a new instance of WorkspaceUnchangedDocumentDiagnosticReport + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb#8 + def initialize(kind:, result_id:, uri:, version:); end + + # Returns the value of attribute attributes. + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb#56 + def attributes; end + + # A document diagnostic report indicating + # no changes to the last result. A server can + # only return `unchanged` if result ids are + # provided. + # + # @return [any] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb#26 + def kind; end + + # A result id which will be sent on the next + # diagnostic request for the same document. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb#35 + def result_id; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb#58 + def to_hash; end + + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb#62 + def to_json(*args); end + + # The URI for which diagnostic information is reported. + # + # @return [string] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb#43 + def uri; end + + # The version number for which the diagnostics are reported. + # If the document is not marked as open `null` can be provided. + # + # @return [number] + # + # source://language_server-protocol//lib/language_server/protocol/interface/workspace_unchanged_document_diagnostic_report.rb#52 + def version; end +end + +# source://language_server-protocol//lib/language_server/protocol/transport/io/reader.rb#7 +module LanguageServer::Protocol::Transport; end + +# source://language_server-protocol//lib/language_server/protocol/transport/io/reader.rb#8 +module LanguageServer::Protocol::Transport::Io; end + +# source://language_server-protocol//lib/language_server/protocol/transport/io/reader.rb#9 +class LanguageServer::Protocol::Transport::Io::Reader + # @return [Reader] a new instance of Reader + # + # source://language_server-protocol//lib/language_server/protocol/transport/io/reader.rb#10 + def initialize(io); end + + # source://language_server-protocol//lib/language_server/protocol/transport/io/reader.rb#15 + def read(&block); end + + private + + # Returns the value of attribute io. + # + # source://language_server-protocol//lib/language_server/protocol/transport/io/reader.rb#26 + def io; end +end + +# source://language_server-protocol//lib/language_server/protocol/transport/io/writer.rb#5 +class LanguageServer::Protocol::Transport::Io::Writer + # @return [Writer] a new instance of Writer + # + # source://language_server-protocol//lib/language_server/protocol/transport/io/writer.rb#8 + def initialize(io); end + + # Returns the value of attribute io. + # + # source://language_server-protocol//lib/language_server/protocol/transport/io/writer.rb#6 + def io; end + + # source://language_server-protocol//lib/language_server/protocol/transport/io/writer.rb#13 + def write(response); end +end + +# source://language_server-protocol//lib/language_server/protocol/transport/stdio/reader.rb#4 +module LanguageServer::Protocol::Transport::Stdio; end + +# source://language_server-protocol//lib/language_server/protocol/transport/stdio/reader.rb#5 +class LanguageServer::Protocol::Transport::Stdio::Reader < ::LanguageServer::Protocol::Transport::Io::Reader + # @return [Reader] a new instance of Reader + # + # source://language_server-protocol//lib/language_server/protocol/transport/stdio/reader.rb#6 + def initialize; end +end + +# source://language_server-protocol//lib/language_server/protocol/transport/stdio/writer.rb#5 +class LanguageServer::Protocol::Transport::Stdio::Writer < ::LanguageServer::Protocol::Transport::Io::Writer + # @return [Writer] a new instance of Writer + # + # source://language_server-protocol//lib/language_server/protocol/transport/stdio/writer.rb#6 + def initialize; end +end + +# source://language_server-protocol//lib/language_server/protocol/version.rb#3 +LanguageServer::Protocol::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/money@6.16.0.rbi b/sorbet/rbi/gems/money@6.16.0.rbi new file mode 100644 index 0000000..e36b35f --- /dev/null +++ b/sorbet/rbi/gems/money@6.16.0.rbi @@ -0,0 +1,2226 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `money` gem. +# Please instead update this file by running `bin/tapioca gem money`. + +# "Money is any object or record that is generally accepted as payment for +# goods and services and repayment of debts in a given socio-economic context +# or country." -Wikipedia +# +# An instance of Money represents an amount of a specific currency. +# +# Money is a value object and should be treated as immutable. +# +# @see http://en.wikipedia.org/wiki/Money +# +# source://money//lib/money/currency/loader.rb#1 +class Money + include ::Comparable + include ::Money::Arithmetic + extend ::Money::Constructors + + # Creates a new Money object of value given in the + # +fractional unit+ of the given +currency+. + # + # Alternatively you can use the convenience + # methods like {Money.ca_dollar} and {Money.us_dollar}. + # + # @example + # Money.new(100) #=> # + # Money.new(100, "USD") #=> # + # Money.new(100, "EUR") #=> # + # @option [Money::Bank::*] + # @param currency [Currency, String, Symbol] The currency format. + # @param [Money::Bank::*] [Hash] a customizable set of options + # @param options [Hash] Optional settings for the new Money instance + # @param obj [Object] Either the fractional value of the money, + # a Money object, or a currency. (If passed a currency as the first + # argument, a Money will be created in that currency with fractional value + # = 0. + # @raise [ArgumentError] + # @return [Money] + # + # source://money//lib/money/money.rb#340 + def initialize(obj, currency = T.unsafe(nil), options = T.unsafe(nil)); end + + # Splits a given amount in parts without losing pennies. The left-over pennies will be + # distributed round-robin amongst the parties. This means that parts listed first will likely + # receive more pennies than ones listed later. + # + # Pass [2, 1, 1] as input to give twice as much to part1 as part2 or + # part3 which results in 50% of the cash to party1, 25% to part2, and 25% to part3. Passing a + # number instead of an array will split the amount evenly (without losing pennies when rounding). + # + # @example + # Money.new(5, "USD").allocate([3, 7]) #=> [Money.new(2), Money.new(3)] + # Money.new(100, "USD").allocate([1, 1, 1]) #=> [Money.new(34), Money.new(33), Money.new(33)] + # Money.new(100, "USD").allocate(2) #=> [Money.new(50), Money.new(50)] + # Money.new(100, "USD").allocate(3) #=> [Money.new(34), Money.new(33), Money.new(33)] + # @param parts [Array, Numeric] how amount should be distributed to parts + # @return [Array] + # + # source://money//lib/money/money.rb#594 + def allocate(parts); end + + # Returns the numerical value of the money + # + # @example + # Money.new(1_00, "USD").amount # => BigDecimal("1.00") + # @return [BigDecimal] + # @see #to_d + # @see #fractional + # + # source://money//lib/money/money.rb#385 + def amount; end + + # Receive a money object with the same amount as the current Money object + # in Canadian dollar. + # + # @example + # n = Money.new(100, "USD").as_ca_dollar + # n.currency #=> # + # @return [Money] + # + # source://money//lib/money/money.rb#560 + def as_ca_dollar; end + + # Receive a money object with the same amount as the current Money object + # in euro. + # + # @example + # n = Money.new(100, "USD").as_euro + # n.currency #=> # + # @return [Money] + # + # source://money//lib/money/money.rb#572 + def as_euro; end + + # Receive a money object with the same amount as the current Money object + # in United States dollar. + # + # @example + # n = Money.new(100, "CAD").as_us_dollar + # n.currency #=> # + # @return [Money] + # + # source://money//lib/money/money.rb#548 + def as_us_dollar; end + + # Returns the value of attribute bank. + # + # source://money//lib/money/money.rb#88 + def bank; end + + # Convenience method for fractional part of the amount. Synonym of #fractional + # + # @return [Integer] when infinite_precision is false + # @return [BigDecimal] when infinite_precision is true + # @see infinite_precision + # + # source://money//lib/money/money.rb#33 + def cents; end + + # @return [Currency] The money's currency. + # + # source://money//lib/money/money.rb#88 + def currency; end + + # Return string representation of currency object + # + # @example + # Money.new(100, :USD).currency_as_string #=> "USD" + # @return [String] + # + # source://money//lib/money/money.rb#395 + def currency_as_string; end + + # Set currency object using a string + # + # @example + # Money.new(100).currency_as_string("CAD") #=> # + # @param val [String] The currency string. + # @return [Money::Currency] + # + # source://money//lib/money/money.rb#408 + def currency_as_string=(val); end + + # Returns a decimal mark according to the locale + # + # @return [String] + # + # source://money//lib/money/money.rb#643 + def decimal_mark; end + + # Assuming using a currency using dollars: + # Returns the value of the money in dollars, + # instead of in the fractional unit cents. + # + # Synonym of #amount + # + # @example + # Money.new(1_00, "USD").dollars # => BigDecimal("1.00") + # @return [BigDecimal] + # @see #amount + # @see #to_d + # @see #cents + # + # source://money//lib/money/money.rb#371 + def dollars; end + + # source://money//lib/money/money.rb#648 + def dup_with(options = T.unsafe(nil)); end + + # Receive the amount of this money object in another Currency. + # + # @example + # Money.new(2000, "USD").exchange_to("EUR") + # Money.new(2000, "USD").exchange_to("EUR") {|x| x.round} + # Money.new(2000, "USD").exchange_to(Currency.new("EUR")) + # @param other_currency [Currency, String, Symbol] Currency to exchange to. + # @return [Money] + # @yield [n] Optional block to use when rounding after exchanging one currency + # for another. + # @yieldparam n [Float] The resulting float after exchanging one currency for + # another. + # @yieldreturn [Integer] + # + # source://money//lib/money/money.rb#531 + def exchange_to(other_currency, &rounding_method); end + + # Creates a formatted price string according to several rules. + # + # @param rules [Hash] See {Money::Formatter Money::Formatter} for the list of formatting options + # @return [String] + # + # source://money//lib/money/money.rb#626 + def format(*rules); end + + # The value of the monetary amount represented in the fractional or subunit + # of the currency. + # + # For example, in the US dollar currency the fractional unit is cents, and + # there are 100 cents in one US dollar. So given the Money representation of + # one US dollar, the fractional interpretation is 100. + # + # Another example is that of the Kuwaiti dinar. In this case the fractional + # unit is the fils and there 1000 fils to one Kuwaiti dinar. So given the + # Money representation of one Kuwaiti dinar, the fractional interpretation is + # 1000. + # + # @return [Integer] when infinite_precision is false + # @return [BigDecimal] when infinite_precision is true + # @see infinite_precision + # + # source://money//lib/money/money.rb#53 + def fractional; end + + # Returns a Integer hash value based on the +fractional+ and +currency+ attributes + # in order to use functions like & (intersection), group_by, etc. + # + # @example + # Money.new(100).hash #=> 908351 + # @return [Integer] + # + # source://money//lib/money/money.rb#421 + def hash; end + + # Common inspect function + # + # @return [String] + # + # source://money//lib/money/money.rb#438 + def inspect; end + + # Round the monetary amount to smallest unit of coinage. + # + # @example + # Money.new(10.1, 'USD').round #=> Money.new(10, 'USD') + # @note This method is only useful when operating with infinite_precision turned + # on. Without infinite_precision values are rounded to the smallest unit of + # coinage automatically. + # @return [Money] + # @see Money.default_infinite_precision + # + # source://money//lib/money/money.rb#615 + def round(rounding_mode = T.unsafe(nil), rounding_precision = T.unsafe(nil)); end + + # Round a given amount of money to the nearest possible amount in cash value. For + # example, in Swiss franc (CHF), the smallest possible amount of cash value is + # CHF 0.05. Therefore, this method rounds CHF 0.07 to CHF 0.05, and CHF 0.08 to + # CHF 0.10. + # + # @return [Integer] when infinite_precision is false + # @return [BigDecimal] when infinite_precision is true + # @see infinite_precision + # + # source://money//lib/money/money.rb#70 + def round_to_nearest_cash_value; end + + # Splits a given amount in parts without losing pennies. The left-over pennies will be + # distributed round-robin amongst the parties. This means that parts listed first will likely + # receive more pennies than ones listed later. + # + # Pass [2, 1, 1] as input to give twice as much to part1 as part2 or + # part3 which results in 50% of the cash to party1, 25% to part2, and 25% to part3. Passing a + # number instead of an array will split the amount evenly (without losing pennies when rounding). + # + # @example + # Money.new(5, "USD").allocate([3, 7]) #=> [Money.new(2), Money.new(3)] + # Money.new(100, "USD").allocate([1, 1, 1]) #=> [Money.new(34), Money.new(33), Money.new(33)] + # Money.new(100, "USD").allocate(2) #=> [Money.new(50), Money.new(50)] + # Money.new(100, "USD").allocate(3) #=> [Money.new(34), Money.new(33), Money.new(33)] + # @param parts [Array, Numeric] how amount should be distributed to parts + # @return [Array] + # + # source://money//lib/money/money.rb#594 + def split(parts); end + + # Uses +Currency#symbol+. If +nil+ is returned, defaults to "¤". + # + # @example + # Money.new(100, "USD").symbol #=> "$" + # @return [String] + # + # source://money//lib/money/money.rb#431 + def symbol; end + + # Returns a thousands separator according to the locale + # + # @return [String] + # + # source://money//lib/money/money.rb#634 + def thousands_separator; end + + # Return the amount of money as a BigDecimal. + # + # @example + # Money.us_dollar(1_00).to_d #=> BigDecimal("1.00") + # @return [BigDecimal] + # + # source://money//lib/money/money.rb#461 + def to_d; end + + # Return the amount of money as a float. Floating points cannot guarantee + # precision. Therefore, this function should only be used when you no longer + # need to represent currency or working with another system that requires + # floats. + # + # @example + # Money.us_dollar(100).to_f #=> 1.0 + # @return [Float] + # + # source://money//lib/money/money.rb#484 + def to_f; end + + # Return the amount of money as a Integer. + # + # @example + # Money.us_dollar(1_00).to_i #=> 1 + # @return [Integer] + # + # source://money//lib/money/money.rb#471 + def to_i; end + + # Conversion to +self+. + # + # @return [self] + # + # source://money//lib/money/money.rb#506 + def to_money(given_currency = T.unsafe(nil)); end + + # Returns the amount of money as a string. + # + # @example + # Money.ca_dollar(100).to_s #=> "1.00" + # @return [String] + # + # source://money//lib/money/money.rb#448 + def to_s; end + + # Returns a new Money instance in a given currency leaving the amount intact + # and not performing currency conversion. + # + # @param new_currency [Currency, String, Symbol] Currency of the new object. + # @return [self] + # + # source://money//lib/money/money.rb#494 + def with_currency(new_currency); end + + private + + # source://money//lib/money/money.rb#658 + def as_d(num); end + + # source://money//lib/money/money.rb#674 + def locale_backend; end + + # source://money//lib/money/money.rb#666 + def return_value(value); end + + class << self + # Adds a new exchange rate to the default bank and return the rate. + # + # @example + # Money.add_rate("USD", "CAD", 1.25) #=> 1.25 + # @param from_currency [Currency, String, Symbol] Currency to exchange from. + # @param to_currency [Currency, String, Symbol] Currency to exchange to. + # @param rate [Numeric] Rate to exchange with. + # @return [Numeric] + # + # source://money//lib/money/money.rb#282 + def add_rate(from_currency, to_currency, rate); end + + # Used to specify precision for converting Rational to BigDecimal + # + # @return [Integer] + # + # source://money//lib/money/money.rb#132 + def conversion_precision; end + + # Sets the attribute conversion_precision + # + # @param value the value to set the attribute conversion_precision to. + # + # source://money//lib/money/money.rb#132 + def conversion_precision=(_arg0); end + + # Used to set a default bank for currency exchange. + # + # Each Money object is associated with a bank + # object, which is responsible for currency exchange. This property + # allows you to specify the default bank object. The default value for + # this property is an instance of +Bank::VariableExchange.+ It allows + # one to specify custom exchange rates. + # + # @return [Money::Bank::Base] + # + # source://money//lib/money/money.rb#171 + def default_bank; end + + # Used to set a default bank for currency exchange. + # + # Each Money object is associated with a bank + # object, which is responsible for currency exchange. This property + # allows you to specify the default bank object. The default value for + # this property is an instance of +Bank::VariableExchange.+ It allows + # one to specify custom exchange rates. + # + # @return [Money::Bank::Base] + # + # source://money//lib/money/money.rb#134 + def default_bank=(_arg0); end + + # source://money//lib/money/money.rb#152 + def default_currency; end + + # source://money//lib/money/money.rb#166 + def default_currency=(currency); end + + # Used to define a default hash of rules for every time + # +Money#format+ is called. Rules provided on method call will be + # merged with the default ones. To overwrite a rule, just provide the + # intended value while calling +format+. + # + # @example + # Money.default_formatting_rules = { display_free: true } + # Money.new(0, "USD").format # => "free" + # Money.new(0, "USD").format(display_free: false) # => "$0.00" + # @return [Hash] + # @see Money::Formatter#initialize Money::Formatter for more details + # + # source://money//lib/money/money.rb#132 + def default_formatting_rules; end + + # Used to define a default hash of rules for every time + # +Money#format+ is called. Rules provided on method call will be + # merged with the default ones. To overwrite a rule, just provide the + # intended value while calling +format+. + # + # @example + # Money.default_formatting_rules = { display_free: true } + # Money.new(0, "USD").format # => "free" + # Money.new(0, "USD").format(display_free: false) # => "$0.00" + # @return [Hash] + # @see Money::Formatter#initialize Money::Formatter for more details + # + # source://money//lib/money/money.rb#132 + def default_formatting_rules=(_arg0); end + + # @return [Boolean] Use this to enable infinite precision cents as the + # global default + # + # source://money//lib/money/money.rb#132 + def default_infinite_precision; end + + # @return [Boolean] Use this to enable infinite precision cents as the + # global default + # + # source://money//lib/money/money.rb#132 + def default_infinite_precision=(_arg0); end + + # Sets the default bank to be a SingleCurrency bank that raises on + # currency exchange. Useful when apps operate in a single currency at a time. + # + # source://money//lib/money/money.rb#288 + def disallow_currency_conversion!; end + + # Creates a new Money object of value given in the +unit+ of the given + # +currency+. + # + # @example + # Money.from_amount(23.45, "USD") # => # + # Money.from_amount(23.45, "JPY") # => # + # @option [Money::Bank::*] + # @param currency [Currency, String, Symbol] The currency format. + # @param [Money::Bank::*] [Hash] a customizable set of options + # @param options [Hash] Optional settings for the new Money instance + # @param amount [Numeric] The numerical value of the money. + # @raise [ArgumentError] + # @return [Money] + # @see #initialize + # + # source://money//lib/money/money.rb#307 + def from_amount(amount, currency = T.unsafe(nil), options = T.unsafe(nil)); end + + def from_cents(*_arg0); end + + # source://money//lib/money/money.rb#136 + def infinite_precision; end + + # source://money//lib/money/money.rb#141 + def infinite_precision=(value); end + + # @private + # + # source://money//lib/money/money.rb#224 + def inherited(base); end + + # Returns the value of attribute locale_backend. + # + # source://money//lib/money/money.rb#133 + def locale_backend; end + + # source://money//lib/money/money.rb#179 + def locale_backend=(value); end + + # Use this to return the rounding mode. + # + # @param mode [BigDecimal::ROUND_MODE] + # @return [BigDecimal::ROUND_MODE] rounding mode + # + # source://money//lib/money/money.rb#235 + def rounding_mode(mode = T.unsafe(nil)); end + + # @attr_writer rounding_mode Use this to specify the rounding mode + # + # source://money//lib/money/money.rb#184 + def rounding_mode=(new_rounding_mode); end + + # source://money//lib/money/money.rb#199 + def setup_defaults; end + + # Used to disable i18n even if it's used by other components of your app. + # + # @return [Boolean] + # + # source://money//lib/money/money.rb#133 + def use_i18n; end + + # Used to disable i18n even if it's used by other components of your app. + # + # @return [Boolean] + # + # source://money//lib/money/money.rb#189 + def use_i18n=(value); end + + # Temporarily changes the rounding mode in a given block. + # + # @example + # fee = Money.with_rounding_mode(BigDecimal::ROUND_HALF_UP) do + # Money.new(1200) * BigDecimal('0.029') + # end + # @param mode [BigDecimal::ROUND_MODE] + # @return [Object] block results + # @yield The block within which rounding mode will be changed. Its return + # value will also be the return value of the whole method. + # + # source://money//lib/money/money.rb#265 + def with_rounding_mode(mode); end + end +end + +# source://money//lib/money/money/allocation.rb#4 +class Money::Allocation + class << self + # Splits a given amount in parts without losing pennies. + # The left-over pennies will be distributed round-robin amongst the parts. This means that + # parts listed first will likely receive more pennies than the ones listed later. + # + # The results should always add up to the original amount. + # + # The parts can be specified as: + # Numeric — performs the split between a given number of parties evenely + # Array — allocates the amounts proportionally to the given array + # + # @raise [ArgumentError] + # + # source://money//lib/money/money/allocation.rb#15 + def generate(amount, parts, whole_amounts = T.unsafe(nil)); end + end +end + +# source://money//lib/money/money/arithmetic.rb#2 +module Money::Arithmetic + # Synonym for +#modulo+. + # + # @param val [Money, Integer] Number take modulo with. + # @return [Money] + # @see #modulo + # + # source://money//lib/money/money/arithmetic.rb#264 + def %(val); end + + # Multiplies the monetary value with the given number and returns a new + # +Money+ object with this monetary value and the same currency. + # + # Note that you can't multiply a Money object by an other +Money+ object. + # + # @example + # Money.new(100) * 2 #=> # + # @param value [Numeric] Number to multiply by. + # @raise [TypeError] If +value+ is NOT a number. + # @return [Money] The resulting money. + # + # source://money//lib/money/money/arithmetic.rb#167 + def *(value); end + + # Returns a new Money object containing the sum of the two operands' monetary + # values. If +other_money+ has a different currency then its monetary value + # is automatically exchanged to this object's currency using +exchange_to+. + # + # Returns a new Money object containing the difference between the two + # operands' monetary values. If +other_money+ has a different currency then + # its monetary value is automatically exchanged to this object's currency + # using +exchange_to+. + # + # @example + # Money.new(100) + Money.new(100) #=> # + # @example + # Money.new(100) - Money.new(99) #=> # + # @param other [Money] Other +Money+ object to add. + # @param other [Money] Other +Money+ object to subtract. + # @return [Money] + # @return [Money] + # + # source://money//lib/money/money/arithmetic.rb#135 + def +(other); end + + # Returns a new Money object containing the sum of the two operands' monetary + # values. If +other_money+ has a different currency then its monetary value + # is automatically exchanged to this object's currency using +exchange_to+. + # + # Returns a new Money object containing the difference between the two + # operands' monetary values. If +other_money+ has a different currency then + # its monetary value is automatically exchanged to this object's currency + # using +exchange_to+. + # + # @example + # Money.new(100) + Money.new(100) #=> # + # @example + # Money.new(100) - Money.new(99) #=> # + # @param other [Money] Other +Money+ object to add. + # @param other [Money] Other +Money+ object to subtract. + # @return [Money] + # @return [Money] + # + # source://money//lib/money/money/arithmetic.rb#135 + def -(other); end + + # Returns a money object with changed polarity. + # + # @example + # - Money.new(100) #=> # + # @return [Money] + # + # source://money//lib/money/money/arithmetic.rb#18 + def -@; end + + # Divides the monetary value with the given number and returns a new +Money+ + # object with this monetary value and the same currency. + # Can also divide by another +Money+ object to get a ratio. + # + # +Money/Numeric+ returns +Money+. +Money/Money+ returns +Float+. + # + # @example + # Money.new(100) / 10 #=> # + # Money.new(100) / Money.new(10) #=> 10.0 + # @param value [Money, Numeric] Number to divide by. + # @return [Money] The resulting money if you divide Money by a number. + # @return [Float] The resulting number if you divide Money by a Money. + # + # source://money//lib/money/money/arithmetic.rb#191 + def /(value); end + + # Compares two Money objects. If money objects have a different currency it + # will attempt to convert the currency. + # + # @param other [Money] Value to compare with. + # @raise [TypeError] when other object is not Money + # @return [Integer] + # + # source://money//lib/money/money/arithmetic.rb#55 + def <=>(other); end + + # Uses Comparable's implementation but raises ArgumentError if non-zero + # numeric value is given. + # + # source://money//lib/money/money/arithmetic.rb#73 + def ==(other); end + + # Return absolute value of self as a new Money object. + # + # @example + # Money.new(-100).abs #=> # + # @return [Money] + # + # source://money//lib/money/money/arithmetic.rb#294 + def abs; end + + # Used to make Money instance handle the operations when arguments order is reversed + # + # @example + # 2 * Money.new(10) #=> # + # @return [Array] + # + # source://money//lib/money/money/arithmetic.rb#326 + def coerce(other); end + + # Synonym for +#/+. + # + # @param value [Money, Numeric] Number to divide by. + # @return [Money] The resulting money if you divide Money by a number. + # @return [Float] The resulting number if you divide Money by a Money. + # @see #/ + # + # source://money//lib/money/money/arithmetic.rb#209 + def div(value); end + + # Divide money by money or fixnum and return array containing quotient and + # modulus. + # + # @example + # Money.new(100).divmod(9) #=> [#, #] + # Money.new(100).divmod(Money.new(9)) #=> [11, #] + # @param val [Money, Integer] Number to divmod by. + # @return [Array, Array] + # + # source://money//lib/money/money/arithmetic.rb#223 + def divmod(val); end + + # Checks whether two Money objects have the same currency and the same + # amount. If Money objects have a different currency it will only be true + # if the amounts are both zero. Checks against objects that are not Money or + # a subclass will always return false. + # + # @example + # Money.new(100).eql?(Money.new(101)) #=> false + # Money.new(100).eql?(Money.new(100)) #=> true + # Money.new(100, "USD").eql?(Money.new(100, "GBP")) #=> false + # Money.new(0, "USD").eql?(Money.new(0, "EUR")) #=> true + # Money.new(100).eql?("1.00") #=> false + # @param other_money [Money] Value to compare with. + # @return [Boolean] + # + # source://money//lib/money/money/arithmetic.rb#37 + def eql?(other_money); end + + # Equivalent to +self.divmod(val)[1]+ + # + # @example + # Money.new(100).modulo(9) #=> # + # Money.new(100).modulo(Money.new(9)) #=> # + # @param val [Money, Integer] Number take modulo with. + # @return [Money] + # + # source://money//lib/money/money/arithmetic.rb#253 + def modulo(val); end + + # Test if the amount is negative. Returns +true+ if the money amount is + # less than 0, +false+ otherwise. + # + # @example + # Money.new(-1).negative? #=> true + # Money.new(0).negative? #=> false + # Money.new(1).negative? #=> false + # @return [Boolean] + # + # source://money//lib/money/money/arithmetic.rb#102 + def negative?; end + + # Test if the money amount is non-zero. Returns this money object if it is + # non-zero, or nil otherwise, like +Numeric#nonzero?+. + # + # @example + # Money.new(100).nonzero? #=> # + # Money.new(0).nonzero? #=> nil + # @return [Money, nil] + # + # source://money//lib/money/money/arithmetic.rb#317 + def nonzero?; end + + # Test if the amount is positive. Returns +true+ if the money amount is + # greater than 0, +false+ otherwise. + # + # @example + # Money.new(1).positive? #=> true + # Money.new(0).positive? #=> false + # Money.new(-1).positive? #=> false + # @return [Boolean] + # + # source://money//lib/money/money/arithmetic.rb#89 + def positive?; end + + # If different signs +self.modulo(val) - val+ otherwise +self.modulo(val)+ + # + # @example + # Money.new(100).remainder(9) #=> # + # @param val [Money, Integer] Number to rake remainder with. + # @return [Money] + # + # source://money//lib/money/money/arithmetic.rb#276 + def remainder(val); end + + # Test if the money amount is zero. + # + # @example + # Money.new(100).zero? #=> false + # Money.new(0).zero? #=> true + # @return [Boolean] + # + # source://money//lib/money/money/arithmetic.rb#305 + def zero?; end + + private + + # source://money//lib/money/money/arithmetic.rb#231 + def divmod_money(val); end + + # source://money//lib/money/money/arithmetic.rb#238 + def divmod_other(val); end +end + +# Wrapper for coerced numeric values to distinguish +# when numeric was on the 1st place in operation. +# +# source://money//lib/money/money/arithmetic.rb#5 +class Money::Arithmetic::CoercedNumeric < ::Struct + # 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 + + # Proxy #zero? method to skip unnecessary typecasts. See #- and #+. + # + # @return [Boolean] + # + # source://money//lib/money/money/arithmetic.rb#7 + def zero?; end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# Provides classes that aid in the ability of exchange one currency with +# another. +# +# source://money//lib/money/bank/base.rb#4 +module Money::Bank; end + +# Money::Bank::Base is the basic interface for creating a money exchange +# object, also called Bank. +# +# A Bank is responsible for storing exchange rates, take a Money object as +# input and returns the corresponding Money object converted into an other +# currency. +# +# This class exists for aiding in the creating of other classes to exchange +# money between different currencies. When creating a subclass you will +# need to implement the following methods to exchange money between +# currencies: +# +# - #exchange_with(Money) #=> Money +# +# See Money::Bank::VariableExchange for a real example. +# +# Also, you can extend +Money::Bank::VariableExchange+ instead of +# +Money::Bank::Base+ if your bank implementation needs to store rates +# internally. +# +# @abstract Subclass and override +#exchange_with+ to implement a custom +# +Money::Bank+ class. You can also override +#setup+ instead of +# +#initialize+ to setup initial variables, etc. +# +# source://money//lib/money/bank/base.rb#40 +class Money::Bank::Base + # Initializes a new +Money::Bank::Base+ object. An optional block can be + # passed to dictate the rounding method that +#exchange_with+ can use. + # + # @example + # Money::Bank::Base.new #=> # + # Money::Bank::Base.new {|n| + # n.floor + # } #=> #> + # @return [Money::Bank::Base] + # @yield [n] Optional block to use when rounding after exchanging one + # currency for another. + # @yieldparam n [Float] The resulting float after exchanging one currency + # for another. + # @yieldreturn [Integer] + # + # source://money//lib/money/bank/base.rb#70 + def initialize(&block); end + + # Exchanges the given +Money+ object to a new +Money+ object in + # +to_currency+. + # + # @abstract Subclass and override +#exchange_with+ to implement a custom + # +Money::Bank+ class. + # @param from [Money] The +Money+ object to exchange from. + # @param to_currency [Money::Currency, String, Symbol] The currency + # string or object to exchange to. + # @raise NotImplementedError + # @return [Money] + # @yield [n] Optional block to use to round the result after making + # the exchange. + # @yieldparam n [Float] The result after exchanging from one currency to + # the other. + # @yieldreturn [Integer] + # + # source://money//lib/money/bank/base.rb#103 + def exchange_with(from, to_currency, &block); end + + # The rounding method to use when exchanging rates. + # + # @return [Proc] + # + # source://money//lib/money/bank/base.rb#52 + def rounding_method; end + + # Given two currency strings or object, checks whether they're both the + # same currency. Return +true+ if the currencies are the same, +false+ + # otherwise. + # + # @example + # same_currency?("usd", "USD") #=> true + # same_currency?("usd", "EUR") #=> false + # same_currency?("usd", Currency.new("USD")) #=> true + # same_currency?("usd", "USD") #=> true + # @param currency1 [Money::Currency, String, Symbol] The first currency + # to compare. + # @param currency2 [Money::Currency, String, Symbol] The second currency + # to compare. + # @return [Boolean] + # + # source://money//lib/money/bank/base.rb#123 + def same_currency?(currency1, currency2); end + + # Called after initialize. Subclasses can use this method to setup + # variables, etc that they normally would in +#initialize+. + # + # @abstract Subclass and override +#setup+ to implement a custom + # +Money::Bank+ class. + # @return [self] + # + # source://money//lib/money/bank/base.rb#82 + def setup; end + + class << self + # Returns the singleton instance of the Base bank. + # + # @return [Money::Bank::Base] + # + # source://money//lib/money/bank/base.rb#45 + def instance; end + end +end + +# Raised when trying to exchange currencies +# +# source://money//lib/money/bank/single_currency.rb#6 +class Money::Bank::DifferentCurrencyError < ::Money::Bank::Error; end + +# The lowest Money::Bank error class. +# All Money::Bank errors should inherit from it. +# +# source://money//lib/money/bank/base.rb#8 +class Money::Bank::Error < ::StandardError; end + +# Class to ensure client code is operating in a single currency +# by raising if an exchange attempts to happen. +# +# This is useful when an application uses multiple currencies but +# it usually deals with only one currency at a time so any arithmetic +# where exchanges happen are erroneous. Using this as the default bank +# means that that these mistakes don't silently do the wrong thing. +# +# source://money//lib/money/bank/single_currency.rb#15 +class Money::Bank::SingleCurrency < ::Money::Bank::Base + # Raises a DifferentCurrencyError to remove possibility of accidentally + # exchanging currencies + # + # @raise [DifferentCurrencyError] + # + # source://money//lib/money/bank/single_currency.rb#19 + def exchange_with(from, to_currency, &block); end +end + +# Raised when the bank doesn't know about the conversion rate +# for specified currencies. +# +# source://money//lib/money/bank/base.rb#13 +class Money::Bank::UnknownRate < ::Money::Bank::Error; end + +# Thrown when an unknown rate format is requested. +# +# source://money//lib/money/bank/variable_exchange.rb#9 +class Money::Bank::UnknownRateFormat < ::StandardError; end + +# Class for aiding in exchanging money between different currencies. By +# default, the +Money+ class uses an object of this class (accessible +# through +Money#bank+) for performing currency exchanges. +# +# By default, +Money::Bank::VariableExchange+ has no knowledge about +# conversion rates. One must manually specify them with +add_rate+, after +# which one can perform exchanges with +#exchange_with+. +# +# Exchange rates are stored in memory using +Money::RatesStore::Memory+ by default. +# Pass custom rates stores for other types of storage (file, database, etc) +# +# @example +# bank = Money::Bank::VariableExchange.new +# bank.add_rate("USD", "CAD", 1.24515) +# bank.add_rate("CAD", "USD", 0.803115) +# +# c1 = Money.new(100_00, "USD") +# c2 = Money.new(100_00, "CAD") +# +# # Exchange 100 USD to CAD: +# bank.exchange_with(c1, "CAD") #=> # +# +# # Exchange 100 CAD to USD: +# bank.exchange_with(c2, "USD") #=> # +# +# # With custom exchange rates storage +# redis_store = MyCustomRedisStore.new(host: 'localhost:6379') +# bank = Money::Bank::VariableExchange.new(redis_store) +# # Store rates in redis +# bank.add_rate 'USD', 'CAD', 0.98 +# # Get rate from redis +# bank.get_rate 'USD', 'CAD' +# +# source://money//lib/money/bank/variable_exchange.rb#43 +class Money::Bank::VariableExchange < ::Money::Bank::Base + # Initializes a new +Money::Bank::VariableExchange+ object. + # It defaults to using an in-memory, thread safe store instance for + # storing exchange rates. + # + # @param st [RateStore] An exchange rate store, used to persist exchange rate pairs. + # @return [VariableExchange] a new instance of VariableExchange + # @yield [n] Optional block to use when rounding after exchanging one + # currency for another. See +Money::bank::base+ + # + # source://money//lib/money/bank/variable_exchange.rb#59 + def initialize(st = T.unsafe(nil), &block); end + + # Registers a conversion rate and returns it (uses +#set_rate+). + # Delegates to +Money::RatesStore::Memory+ + # + # @example + # bank = Money::Bank::VariableExchange.new + # bank.add_rate("USD", "CAD", 1.24515) + # bank.add_rate("CAD", "USD", 0.803115) + # @param from [Currency, String, Symbol] Currency to exchange from. + # @param to [Currency, String, Symbol] Currency to exchange to. + # @param rate [Numeric] Rate to use when exchanging currencies. + # @return [Numeric] + # + # source://money//lib/money/bank/variable_exchange.rb#158 + def add_rate(from, to, rate); end + + # source://money//lib/money/bank/variable_exchange.rb#127 + def calculate_fractional(from, to_currency); end + + # source://money//lib/money/bank/variable_exchange.rb#134 + def exchange(fractional, rate, &block); end + + # Exchanges the given +Money+ object to a new +Money+ object in + # +to_currency+. + # + # @example + # bank = Money::Bank::VariableExchange.new + # bank.add_rate("USD", "CAD", 1.24515) + # bank.add_rate("CAD", "USD", 0.803115) + # + # c1 = Money.new(100_00, "USD") + # c2 = Money.new(100_00, "CAD") + # + # # Exchange 100 USD to CAD: + # bank.exchange_with(c1, "CAD") #=> # + # + # # Exchange 100 CAD to USD: + # bank.exchange_with(c2, "USD") #=> # + # @param from [Money] The +Money+ object to exchange. + # @param to_currency [Currency, String, Symbol] The currency to exchange to. + # @raise +Money::Bank::UnknownRate+ if the conversion rate is unknown. + # @return [Money] + # @yield [n] Optional block to use when rounding after exchanging one + # currency for another. + # @yieldparam n [Float] The resulting float after exchanging one currency + # for another. + # @yieldreturn [Integer] + # + # source://money//lib/money/bank/variable_exchange.rb#109 + def exchange_with(from, to_currency, &block); end + + # Return the known rates as a string in the format specified. If +file+ + # is given will also write the string out to the file specified. + # Available formats are +:json+, +:ruby+ and +:yaml+. + # + # @example + # bank = Money::Bank::VariableExchange.new + # bank.set_rate("USD", "CAD", 1.24515) + # bank.set_rate("CAD", "USD", 0.803115) + # + # s = bank.export_rates(:json) + # s #=> "{\"USD_TO_CAD\":1.24515,\"CAD_TO_USD\":0.803115}" + # @param format [Symbol] Request format for the resulting string. + # @param file [String] Optional file location to write the rates to. + # @param opts [Hash] Options hash to set special parameters. Backwards compatibility only. + # @raise +Money::Bank::UnknownRateFormat+ if format is unknown. + # @return [String] + # + # source://money//lib/money/bank/variable_exchange.rb#221 + def export_rates(format, file = T.unsafe(nil), opts = T.unsafe(nil)); end + + # Retrieve the rate for the given currencies. + # data access. + # Delegates to +Money::RatesStore::Memory+ + # + # @example + # bank = Money::Bank::VariableExchange.new + # bank.set_rate("USD", "CAD", 1.24515) + # bank.set_rate("CAD", "USD", 0.803115) + # + # bank.get_rate("USD", "CAD") #=> 1.24515 + # bank.get_rate("CAD", "USD") #=> 0.803115 + # @param from [Currency, String, Symbol] Currency to exchange from. + # @param to [Currency, String, Symbol] Currency to exchange to. + # @param opts [Hash] Options hash to set special parameters. Backwards compatibility only. + # @return [Numeric] + # + # source://money//lib/money/bank/variable_exchange.rb#198 + def get_rate(from, to, opts = T.unsafe(nil)); end + + # Loads rates provided in +s+ given the specified format. Available + # formats are +:json+, +:ruby+ and +:yaml+. + # Delegates to +Money::RatesStore::Memory+ + # + # @example + # s = "{\"USD_TO_CAD\":1.24515,\"CAD_TO_USD\":0.803115}" + # bank = Money::Bank::VariableExchange.new + # bank.import_rates(:json, s) + # + # bank.get_rate("USD", "CAD") #=> 1.24515 + # bank.get_rate("CAD", "USD") #=> 0.803115 + # @param format [Symbol] The format of +s+. + # @param s [String] The rates string. + # @param opts [Hash] Options hash to set special parameters. Backwards compatibility only. + # @raise +Money::Bank::UnknownRateFormat+ if format is unknown. + # @return [self] + # + # source://money//lib/money/bank/variable_exchange.rb#261 + def import_rates(format, s, opts = T.unsafe(nil)); end + + # source://money//lib/money/bank/variable_exchange.rb#68 + def marshal_dump; end + + # source://money//lib/money/bank/variable_exchange.rb#72 + def marshal_load(arr); end + + # Returns the value of attribute mutex. + # + # source://money//lib/money/bank/variable_exchange.rb#45 + def mutex; end + + # This should be deprecated. + # + # source://money//lib/money/bank/variable_exchange.rb#236 + def rates; end + + # Set the rate for the given currencies. + # access. + # Delegates to +Money::RatesStore::Memory+ + # + # @example + # bank = Money::Bank::VariableExchange.new + # bank.set_rate("USD", "CAD", 1.24515) + # bank.set_rate("CAD", "USD", 0.803115) + # @param from [Currency, String, Symbol] Currency to exchange from. + # @param to [Currency, String, Symbol] Currency to exchange to. + # @param rate [Numeric] Rate to use when exchanging currencies. + # @param opts [Hash] Options hash to set special parameters. Backwards compatibility only. + # @return [Numeric] + # + # source://money//lib/money/bank/variable_exchange.rb#177 + def set_rate(from, to, rate, opts = T.unsafe(nil)); end + + # source://money//lib/money/bank/variable_exchange.rb#64 + def store; end +end + +# source://money//lib/money/bank/variable_exchange.rb#50 +Money::Bank::VariableExchange::FORMAT_SERIALIZERS = T.let(T.unsafe(nil), Hash) + +# Available formats for importing/exporting rates. +# +# source://money//lib/money/bank/variable_exchange.rb#48 +Money::Bank::VariableExchange::RATE_FORMATS = T.let(T.unsafe(nil), Array) + +# source://money//lib/money/bank/variable_exchange.rb#49 +Money::Bank::VariableExchange::SERIALIZER_SEPARATOR = T.let(T.unsafe(nil), String) + +# source://money//lib/money/money/constructors.rb#2 +module Money::Constructors + # Creates a new Money object of the given value, using the Canadian + # dollar currency. + # + # @example + # n = Money.ca_dollar(100) + # n.cents #=> 100 + # n.currency #=> # + # @param cents [Integer] The cents value. + # @return [Money] + # + # source://money//lib/money/money/constructors.rb#29 + def ca_dollar(cents); end + + # Creates a new Money object of the given value, using the Canadian + # dollar currency. + # + # @example + # n = Money.ca_dollar(100) + # n.cents #=> 100 + # n.currency #=> # + # @param cents [Integer] The cents value. + # @return [Money] + # + # source://money//lib/money/money/constructors.rb#29 + def cad(cents); end + + # Create a new money object with value 0. + # + # @example + # Money.empty #=> # + # @param currency [Currency, String, Symbol] The currency to use. + # @return [Money] + # + # source://money//lib/money/money/constructors.rb#12 + def empty(currency = T.unsafe(nil)); end + + # Creates a new Money object of the given value, using the Euro currency. + # + # @example + # n = Money.euro(100) + # n.cents #=> 100 + # n.currency #=> # + # @param cents [Integer] The cents value. + # @return [Money] + # + # source://money//lib/money/money/constructors.rb#62 + def eur(cents); end + + # Creates a new Money object of the given value, using the Euro currency. + # + # @example + # n = Money.euro(100) + # n.cents #=> 100 + # n.currency #=> # + # @param cents [Integer] The cents value. + # @return [Money] + # + # source://money//lib/money/money/constructors.rb#62 + def euro(cents); end + + # Creates a new Money object of the given value, in British pounds. + # + # @example + # n = Money.pound_sterling(100) + # n.fractional #=> 100 + # n.currency #=> # + # @param pence [Integer] The pence value. + # @return [Money] + # + # source://money//lib/money/money/constructors.rb#78 + def gbp(pence); end + + # Creates a new Money object of the given value, in British pounds. + # + # @example + # n = Money.pound_sterling(100) + # n.fractional #=> 100 + # n.currency #=> # + # @param pence [Integer] The pence value. + # @return [Money] + # + # source://money//lib/money/money/constructors.rb#78 + def pound_sterling(pence); end + + # Creates a new Money object of the given value, using the American dollar + # currency. + # + # @example + # n = Money.us_dollar(100) + # n.cents #=> 100 + # n.currency #=> # + # @param cents [Integer] The cents value. + # @return [Money] + # + # source://money//lib/money/money/constructors.rb#46 + def us_dollar(cents); end + + # Creates a new Money object of the given value, using the American dollar + # currency. + # + # @example + # n = Money.us_dollar(100) + # n.cents #=> 100 + # n.currency #=> # + # @param cents [Integer] The cents value. + # @return [Money] + # + # source://money//lib/money/money/constructors.rb#46 + def usd(cents); end + + # Create a new money object with value 0. + # + # @example + # Money.empty #=> # + # @param currency [Currency, String, Symbol] The currency to use. + # @return [Money] + # + # source://money//lib/money/money/constructors.rb#12 + def zero(currency = T.unsafe(nil)); end +end + +# Represents a specific currency unit. +# +# @see https://en.wikipedia.org/wiki/Currency +# @see http://iso4217.net/ +# +# source://money//lib/money/currency/loader.rb#2 +class Money::Currency + include ::Comparable + extend ::Enumerable + extend ::Money::Currency::Heuristics + + # Create a new +Currency+ object. + # + # @example + # Money::Currency.new(:usd) #=> # + # @param id [String, Symbol, #to_s] Used to look into +table+ and retrieve + # the applicable attributes. + # @return [Money::Currency] + # + # source://money//lib/money/currency.rb#275 + def initialize(id); end + + # Compares +self+ with +other_currency+ against the value of +priority+ + # attribute. + # + # @example + # c1 = Money::Currency.new(:usd) + # c2 = Money::Currency.new(:jpy) + # c1 <=> c2 #=> 1 + # c2 <=> c1 #=> -1 + # c1 <=> c1 #=> 0 + # @param other_currency [Money::Currency] The currency to compare to. + # @return [-1, 0, 1] -1 if less than, 0 is equal to, 1 if greater than + # + # source://money//lib/money/currency.rb#293 + def <=>(other_currency); end + + # Compares +self+ with +other_currency+ and returns +true+ if the are the + # same or if their +id+ attributes match. + # + # @example + # c1 = Money::Currency.new(:usd) + # c2 = Money::Currency.new(:jpy) + # c1 == c1 #=> true + # c1 == c2 #=> false + # @param other_currency [Money::Currency] The currency to compare to. + # @return [Boolean] + # + # source://money//lib/money/currency.rb#316 + def ==(other_currency); end + + # Returns currency symbol or iso code for currencies with no symbol. + # + # @return [String] + # + # source://money//lib/money/currency.rb#400 + def code; end + + # @return [String] The decimal mark, or character used to separate the + # whole unit from the subunit. + # + # source://money//lib/money/currency.rb#258 + def decimal_mark; end + + # Returns the relation between subunit and unit as a base 10 exponent. + # + # Note that MGA and MRU are exceptions and are rounded to 1 + # + # @return [Integer] + # @see https://en.wikipedia.org/wiki/ISO_4217#Active_codes + # + # source://money//lib/money/currency.rb#425 + def decimal_places; end + + # @return [String] The character used to separate thousands grouping of + # the whole unit. + # + # source://money//lib/money/currency.rb#258 + def delimiter; end + + # @return [String] Alternative currency used if symbol is ambiguous + # + # source://money//lib/money/currency.rb#258 + def disambiguate_symbol; end + + def eql?(_arg0); end + + # Returns the relation between subunit and unit as a base 10 exponent. + # + # Note that MGA and MRU are exceptions and are rounded to 1 + # + # @return [Integer] + # @see https://en.wikipedia.org/wiki/ISO_4217#Active_codes + # + # source://money//lib/money/currency.rb#425 + def exponent; end + + # Returns the value of attribute format. + # + # source://money//lib/money/currency.rb#258 + def format; end + + # Returns a Integer hash value based on the +id+ attribute in order to use + # functions like & (intersection), group_by, etc. + # + # @example + # Money::Currency.new(:usd).hash #=> 428936 + # @return [Integer] + # + # source://money//lib/money/currency.rb#337 + def hash; end + + # @return [String] The html entity for the currency symbol + # + # source://money//lib/money/currency.rb#258 + def html_entity; end + + # @return [Symbol] The symbol used to identify the currency, usually THE + # lowercase +iso_code+ attribute. + # + # source://money//lib/money/currency.rb#258 + def id; end + + # Returns a human readable representation. + # + # @example + # Money::Currency.new(:usd) #=> # + # @return [String] + # + # source://money//lib/money/currency.rb#347 + def inspect; end + + # Returns if a code currency is ISO. + # + # @example + # Money::Currency.new(:usd).iso? + # @return [Boolean] + # + # source://money//lib/money/currency.rb#415 + def iso?; end + + # @return [String] The international 3-letter code as defined by the ISO + # 4217 standard. + # + # source://money//lib/money/currency.rb#258 + def iso_code; end + + # @return [String] The international 3-numeric code as defined by the ISO + # 4217 standard. + # + # source://money//lib/money/currency.rb#258 + def iso_numeric; end + + # @return [String] The currency name. + # + # source://money//lib/money/currency.rb#258 + def name; end + + # @return [Integer] A numerical value you can use to sort/group the + # currency list. + # + # source://money//lib/money/currency.rb#258 + def priority; end + + # @return [String] The decimal mark, or character used to separate the + # whole unit from the subunit. + # + # source://money//lib/money/currency.rb#258 + def separator; end + + # @return [Integer] Smallest amount of cash possible (in the subunit of + # this currency) + # + # source://money//lib/money/currency.rb#258 + def smallest_denomination; end + + # @return [String] The name of the fractional monetary unit. + # + # source://money//lib/money/currency.rb#258 + def subunit; end + + # @return [Integer] The proportion between the unit and the subunit + # + # source://money//lib/money/currency.rb#258 + def subunit_to_unit; end + + # @return [String] The currency symbol (UTF-8 encoded). + # + # source://money//lib/money/currency.rb#258 + def symbol; end + + # @return [Boolean] Should the currency symbol precede the amount, or + # should it come after? + # + # source://money//lib/money/currency.rb#258 + def symbol_first; end + + # @return [Boolean] + # + # source://money//lib/money/currency.rb#404 + def symbol_first?; end + + # @return [String] The character used to separate thousands grouping of + # the whole unit. + # + # source://money//lib/money/currency.rb#258 + def thousands_separator; end + + # Conversion to +self+. + # + # @return [self] + # + # source://money//lib/money/currency.rb#393 + def to_currency; end + + # Returns a string representation corresponding to the upcase +id+ + # attribute. + # + # -- + # DEV: id.to_s.upcase corresponds to iso_code but don't use ISO_CODE for consistency. + # + # @example + # Money::Currency.new(:usd).to_s #=> "USD" + # Money::Currency.new(:eur).to_s #=> "EUR" + # @return [String] + # + # source://money//lib/money/currency.rb#362 + def to_s; end + + # Returns a string representation corresponding to the upcase +id+ + # attribute. Useful in cases where only implicit conversions are made. + # + # @example + # Money::Currency.new(:usd).to_str #=> "USD" + # Money::Currency.new(:eur).to_str #=> "EUR" + # @return [String] + # + # source://money//lib/money/currency.rb#374 + def to_str; end + + # Returns a symbol representation corresponding to the upcase +id+ + # attribute. + # + # @example + # Money::Currency.new(:usd).to_sym #=> :USD + # Money::Currency.new(:eur).to_sym #=> :EUR + # @return [Symbol] + # + # source://money//lib/money/currency.rb#386 + def to_sym; end + + private + + # source://money//lib/money/currency.rb#320 + def compare_ids(other_currency); end + + # source://money//lib/money/currency.rb#432 + def initialize_data!; end + + class << self + # source://money//lib/money/currency.rb#46 + def _instances; end + + # List the currencies imported and registered + # + # @example + # Money::Currency.all() + # [#, 'CAD', 'EUR']... + # @return [Array] + # + # source://money//lib/money/currency.rb#133 + def all; end + + # source://money//lib/money/currency.rb#205 + def each; end + + # Lookup a currency with given +id+ an returns a +Currency+ instance on + # success, +nil+ otherwise. + # + # retrieve the applicable attributes. + # + # @example + # Money::Currency.find(:eur) #=> # + # Money::Currency.find(:foo) #=> nil + # @param id [String, Symbol, #to_s] Used to look into +table+ and + # @return [Money::Currency] + # + # source://money//lib/money/currency.rb#61 + def find(id); end + + # Lookup a currency with given +num+ as an ISO 4217 numeric and returns an + # +Currency+ instance on success, +nil+ otherwise. + # + # the right currency id. + # + # @example + # Money::Currency.find_by_iso_numeric(978) #=> # + # Money::Currency.find_by_iso_numeric(51) #=> # + # Money::Currency.find_by_iso_numeric('001') #=> nil + # @param num [#to_s] used to look into +table+ in +iso_numeric+ and find + # @return [Money::Currency] + # + # source://money//lib/money/currency.rb#80 + def find_by_iso_numeric(num); end + + # Inherit a new currency from existing one + # + # @param parent_iso_code [String] the international 3-letter code as defined + # @param curr [Hash] See {register} method for hash structure + # + # source://money//lib/money/currency.rb#181 + def inherit(parent_iso_code, curr); end + + # source://money//lib/money/currency.rb#37 + def new(id); end + + # Register a new currency + # + # @option priority + # @option name + # @option symbol + # @option subunit + # @option subunit_to_unit + # @option separator + # @option delimiter + # @option iso_code + # @option iso_numeric + # @param separator [Hash] a customizable set of options + # @param delimiter [Hash] a customizable set of options + # @param curr [Hash] information about the currency + # @param priority [Hash] a customizable set of options + # @param iso_code [Hash] a customizable set of options + # @param iso_numeric [Hash] a customizable set of options + # @param name [Hash] a customizable set of options + # @param symbol [Hash] a customizable set of options + # @param subunit [Hash] a customizable set of options + # @param subunit_to_unit [Hash] a customizable set of options + # + # source://money//lib/money/currency.rb#170 + def register(curr); end + + # source://money//lib/money/currency.rb#209 + def reset!; end + + # We need a string-based validator before creating an unbounded number of + # symbols. + # http://www.randomhacks.net/articles/2007/01/20/13-ways-of-looking-at-a-ruby-symbol#11 + # https://github.com/RubyMoney/money/issues/132 + # + # @return [Set] + # + # source://money//lib/money/currency.rb#149 + def stringified_keys; end + + # List of known currencies. + # + # == monetary unit + # The standard unit of value of a currency, as the dollar in the United States or the peso in Mexico. + # https://www.answers.com/topic/monetary-unit + # == fractional monetary unit, subunit + # A monetary unit that is valued at a fraction (usually one hundredth) of the basic monetary unit + # https://www.answers.com/topic/fractional-monetary-unit-subunit + # + # See https://en.wikipedia.org/wiki/List_of_circulating_currencies and + # http://search.cpan.org/~tnguyen/Locale-Currency-Format-1.28/Format.pm + # + # source://money//lib/money/currency.rb#123 + def table; end + + # Unregister a currency. + # + # @param curr [Object] A Hash with the key `:iso_code`, or the ISO code + # as a String or Symbol. + # @return [Boolean] true if the currency previously existed, false + # if it didn't. + # + # source://money//lib/money/currency.rb#194 + def unregister(curr); end + + # Wraps the object in a +Currency+ unless it's already a +Currency+ + # object. + # + # object. + # + # @example + # c1 = Money::Currency.new(:usd) + # Money::Currency.wrap(nil) #=> nil + # Money::Currency.wrap(c1) #=> # + # Money::Currency.wrap("usd") #=> # + # @param object [Object] The object to attempt and wrap as a +Currency+ + # @return [Money::Currency] + # + # source://money//lib/money/currency.rb#102 + def wrap(object); end + + private + + # source://money//lib/money/currency.rb#216 + def stringify_keys; end + end +end + +# source://money//lib/money/currency/heuristics.rb#5 +module Money::Currency::Heuristics + # @raise [StandardError] + # + # source://money//lib/money/currency/heuristics.rb#6 + def analyze(str); end +end + +# source://money//lib/money/currency/loader.rb#3 +module Money::Currency::Loader + class << self + # Loads and returns the currencies stored in JSON files in the config directory. + # + # @return [Hash] + # + # source://money//lib/money/currency/loader.rb#10 + def load_currencies; end + + private + + # source://money//lib/money/currency/loader.rb#18 + def parse_currency_file(filename); end + end +end + +# source://money//lib/money/currency/loader.rb#4 +Money::Currency::Loader::DATA_PATH = T.let(T.unsafe(nil), String) + +# Thrown when a Currency has been registered without all the attributes +# which are required for the current action. +# +# source://money//lib/money/currency.rb#24 +class Money::Currency::MissingAttributeError < ::StandardError + # @return [MissingAttributeError] a new instance of MissingAttributeError + # + # source://money//lib/money/currency.rb#25 + def initialize(method, currency, attribute); end +end + +# Thrown when an unknown currency is requested. +# +# source://money//lib/money/currency.rb#34 +class Money::Currency::UnknownCurrency < ::ArgumentError; end + +# source://money//lib/money/money/formatter.rb#5 +class Money::Formatter + # Creates a formatted price string according to several rules. + # + # with the symbol (if present) and `%n` will be replaced with the number. + # + # Note that the default rules can be defined through {Money.default_formatting_rules} hash. + # + # @example + # Money.new(10000, "USD").format(format: '%u %n') #=> "$ 100.00" + # Money.new(10000, "USD").format(format: '%u%n') #=> "$100.00" + # @example + # Money.us_dollar(100.1).format #=> "$1.001" + # Money.us_dollar(100.1).format(rounded_infinite_precision: true) #=> "$1" + # Money.us_dollar(100.9).format(rounded_infinite_precision: true) #=> "$1.01" + # @example + # Money.ca_dollar(100).format(no_cents: true) #=> "$1" + # Money.ca_dollar(599).format(no_cents: true) #=> "$5" + # @example + # Money.ca_dollar(10000).format(no_cents_if_whole: true) #=> "$100" + # Money.ca_dollar(10034).format(no_cents_if_whole: true) #=> "$100.34" + # @example + # Money.new(100, "USD") #=> "$1.00" + # Money.new(100, "GBP") #=> "£1.00" + # Money.new(100, "EUR") #=> "€1.00" + # + # # Same thing. + # Money.new(100, "USD").format(symbol: true) #=> "$1.00" + # Money.new(100, "GBP").format(symbol: true) #=> "£1.00" + # Money.new(100, "EUR").format(symbol: true) #=> "€1.00" + # + # # You can specify a false expression or an empty string to disable + # # prepending a money symbol.§ + # Money.new(100, "USD").format(symbol: false) #=> "1.00" + # Money.new(100, "GBP").format(symbol: nil) #=> "1.00" + # Money.new(100, "EUR").format(symbol: "") #=> "1.00" + # + # # If the symbol for the given currency isn't known, then it will default + # # to "¤" as symbol. + # Money.new(100, "AWG").format(symbol: true) #=> "¤1.00" + # + # # You can specify a string as value to enforce using a particular symbol. + # Money.new(100, "AWG").format(symbol: "ƒ") #=> "ƒ1.00" + # + # # You can specify a indian currency format + # Money.new(10000000, "INR").format(south_asian_number_formatting: true) #=> "1,00,000.00" + # Money.new(10000000).format(south_asian_number_formatting: true) #=> "$1,00,000.00" + # @example + # # Default is to not insert a space. + # Money.new(100, "USD").format #=> "$1.00" + # + # # Same thing. + # Money.new(100, "USD").format(symbol_before_without_space: true) #=> "$1.00" + # + # # If set to false, will insert a space. + # Money.new(100, "USD").format(symbol_before_without_space: false) #=> "$ 1.00" + # @example + # # Default is to insert a space. + # Money.new(100, "USD").format(symbol_position: :after) #=> "1.00 $" + # + # # If set to true, will not insert a space. + # Money.new(100, "USD").format(symbol_position: :after, symbol_after_without_space: true) #=> "1.00$" + # @example + # # If a string is specified, it's value is used. + # Money.new(100, "USD").format(decimal_mark: ",") #=> "$1,00" + # + # # If the decimal_mark for a given currency isn't known, then it will default + # # to "." as decimal_mark. + # Money.new(100, "FOO").format #=> "$1.00" + # @example + # # If false is specified, no thousands_separator is used. + # Money.new(100000, "USD").format(thousands_separator: false) #=> "1000.00" + # Money.new(100000, "USD").format(thousands_separator: nil) #=> "1000.00" + # Money.new(100000, "USD").format(thousands_separator: "") #=> "1000.00" + # + # # If a string is specified, it's value is used. + # Money.new(100000, "USD").format(thousands_separator: ".") #=> "$1.000.00" + # + # # If the thousands_separator for a given currency isn't known, then it will + # # default to "," as thousands_separator. + # Money.new(100000, "FOO").format #=> "$1,000.00" + # @example + # Money.ca_dollar(570).format(html: true, with_currency: true) + # #=> "$5.70 CAD" + # @example + # Money.ca_dollar(570).format(html_wrap: true, with_currency: true) + # #=> "$5.70 CAD" + # @example + # # You can specify to display the sign before the symbol for negative numbers + # Money.new(-100, "GBP").format(sign_before_symbol: true) #=> "-£1.00" + # Money.new(-100, "GBP").format(sign_before_symbol: false) #=> "£-1.00" + # Money.new(-100, "GBP").format #=> "£-1.00" + # @example + # # You can specify to display the sign with positive numbers + # Money.new(100, "GBP").format(sign_positive: true, sign_before_symbol: true) #=> "+£1.00" + # Money.new(100, "GBP").format(sign_positive: true, sign_before_symbol: false) #=> "£+1.00" + # Money.new(100, "GBP").format(sign_positive: false, sign_before_symbol: true) #=> "£1.00" + # Money.new(100, "GBP").format(sign_positive: false, sign_before_symbol: false) #=> "£1.00" + # Money.new(100, "GBP").format #=> "£+1.00" + # @example + # Money.us_dollar(0).format(display_free: true) #=> "free" + # Money.us_dollar(0).format(display_free: "gratis") #=> "gratis" + # Money.us_dollar(0).format #=> "$0.00" + # @example + # Money.new(10000, "USD").format(disambiguate: false) #=> "$100.00" + # Money.new(10000, "CAD").format(disambiguate: false) #=> "$100.00" + # Money.new(10000, "USD").format(disambiguate: true) #=> "$100.00" + # Money.new(10000, "CAD").format(disambiguate: true) #=> "C$100.00" + # @example + # Money.new(10000, "USD").format(disambiguate: false) + # #=> "$100.00 + # @example + # Money.new(10000, "USD").format(symbol_position: :before) #=> "$100.00" + # Money.new(10000, "USD").format(symbol_position: :after) #=> "100.00 $" + # @example + # # With the following entry in the translation files: + # # en: + # # number: + # # currency: + # # symbol: + # # CAD: "CAD$" + # Money.new(10000, "CAD").format(translate: true) #=> "CAD$100.00" + # @example + # Money.new(89000, :btc).format(drop_trailing_zeros: true) #=> B⃦0.00089 + # Money.new(110, :usd).format(drop_trailing_zeros: true) #=> $1.1 + # @example + # Money.new(89000, :btc).format(delimiter_pattern: /(\d)(?=\d)/) #=> B⃦8,9,0.00 + # @example + # Money.ca_dollar(100).format #=> "$1.00" + # Money.ca_dollar(100).format(with_currency: true) #=> "$1.00 CAD" + # Money.us_dollar(85).format(with_currency: true) #=> "$0.85 USD" + # @option rules + # @option rules + # @option rules + # @option rules + # @option rules + # @option rules + # @option rules + # @option rules + # @option rules + # @option rules + # @option rules + # @option rules + # @option rules + # @option rules + # @option rules + # @option rules + # @option rules + # @option rules + # @option rules + # @option rules + # @option rules + # @param rules [Hash] The options used to format the string. + # @return [String] + # @see Money.default_formatting_rules Money.default_formatting_rules for more information. + # + # source://money//lib/money/money/formatter.rb#230 + def initialize(money, *rules); end + + # source://money//lib/money/money/formatter.rb#247 + def decimal_mark; end + + # source://money//lib/money/money/formatter.rb#243 + def delimiter; end + + # source://money//lib/money/money/formatter.rb#247 + def separator; end + + # source://money//lib/money/money/formatter.rb#243 + def thousands_separator; end + + # source://money//lib/money/money/formatter.rb#236 + def to_s; end + + private + + # source://money//lib/money/money/formatter.rb#310 + def append_currency_symbol(formatted_number); end + + # source://money//lib/money/money/formatter.rb#281 + def append_sign(formatted_number); end + + # Returns the value of attribute currency. + # + # source://money//lib/money/money/formatter.rb#256 + def currency; end + + # source://money//lib/money/money/formatter.rb#344 + def extract_whole_and_decimal_parts; end + + # source://money//lib/money/money/formatter.rb#357 + def format_decimal_part(value); end + + # source://money//lib/money/money/formatter.rb#258 + def format_number; end + + # source://money//lib/money/money/formatter.rb#337 + def format_whole_part(value); end + + # source://money//lib/money/money/formatter.rb#333 + def free_text; end + + # source://money//lib/money/money/formatter.rb#329 + def html_wrap(string, class_name); end + + # source://money//lib/money/money/formatter.rb#371 + def lookup(key); end + + # Returns the value of attribute money. + # + # source://money//lib/money/money/formatter.rb#256 + def money; end + + # Returns the value of attribute rules. + # + # source://money//lib/money/money/formatter.rb#256 + def rules; end + + # @return [Boolean] + # + # source://money//lib/money/money/formatter.rb#325 + def show_free_text?; end + + # source://money//lib/money/money/formatter.rb#377 + def symbol_value_from(rules); end +end + +# source://money//lib/money/money/formatter.rb#6 +Money::Formatter::DEFAULTS = T.let(T.unsafe(nil), Hash) + +# source://money//lib/money/money/formatting_rules.rb#4 +class Money::FormattingRules + # @return [FormattingRules] a new instance of FormattingRules + # + # source://money//lib/money/money/formatting_rules.rb#5 + def initialize(currency, *raw_rules); end + + # source://money//lib/money/money/formatting_rules.rb#20 + def [](key); end + + # @return [Boolean] + # + # source://money//lib/money/money/formatting_rules.rb#24 + def has_key?(key); end + + private + + # Returns the value of attribute currency. + # + # source://money//lib/money/money/formatting_rules.rb#30 + def currency; end + + # source://money//lib/money/money/formatting_rules.rb#61 + def default_formatting_rules; end + + # source://money//lib/money/money/formatting_rules.rb#94 + def delimiter_pattern_rule(rules); end + + # source://money//lib/money/money/formatting_rules.rb#82 + def determine_format_from_formatting_rules(rules); end + + # source://money//lib/money/money/formatting_rules.rb#74 + def localize_formatting_rules(rules); end + + # Cleans up formatting rules. + # + # @param rules [Hash] + # @return [Hash] + # + # source://money//lib/money/money/formatting_rules.rb#37 + def normalize_formatting_rules(rules); end + + # source://money//lib/money/money/formatting_rules.rb#103 + def symbol_position_from(rules); end + + # source://money//lib/money/money/formatting_rules.rb#65 + def translate_formatting_rules(rules); end + + # source://money//lib/money/money/formatting_rules.rb#117 + def warn_about_deprecated_rules(rules); end +end + +# source://money//lib/money/locale_backend/errors.rb#2 +module Money::LocaleBackend + class << self + # @raise [Unknown] + # + # source://money//lib/money/money/locale_backend.rb#16 + def find(name); end + end +end + +# source://money//lib/money/money/locale_backend.rb#10 +Money::LocaleBackend::BACKENDS = T.let(T.unsafe(nil), Hash) + +# source://money//lib/money/locale_backend/base.rb#5 +class Money::LocaleBackend::Base; end + +# source://money//lib/money/locale_backend/currency.rb#5 +class Money::LocaleBackend::Currency < ::Money::LocaleBackend::Base + # source://money//lib/money/locale_backend/currency.rb#6 + def lookup(key, currency); end +end + +# source://money//lib/money/locale_backend/i18n.rb#5 +class Money::LocaleBackend::I18n < ::Money::LocaleBackend::Base + # @raise [NotSupported] + # @return [I18n] a new instance of I18n + # + # source://money//lib/money/locale_backend/i18n.rb#12 + def initialize; end + + # source://money//lib/money/locale_backend/i18n.rb#16 + def lookup(key, _); end +end + +# source://money//lib/money/locale_backend/i18n.rb#6 +Money::LocaleBackend::I18n::KEY_MAP = T.let(T.unsafe(nil), Hash) + +# source://money//lib/money/locale_backend/legacy.rb#6 +class Money::LocaleBackend::Legacy < ::Money::LocaleBackend::Base + # @raise [NotSupported] + # @return [Legacy] a new instance of Legacy + # + # source://money//lib/money/locale_backend/legacy.rb#7 + def initialize; end + + # source://money//lib/money/locale_backend/legacy.rb#11 + def lookup(key, currency); end + + private + + # source://money//lib/money/locale_backend/legacy.rb#23 + def i18n_backend; end +end + +# source://money//lib/money/locale_backend/errors.rb#3 +class Money::LocaleBackend::NotSupported < ::StandardError; end + +# source://money//lib/money/locale_backend/errors.rb#4 +class Money::LocaleBackend::Unknown < ::ArgumentError; end + +# source://money//lib/money/rates_store/memory.rb#4 +module Money::RatesStore; end + +# Class for thread-safe storage of exchange rate pairs. +# Used by instances of +Money::Bank::VariableExchange+. +# +# @example +# store = Money::RatesStore::Memory.new +# store.add_rate 'USD', 'CAD', 0.98 +# store.get_rate 'USD', 'CAD' # => 0.98 +# # iterates rates +# store.each_rate {|iso_from, iso_to, rate| puts "#{from} -> #{to}: #{rate}" } +# +# source://money//lib/money/rates_store/memory.rb#15 +class Money::RatesStore::Memory + # Initializes a new +Money::RatesStore::Memory+ object. + # + # @option opts + # @param opts [Hash] Optional store options. + # @param rates [Hash] Optional initial exchange rate data. + # @return [Memory] a new instance of Memory + # + # source://money//lib/money/rates_store/memory.rb#23 + def initialize(opts = T.unsafe(nil), rates = T.unsafe(nil)); end + + # Registers a conversion rate and returns it. Uses +Mutex+ to synchronize data access. + # + # @example + # store = Money::RatesStore::Memory.new + # store.add_rate("USD", "CAD", 1.24515) + # store.add_rate("CAD", "USD", 0.803115) + # @param currency_iso_from [String] Currency to exchange from. + # @param currency_iso_to [String] Currency to exchange to. + # @param rate [Numeric] Rate to use when exchanging currencies. + # @return [Numeric] + # + # source://money//lib/money/rates_store/memory.rb#41 + def add_rate(currency_iso_from, currency_iso_to, rate); end + + # Iterate over rate tuples (iso_from, iso_to, rate) + # + # @example + # store.each_rate do |iso_from, iso_to, rate| + # puts [iso_from, iso_to, rate].join + # end + # @return [Enumerator] + # @yieldparam iso_from [String] Currency ISO string. + # @yieldparam iso_to [String] Currency ISO string. + # @yieldparam rate [Numeric] Exchange rate. + # + # source://money//lib/money/rates_store/memory.rb#91 + def each_rate(&block); end + + # Retrieve the rate for the given currencies. Uses +Mutex+ to synchronize data access. + # Delegates to +Money::RatesStore::Memory+ + # + # @example + # store = Money::RatesStore::Memory.new + # store.add_rate("USD", "CAD", 1.24515) + # + # store.get_rate("USD", "CAD") #=> 1.24515 + # @param currency_iso_from [String] Currency to exchange from. + # @param currency_iso_to [String] Currency to exchange to. + # @return [Numeric] + # + # source://money//lib/money/rates_store/memory.rb#60 + def get_rate(currency_iso_from, currency_iso_to); end + + # source://money//lib/money/rates_store/memory.rb#66 + def marshal_dump; end + + # Wraps block execution in a thread-safe transaction + # + # source://money//lib/money/rates_store/memory.rb#73 + def transaction(&block); end + + private + + # Returns the value of attribute guard. + # + # source://money//lib/money/rates_store/memory.rb#104 + def guard; end + + # Returns the value of attribute options. + # + # source://money//lib/money/rates_store/memory.rb#104 + def options; end + + # Return the rate hashkey for the given currencies. + # + # @example + # rate_key_for("USD", "CAD") #=> "USD_TO_CAD" + # @param currency_iso_from [String] The currency to exchange from. + # @param currency_iso_to [String] The currency to exchange to. + # @return [String] + # + # source://money//lib/money/rates_store/memory.rb#115 + def rate_key_for(currency_iso_from, currency_iso_to); end + + # Returns the value of attribute rates. + # + # source://money//lib/money/rates_store/memory.rb#104 + def rates; end +end + +# source://money//lib/money/rates_store/memory.rb#16 +Money::RatesStore::Memory::INDEX_KEY_SEPARATOR = T.let(T.unsafe(nil), String) + +# Raised when smallest denomination of a currency is not defined +# +# source://money//lib/money/money.rb#25 +class Money::UndefinedSmallestDenomination < ::StandardError; end diff --git a/sorbet/rbi/gems/netrc@0.11.0.rbi b/sorbet/rbi/gems/netrc@0.11.0.rbi new file mode 100644 index 0000000..062a557 --- /dev/null +++ b/sorbet/rbi/gems/netrc@0.11.0.rbi @@ -0,0 +1,158 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `netrc` gem. +# Please instead update this file by running `bin/tapioca gem netrc`. + +# source://netrc//lib/netrc.rb#3 +class Netrc + # @return [Netrc] a new instance of Netrc + # + # source://netrc//lib/netrc.rb#166 + def initialize(path, data); end + + # source://netrc//lib/netrc.rb#180 + def [](k); end + + # source://netrc//lib/netrc.rb#188 + def []=(k, info); end + + # source://netrc//lib/netrc.rb#200 + def delete(key); end + + # source://netrc//lib/netrc.rb#211 + def each(&block); end + + # source://netrc//lib/netrc.rb#196 + def length; end + + # source://netrc//lib/netrc.rb#215 + def new_item(m, l, p); end + + # Returns the value of attribute new_item_prefix. + # + # source://netrc//lib/netrc.rb#178 + def new_item_prefix; end + + # Sets the attribute new_item_prefix + # + # @param value the value to set the attribute new_item_prefix to. + # + # source://netrc//lib/netrc.rb#178 + def new_item_prefix=(_arg0); end + + # source://netrc//lib/netrc.rb#219 + def save; end + + # source://netrc//lib/netrc.rb#233 + def unparse; end + + class << self + # source://netrc//lib/netrc.rb#42 + def check_permissions(path); end + + # source://netrc//lib/netrc.rb#33 + def config; end + + # @yield [self.config] + # + # source://netrc//lib/netrc.rb#37 + def configure; end + + # source://netrc//lib/netrc.rb#10 + def default_path; end + + # source://netrc//lib/netrc.rb#14 + def home_path; end + + # source://netrc//lib/netrc.rb#85 + def lex(lines); end + + # source://netrc//lib/netrc.rb#29 + def netrc_filename; end + + # Returns two values, a header and a list of items. + # Each item is a tuple, containing some or all of: + # - machine keyword (including trailing whitespace+comments) + # - machine name + # - login keyword (including surrounding whitespace+comments) + # - login + # - password keyword (including surrounding whitespace+comments) + # - password + # - trailing chars + # This lets us change individual fields, then write out the file + # with all its original formatting. + # + # source://netrc//lib/netrc.rb#129 + def parse(ts); end + + # Reads path and parses it as a .netrc file. If path doesn't + # exist, returns an empty object. Decrypt paths ending in .gpg. + # + # source://netrc//lib/netrc.rb#51 + def read(path = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://netrc//lib/netrc.rb#112 + def skip?(s); end + end +end + +# source://netrc//lib/netrc.rb#8 +Netrc::CYGWIN = T.let(T.unsafe(nil), T.untyped) + +# source://netrc//lib/netrc.rb#244 +class Netrc::Entry < ::Struct + # Returns the value of attribute login + # + # @return [Object] the current value of login + def login; end + + # Sets the attribute login + # + # @param value [Object] the value to set the attribute login to. + # @return [Object] the newly set value + def login=(_); end + + # Returns the value of attribute password + # + # @return [Object] the current value of password + def password; end + + # Sets the attribute password + # + # @param value [Object] the value to set the attribute password to. + # @return [Object] the newly set value + def password=(_); end + + def to_ary; end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://netrc//lib/netrc.rb#250 +class Netrc::Error < ::StandardError; end + +# source://netrc//lib/netrc.rb#68 +class Netrc::TokenArray < ::Array + # source://netrc//lib/netrc.rb#76 + def readto; end + + # source://netrc//lib/netrc.rb#69 + def take; end +end + +# source://netrc//lib/netrc.rb#4 +Netrc::VERSION = T.let(T.unsafe(nil), String) + +# see http://stackoverflow.com/questions/4871309/what-is-the-correct-way-to-detect-if-ruby-is-running-on-windows +# +# source://netrc//lib/netrc.rb#7 +Netrc::WINDOWS = T.let(T.unsafe(nil), T.untyped) diff --git a/sorbet/rbi/gems/parallel@1.23.0.rbi b/sorbet/rbi/gems/parallel@1.23.0.rbi new file mode 100644 index 0000000..c8b319a --- /dev/null +++ b/sorbet/rbi/gems/parallel@1.23.0.rbi @@ -0,0 +1,273 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `parallel` gem. +# Please instead update this file by running `bin/tapioca gem parallel`. + +# source://parallel//lib/parallel/version.rb#2 +module Parallel + class << self + # @return [Boolean] + # + # source://parallel//lib/parallel.rb#243 + def all?(*args, &block); end + + # @return [Boolean] + # + # source://parallel//lib/parallel.rb#238 + def any?(*args, &block); end + + # source://parallel//lib/parallel.rb#234 + def each(array, options = T.unsafe(nil), &block); end + + # source://parallel//lib/parallel.rb#248 + def each_with_index(array, options = T.unsafe(nil), &block); end + + # source://parallel//lib/parallel.rb#307 + def filter_map(*args, &block); end + + # source://parallel//lib/parallel.rb#303 + def flat_map(*args, &block); end + + # source://parallel//lib/parallel.rb#228 + def in_processes(options = T.unsafe(nil), &block); end + + # source://parallel//lib/parallel.rb#212 + def in_threads(options = T.unsafe(nil)); end + + # source://parallel//lib/parallel.rb#252 + def map(source, options = T.unsafe(nil), &block); end + + # source://parallel//lib/parallel.rb#299 + def map_with_index(array, options = T.unsafe(nil), &block); end + + # Number of physical processor cores on the current system. + # + # source://parallel//lib/parallel.rb#312 + def physical_processor_count; end + + # Number of processors seen by the OS, used for process scheduling + # + # source://parallel//lib/parallel.rb#345 + def processor_count; end + + # source://parallel//lib/parallel.rb#350 + def worker_number; end + + # TODO: this does not work when doing threads in forks, so should remove and yield the number instead if needed + # + # source://parallel//lib/parallel.rb#355 + def worker_number=(worker_num); end + + private + + # source://parallel//lib/parallel.rb#361 + def add_progress_bar!(job_factory, options); end + + # source://parallel//lib/parallel.rb#624 + def call_with_index(item, index, options, &block); end + + # source://parallel//lib/parallel.rb#556 + def create_workers(job_factory, options, &block); end + + # options is either a Integer or a Hash with :count + # + # source://parallel//lib/parallel.rb#614 + def extract_count_from_options(options); end + + # source://parallel//lib/parallel.rb#642 + def instrument_finish(item, index, result, options); end + + # source://parallel//lib/parallel.rb#647 + def instrument_start(item, index, options); end + + # source://parallel//lib/parallel.rb#590 + def process_incoming_jobs(read, write, job_factory, options, &block); end + + # source://parallel//lib/parallel.rb#544 + def replace_worker(job_factory, workers, index, options, blk); end + + # source://parallel//lib/parallel.rb#635 + def with_instrumentation(item, index, options); end + + # source://parallel//lib/parallel.rb#386 + def work_direct(job_factory, options, &block); end + + # source://parallel//lib/parallel.rb#496 + def work_in_processes(job_factory, options, &blk); end + + # source://parallel//lib/parallel.rb#430 + def work_in_ractors(job_factory, options); end + + # source://parallel//lib/parallel.rb#405 + def work_in_threads(job_factory, options, &block); end + + # source://parallel//lib/parallel.rb#564 + def worker(job_factory, options, &block); end + end +end + +# source://parallel//lib/parallel.rb#11 +class Parallel::Break < ::StandardError + # @return [Break] a new instance of Break + # + # source://parallel//lib/parallel.rb#14 + def initialize(value = T.unsafe(nil)); end + + # Returns the value of attribute value. + # + # source://parallel//lib/parallel.rb#12 + def value; end +end + +# source://parallel//lib/parallel.rb#8 +class Parallel::DeadWorker < ::StandardError; end + +# source://parallel//lib/parallel.rb#32 +class Parallel::ExceptionWrapper + # @return [ExceptionWrapper] a new instance of ExceptionWrapper + # + # source://parallel//lib/parallel.rb#35 + def initialize(exception); end + + # Returns the value of attribute exception. + # + # source://parallel//lib/parallel.rb#33 + def exception; end +end + +# source://parallel//lib/parallel.rb#98 +class Parallel::JobFactory + # @return [JobFactory] a new instance of JobFactory + # + # source://parallel//lib/parallel.rb#99 + def initialize(source, mutex); end + + # source://parallel//lib/parallel.rb#107 + def next; end + + # generate item that is sent to workers + # just index is faster + less likely to blow up with unserializable errors + # + # source://parallel//lib/parallel.rb#136 + def pack(item, index); end + + # source://parallel//lib/parallel.rb#126 + def size; end + + # unpack item that is sent to workers + # + # source://parallel//lib/parallel.rb#141 + def unpack(data); end + + private + + # @return [Boolean] + # + # source://parallel//lib/parallel.rb#147 + def producer?; end + + # source://parallel//lib/parallel.rb#151 + def queue_wrapper(array); end +end + +# source://parallel//lib/parallel.rb#20 +class Parallel::Kill < ::Parallel::Break; end + +# source://parallel//lib/parallel.rb#6 +Parallel::Stop = T.let(T.unsafe(nil), Object) + +# source://parallel//lib/parallel.rb#23 +class Parallel::UndumpableException < ::StandardError + # @return [UndumpableException] a new instance of UndumpableException + # + # source://parallel//lib/parallel.rb#26 + def initialize(original); end + + # Returns the value of attribute backtrace. + # + # source://parallel//lib/parallel.rb#24 + def backtrace; end +end + +# source://parallel//lib/parallel.rb#156 +class Parallel::UserInterruptHandler + class << self + # source://parallel//lib/parallel.rb#181 + def kill(thing); end + + # kill all these pids or threads if user presses Ctrl+c + # + # source://parallel//lib/parallel.rb#161 + def kill_on_ctrl_c(pids, options); end + + private + + # source://parallel//lib/parallel.rb#205 + def restore_interrupt(old, signal); end + + # source://parallel//lib/parallel.rb#190 + def trap_interrupt(signal); end + end +end + +# source://parallel//lib/parallel.rb#157 +Parallel::UserInterruptHandler::INTERRUPT_SIGNAL = T.let(T.unsafe(nil), Symbol) + +# source://parallel//lib/parallel/version.rb#3 +Parallel::VERSION = T.let(T.unsafe(nil), String) + +# source://parallel//lib/parallel/version.rb#3 +Parallel::Version = T.let(T.unsafe(nil), String) + +# source://parallel//lib/parallel.rb#51 +class Parallel::Worker + # @return [Worker] a new instance of Worker + # + # source://parallel//lib/parallel.rb#55 + def initialize(read, write, pid); end + + # might be passed to started_processes and simultaneously closed by another thread + # when running in isolation mode, so we have to check if it is closed before closing + # + # source://parallel//lib/parallel.rb#68 + def close_pipes; end + + # Returns the value of attribute pid. + # + # source://parallel//lib/parallel.rb#52 + def pid; end + + # Returns the value of attribute read. + # + # source://parallel//lib/parallel.rb#52 + def read; end + + # source://parallel//lib/parallel.rb#61 + def stop; end + + # Returns the value of attribute thread. + # + # source://parallel//lib/parallel.rb#53 + def thread; end + + # Sets the attribute thread + # + # @param value the value to set the attribute thread to. + # + # source://parallel//lib/parallel.rb#53 + def thread=(_arg0); end + + # source://parallel//lib/parallel.rb#73 + def work(data); end + + # Returns the value of attribute write. + # + # source://parallel//lib/parallel.rb#52 + def write; end + + private + + # source://parallel//lib/parallel.rb#91 + def wait; end +end diff --git a/sorbet/rbi/gems/parser@3.2.2.3.rbi b/sorbet/rbi/gems/parser@3.2.2.3.rbi new file mode 100644 index 0000000..79fb0cf --- /dev/null +++ b/sorbet/rbi/gems/parser@3.2.2.3.rbi @@ -0,0 +1,5451 @@ +# 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; end + +# @api public +# +# source://parser//lib/parser.rb#24 +module Parser::AST; end + +# {Parser::AST::Node} contains information about a single AST node and its +# child nodes. It extends the basic [AST::Node](https://www.rubydoc.info/gems/ast/AST/Node) +# class provided by gem [ast](https://www.rubydoc.info/gems/ast). +# +# @api public +# +# source://parser//lib/parser/ast/node.rb#17 +class Parser::AST::Node < ::AST::Node + # Assigns various properties to this AST node. Currently only the + # location can be set. + # + # @api public + # @option properties + # @param properties [Hash] + # + # source://parser//lib/parser/ast/node.rb#30 + def assign_properties(properties); end + + # Source map for this Node. + # + # @api public + # @return [Parser::Source::Map] + # + # source://parser//lib/parser/ast/node.rb#18 + def loc; end + + # Source map for this Node. + # + # @api public + # @return [Parser::Source::Map] + # + # source://parser//lib/parser/ast/node.rb#18 + def location; end +end + +# @api public +# +# source://parser//lib/parser/ast/processor.rb#9 +class Parser::AST::Processor < ::AST::Processor + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_alias(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_and(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_and_asgn(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#116 + def on_arg(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_arg_expr(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_args(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#103 + def on_argument(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_array(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_array_pattern(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_array_pattern_with_tail(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#32 + def on_back_ref(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_begin(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_block(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_block_pass(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#116 + def on_blockarg(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_blockarg_expr(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_break(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_case(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_case_match(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#87 + def on_casgn(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_class(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#79 + def on_const(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_const_pattern(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#179 + def on_csend(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#32 + def on_cvar(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#56 + def on_cvasgn(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#158 + def on_def(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_defined?(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#167 + def on_defs(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_dstr(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_dsym(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_eflipflop(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#286 + def on_empty_else(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_ensure(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_erange(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_find_pattern(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_for(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#116 + def on_forward_arg(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_forwarded_kwrestarg(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_forwarded_restarg(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#32 + def on_gvar(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#56 + def on_gvasgn(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_hash(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_hash_pattern(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_if(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_if_guard(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_iflipflop(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_in_match(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_in_pattern(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_index(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_indexasgn(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_irange(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#32 + def on_ivar(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#56 + def on_ivasgn(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#116 + def on_kwarg(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_kwargs(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_kwbegin(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#116 + def on_kwoptarg(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#116 + def on_kwrestarg(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_kwsplat(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_lambda(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#32 + def on_lvar(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#56 + def on_lvasgn(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_masgn(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_match_alt(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_match_as(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_match_current_line(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_match_pattern(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_match_pattern_p(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_match_rest(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#32 + def on_match_var(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_match_with_lvasgn(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_mlhs(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_module(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_next(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_not(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#32 + def on_nth_ref(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#196 + def on_numblock(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#68 + def on_op_asgn(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#116 + def on_optarg(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_or(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_or_asgn(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_pair(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_pin(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_postexe(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_preexe(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#130 + def on_procarg0(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_redo(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_regexp(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_resbody(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_rescue(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#116 + def on_restarg(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_restarg_expr(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_retry(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_return(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_sclass(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#179 + def on_send(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#116 + def on_shadowarg(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_splat(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_super(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_undef(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_unless_guard(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_until(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_until_post(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#27 + def on_var(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#43 + def on_vasgn(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_when(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_while(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_while_post(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_xstr(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_yield(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#279 + def process_argument_node(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def process_regular_node(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#271 + def process_var_asgn_node(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#263 + def process_variable_node(node); end +end + +# Base class for version-specific parsers. +# +# @api public +# +# source://parser//lib/parser/base.rb#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#77 +module Parser::Builders; end + +# source://parser//lib/parser/builders/default.rb#8 +class Parser::Builders::Default + # source://parser//lib/parser/builders/default.rb#243 + def initialize; end + + # source://parser//lib/parser/builders/default.rb#690 + def __ENCODING__(__ENCODING__t); end + + # source://parser//lib/parser/builders/default.rb#348 + def __FILE__(__FILE__t); end + + # source://parser//lib/parser/builders/default.rb#312 + def __LINE__(__LINE__t); end + + # source://parser//lib/parser/builders/default.rb#616 + def accessible(node); end + + # source://parser//lib/parser/builders/default.rb#865 + def alias(alias_t, to, from); end + + # source://parser//lib/parser/builders/default.rb#904 + def arg(name_t); end + + # source://parser//lib/parser/builders/default.rb#994 + def arg_expr(expr); end + + # source://parser//lib/parser/builders/default.rb#874 + def args(begin_t, args, end_t, check_args = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#440 + def array(begin_t, elements, end_t); end + + # source://parser//lib/parser/builders/default.rb#1577 + def array_pattern(lbrack_t, elements, rbrack_t); end + + # source://parser//lib/parser/builders/default.rb#754 + def assign(lhs, eql_t, rhs); end + + # source://parser//lib/parser/builders/default.rb#699 + def assignable(node); end + + # source://parser//lib/parser/builders/default.rb#540 + def associate(begin_t, pairs, end_t); end + + # source://parser//lib/parser/builders/default.rb#1158 + def attr_asgn(receiver, dot_t, selector_t); end + + # source://parser//lib/parser/builders/default.rb#606 + def back_ref(token); end + + # source://parser//lib/parser/builders/default.rb#1422 + def begin(begin_t, body, end_t); end + + # source://parser//lib/parser/builders/default.rb#1364 + def begin_body(compound_stmt, rescue_bodies = T.unsafe(nil), else_t = T.unsafe(nil), else_ = T.unsafe(nil), ensure_t = T.unsafe(nil), ensure_ = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#1440 + def begin_keyword(begin_t, body, end_t); end + + # source://parser//lib/parser/builders/default.rb#1192 + def binary_op(receiver, operator_t, arg); end + + # source://parser//lib/parser/builders/default.rb#1109 + def block(method_call, begin_t, args, body, end_t); end + + # source://parser//lib/parser/builders/default.rb#1144 + def block_pass(amper_t, arg); end + + # source://parser//lib/parser/builders/default.rb#969 + def blockarg(amper_t, name_t); end + + # source://parser//lib/parser/builders/default.rb#1014 + def blockarg_expr(amper_t, expr); end + + # source://parser//lib/parser/builders/default.rb#1100 + def call_lambda(lambda_t); end + + # source://parser//lib/parser/builders/default.rb#1083 + def call_method(receiver, dot_t, selector_t, lparen_t = T.unsafe(nil), args = T.unsafe(nil), rparen_t = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#1055 + def call_type_for_dot(dot_t); end + + # source://parser//lib/parser/builders/default.rb#1297 + def case(case_t, expr, when_bodies, else_t, else_body, end_t); end + + # source://parser//lib/parser/builders/default.rb#1460 + def case_match(case_t, expr, in_bodies, else_t, else_body, end_t); end + + # source://parser//lib/parser/builders/default.rb#343 + def character(char_t); end + + # source://parser//lib/parser/builders/default.rb#284 + def complex(complex_t); end + + # source://parser//lib/parser/builders/default.rb#1410 + def compstmt(statements); end + + # source://parser//lib/parser/builders/default.rb#1273 + def condition(cond_t, cond, then_t, if_true, else_t, if_false, end_t); end + + # source://parser//lib/parser/builders/default.rb#1279 + def condition_mod(if_true, if_false, cond_t, cond); end + + # source://parser//lib/parser/builders/default.rb#673 + def const(name_t); end + + # source://parser//lib/parser/builders/default.rb#685 + def const_fetch(scope, t_colon2, name_t); end + + # source://parser//lib/parser/builders/default.rb#678 + def const_global(t_colon3, name_t); end + + # source://parser//lib/parser/builders/default.rb#750 + def const_op_assignable(node); end + + # source://parser//lib/parser/builders/default.rb#1607 + def const_pattern(const, ldelim_t, pattern, rdelim_t); end + + # source://parser//lib/parser/builders/default.rb#601 + def cvar(token); end + + # source://parser//lib/parser/builders/default.rb#388 + def dedent_string(node, dedent_level); end + + # source://parser//lib/parser/builders/default.rb#801 + def def_class(class_t, name, lt_t, superclass, body, end_t); end + + # source://parser//lib/parser/builders/default.rb#832 + def def_endless_method(def_t, name_t, args, assignment_t, body); end + + # source://parser//lib/parser/builders/default.rb#850 + def def_endless_singleton(def_t, definee, dot_t, name_t, args, assignment_t, body); end + + # source://parser//lib/parser/builders/default.rb#824 + def def_method(def_t, name_t, args, body, end_t); end + + # source://parser//lib/parser/builders/default.rb#814 + def def_module(module_t, name, body, end_t); end + + # source://parser//lib/parser/builders/default.rb#808 + def def_sclass(class_t, lshft_t, expr, body, end_t); end + + # source://parser//lib/parser/builders/default.rb#840 + def def_singleton(def_t, definee, dot_t, name_t, args, body, end_t); end + + # source://parser//lib/parser/builders/default.rb#237 + def emit_file_line_as_literals; end + + # source://parser//lib/parser/builders/default.rb#237 + def emit_file_line_as_literals=(_arg0); end + + # source://parser//lib/parser/builders/default.rb#265 + def false(false_t); end + + # source://parser//lib/parser/builders/default.rb#1598 + def find_pattern(lbrack_t, elements, rbrack_t); end + + # source://parser//lib/parser/builders/default.rb#276 + def float(float_t); end + + # source://parser//lib/parser/builders/default.rb#1318 + def for(for_t, iterator, in_t, iteratee, do_t, body, end_t); end + + # source://parser//lib/parser/builders/default.rb#900 + def forward_arg(dots_t); end + + # source://parser//lib/parser/builders/default.rb#890 + def forward_only_args(begin_t, dots_t, end_t); end + + # source://parser//lib/parser/builders/default.rb#1071 + def forwarded_args(dots_t); end + + # source://parser//lib/parser/builders/default.rb#1079 + def forwarded_kwrestarg(dstar_t); end + + # source://parser//lib/parser/builders/default.rb#1075 + def forwarded_restarg(star_t); end + + # source://parser//lib/parser/builders/default.rb#596 + def gvar(token); end + + # source://parser//lib/parser/builders/default.rb#1571 + def hash_pattern(lbrace_t, kwargs, rbrace_t); end + + # source://parser//lib/parser/builders/default.rb#586 + def ident(token); end + + # source://parser//lib/parser/builders/default.rb#1487 + def if_guard(if_t, if_body); end + + # source://parser//lib/parser/builders/default.rb#1466 + def in_match(lhs, in_t, rhs); end + + # source://parser//lib/parser/builders/default.rb#1481 + def in_pattern(in_t, pattern, guard, then_t, body); end + + # source://parser//lib/parser/builders/default.rb#1167 + def index(receiver, lbrack_t, indexes, rbrack_t); end + + # source://parser//lib/parser/builders/default.rb#1181 + def index_asgn(receiver, lbrack_t, indexes, rbrack_t); end + + # source://parser//lib/parser/builders/default.rb#272 + def integer(integer_t); end + + # source://parser//lib/parser/builders/default.rb#591 + def ivar(token); end + + # source://parser//lib/parser/builders/default.rb#1326 + def keyword_cmd(type, keyword_t, lparen_t = T.unsafe(nil), args = T.unsafe(nil), rparen_t = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#931 + def kwarg(name_t); end + + # source://parser//lib/parser/builders/default.rb#957 + def kwnilarg(dstar_t, nil_t); end + + # source://parser//lib/parser/builders/default.rb#938 + def kwoptarg(name_t, value); end + + # source://parser//lib/parser/builders/default.rb#945 + def kwrestarg(dstar_t, name_t = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#535 + def kwsplat(dstar_t, arg); end + + # source://parser//lib/parser/builders/default.rb#1266 + def logical_op(type, lhs, op_t, rhs); end + + # source://parser//lib/parser/builders/default.rb#1304 + def loop(type, keyword_t, cond, do_t, body, end_t); end + + # source://parser//lib/parser/builders/default.rb#1309 + def loop_mod(type, body, keyword_t, cond); end + + # source://parser//lib/parser/builders/default.rb#1621 + def match_alt(left, pipe_t, right); end + + # source://parser//lib/parser/builders/default.rb#1628 + def match_as(value, assoc_t, as); end + + # source://parser//lib/parser/builders/default.rb#1507 + def match_hash_var(name_t); end + + # source://parser//lib/parser/builders/default.rb#1521 + def match_hash_var_from_str(begin_t, strings, end_t); end + + # source://parser//lib/parser/builders/default.rb#1659 + def match_label(label_type, label); end + + # source://parser//lib/parser/builders/default.rb#1635 + def match_nil_pattern(dstar_t, nil_t); end + + # source://parser//lib/parser/builders/default.rb#1214 + def match_op(receiver, match_t, arg); end + + # source://parser//lib/parser/builders/default.rb#1640 + def match_pair(label_type, label, value); end + + # source://parser//lib/parser/builders/default.rb#1471 + def match_pattern(lhs, match_t, rhs); end + + # source://parser//lib/parser/builders/default.rb#1476 + def match_pattern_p(lhs, match_t, rhs); end + + # source://parser//lib/parser/builders/default.rb#1560 + def match_rest(star_t, name_t = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#1495 + def match_var(name_t); end + + # source://parser//lib/parser/builders/default.rb#1603 + def match_with_trailing_comma(match, comma_t); end + + # source://parser//lib/parser/builders/default.rb#792 + def multi_assign(lhs, eql_t, rhs); end + + # source://parser//lib/parser/builders/default.rb#787 + def multi_lhs(begin_t, items, end_t); end + + # source://parser//lib/parser/builders/default.rb#255 + def nil(nil_t); end + + # source://parser//lib/parser/builders/default.rb#1242 + def not_op(not_t, begin_t = T.unsafe(nil), receiver = T.unsafe(nil), end_t = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#611 + def nth_ref(token); end + + # source://parser//lib/parser/builders/default.rb#886 + def numargs(max_numparam); end + + # source://parser//lib/parser/builders/default.rb#1025 + def objc_kwarg(kwname_t, assoc_t, name_t); end + + # source://parser//lib/parser/builders/default.rb#1039 + def objc_restarg(star_t, name = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#1149 + def objc_varargs(pair, rest_of_varargs); end + + # source://parser//lib/parser/builders/default.rb#761 + def op_assign(lhs, op_t, rhs); end + + # source://parser//lib/parser/builders/default.rb#911 + def optarg(name_t, eql_t, value); end + + # source://parser//lib/parser/builders/default.rb#488 + def pair(key, assoc_t, value); end + + # source://parser//lib/parser/builders/default.rb#505 + def pair_keyword(key_t, value); end + + # source://parser//lib/parser/builders/default.rb#521 + def pair_label(key_t); end + + # source://parser//lib/parser/builders/default.rb#493 + def pair_list_18(list); end + + # source://parser//lib/parser/builders/default.rb#513 + def pair_quoted(begin_t, parts, end_t, value); end + + # source://parser//lib/parser/builders/default.rb#225 + def parser; end + + # source://parser//lib/parser/builders/default.rb#225 + def parser=(_arg0); end + + # source://parser//lib/parser/builders/default.rb#1616 + def pin(pin_t, var); end + + # source://parser//lib/parser/builders/default.rb#1349 + def postexe(postexe_t, lbrace_t, compstmt, rbrace_t); end + + # source://parser//lib/parser/builders/default.rb#1344 + def preexe(preexe_t, lbrace_t, compstmt, rbrace_t); end + + # source://parser//lib/parser/builders/default.rb#979 + def procarg0(arg); end + + # source://parser//lib/parser/builders/default.rb#572 + def range_exclusive(lhs, dot3_t, rhs); end + + # source://parser//lib/parser/builders/default.rb#567 + def range_inclusive(lhs, dot2_t, rhs); end + + # source://parser//lib/parser/builders/default.rb#280 + def rational(rational_t); end + + # source://parser//lib/parser/builders/default.rb#426 + def regexp_compose(begin_t, parts, end_t, options); end + + # source://parser//lib/parser/builders/default.rb#417 + def regexp_options(regopt_t); end + + # source://parser//lib/parser/builders/default.rb#1356 + def rescue_body(rescue_t, exc_list, assoc_t, exc_var, then_t, compound_stmt); end + + # source://parser//lib/parser/builders/default.rb#920 + def restarg(star_t, name_t = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#1003 + def restarg_expr(star_t, expr = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#581 + def self(token); end + + # source://parser//lib/parser/builders/default.rb#962 + def shadowarg(name_t); end + + # source://parser//lib/parser/builders/default.rb#445 + def splat(star_t, arg = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#319 + def string(string_t); end + + # source://parser//lib/parser/builders/default.rb#329 + def string_compose(begin_t, parts, end_t); end + + # source://parser//lib/parser/builders/default.rb#324 + def string_internal(string_t); end + + # source://parser//lib/parser/builders/default.rb#355 + def symbol(symbol_t); end + + # source://parser//lib/parser/builders/default.rb#365 + def symbol_compose(begin_t, parts, end_t); end + + # source://parser//lib/parser/builders/default.rb#360 + def symbol_internal(symbol_t); end + + # source://parser//lib/parser/builders/default.rb#469 + def symbols_compose(begin_t, parts, end_t); end + + # source://parser//lib/parser/builders/default.rb#1284 + def ternary(cond, question_t, if_true, colon_t, if_false); end + + # source://parser//lib/parser/builders/default.rb#260 + def true(true_t); end + + # source://parser//lib/parser/builders/default.rb#294 + def unary_num(unary_t, numeric); end + + # source://parser//lib/parser/builders/default.rb#1230 + def unary_op(op_t, receiver); end + + # source://parser//lib/parser/builders/default.rb#860 + def undef_method(undef_t, names); end + + # source://parser//lib/parser/builders/default.rb#1491 + def unless_guard(unless_t, unless_body); end + + # source://parser//lib/parser/builders/default.rb#1291 + def when(when_t, patterns, then_t, body); end + + # source://parser//lib/parser/builders/default.rb#455 + def word(parts); end + + # source://parser//lib/parser/builders/default.rb#464 + def words_compose(begin_t, parts, end_t); end + + # source://parser//lib/parser/builders/default.rb#381 + def xstring_compose(begin_t, parts, end_t); end + + private + + # source://parser//lib/parser/builders/default.rb#1798 + def arg_name_collides?(this_name, that_name); end + + # source://parser//lib/parser/builders/default.rb#1994 + def arg_prefix_map(op_t, name_t = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#1968 + def binary_op_map(left_e, op_t, right_e); end + + # source://parser//lib/parser/builders/default.rb#2096 + def block_map(receiver_l, begin_t, end_t); end + + # source://parser//lib/parser/builders/default.rb#1773 + def check_assignment_to_numparam(name, loc); end + + # source://parser//lib/parser/builders/default.rb#1675 + def check_condition(cond); end + + # source://parser//lib/parser/builders/default.rb#1744 + def check_duplicate_arg(this_arg, map = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#1719 + def check_duplicate_args(args, map = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#1831 + def check_duplicate_pattern_key(name, loc); end + + # source://parser//lib/parser/builders/default.rb#1821 + def check_duplicate_pattern_variable(name, loc); end + + # source://parser//lib/parser/builders/default.rb#1813 + def check_lvar_name(name, loc); end + + # source://parser//lib/parser/builders/default.rb#1788 + def check_reserved_for_numparam(name, loc); end + + # source://parser//lib/parser/builders/default.rb#2253 + def collapse_string_parts?(parts); end + + # source://parser//lib/parser/builders/default.rb#1919 + def collection_map(begin_t, parts, end_t); end + + # source://parser//lib/parser/builders/default.rb#2123 + 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#1954 + def constant_map(scope, colon2_t, name_t); end + + # source://parser//lib/parser/builders/default.rb#2027 + def definition_map(keyword_t, operator_t, name_t, end_t); end + + # source://parser//lib/parser/builders/default.rb#1860 + def delimited_string_map(string_t); end + + # source://parser//lib/parser/builders/default.rb#2275 + def diagnostic(type, reason, arguments, location, highlights = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#2167 + def eh_keyword_map(compstmt_e, keyword_t, body_es, else_t, else_e); end + + # source://parser//lib/parser/builders/default.rb#2033 + def endless_definition_map(keyword_t, operator_t, name_t, assignment_t, body_e); end + + # source://parser//lib/parser/builders/default.rb#1915 + def expr_map(loc); end + + # source://parser//lib/parser/builders/default.rb#2148 + def for_map(keyword_t, in_t, begin_t, end_t); end + + # source://parser//lib/parser/builders/default.rb#2195 + def guard_map(keyword_t, guard_body_e); end + + # source://parser//lib/parser/builders/default.rb#2085 + def index_map(receiver_e, lbrack_t, rbrack_t); end + + # source://parser//lib/parser/builders/default.rb#1851 + def join_exprs(left_expr, right_expr); end + + # source://parser//lib/parser/builders/default.rb#2101 + def keyword_map(keyword_t, begin_t, args, end_t); end + + # source://parser//lib/parser/builders/default.rb#2118 + def keyword_mod_map(pre_e, keyword_t, post_e); end + + # source://parser//lib/parser/builders/default.rb#2004 + def kwarg_map(name_t, value_e = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#2306 + def kwargs?(node); end + + # source://parser//lib/parser/builders/default.rb#2270 + def loc(token); end + + # source://parser//lib/parser/builders/default.rb#2017 + def module_definition_map(keyword_t, name_e, operator_t, end_t); end + + # source://parser//lib/parser/builders/default.rb#1843 + def n(type, children, source_map); end + + # source://parser//lib/parser/builders/default.rb#1847 + 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#1885 + def pair_keyword_map(key_t, value_e); end + + # source://parser//lib/parser/builders/default.rb#1900 + def pair_quoted_map(begin_t, end_t, value_e); end + + # source://parser//lib/parser/builders/default.rb#1871 + def prefix_string_map(symbol); end + + # source://parser//lib/parser/builders/default.rb#1982 + def range_map(start_e, op_t, end_e); end + + # source://parser//lib/parser/builders/default.rb#1949 + def regexp_map(begin_t, end_t, options_e); end + + # source://parser//lib/parser/builders/default.rb#2154 + 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#2296 + def rewrite_hash_args_to_kwargs(args); end + + # source://parser//lib/parser/builders/default.rb#2067 + def send_binary_op_map(lhs_e, selector_t, rhs_e); end + + # source://parser//lib/parser/builders/default.rb#2090 + def send_index_map(receiver_e, lbrack_t, rbrack_t); end + + # source://parser//lib/parser/builders/default.rb#2041 + 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#2073 + def send_unary_op_map(selector_t, arg_e); end + + # source://parser//lib/parser/builders/default.rb#2226 + def static_regexp(parts, options); end + + # source://parser//lib/parser/builders/default.rb#2246 + def static_regexp_node(node); end + + # source://parser//lib/parser/builders/default.rb#2209 + def static_string(nodes); end + + # source://parser//lib/parser/builders/default.rb#1935 + def string_map(begin_t, parts, end_t); end + + # source://parser//lib/parser/builders/default.rb#2262 + def string_value(token); end + + # source://parser//lib/parser/builders/default.rb#2143 + def ternary_map(begin_e, question_t, mid_e, colon_t, end_e); end + + # source://parser//lib/parser/builders/default.rb#1856 + def token_map(token); end + + # source://parser//lib/parser/builders/default.rb#1972 + def unary_op_map(op_t, arg_e = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#1880 + def unquoted_map(token); end + + # source://parser//lib/parser/builders/default.rb#2284 + def validate_definee(definee); end + + # source://parser//lib/parser/builders/default.rb#1758 + def validate_no_forward_arg_after_restarg(args); end + + # source://parser//lib/parser/builders/default.rb#2258 + def value(token); end + + # source://parser//lib/parser/builders/default.rb#2061 + def var_send_map(variable_e); end + + # source://parser//lib/parser/builders/default.rb#1964 + 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 + +# @api private +# +# source://parser//lib/parser/deprecation.rb#7 +module Parser::Deprecation + # @api private + # + # source://parser//lib/parser/deprecation.rb#9 + def warn_of_deprecation; end + + # @api private + # + # source://parser//lib/parser/deprecation.rb#8 + def warned_of_deprecation=(_arg0); end +end + +# @api public +# +# source://parser//lib/parser/diagnostic.rb#31 +class Parser::Diagnostic + # @api public + # @param level [Symbol] + # @param reason [Symbol] + # @param arguments [Hash] + # @param location [Parser::Source::Range] + # @param highlights [Array] + # @return [Diagnostic] a new instance of Diagnostic + # + # source://parser//lib/parser/diagnostic.rb#49 + def initialize(level, reason, arguments, location, highlights = T.unsafe(nil)); end + + # @api public + # @return [Symbol] extended arguments that describe the error + # @see Parser::MESSAGES + # + # source://parser//lib/parser/diagnostic.rb#39 + def arguments; end + + # Supplementary error-related source ranges. + # + # @api public + # @return [Array] + # + # source://parser//lib/parser/diagnostic.rb#40 + def highlights; end + + # @api public + # @return [Symbol] diagnostic level + # @see LEVELS + # + # source://parser//lib/parser/diagnostic.rb#39 + def level; end + + # Main error-related source range. + # + # @api public + # @return [Parser::Source::Range] + # + # source://parser//lib/parser/diagnostic.rb#40 + def location; end + + # @api public + # @return [String] the rendered message. + # + # source://parser//lib/parser/diagnostic.rb#69 + def message; end + + # @api public + # @return [Symbol] reason for error + # @see Parser::MESSAGES + # + # source://parser//lib/parser/diagnostic.rb#39 + def reason; end + + # Renders the diagnostic message as a clang-like diagnostic. + # + # @api public + # @example + # diagnostic.render # => + # # [ + # # "(fragment:0):1:5: error: unexpected token $end", + # # "foo +", + # # " ^" + # # ] + # @return [Array] + # + # source://parser//lib/parser/diagnostic.rb#86 + def render; end + + private + + # If necessary, shrink a `Range` so as to include only the first line. + # + # @api public + # @return [Parser::Source::Range] + # + # source://parser//lib/parser/diagnostic.rb#142 + def first_line_only(range); end + + # If necessary, shrink a `Range` so as to include only the last line. + # + # @api public + # @return [Parser::Source::Range] + # + # source://parser//lib/parser/diagnostic.rb#155 + def last_line_only(range); end + + # Renders one source line in clang diagnostic style, with highlights. + # + # @api public + # @return [Array] + # + # source://parser//lib/parser/diagnostic.rb#110 + def render_line(range, ellipsis = T.unsafe(nil), range_end = T.unsafe(nil)); end +end + +# source://parser//lib/parser/diagnostic/engine.rb#36 +class Parser::Diagnostic::Engine + # source://parser//lib/parser/diagnostic/engine.rb#45 + def initialize(consumer = T.unsafe(nil)); end + + # source://parser//lib/parser/diagnostic/engine.rb#39 + def all_errors_are_fatal; end + + # source://parser//lib/parser/diagnostic/engine.rb#39 + def all_errors_are_fatal=(_arg0); end + + # source://parser//lib/parser/diagnostic/engine.rb#37 + def consumer; end + + # source://parser//lib/parser/diagnostic/engine.rb#37 + def consumer=(_arg0); end + + # source://parser//lib/parser/diagnostic/engine.rb#40 + def ignore_warnings; end + + # source://parser//lib/parser/diagnostic/engine.rb#40 + def ignore_warnings=(_arg0); end + + # source://parser//lib/parser/diagnostic/engine.rb#64 + def process(diagnostic); end + + protected + + # source://parser//lib/parser/diagnostic/engine.rb#86 + def ignore?(diagnostic); end + + # source://parser//lib/parser/diagnostic/engine.rb#97 + def raise?(diagnostic); end +end + +# Collection of the available diagnostic levels. +# +# @api public +# @return [Array] +# +# source://parser//lib/parser/diagnostic.rb#37 +Parser::Diagnostic::LEVELS = T.let(T.unsafe(nil), Array) + +# line 3 "lib/parser/lexer.rl" +# +# === BEFORE YOU START === +# +# Read the Ruby Hacking Guide chapter 11, available in English at +# http://whitequark.org/blog/2013/04/01/ruby-hacking-guide-ch-11-finite-state-lexer/ +# +# Remember two things about Ragel scanners: +# +# 1) Longest match wins. +# +# 2) If two matches have the same length, the first +# in source code wins. +# +# General rules of making Ragel and Bison happy: +# +# * `p` (position) and `@te` contain the index of the character +# they're pointing to ("current"), plus one. `@ts` contains the index +# of the corresponding character. The code for extracting matched token is: +# +# @source_buffer.slice(@ts...@te) +# +# * If your input is `foooooooobar` and the rule is: +# +# 'f' 'o'+ +# +# the result will be: +# +# foooooooobar +# ^ ts=0 ^ p=te=9 +# +# * A Ragel lexer action should not emit more than one token, unless +# you know what you are doing. +# +# * All Ragel commands (fnext, fgoto, ...) end with a semicolon. +# +# * If an action emits the token and transitions to another state, use +# these Ragel commands: +# +# emit($whatever) +# fnext $next_state; fbreak; +# +# If you perform `fgoto` in an action which does not emit a token nor +# rewinds the stream pointer, the parser's side-effectful, +# context-sensitive lookahead actions will break in a hard to detect +# and debug way. +# +# * If an action does not emit a token: +# +# fgoto $next_state; +# +# * If an action features lookbehind, i.e. matches characters with the +# intent of passing them to another action: +# +# p = @ts - 1 +# fgoto $next_state; +# +# or, if the lookbehind consists of a single character: +# +# fhold; fgoto $next_state; +# +# * Ragel merges actions. So, if you have `e_lparen = '(' %act` and +# `c_lparen = '('` and a lexer action `e_lparen | c_lparen`, the result +# _will_ invoke the action `act`. +# +# e_something stands for "something with **e**mbedded action". +# +# * EOF is explicit and is matched by `c_eof`. If you want to introspect +# the state of the lexer, add this rule to the state: +# +# c_eof => do_eof; +# +# * If you proceed past EOF, the lexer will complain: +# +# NoMethodError: undefined method `ord' for nil:NilClass +# +# source://parser//lib/parser/lexer-F1.rb#82 +class Parser::Lexer + # @return [Lexer] a new instance of Lexer + # + # source://parser//lib/parser/lexer-F1.rb#8250 + def initialize(version); end + + # Return next token: [type, value]. + # + # source://parser//lib/parser/lexer-F1.rb#8410 + def advance; end + + # Returns the value of attribute cmdarg. + # + # source://parser//lib/parser/lexer-F1.rb#8244 + def cmdarg; end + + # Sets the attribute cmdarg + # + # @param value the value to set the attribute cmdarg to. + # + # source://parser//lib/parser/lexer-F1.rb#8244 + def cmdarg=(_arg0); end + + # Returns the value of attribute cmdarg_stack. + # + # source://parser//lib/parser/lexer-F1.rb#8248 + def cmdarg_stack; end + + # Returns the value of attribute command_start. + # + # source://parser//lib/parser/lexer-F1.rb#8244 + def command_start; end + + # Sets the attribute command_start + # + # @param value the value to set the attribute command_start to. + # + # source://parser//lib/parser/lexer-F1.rb#8244 + def command_start=(_arg0); end + + # Returns the value of attribute comments. + # + # source://parser//lib/parser/lexer-F1.rb#8246 + def comments; end + + # Sets the attribute comments + # + # @param value the value to set the attribute comments to. + # + # source://parser//lib/parser/lexer-F1.rb#8246 + def comments=(_arg0); end + + # Returns the value of attribute cond. + # + # source://parser//lib/parser/lexer-F1.rb#8244 + def cond; end + + # Sets the attribute cond + # + # @param value the value to set the attribute cond to. + # + # source://parser//lib/parser/lexer-F1.rb#8244 + def cond=(_arg0); end + + # Returns the value of attribute cond_stack. + # + # source://parser//lib/parser/lexer-F1.rb#8248 + def cond_stack; end + + # Returns the value of attribute context. + # + # source://parser//lib/parser/lexer-F1.rb#8244 + def context; end + + # Sets the attribute context + # + # @param value the value to set the attribute context to. + # + # source://parser//lib/parser/lexer-F1.rb#8244 + def context=(_arg0); end + + # source://parser//lib/parser/lexer-F1.rb#8405 + def dedent_level; end + + # Returns the value of attribute diagnostics. + # + # source://parser//lib/parser/lexer-F1.rb#8240 + def diagnostics; end + + # Sets the attribute diagnostics + # + # @param value the value to set the attribute diagnostics to. + # + # source://parser//lib/parser/lexer-F1.rb#8240 + def diagnostics=(_arg0); end + + # source://parser//lib/parser/lexer-F1.rb#8358 + def encoding; end + + # Returns the value of attribute force_utf32. + # + # source://parser//lib/parser/lexer-F1.rb#8242 + def force_utf32; end + + # Sets the attribute force_utf32 + # + # @param value the value to set the attribute force_utf32 to. + # + # source://parser//lib/parser/lexer-F1.rb#8242 + def force_utf32=(_arg0); end + + # Returns the value of attribute lambda_stack. + # + # source://parser//lib/parser/lexer-F1.rb#8248 + def lambda_stack; end + + # Returns the value of attribute paren_nest. + # + # source://parser//lib/parser/lexer-F1.rb#8248 + def paren_nest; end + + # source://parser//lib/parser/lexer-F1.rb#8392 + def pop_cmdarg; end + + # source://parser//lib/parser/lexer-F1.rb#8401 + def pop_cond; end + + # source://parser//lib/parser/lexer-F1.rb#8387 + def push_cmdarg; end + + # source://parser//lib/parser/lexer-F1.rb#8396 + def push_cond; end + + # source://parser//lib/parser/lexer-F1.rb#8281 + def reset(reset_state = T.unsafe(nil)); end + + # % + # + # source://parser//lib/parser/lexer-F1.rb#8238 + def source_buffer; end + + # source://parser//lib/parser/lexer-F1.rb#8334 + def source_buffer=(source_buffer); end + + # source://parser//lib/parser/lexer-F1.rb#8379 + def state; end + + # source://parser//lib/parser/lexer-F1.rb#8383 + def state=(state); end + + # Returns the value of attribute static_env. + # + # source://parser//lib/parser/lexer-F1.rb#8241 + def static_env; end + + # Sets the attribute static_env + # + # @param value the value to set the attribute static_env to. + # + # source://parser//lib/parser/lexer-F1.rb#8241 + def static_env=(_arg0); end + + # Returns the value of attribute tokens. + # + # source://parser//lib/parser/lexer-F1.rb#8246 + def tokens; end + + # Sets the attribute tokens + # + # @param value the value to set the attribute tokens to. + # + # source://parser//lib/parser/lexer-F1.rb#8246 + def tokens=(_arg0); end + + # Returns the value of attribute version. + # + # source://parser//lib/parser/lexer-F1.rb#8248 + def version; end + + protected + + # source://parser//lib/parser/lexer-F1.rb#14631 + def arg_or_cmdarg(cmd_state); end + + # source://parser//lib/parser/lexer-F1.rb#14693 + def check_ambiguous_slash(tm); end + + # source://parser//lib/parser/lexer-F1.rb#14655 + def diagnostic(type, reason, arguments = T.unsafe(nil), location = T.unsafe(nil), highlights = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-F1.rb#14661 + def e_lbrace; end + + # source://parser//lib/parser/lexer-F1.rb#14605 + def emit(type, value = T.unsafe(nil), s = T.unsafe(nil), e = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-F1.rb#14714 + def emit_class_var(ts = T.unsafe(nil), te = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-F1.rb#14742 + def emit_colon_with_digits(p, tm, diag_msg); end + + # source://parser//lib/parser/lexer-F1.rb#14639 + def emit_comment(s = T.unsafe(nil), e = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-F1.rb#14651 + def emit_comment_from_range(p, pe); end + + # source://parser//lib/parser/lexer-F1.rb#14621 + def emit_do(do_block = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-F1.rb#14704 + def emit_global_var(ts = T.unsafe(nil), te = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-F1.rb#14722 + def emit_instance_var(ts = T.unsafe(nil), te = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-F1.rb#14730 + def emit_rbrace_rparen_rbrack; end + + # source://parser//lib/parser/lexer-F1.rb#14752 + def emit_singleton_class; end + + # source://parser//lib/parser/lexer-F1.rb#14615 + def emit_table(table, s = T.unsafe(nil), e = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-F1.rb#14670 + def numeric_literal_int; end + + # source://parser//lib/parser/lexer-F1.rb#14689 + def on_newline(p); end + + # source://parser//lib/parser/lexer-F1.rb#14601 + def range(s = T.unsafe(nil), e = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-F1.rb#14592 + def stack_pop; end + + # source://parser//lib/parser/lexer-F1.rb#14597 + def tok(s = T.unsafe(nil), e = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://parser//lib/parser/lexer-F1.rb#14588 + def version?(*versions); end + + class << self + # Returns the value of attribute lex_en_expr_arg. + # + # source://parser//lib/parser/lexer-F1.rb#8186 + def lex_en_expr_arg; end + + # Sets the attribute lex_en_expr_arg + # + # @param value the value to set the attribute lex_en_expr_arg to. + # + # source://parser//lib/parser/lexer-F1.rb#8186 + def lex_en_expr_arg=(_arg0); end + + # Returns the value of attribute lex_en_expr_beg. + # + # source://parser//lib/parser/lexer-F1.rb#8202 + def lex_en_expr_beg; end + + # Sets the attribute lex_en_expr_beg + # + # @param value the value to set the attribute lex_en_expr_beg to. + # + # source://parser//lib/parser/lexer-F1.rb#8202 + def lex_en_expr_beg=(_arg0); end + + # Returns the value of attribute lex_en_expr_cmdarg. + # + # source://parser//lib/parser/lexer-F1.rb#8190 + def lex_en_expr_cmdarg; end + + # Sets the attribute lex_en_expr_cmdarg + # + # @param value the value to set the attribute lex_en_expr_cmdarg to. + # + # source://parser//lib/parser/lexer-F1.rb#8190 + def lex_en_expr_cmdarg=(_arg0); end + + # Returns the value of attribute lex_en_expr_dot. + # + # source://parser//lib/parser/lexer-F1.rb#8182 + def lex_en_expr_dot; end + + # Sets the attribute lex_en_expr_dot + # + # @param value the value to set the attribute lex_en_expr_dot to. + # + # source://parser//lib/parser/lexer-F1.rb#8182 + def lex_en_expr_dot=(_arg0); end + + # Returns the value of attribute lex_en_expr_end. + # + # source://parser//lib/parser/lexer-F1.rb#8214 + def lex_en_expr_end; end + + # Sets the attribute lex_en_expr_end + # + # @param value the value to set the attribute lex_en_expr_end to. + # + # source://parser//lib/parser/lexer-F1.rb#8214 + def lex_en_expr_end=(_arg0); end + + # Returns the value of attribute lex_en_expr_endarg. + # + # source://parser//lib/parser/lexer-F1.rb#8194 + def lex_en_expr_endarg; end + + # Sets the attribute lex_en_expr_endarg + # + # @param value the value to set the attribute lex_en_expr_endarg to. + # + # source://parser//lib/parser/lexer-F1.rb#8194 + def lex_en_expr_endarg=(_arg0); end + + # Returns the value of attribute lex_en_expr_endfn. + # + # source://parser//lib/parser/lexer-F1.rb#8178 + def lex_en_expr_endfn; end + + # Sets the attribute lex_en_expr_endfn + # + # @param value the value to set the attribute lex_en_expr_endfn to. + # + # source://parser//lib/parser/lexer-F1.rb#8178 + def lex_en_expr_endfn=(_arg0); end + + # Returns the value of attribute lex_en_expr_fname. + # + # source://parser//lib/parser/lexer-F1.rb#8174 + def lex_en_expr_fname; end + + # Sets the attribute lex_en_expr_fname + # + # @param value the value to set the attribute lex_en_expr_fname to. + # + # source://parser//lib/parser/lexer-F1.rb#8174 + def lex_en_expr_fname=(_arg0); end + + # Returns the value of attribute lex_en_expr_labelarg. + # + # source://parser//lib/parser/lexer-F1.rb#8206 + def lex_en_expr_labelarg; end + + # Sets the attribute lex_en_expr_labelarg + # + # @param value the value to set the attribute lex_en_expr_labelarg to. + # + # source://parser//lib/parser/lexer-F1.rb#8206 + def lex_en_expr_labelarg=(_arg0); end + + # Returns the value of attribute lex_en_expr_mid. + # + # source://parser//lib/parser/lexer-F1.rb#8198 + def lex_en_expr_mid; end + + # Sets the attribute lex_en_expr_mid + # + # @param value the value to set the attribute lex_en_expr_mid to. + # + # source://parser//lib/parser/lexer-F1.rb#8198 + def lex_en_expr_mid=(_arg0); end + + # Returns the value of attribute lex_en_expr_value. + # + # source://parser//lib/parser/lexer-F1.rb#8210 + def lex_en_expr_value; end + + # Sets the attribute lex_en_expr_value + # + # @param value the value to set the attribute lex_en_expr_value to. + # + # source://parser//lib/parser/lexer-F1.rb#8210 + def lex_en_expr_value=(_arg0); end + + # Returns the value of attribute lex_en_expr_variable. + # + # source://parser//lib/parser/lexer-F1.rb#8170 + def lex_en_expr_variable; end + + # Sets the attribute lex_en_expr_variable + # + # @param value the value to set the attribute lex_en_expr_variable to. + # + # source://parser//lib/parser/lexer-F1.rb#8170 + def lex_en_expr_variable=(_arg0); end + + # Returns the value of attribute lex_en_inside_string. + # + # source://parser//lib/parser/lexer-F1.rb#8230 + def lex_en_inside_string; end + + # Sets the attribute lex_en_inside_string + # + # @param value the value to set the attribute lex_en_inside_string to. + # + # source://parser//lib/parser/lexer-F1.rb#8230 + def lex_en_inside_string=(_arg0); end + + # Returns the value of attribute lex_en_leading_dot. + # + # source://parser//lib/parser/lexer-F1.rb#8218 + def lex_en_leading_dot; end + + # Sets the attribute lex_en_leading_dot + # + # @param value the value to set the attribute lex_en_leading_dot to. + # + # source://parser//lib/parser/lexer-F1.rb#8218 + def lex_en_leading_dot=(_arg0); end + + # Returns the value of attribute lex_en_line_begin. + # + # source://parser//lib/parser/lexer-F1.rb#8226 + def lex_en_line_begin; end + + # Sets the attribute lex_en_line_begin + # + # @param value the value to set the attribute lex_en_line_begin to. + # + # source://parser//lib/parser/lexer-F1.rb#8226 + def lex_en_line_begin=(_arg0); end + + # Returns the value of attribute lex_en_line_comment. + # + # source://parser//lib/parser/lexer-F1.rb#8222 + def lex_en_line_comment; end + + # Sets the attribute lex_en_line_comment + # + # @param value the value to set the attribute lex_en_line_comment to. + # + # source://parser//lib/parser/lexer-F1.rb#8222 + def lex_en_line_comment=(_arg0); end + + # Returns the value of attribute lex_error. + # + # source://parser//lib/parser/lexer-F1.rb#8165 + def lex_error; end + + # Sets the attribute lex_error + # + # @param value the value to set the attribute lex_error to. + # + # source://parser//lib/parser/lexer-F1.rb#8165 + def lex_error=(_arg0); end + + # Returns the value of attribute lex_start. + # + # source://parser//lib/parser/lexer-F1.rb#8161 + def lex_start; end + + # Sets the attribute lex_start + # + # @param value the value to set the attribute lex_start to. + # + # source://parser//lib/parser/lexer-F1.rb#8161 + def lex_start=(_arg0); end + + private + + # Returns the value of attribute _lex_eof_trans. + # + # source://parser//lib/parser/lexer-F1.rb#8064 + def _lex_eof_trans; end + + # Sets the attribute _lex_eof_trans + # + # @param value the value to set the attribute _lex_eof_trans to. + # + # source://parser//lib/parser/lexer-F1.rb#8064 + def _lex_eof_trans=(_arg0); end + + # Returns the value of attribute _lex_from_state_actions. + # + # source://parser//lib/parser/lexer-F1.rb#7967 + def _lex_from_state_actions; end + + # Sets the attribute _lex_from_state_actions + # + # @param value the value to set the attribute _lex_from_state_actions to. + # + # source://parser//lib/parser/lexer-F1.rb#7967 + def _lex_from_state_actions=(_arg0); end + + # Returns the value of attribute _lex_index_offsets. + # + # source://parser//lib/parser/lexer-F1.rb#461 + def _lex_index_offsets; end + + # Sets the attribute _lex_index_offsets + # + # @param value the value to set the attribute _lex_index_offsets to. + # + # source://parser//lib/parser/lexer-F1.rb#461 + def _lex_index_offsets=(_arg0); end + + # Returns the value of attribute _lex_indicies. + # + # source://parser//lib/parser/lexer-F1.rb#558 + def _lex_indicies; end + + # Sets the attribute _lex_indicies + # + # @param value the value to set the attribute _lex_indicies to. + # + # source://parser//lib/parser/lexer-F1.rb#558 + def _lex_indicies=(_arg0); end + + # Returns the value of attribute _lex_key_spans. + # + # source://parser//lib/parser/lexer-F1.rb#364 + def _lex_key_spans; end + + # Sets the attribute _lex_key_spans + # + # @param value the value to set the attribute _lex_key_spans to. + # + # source://parser//lib/parser/lexer-F1.rb#364 + def _lex_key_spans=(_arg0); end + + # Returns the value of attribute _lex_to_state_actions. + # + # source://parser//lib/parser/lexer-F1.rb#7870 + def _lex_to_state_actions; end + + # Sets the attribute _lex_to_state_actions + # + # @param value the value to set the attribute _lex_to_state_actions to. + # + # source://parser//lib/parser/lexer-F1.rb#7870 + def _lex_to_state_actions=(_arg0); end + + # Returns the value of attribute _lex_trans_actions. + # + # source://parser//lib/parser/lexer-F1.rb#7722 + def _lex_trans_actions; end + + # Sets the attribute _lex_trans_actions + # + # @param value the value to set the attribute _lex_trans_actions to. + # + # source://parser//lib/parser/lexer-F1.rb#7722 + def _lex_trans_actions=(_arg0); end + + # Returns the value of attribute _lex_trans_keys. + # + # source://parser//lib/parser/lexer-F1.rb#87 + def _lex_trans_keys; end + + # Sets the attribute _lex_trans_keys + # + # @param value the value to set the attribute _lex_trans_keys to. + # + # source://parser//lib/parser/lexer-F1.rb#87 + def _lex_trans_keys=(_arg0); end + + # Returns the value of attribute _lex_trans_targs. + # + # source://parser//lib/parser/lexer-F1.rb#7574 + def _lex_trans_targs; end + + # Sets the attribute _lex_trans_targs + # + # @param value the value to set the attribute _lex_trans_targs to. + # + # source://parser//lib/parser/lexer-F1.rb#7574 + def _lex_trans_targs=(_arg0); end + end +end + +# source://parser//lib/parser/lexer/dedenter.rb#5 +class Parser::Lexer::Dedenter + # source://parser//lib/parser/lexer/dedenter.rb#9 + def initialize(dedent_level); end + + # source://parser//lib/parser/lexer/dedenter.rb#36 + def dedent(string); end + + # source://parser//lib/parser/lexer/dedenter.rb#83 + def interrupt; end +end + +# source://parser//lib/parser/lexer/dedenter.rb#7 +Parser::Lexer::Dedenter::TAB_WIDTH = T.let(T.unsafe(nil), Integer) + +# source://parser//lib/parser/lexer-F1.rb#14799 +Parser::Lexer::ESCAPE_WHITESPACE = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/lexer-F1.rb#14785 +Parser::Lexer::KEYWORDS = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/lexer-F1.rb#14792 +Parser::Lexer::KEYWORDS_BEGIN = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/lexer-F1.rb#8362 +Parser::Lexer::LEX_STATES = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/lexer/literal.rb#6 +class Parser::Lexer::Literal + # source://parser//lib/parser/lexer/literal.rb#40 + def initialize(lexer, str_type, delimiter, str_s, heredoc_e = T.unsafe(nil), indent = T.unsafe(nil), dedent_body = T.unsafe(nil), label_allowed = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer/literal.rb#114 + def backslash_delimited?; end + + # source://parser//lib/parser/lexer/literal.rb#37 + def dedent_level; end + + # source://parser//lib/parser/lexer/literal.rb#189 + def end_interp_brace_and_try_closing; end + + # source://parser//lib/parser/lexer/literal.rb#216 + def extend_content; end + + # source://parser//lib/parser/lexer/literal.rb#220 + def extend_space(ts, te); end + + # source://parser//lib/parser/lexer/literal.rb#195 + def extend_string(string, ts, te); end + + # source://parser//lib/parser/lexer/literal.rb#202 + def flush_string; end + + # source://parser//lib/parser/lexer/literal.rb#102 + def heredoc?; end + + # source://parser//lib/parser/lexer/literal.rb#37 + def heredoc_e; end + + # source://parser//lib/parser/lexer/literal.rb#166 + def infer_indent_level(line); end + + # source://parser//lib/parser/lexer/literal.rb#89 + def interpolate?; end + + # source://parser//lib/parser/lexer/literal.rb#122 + def munge_escape?(character); end + + # source://parser//lib/parser/lexer/literal.rb#132 + def nest_and_try_closing(delimiter, ts, te, lookahead = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer/literal.rb#106 + def plain_heredoc?; end + + # source://parser//lib/parser/lexer/literal.rb#98 + def regexp?; end + + # source://parser//lib/parser/lexer/literal.rb#38 + def saved_herebody_s; end + + # source://parser//lib/parser/lexer/literal.rb#38 + def saved_herebody_s=(_arg0); end + + # source://parser//lib/parser/lexer/literal.rb#110 + def squiggly_heredoc?; end + + # source://parser//lib/parser/lexer/literal.rb#185 + def start_interp_brace; end + + # source://parser//lib/parser/lexer/literal.rb#37 + def str_s; end + + # source://parser//lib/parser/lexer/literal.rb#230 + def supports_line_continuation_via_slash?; end + + # source://parser//lib/parser/lexer/literal.rb#118 + def type; end + + # source://parser//lib/parser/lexer/literal.rb#93 + def words?; end + + protected + + # source://parser//lib/parser/lexer/literal.rb#248 + def clear_buffer; end + + # source://parser//lib/parser/lexer/literal.rb#244 + def coerce_encoding(string); end + + # source://parser//lib/parser/lexer/literal.rb#236 + def delimiter?(delimiter); end + + # source://parser//lib/parser/lexer/literal.rb#264 + def emit(token, type, s, e); end + + # source://parser//lib/parser/lexer/literal.rb#259 + def emit_start_tok; end +end + +# source://parser//lib/parser/lexer/literal.rb#7 +Parser::Lexer::Literal::DELIMITERS = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/lexer/literal.rb#9 +Parser::Lexer::Literal::TYPES = T.let(T.unsafe(nil), Hash) + +# Mapping of strings to parser tokens. +# +# source://parser//lib/parser/lexer-F1.rb#14759 +Parser::Lexer::PUNCTUATION = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/lexer-F1.rb#14779 +Parser::Lexer::PUNCTUATION_BEGIN = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/lexer/stack_state.rb#5 +class Parser::Lexer::StackState + # source://parser//lib/parser/lexer/stack_state.rb#6 + def initialize(name); end + + # source://parser//lib/parser/lexer/stack_state.rb#34 + def active?; end + + # source://parser//lib/parser/lexer/stack_state.rb#11 + def clear; end + + # source://parser//lib/parser/lexer/stack_state.rb#38 + def empty?; end + + # source://parser//lib/parser/lexer/stack_state.rb#42 + def inspect; end + + # source://parser//lib/parser/lexer/stack_state.rb#29 + def lexpop; end + + # source://parser//lib/parser/lexer/stack_state.rb#22 + def pop; end + + # source://parser//lib/parser/lexer/stack_state.rb#15 + def push(bit); end + + # source://parser//lib/parser/lexer/stack_state.rb#42 + def to_s; end +end + +# line 3 "lib/parser/lexer-strings.rl" +# +# source://parser//lib/parser/lexer-strings.rb#6 +class Parser::LexerStrings + # @return [LexerStrings] a new instance of LexerStrings + # + # source://parser//lib/parser/lexer-strings.rb#3300 + def initialize(lexer, version); end + + # source://parser//lib/parser/lexer-strings.rb#3339 + def advance(p); end + + # source://parser//lib/parser/lexer-strings.rb#5069 + def close_interp_on_current_literal(p); end + + # source://parser//lib/parser/lexer-strings.rb#5043 + def continue_lexing(current_literal); end + + # source://parser//lib/parser/lexer-strings.rb#5092 + def dedent_level; end + + # Returns the value of attribute herebody_s. + # + # source://parser//lib/parser/lexer-strings.rb#3295 + def herebody_s; end + + # Sets the attribute herebody_s + # + # @param value the value to set the attribute herebody_s to. + # + # source://parser//lib/parser/lexer-strings.rb#3295 + def herebody_s=(_arg0); end + + # source://parser//lib/parser/lexer-strings.rb#5047 + def literal; end + + # source://parser//lib/parser/lexer-strings.rb#5015 + def next_state_for_literal(literal); end + + # This hook is triggered by "main" lexer on every newline character + # + # source://parser//lib/parser/lexer-strings.rb#5100 + def on_newline(p); end + + # source://parser//lib/parser/lexer-strings.rb#5051 + def pop_literal; end + + # === LITERAL STACK === + # + # source://parser//lib/parser/lexer-strings.rb#5009 + def push_literal(*args); end + + # source://parser//lib/parser/lexer-strings.rb#4999 + def read_character_constant(p); end + + # source://parser//lib/parser/lexer-strings.rb#3314 + def reset; end + + # Set by "main" lexer + # + # source://parser//lib/parser/lexer-strings.rb#3298 + def source_buffer; end + + # Set by "main" lexer + # + # source://parser//lib/parser/lexer-strings.rb#3298 + def source_buffer=(_arg0); end + + # Set by "main" lexer + # + # source://parser//lib/parser/lexer-strings.rb#3298 + def source_pts; end + + # Set by "main" lexer + # + # source://parser//lib/parser/lexer-strings.rb#3298 + def source_pts=(_arg0); end + + protected + + # source://parser//lib/parser/lexer-strings.rb#5397 + def check_ambiguous_slash(tm); end + + # source://parser//lib/parser/lexer-strings.rb#5408 + def check_invalid_escapes(p); end + + # source://parser//lib/parser/lexer-strings.rb#5136 + def cond; end + + # source://parser//lib/parser/lexer-strings.rb#5132 + def diagnostic(type, reason, arguments = T.unsafe(nil), location = T.unsafe(nil), highlights = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-strings.rb#5128 + def emit(type, value = T.unsafe(nil), s = T.unsafe(nil), e = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-strings.rb#5387 + def emit_character_constant; end + + # source://parser//lib/parser/lexer-strings.rb#5364 + def emit_interp_var(interp_var_kind); end + + # @return [Boolean] + # + # source://parser//lib/parser/lexer-strings.rb#5140 + def emit_invalid_escapes?; end + + # source://parser//lib/parser/lexer-strings.rb#5291 + def encode_escape(ord); end + + # source://parser//lib/parser/lexer-strings.rb#5375 + def encode_escaped_char(p); end + + # @return [Boolean] + # + # source://parser//lib/parser/lexer-strings.rb#5112 + def eof_codepoint?(point); end + + # source://parser//lib/parser/lexer-strings.rb#5210 + def extend_interp_code(current_literal); end + + # source://parser//lib/parser/lexer-strings.rb#5225 + def extend_interp_digit_var; end + + # source://parser//lib/parser/lexer-strings.rb#5355 + def extend_interp_var(current_literal); end + + # source://parser//lib/parser/lexer-strings.rb#5234 + def extend_string_eol_check_eof(current_literal, pe); end + + # source://parser//lib/parser/lexer-strings.rb#5251 + def extend_string_eol_heredoc_intertwined(p); end + + # source://parser//lib/parser/lexer-strings.rb#5241 + def extend_string_eol_heredoc_line; end + + # source://parser//lib/parser/lexer-strings.rb#5267 + def extend_string_eol_words(current_literal, p); end + + # String escaping + # + # source://parser//lib/parser/lexer-strings.rb#5154 + def extend_string_escaped; end + + # source://parser//lib/parser/lexer-strings.rb#5287 + def extend_string_for_token_range(current_literal, string); end + + # source://parser//lib/parser/lexer-strings.rb#5279 + def extend_string_slice_end(lookahead); end + + # source://parser//lib/parser/lexer-strings.rb#5124 + def range(s = T.unsafe(nil), e = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-strings.rb#5347 + def read_post_meta_or_ctrl_char(p); end + + # source://parser//lib/parser/lexer-strings.rb#5379 + def slash_c_char; end + + # source://parser//lib/parser/lexer-strings.rb#5383 + def slash_m_char; end + + # source://parser//lib/parser/lexer-strings.rb#5120 + def tok(s = T.unsafe(nil), e = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-strings.rb#5295 + def unescape_char(p); end + + # source://parser//lib/parser/lexer-strings.rb#5307 + def unicode_points(p); end + + # @return [Boolean] + # + # source://parser//lib/parser/lexer-strings.rb#5116 + def version?(*versions); end + + class << self + # Returns the value of attribute lex_en_character. + # + # source://parser//lib/parser/lexer-strings.rb#3275 + def lex_en_character; end + + # Sets the attribute lex_en_character + # + # @param value the value to set the attribute lex_en_character to. + # + # source://parser//lib/parser/lexer-strings.rb#3275 + def lex_en_character=(_arg0); end + + # Returns the value of attribute lex_en_interp_backslash_delimited. + # + # source://parser//lib/parser/lexer-strings.rb#3255 + def lex_en_interp_backslash_delimited; end + + # Sets the attribute lex_en_interp_backslash_delimited + # + # @param value the value to set the attribute lex_en_interp_backslash_delimited to. + # + # source://parser//lib/parser/lexer-strings.rb#3255 + def lex_en_interp_backslash_delimited=(_arg0); end + + # Returns the value of attribute lex_en_interp_backslash_delimited_words. + # + # source://parser//lib/parser/lexer-strings.rb#3263 + def lex_en_interp_backslash_delimited_words; end + + # Sets the attribute lex_en_interp_backslash_delimited_words + # + # @param value the value to set the attribute lex_en_interp_backslash_delimited_words to. + # + # source://parser//lib/parser/lexer-strings.rb#3263 + def lex_en_interp_backslash_delimited_words=(_arg0); end + + # Returns the value of attribute lex_en_interp_string. + # + # source://parser//lib/parser/lexer-strings.rb#3243 + def lex_en_interp_string; end + + # Sets the attribute lex_en_interp_string + # + # @param value the value to set the attribute lex_en_interp_string to. + # + # source://parser//lib/parser/lexer-strings.rb#3243 + def lex_en_interp_string=(_arg0); end + + # Returns the value of attribute lex_en_interp_words. + # + # source://parser//lib/parser/lexer-strings.rb#3239 + def lex_en_interp_words; end + + # Sets the attribute lex_en_interp_words + # + # @param value the value to set the attribute lex_en_interp_words to. + # + # source://parser//lib/parser/lexer-strings.rb#3239 + def lex_en_interp_words=(_arg0); end + + # Returns the value of attribute lex_en_plain_backslash_delimited. + # + # source://parser//lib/parser/lexer-strings.rb#3259 + def lex_en_plain_backslash_delimited; end + + # Sets the attribute lex_en_plain_backslash_delimited + # + # @param value the value to set the attribute lex_en_plain_backslash_delimited to. + # + # source://parser//lib/parser/lexer-strings.rb#3259 + def lex_en_plain_backslash_delimited=(_arg0); end + + # Returns the value of attribute lex_en_plain_backslash_delimited_words. + # + # source://parser//lib/parser/lexer-strings.rb#3267 + def lex_en_plain_backslash_delimited_words; end + + # Sets the attribute lex_en_plain_backslash_delimited_words + # + # @param value the value to set the attribute lex_en_plain_backslash_delimited_words to. + # + # source://parser//lib/parser/lexer-strings.rb#3267 + def lex_en_plain_backslash_delimited_words=(_arg0); end + + # Returns the value of attribute lex_en_plain_string. + # + # source://parser//lib/parser/lexer-strings.rb#3251 + def lex_en_plain_string; end + + # Sets the attribute lex_en_plain_string + # + # @param value the value to set the attribute lex_en_plain_string to. + # + # source://parser//lib/parser/lexer-strings.rb#3251 + def lex_en_plain_string=(_arg0); end + + # Returns the value of attribute lex_en_plain_words. + # + # source://parser//lib/parser/lexer-strings.rb#3247 + def lex_en_plain_words; end + + # Sets the attribute lex_en_plain_words + # + # @param value the value to set the attribute lex_en_plain_words to. + # + # source://parser//lib/parser/lexer-strings.rb#3247 + def lex_en_plain_words=(_arg0); end + + # Returns the value of attribute lex_en_regexp_modifiers. + # + # source://parser//lib/parser/lexer-strings.rb#3271 + def lex_en_regexp_modifiers; end + + # Sets the attribute lex_en_regexp_modifiers + # + # @param value the value to set the attribute lex_en_regexp_modifiers to. + # + # source://parser//lib/parser/lexer-strings.rb#3271 + def lex_en_regexp_modifiers=(_arg0); end + + # Returns the value of attribute lex_en_unknown. + # + # source://parser//lib/parser/lexer-strings.rb#3279 + def lex_en_unknown; end + + # Sets the attribute lex_en_unknown + # + # @param value the value to set the attribute lex_en_unknown to. + # + # source://parser//lib/parser/lexer-strings.rb#3279 + def lex_en_unknown=(_arg0); end + + # Returns the value of attribute lex_error. + # + # source://parser//lib/parser/lexer-strings.rb#3234 + def lex_error; end + + # Sets the attribute lex_error + # + # @param value the value to set the attribute lex_error to. + # + # source://parser//lib/parser/lexer-strings.rb#3234 + def lex_error=(_arg0); end + + # Returns the value of attribute lex_start. + # + # source://parser//lib/parser/lexer-strings.rb#3230 + def lex_start; end + + # Sets the attribute lex_start + # + # @param value the value to set the attribute lex_start to. + # + # source://parser//lib/parser/lexer-strings.rb#3230 + def lex_start=(_arg0); end + + private + + # Returns the value of attribute _lex_actions. + # + # source://parser//lib/parser/lexer-strings.rb#11 + def _lex_actions; end + + # Sets the attribute _lex_actions + # + # @param value the value to set the attribute _lex_actions to. + # + # source://parser//lib/parser/lexer-strings.rb#11 + def _lex_actions=(_arg0); end + + # Returns the value of attribute _lex_eof_trans. + # + # source://parser//lib/parser/lexer-strings.rb#3184 + def _lex_eof_trans; end + + # Sets the attribute _lex_eof_trans + # + # @param value the value to set the attribute _lex_eof_trans to. + # + # source://parser//lib/parser/lexer-strings.rb#3184 + def _lex_eof_trans=(_arg0); end + + # Returns the value of attribute _lex_from_state_actions. + # + # source://parser//lib/parser/lexer-strings.rb#3138 + def _lex_from_state_actions; end + + # Sets the attribute _lex_from_state_actions + # + # @param value the value to set the attribute _lex_from_state_actions to. + # + # source://parser//lib/parser/lexer-strings.rb#3138 + def _lex_from_state_actions=(_arg0); end + + # Returns the value of attribute _lex_index_offsets. + # + # source://parser//lib/parser/lexer-strings.rb#244 + def _lex_index_offsets; end + + # Sets the attribute _lex_index_offsets + # + # @param value the value to set the attribute _lex_index_offsets to. + # + # source://parser//lib/parser/lexer-strings.rb#244 + def _lex_index_offsets=(_arg0); end + + # Returns the value of attribute _lex_indicies. + # + # source://parser//lib/parser/lexer-strings.rb#290 + def _lex_indicies; end + + # Sets the attribute _lex_indicies + # + # @param value the value to set the attribute _lex_indicies to. + # + # source://parser//lib/parser/lexer-strings.rb#290 + def _lex_indicies=(_arg0); end + + # Returns the value of attribute _lex_key_spans. + # + # source://parser//lib/parser/lexer-strings.rb#198 + def _lex_key_spans; end + + # Sets the attribute _lex_key_spans + # + # @param value the value to set the attribute _lex_key_spans to. + # + # source://parser//lib/parser/lexer-strings.rb#198 + def _lex_key_spans=(_arg0); end + + # Returns the value of attribute _lex_to_state_actions. + # + # source://parser//lib/parser/lexer-strings.rb#3092 + def _lex_to_state_actions; end + + # Sets the attribute _lex_to_state_actions + # + # @param value the value to set the attribute _lex_to_state_actions to. + # + # source://parser//lib/parser/lexer-strings.rb#3092 + def _lex_to_state_actions=(_arg0); end + + # Returns the value of attribute _lex_trans_actions. + # + # source://parser//lib/parser/lexer-strings.rb#3029 + def _lex_trans_actions; end + + # Sets the attribute _lex_trans_actions + # + # @param value the value to set the attribute _lex_trans_actions to. + # + # source://parser//lib/parser/lexer-strings.rb#3029 + def _lex_trans_actions=(_arg0); end + + # Returns the value of attribute _lex_trans_keys. + # + # source://parser//lib/parser/lexer-strings.rb#76 + def _lex_trans_keys; end + + # Sets the attribute _lex_trans_keys + # + # @param value the value to set the attribute _lex_trans_keys to. + # + # source://parser//lib/parser/lexer-strings.rb#76 + def _lex_trans_keys=(_arg0); end + + # Returns the value of attribute _lex_trans_targs. + # + # source://parser//lib/parser/lexer-strings.rb#2966 + def _lex_trans_targs; end + + # Sets the attribute _lex_trans_targs + # + # @param value the value to set the attribute _lex_trans_targs to. + # + # source://parser//lib/parser/lexer-strings.rb#2966 + def _lex_trans_targs=(_arg0); end + end +end + +# % +# +# source://parser//lib/parser/lexer-strings.rb#3287 +Parser::LexerStrings::ESCAPES = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/lexer-strings.rb#5414 +Parser::LexerStrings::ESCAPE_WHITESPACE = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/lexer-strings.rb#3332 +Parser::LexerStrings::LEX_STATES = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/lexer-strings.rb#3293 +Parser::LexerStrings::REGEXP_META_CHARACTERS = T.let(T.unsafe(nil), Regexp) + +# Diagnostic messages (errors, warnings and notices) that can be generated. +# +# @api public +# @see Diagnostic +# +# source://parser//lib/parser/messages.rb#11 +Parser::MESSAGES = T.let(T.unsafe(nil), Hash) + +# Holds p->max_numparam from parse.y +# +# @api private +# +# source://parser//lib/parser/max_numparam_stack.rb#8 +class Parser::MaxNumparamStack + # @api private + # @return [MaxNumparamStack] a new instance of MaxNumparamStack + # + # source://parser//lib/parser/max_numparam_stack.rb#13 + def initialize; end + + # @api private + # @return [Boolean] + # + # source://parser//lib/parser/max_numparam_stack.rb#17 + def empty?; end + + # @api private + # @return [Boolean] + # + # source://parser//lib/parser/max_numparam_stack.rb#29 + def has_numparams?; end + + # @api private + # + # source://parser//lib/parser/max_numparam_stack.rb#21 + def has_ordinary_params!; end + + # @api private + # @return [Boolean] + # + # source://parser//lib/parser/max_numparam_stack.rb#25 + def has_ordinary_params?; end + + # @api private + # + # source://parser//lib/parser/max_numparam_stack.rb#45 + def pop; end + + # @api private + # + # source://parser//lib/parser/max_numparam_stack.rb#41 + def push(static:); end + + # @api private + # + # source://parser//lib/parser/max_numparam_stack.rb#33 + def register(numparam); end + + # @api private + # + # source://parser//lib/parser/max_numparam_stack.rb#9 + def stack; end + + # @api private + # + # source://parser//lib/parser/max_numparam_stack.rb#37 + def top; end + + private + + # @api private + # + # source://parser//lib/parser/max_numparam_stack.rb#51 + def set(value); end +end + +# @api private +# +# source://parser//lib/parser/max_numparam_stack.rb#11 +Parser::MaxNumparamStack::ORDINARY_PARAMS = T.let(T.unsafe(nil), Integer) + +# @api private +# +# source://parser//lib/parser/messages.rb#107 +module Parser::Messages + class << self + # Formats the message, returns a raw template if there's nothing to interpolate + # + # Code like `format("", {})` gives a warning, and so this method tries interpolating + # only if `arguments` hash is not empty. + # + # @api private + # + # source://parser//lib/parser/messages.rb#114 + def compile(reason, arguments); end + end +end + +# Parser metadata +# +# source://parser//lib/parser/meta.rb#5 +module Parser::Meta; end + +# All node types that parser can produce. Not all parser versions +# will be able to produce every possible node. +# +# source://parser//lib/parser/meta.rb#9 +Parser::Meta::NODE_TYPES = T.let(T.unsafe(nil), Set) + +# {Parser::Rewriter} is deprecated. Use {Parser::TreeRewriter} instead. +# It has a backwards compatible API and uses {Parser::Source::TreeRewriter} +# instead of {Parser::Source::Rewriter}. +# Please check the documentation for {Parser::Source::Rewriter} for details. +# +# @api public +# @deprecated Use {Parser::TreeRewriter} +# +# source://parser//lib/parser/rewriter.rb#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) + +# @api public +# +# source://parser//lib/parser.rb#30 +module Parser::Source; end + +# A buffer with source code. {Buffer} contains the source code itself, +# associated location information (name and first line), and takes care +# of encoding. +# +# A source buffer is immutable once populated. +# +# @api public +# +# source://parser//lib/parser/source/buffer.rb#25 +class Parser::Source::Buffer + # @api public + # @return [Buffer] a new instance of Buffer + # + # source://parser//lib/parser/source/buffer.rb#105 + def initialize(name, first_line = T.unsafe(nil), source: T.unsafe(nil)); end + + # Convert a character index into the source to a column number. + # + # @api private + # @param position [Integer] + # @return [Integer] column + # + # source://parser//lib/parser/source/buffer.rb#242 + def column_for_position(position); end + + # Convert a character index into the source to a `[line, column]` tuple. + # + # @api public + # @param position [Integer] + # @return [[Integer, Integer]] `[line, column]` + # + # source://parser//lib/parser/source/buffer.rb#217 + def decompose_position(position); end + + # First line of the buffer, 1 by default. + # + # @api public + # @return [Integer] first line + # + # source://parser//lib/parser/source/buffer.rb#26 + def first_line; end + + # @api public + # + # source://parser//lib/parser/source/buffer.rb#312 + def freeze; end + + # @api public + # + # source://parser//lib/parser/source/buffer.rb#318 + def inspect; end + + # Number of last line in the buffer + # + # @api public + # @return [Integer] + # + # source://parser//lib/parser/source/buffer.rb#307 + def last_line; end + + # Convert a character index into the source to a line number. + # + # @api private + # @param position [Integer] + # @return [Integer] line + # + # source://parser//lib/parser/source/buffer.rb#231 + def line_for_position(position); end + + # Extract line `lineno` as a new `Range`, taking `first_line` into account. + # + # @api public + # @param lineno [Integer] + # @raise [IndexError] if `lineno` is out of bounds + # @return [Range] + # + # source://parser//lib/parser/source/buffer.rb#284 + def line_range(lineno); end + + # Buffer name. If the buffer was created from a file, the name corresponds + # to relative path to the file. + # + # @api public + # @return [String] buffer name + # + # source://parser//lib/parser/source/buffer.rb#26 + def name; end + + # Populate this buffer from a string without encoding autodetection. + # + # @api public + # @param input [String] + # @raise [ArgumentError] if already populated + # @return [String] + # + # source://parser//lib/parser/source/buffer.rb#180 + def raw_source=(input); end + + # Populate this buffer from correspondingly named file. + # + # @api public + # @example + # Parser::Source::Buffer.new('foo/bar.rb').read + # @raise [ArgumentError] if already populated + # @return [Buffer] self + # + # source://parser//lib/parser/source/buffer.rb#131 + def read; end + + # @api public + # + # source://parser//lib/parser/source/buffer.rb#194 + def slice(start, length = T.unsafe(nil)); end + + # Source code contained in this buffer. + # + # @api public + # @raise [RuntimeError] if buffer is not populated yet + # @return [String] source code + # + # source://parser//lib/parser/source/buffer.rb#145 + def source; end + + # Populate this buffer from a string with encoding autodetection. + # `input` is mutated if not frozen. + # + # @api public + # @param input [String] + # @raise [ArgumentError] if already populated + # @raise [EncodingError] if `input` includes invalid byte sequence for the encoding + # @return [String] + # + # source://parser//lib/parser/source/buffer.rb#162 + def source=(input); end + + # Extract line `lineno` from source, taking `first_line` into account. + # + # @api public + # @param lineno [Integer] + # @raise [IndexError] if `lineno` is out of bounds + # @return [String] + # + # source://parser//lib/parser/source/buffer.rb#273 + def source_line(lineno); end + + # Return an `Array` of source code lines. + # + # @api public + # @return [Array] + # + # source://parser//lib/parser/source/buffer.rb#252 + def source_lines; end + + # @api public + # @return [Range] A range covering the whole source + # + # source://parser//lib/parser/source/buffer.rb#298 + def source_range; end + + private + + # @api public + # + # source://parser//lib/parser/source/buffer.rb#348 + def bsearch(line_begins, position); end + + # @api public + # + # source://parser//lib/parser/source/buffer.rb#325 + def line_begins; end + + # @api public + # + # source://parser//lib/parser/source/buffer.rb#339 + def line_index_for_position(position); end + + class << self + # Try to recognize encoding of `string` as Ruby would, i.e. by looking for + # magic encoding comment or UTF-8 BOM. `string` can be in any encoding. + # + # @api public + # @param string [String] + # @return [String, nil] encoding name, if recognized + # + # source://parser//lib/parser/source/buffer.rb#51 + def recognize_encoding(string); end + + # Recognize encoding of `input` and process it so it could be lexed. + # + # * If `input` does not contain BOM or magic encoding comment, it is + # kept in the original encoding. + # * If the detected encoding is binary, `input` is kept in binary. + # * Otherwise, `input` is re-encoded into UTF-8 and returned as a + # new string. + # + # This method mutates the encoding of `input`, but not its content. + # + # @api public + # @param input [String] + # @raise [EncodingError] + # @return [String] + # + # source://parser//lib/parser/source/buffer.rb#90 + def reencode_string(input); end + end +end + +# @api private +# +# source://parser//lib/parser/source/buffer.rb#31 +Parser::Source::Buffer::ENCODING_RE = T.let(T.unsafe(nil), Regexp) + +# A comment in the source code. +# +# @api public +# +# source://parser//lib/parser/source/comment.rb#17 +class Parser::Source::Comment + # @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#103 + 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#13 +class Parser::Source::TreeRewriter::Action + # source://parser//lib/parser/source/tree_rewriter/action.rb#16 + def initialize(range, enforcer, insert_before: T.unsafe(nil), replacement: T.unsafe(nil), insert_after: T.unsafe(nil), children: T.unsafe(nil)); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#28 + def combine(action); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#67 + def contract; end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#33 + def empty?; end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#14 + def insert_after; end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#14 + def insert_before; end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#57 + def insertion?; end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#80 + def moved(source_buffer, offset); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#49 + def nested_actions; end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#40 + def ordered_replacements; end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#14 + def range; end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#14 + def replacement; end + + protected + + # source://parser//lib/parser/source/tree_rewriter/action.rb#158 + def analyse_hierarchy(action); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#145 + def bsearch_child_index(from = T.unsafe(nil)); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#224 + def call_enforcer_for_merge(action); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#204 + def check_fusible(action, *fusible); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#94 + def children; end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#129 + def combine_children(more_children); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#102 + def do_combine(action); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#135 + def fuse_deletions(action, fusible, other_sibblings); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#215 + def merge(action); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#110 + def place_in_hierarchy(action); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#232 + def swallow(children); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#96 + def with(range: T.unsafe(nil), enforcer: T.unsafe(nil), children: T.unsafe(nil), insert_before: T.unsafe(nil), replacement: T.unsafe(nil), insert_after: T.unsafe(nil)); end +end + +# @api public +# +# source://parser//lib/parser/source/tree_rewriter.rb#356 +Parser::Source::TreeRewriter::DEPRECATION_WARNING = T.let(T.unsafe(nil), String) + +# @api public +# +# source://parser//lib/parser/source/tree_rewriter.rb#417 +Parser::Source::TreeRewriter::POLICY_TO_LEVEL = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/static_environment.rb#5 +class Parser::StaticEnvironment + # @return [StaticEnvironment] a new instance of StaticEnvironment + # + # source://parser//lib/parser/static_environment.rb#11 + def initialize; end + + # source://parser//lib/parser/static_environment.rb#40 + def declare(name); end + + # source://parser//lib/parser/static_environment.rb#58 + def declare_anonymous_blockarg; end + + # source://parser//lib/parser/static_environment.rb#74 + def declare_anonymous_kwrestarg; end + + # source://parser//lib/parser/static_environment.rb#66 + def declare_anonymous_restarg; end + + # source://parser//lib/parser/static_environment.rb#50 + def declare_forward_args; end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#46 + def declared?(name); end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#62 + def declared_anonymous_blockarg?; end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#78 + def declared_anonymous_kwrestarg?; end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#70 + def declared_anonymous_restarg?; end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#54 + def declared_forward_args?; end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#82 + def empty?; end + + # source://parser//lib/parser/static_environment.rb#27 + def extend_dynamic; end + + # source://parser//lib/parser/static_environment.rb#20 + def extend_static; end + + # source://parser//lib/parser/static_environment.rb#15 + def reset; end + + # source://parser//lib/parser/static_environment.rb#34 + def unextend; end +end + +# source://parser//lib/parser/static_environment.rb#7 +Parser::StaticEnvironment::ANONYMOUS_BLOCKARG = T.let(T.unsafe(nil), Symbol) + +# source://parser//lib/parser/static_environment.rb#9 +Parser::StaticEnvironment::ANONYMOUS_KWRESTARG = T.let(T.unsafe(nil), Symbol) + +# source://parser//lib/parser/static_environment.rb#8 +Parser::StaticEnvironment::ANONYMOUS_RESTARG = T.let(T.unsafe(nil), Symbol) + +# source://parser//lib/parser/static_environment.rb#6 +Parser::StaticEnvironment::FORWARD_ARGS = T.let(T.unsafe(nil), Symbol) + +# {Parser::SyntaxError} is raised whenever parser detects a syntax error, +# similar to the standard SyntaxError class. +# +# @api public +# +# source://parser//lib/parser/syntax_error.rb#13 +class Parser::SyntaxError < ::StandardError + # @api public + # @return [SyntaxError] a new instance of SyntaxError + # + # source://parser//lib/parser/syntax_error.rb#16 + def initialize(diagnostic); end + + # @api public + # @return [Parser::Diagnostic] + # + # source://parser//lib/parser/syntax_error.rb#14 + def diagnostic; end +end + +# {Parser::TreeRewriter} offers a basic API that makes it easy to rewrite +# existing ASTs. It's built on top of {Parser::AST::Processor} and +# {Parser::Source::TreeRewriter} +# +# For example, assume you want to remove `do` tokens from a while statement. +# You can do this as following: +# +# require 'parser/current' +# +# class RemoveDo < Parser::TreeRewriter +# def on_while(node) +# # Check if the statement starts with "do" +# if node.location.begin.is?('do') +# remove(node.location.begin) +# end +# end +# end +# +# code = <<-EOF +# while true do +# puts 'hello' +# end +# EOF +# +# ast = Parser::CurrentRuby.parse code +# buffer = Parser::Source::Buffer.new('(example)', source: code) +# rewriter = RemoveDo.new +# +# # Rewrite the AST, returns a String with the new form. +# puts rewriter.rewrite(buffer, ast) +# +# This would result in the following Ruby code: +# +# while true +# puts 'hello' +# end +# +# Keep in mind that {Parser::TreeRewriter} does not take care of indentation when +# inserting/replacing code so you'll have to do this yourself. +# +# See also [a blog entry](http://whitequark.org/blog/2013/04/26/lets-play-with-ruby-code/) +# describing rewriters in greater detail. +# +# @api public +# +# source://parser//lib/parser/tree_rewriter.rb#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 + +# 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/prettier_print@1.2.1.rbi b/sorbet/rbi/gems/prettier_print@1.2.1.rbi new file mode 100644 index 0000000..4e88525 --- /dev/null +++ b/sorbet/rbi/gems/prettier_print@1.2.1.rbi @@ -0,0 +1,951 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `prettier_print` gem. +# Please instead update this file by running `bin/tapioca gem prettier_print`. + +# This class implements a pretty printing algorithm. It finds line breaks and +# nice indentations for grouped structure. +# +# By default, the class assumes that primitive elements are strings and each +# byte in the strings is a single column in width. But it can be used for other +# situations by giving suitable arguments for some methods: +# +# * newline object and space generation block for PrettierPrint.new +# * optional width argument for PrettierPrint#text +# * PrettierPrint#breakable +# +# There are several candidate uses: +# * text formatting using proportional fonts +# * multibyte characters which has columns different to number of bytes +# * non-string formatting +# +# == Usage +# +# To use this module, you will need to generate a tree of print nodes that +# represent indentation and newline behavior before it gets sent to the printer. +# Each node has different semantics, depending on the desired output. +# +# The most basic node is a Text node. This represents plain text content that +# cannot be broken up even if it doesn't fit on one line. You would create one +# of those with the text method, as in: +# +# PrettierPrint.format { |q| q.text('my content') } +# +# No matter what the desired output width is, the output for the snippet above +# will always be the same. +# +# If you want to allow the printer to break up the content on the space +# character when there isn't enough width for the full string on the same line, +# you can use the Breakable and Group nodes. For example: +# +# PrettierPrint.format do |q| +# q.group do +# q.text("my") +# q.breakable +# q.text("content") +# end +# end +# +# Now, if everything fits on one line (depending on the maximum width specified) +# then it will be the same output as the first example. If, however, there is +# not enough room on the line, then you will get two lines of output, one for +# the first string and one for the second. +# +# There are other nodes for the print tree as well, described in the +# documentation below. They control alignment, indentation, conditional +# formatting, and more. +# +# == References +# Christian Lindig, Strictly Pretty, March 2000 +# https://lindig.github.io/papers/strictly-pretty-2000.pdf +# +# Philip Wadler, A prettier printer, March 1998 +# https://homepages.inf.ed.ac.uk/wadler/papers/prettier/prettier.pdf +# +# source://prettier_print//lib/prettier_print.rb#62 +class PrettierPrint + # Creates a buffer for pretty printing. + # + # +output+ is an output target. If it is not specified, '' is assumed. It + # should have a << method which accepts the first argument +obj+ of + # PrettierPrint#text, the first argument +separator+ of PrettierPrint#breakable, + # the first argument +newline+ of PrettierPrint.new, and the result of a given + # block for PrettierPrint.new. + # + # +maxwidth+ specifies maximum line length. If it is not specified, 80 is + # assumed. However actual outputs may overflow +maxwidth+ if long + # non-breakable texts are provided. + # + # +newline+ is used for line breaks. "\n" is used if it is not specified. + # + # The block is used to generate spaces. ->(n) { ' ' * n } is used if it is not + # given. + # + # @return [PrettierPrint] a new instance of PrettierPrint + # + # source://prettier_print//lib/prettier_print.rb#441 + def initialize(output = T.unsafe(nil), maxwidth = T.unsafe(nil), newline = T.unsafe(nil), &genspace); end + + # This inserts a BreakParent node into the print tree which forces the + # surrounding and all parent group nodes to break. + # + # source://prettier_print//lib/prettier_print.rb#814 + def break_parent; end + + # This says "you can break a line here if necessary", and a +width+\-column + # text +separator+ is inserted if a line is not broken at the point. + # + # If +separator+ is not specified, ' ' is used. + # + # If +width+ is not specified, +separator.length+ is used. You will have to + # specify this when +separator+ is a multibyte character, for example. + # + # By default, if the surrounding group is broken and a newline is inserted, + # the printer will indent the subsequent line up to the current level of + # indentation. You can disable this behavior with the +indent+ argument if + # that's not desired (rare). + # + # By default, when you insert a Breakable into the print tree, it only breaks + # the surrounding group when the group's contents cannot fit onto the + # remaining space of the current line. You can force it to break the + # surrounding group instead if you always want the newline with the +force+ + # argument. + # + # There are a few circumstances where you'll want to force the newline into + # the output but no insert a break parent (because you don't want to + # necessarily force the groups to break unless they need to). In this case you + # can pass `force: :skip_break_parent` to this method and it will not insert + # a break parent.` + # + # source://prettier_print//lib/prettier_print.rb#802 + def breakable(separator = T.unsafe(nil), width = T.unsafe(nil), indent: T.unsafe(nil), force: T.unsafe(nil)); end + + # Another very common breakable call you receive while formatting is an + # empty string in flat mode and a newline in break mode. Similar to + # breakable_space, this is here for avoid unnecessary calculation. + # + # source://prettier_print//lib/prettier_print.rb#646 + def breakable_empty; end + + # The final of the very common breakable calls you receive while formatting + # is the normal breakable space but with the addition of the break_parent. + # + # source://prettier_print//lib/prettier_print.rb#652 + def breakable_force; end + + # This is the same shortcut as breakable_force, except that it doesn't indent + # the next line. This is necessary if you're trying to preserve some custom + # formatting like a multi-line string. + # + # source://prettier_print//lib/prettier_print.rb#660 + def breakable_return; end + + # The vast majority of breakable calls you receive while formatting are a + # space in flat mode and a newline in break mode. Since this is so common, + # we have a method here to skip past unnecessary calculation. + # + # source://prettier_print//lib/prettier_print.rb#639 + def breakable_space; end + + # This is an output buffer that wraps the output object and provides + # additional functionality depending on its type. + # + # This defaults to Buffer::StringBuffer.new("".dup) + # + # source://prettier_print//lib/prettier_print.rb#400 + def buffer; end + + # A convenience method which is same as follows: + # + # text(",") + # breakable + # + # source://prettier_print//lib/prettier_print.rb#669 + def comma_breakable; end + + # Returns the group most recently added to the stack. + # + # Contrived example: + # out = "" + # => "" + # q = PrettierPrint.new(out) + # => # + # q.group { + # q.text q.current_group.inspect + # q.text q.newline + # q.group(q.current_group.depth + 1) { + # q.text q.current_group.inspect + # q.text q.newline + # q.group(q.current_group.depth + 1) { + # q.text q.current_group.inspect + # q.text q.newline + # q.group(q.current_group.depth + 1) { + # q.text q.current_group.inspect + # q.text q.newline + # } + # } + # } + # } + # => 284 + # puts out + # # + # # + # # + # # + # + # source://prettier_print//lib/prettier_print.rb#484 + def current_group; end + + # This is similar to #breakable except the decision to break or not is + # determined individually. + # + # Two #fill_breakable under a group may cause 4 results: + # (break,break), (break,non-break), (non-break,break), (non-break,non-break). + # This is different to #breakable because two #breakable under a group + # may cause 2 results: (break,break), (non-break,non-break). + # + # The text +separator+ is inserted if a line is not broken at this point. + # + # If +separator+ is not specified, ' ' is used. + # + # If +width+ is not specified, +separator.length+ is used. You will have to + # specify this when +separator+ is a multibyte character, for example. + # + # source://prettier_print//lib/prettier_print.rb#688 + def fill_breakable(separator = T.unsafe(nil), width = T.unsafe(nil)); end + + # Flushes all of the generated print tree onto the output buffer, then clears + # the generated tree from memory. + # + # source://prettier_print//lib/prettier_print.rb#490 + def flush(base_indentation = T.unsafe(nil)); end + + # An object that responds to call that takes one argument, of an Integer, and + # returns the corresponding number of spaces. + # + # By default this is: ->(n) { ' ' * n } + # + # source://prettier_print//lib/prettier_print.rb#416 + def genspace; end + + # Groups line break hints added in the block. The line break hints are all to + # be used or not. + # + # If +indent+ is specified, the method call is regarded as nested by + # nest(indent) { ... }. + # + # If +open_object+ is specified, text(open_object, open_width) is + # called before grouping. If +close_object+ is specified, + # text(close_object, close_width) is called after grouping. + # + # source://prettier_print//lib/prettier_print.rb#845 + def group(indent = T.unsafe(nil), open_object = T.unsafe(nil), close_object = T.unsafe(nil), open_width = T.unsafe(nil), close_width = T.unsafe(nil)); end + + # The stack of groups that are being printed. + # + # source://prettier_print//lib/prettier_print.rb#419 + def groups; end + + # Inserts an IfBreak node with the contents of the block being added to its + # list of nodes that should be printed if the surrounding node breaks. If it + # doesn't, then you can specify the contents to be printed with the #if_flat + # method used on the return object from this method. For example, + # + # q.if_break { q.text('do') }.if_flat { q.text('{') } + # + # In the example above, if the surrounding group is broken it will print 'do' + # and if it is not it will print '{'. + # + # source://prettier_print//lib/prettier_print.rb#917 + def if_break; end + + # This is similar to if_break in that it also inserts an IfBreak node into the + # print tree, however it's starting from the flat contents, and cannot be used + # to build the break contents. + # + # source://prettier_print//lib/prettier_print.rb#936 + def if_flat; end + + # Very similar to the #nest method, this indents the nested content by one + # level by inserting an Indent node into the print tree. The contents of the + # node are determined by the block. + # + # source://prettier_print//lib/prettier_print.rb#956 + def indent; end + + # This method calculates the position of the text relative to the current + # indentation level when the doc has been printed. It's useful for + # determining how to align text to doc nodes that are already built into the + # tree. + # + # source://prettier_print//lib/prettier_print.rb#696 + def last_position(node); end + + # Inserts a LineSuffix node into the print tree. The contents of the node are + # determined by the block. + # + # source://prettier_print//lib/prettier_print.rb#967 + def line_suffix(priority: T.unsafe(nil)); end + + # The maximum width of a line, before it is separated in to a newline + # + # This defaults to 80, and should be an Integer + # + # source://prettier_print//lib/prettier_print.rb#405 + def maxwidth; end + + # Increases left margin after newline with +indent+ for line breaks added in + # the block. + # + # source://prettier_print//lib/prettier_print.rb#977 + def nest(indent); end + + # The value that is appended to +output+ to add a new line. + # + # This defaults to "\n", and should be String + # + # source://prettier_print//lib/prettier_print.rb#410 + def newline; end + + # The output object. It represents the final destination of the contents of + # the print tree. It should respond to <<. + # + # This defaults to "".dup + # + # source://prettier_print//lib/prettier_print.rb#394 + def output; end + + # This method will remove any breakables from the list of contents so that + # no newlines are present in the output. If a newline is being forced into + # the output, the replace value will be used. + # + # source://prettier_print//lib/prettier_print.rb#721 + def remove_breaks(node, replace = T.unsafe(nil)); end + + # Adds a separated list. + # The list is separated by comma with breakable space, by default. + # + # #seplist iterates the +list+ using +iter_method+. + # It yields each object to the block given for #seplist. + # The procedure +separator_proc+ is called between each yields. + # + # If the iteration is zero times, +separator_proc+ is not called at all. + # + # If +separator_proc+ is nil or not given, + # +lambda { comma_breakable }+ is used. + # If +iter_method+ is not given, :each is used. + # + # For example, following 3 code fragments has similar effect. + # + # q.seplist([1,2,3]) {|v| xxx v } + # + # q.seplist([1,2,3], lambda { q.comma_breakable }, :each) {|v| xxx v } + # + # xxx 1 + # q.comma_breakable + # xxx 2 + # q.comma_breakable + # xxx 3 + # + # source://prettier_print//lib/prettier_print.rb#760 + def seplist(list, sep = T.unsafe(nil), iter_method = T.unsafe(nil)); end + + # The current array of contents that calls to methods that generate print tree + # nodes will append to. + # + # source://prettier_print//lib/prettier_print.rb#423 + def target; end + + # This adds +object+ as a text of +width+ columns in width. + # + # If +width+ is not specified, object.length is used. + # + # source://prettier_print//lib/prettier_print.rb#989 + def text(object = T.unsafe(nil), width = T.unsafe(nil)); end + + # This inserts a Trim node into the print tree which, when printed, will clear + # all whitespace at the end of the output buffer. This is useful for the rare + # case where you need to delete printed indentation and force the next node + # to start at the beginning of the line. + # + # source://prettier_print//lib/prettier_print.rb#828 + def trim; end + + # A convenience method used by a lot of the print tree node builders that + # temporarily changes the target that the builders will append to. + # + # source://prettier_print//lib/prettier_print.rb#1007 + def with_target(target); end + + private + + # This method returns a boolean as to whether or not the remaining commands + # fit onto the remaining space on the current line. If we finish printing + # all of the commands or if we hit a newline, then we return true. Otherwise + # if we continue printing past the remaining space, we return false. + # + # @return [Boolean] + # + # source://prettier_print//lib/prettier_print.rb#1019 + def fits?(next_commands, rest_commands, remaining); end + + # source://prettier_print//lib/prettier_print.rb#1091 + def remove_breaks_with(doc, replace); end + + # Resets the group stack and target array so that this pretty printer object + # can continue to be used before calling flush again if desired. + # + # source://prettier_print//lib/prettier_print.rb#1085 + def reset; end + + class << self + # This is a convenience method which is same as follows: + # + # begin + # q = PrettierPrint.new(output, maxwidth, newline, &genspace) + # ... + # q.flush + # output + # end + # + # @yield [q] + # + # source://prettier_print//lib/prettier_print.rb#377 + def format(output = T.unsafe(nil), maxwidth = T.unsafe(nil), newline = T.unsafe(nil), genspace = T.unsafe(nil), indentation = T.unsafe(nil)); end + + # This is similar to PrettierPrint::format but the result has no breaks. + # + # +maxwidth+, +newline+ and +genspace+ are ignored. + # + # The invocation of +breakable+ in the block doesn't break a line and is + # treated as just an invocation of +text+. + # + # @yield [q] + # + # source://prettier_print//lib/prettier_print/single_line.rb#156 + def singleline_format(output = T.unsafe(nil), _maxwidth = T.unsafe(nil), _newline = T.unsafe(nil), _genspace = T.unsafe(nil)); end + end +end + +# A node in the print tree that represents aligning nested nodes to a certain +# prefix width or string. +# +# source://prettier_print//lib/prettier_print.rb#65 +class PrettierPrint::Align + # @return [Align] a new instance of Align + # + # source://prettier_print//lib/prettier_print.rb#68 + def initialize(indent:, contents: T.unsafe(nil)); end + + # Returns the value of attribute contents. + # + # source://prettier_print//lib/prettier_print.rb#66 + def contents; end + + # Returns the value of attribute indent. + # + # source://prettier_print//lib/prettier_print.rb#66 + def indent; end + + # source://prettier_print//lib/prettier_print.rb#73 + def pretty_print(q); end +end + +# source://prettier_print//lib/prettier_print.rb#126 +PrettierPrint::BREAKABLE_EMPTY = T.let(T.unsafe(nil), PrettierPrint::Breakable) + +# source://prettier_print//lib/prettier_print.rb#127 +PrettierPrint::BREAKABLE_FORCE = T.let(T.unsafe(nil), PrettierPrint::Breakable) + +# source://prettier_print//lib/prettier_print.rb#128 +PrettierPrint::BREAKABLE_RETURN = T.let(T.unsafe(nil), PrettierPrint::Breakable) + +# Below here are the most common combination of options that are created when +# creating new breakables. They are here to cut down on some allocations. +# +# source://prettier_print//lib/prettier_print.rb#125 +PrettierPrint::BREAKABLE_SPACE = T.let(T.unsafe(nil), PrettierPrint::Breakable) + +# Since there's really no difference in these instances, just using the same +# one saves on some allocations. +# +# source://prettier_print//lib/prettier_print.rb#141 +PrettierPrint::BREAK_PARENT = T.let(T.unsafe(nil), PrettierPrint::BreakParent) + +# A node in the print tree that forces the surrounding group to print out in +# the "break" mode as opposed to the "flat" mode. Useful for when you need to +# force a newline into a group. +# +# source://prettier_print//lib/prettier_print.rb#133 +class PrettierPrint::BreakParent + # source://prettier_print//lib/prettier_print.rb#134 + def pretty_print(q); end +end + +# A node in the print tree that represents a place in the buffer that the +# content can be broken onto multiple lines. +# +# source://prettier_print//lib/prettier_print.rb#82 +class PrettierPrint::Breakable + # @return [Breakable] a new instance of Breakable + # + # source://prettier_print//lib/prettier_print.rb#85 + def initialize(separator = T.unsafe(nil), width = T.unsafe(nil), force: T.unsafe(nil), indent: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://prettier_print//lib/prettier_print.rb#97 + def force?; end + + # @return [Boolean] + # + # source://prettier_print//lib/prettier_print.rb#101 + def indent?; end + + # source://prettier_print//lib/prettier_print.rb#105 + def pretty_print(q); end + + # Returns the value of attribute separator. + # + # source://prettier_print//lib/prettier_print.rb#83 + def separator; end + + # Returns the value of attribute width. + # + # source://prettier_print//lib/prettier_print.rb#83 + def width; end +end + +# When building up the contents in the output buffer, it's convenient to be +# able to trim trailing whitespace before newlines. If the output object is a +# string or array or strings, then we can do this with some gsub calls. If +# not, then this effectively just wraps the output object and forwards on +# calls to <<. +# +# source://prettier_print//lib/prettier_print.rb#277 +module PrettierPrint::Buffer + class << self + # This is a switch for building the correct output buffer wrapper class for + # the given output object. + # + # source://prettier_print//lib/prettier_print.rb#336 + def for(output); end + end +end + +# This is an output buffer that wraps an array output object. It provides a +# trim! method that trims off trailing whitespace from the last element in +# the array if it's an unfrozen string using the same method as the +# StringBuffer. +# +# source://prettier_print//lib/prettier_print.rb#303 +class PrettierPrint::Buffer::ArrayBuffer + # @return [ArrayBuffer] a new instance of ArrayBuffer + # + # source://prettier_print//lib/prettier_print.rb#306 + def initialize(output = T.unsafe(nil)); end + + # source://prettier_print//lib/prettier_print.rb#310 + def <<(object); end + + # Returns the value of attribute output. + # + # source://prettier_print//lib/prettier_print.rb#304 + def output; end + + # source://prettier_print//lib/prettier_print.rb#314 + def trim!; end +end + +# This is an output buffer that wraps a string output object. It provides a +# trim! method that trims off trailing whitespace from the string using +# gsub!. +# +# source://prettier_print//lib/prettier_print.rb#281 +class PrettierPrint::Buffer::StringBuffer + # @return [StringBuffer] a new instance of StringBuffer + # + # source://prettier_print//lib/prettier_print.rb#284 + def initialize(output = T.unsafe(nil)); end + + # source://prettier_print//lib/prettier_print.rb#288 + def <<(object); end + + # Returns the value of attribute output. + # + # source://prettier_print//lib/prettier_print.rb#282 + def output; end + + # source://prettier_print//lib/prettier_print.rb#292 + def trim!; end +end + +# When generating spaces after a newline for indentation, by default we +# generate one space per character needed for indentation. You can change this +# behavior (for instance to use tabs) by passing a different genspace +# procedure. +# +# source://prettier_print//lib/prettier_print.rb#350 +PrettierPrint::DEFAULT_GENSPACE = T.let(T.unsafe(nil), Proc) + +# The default indentation for printing is zero, assuming that the code starts +# at the top level. That can be changed if desired to start from a different +# indentation level. +# +# source://prettier_print//lib/prettier_print.rb#366 +PrettierPrint::DEFAULT_INDENTATION = T.let(T.unsafe(nil), Integer) + +# When printing, you can optionally specify the value that should be used +# whenever a group needs to be broken onto multiple lines. In this case the +# default is \n. +# +# source://prettier_print//lib/prettier_print.rb#344 +PrettierPrint::DEFAULT_NEWLINE = T.let(T.unsafe(nil), String) + +# A node in the print tree that represents a group of items which the printer +# should try to fit onto one line. This is the basic command to tell the +# printer when to break. Groups are usually nested, and the printer will try +# to fit everything on one line, but if it doesn't fit it will break the +# outermost group first and try again. It will continue breaking groups until +# everything fits (or there are no more groups to break). +# +# source://prettier_print//lib/prettier_print.rb#149 +class PrettierPrint::Group + # @return [Group] a new instance of Group + # + # source://prettier_print//lib/prettier_print.rb#152 + def initialize(depth, contents: T.unsafe(nil)); end + + # source://prettier_print//lib/prettier_print.rb#158 + def break; end + + # @return [Boolean] + # + # source://prettier_print//lib/prettier_print.rb#162 + def break?; end + + # Returns the value of attribute contents. + # + # source://prettier_print//lib/prettier_print.rb#150 + def contents; end + + # Returns the value of attribute depth. + # + # source://prettier_print//lib/prettier_print.rb#150 + def depth; end + + # source://prettier_print//lib/prettier_print.rb#166 + def pretty_print(q); end +end + +# A node in the print tree that represents printing one thing if the +# surrounding group node is broken and another thing if the surrounding group +# node is flat. +# +# source://prettier_print//lib/prettier_print.rb#176 +class PrettierPrint::IfBreak + # @return [IfBreak] a new instance of IfBreak + # + # source://prettier_print//lib/prettier_print.rb#179 + def initialize(break_contents: T.unsafe(nil), flat_contents: T.unsafe(nil)); end + + # Returns the value of attribute break_contents. + # + # source://prettier_print//lib/prettier_print.rb#177 + def break_contents; end + + # Returns the value of attribute flat_contents. + # + # source://prettier_print//lib/prettier_print.rb#177 + def flat_contents; end + + # source://prettier_print//lib/prettier_print.rb#184 + def pretty_print(q); end +end + +# A small DSL-like object used for specifying the alternative contents to be +# printed if the surrounding group doesn't break for an IfBreak node. +# +# source://prettier_print//lib/prettier_print.rb#874 +class PrettierPrint::IfBreakBuilder + # @return [IfBreakBuilder] a new instance of IfBreakBuilder + # + # source://prettier_print//lib/prettier_print.rb#877 + def initialize(q, flat_contents); end + + # Returns the value of attribute flat_contents. + # + # source://prettier_print//lib/prettier_print.rb#875 + def flat_contents; end + + # source://prettier_print//lib/prettier_print.rb#882 + def if_flat; end + + # Returns the value of attribute q. + # + # source://prettier_print//lib/prettier_print.rb#875 + def q; end +end + +# When we already know that groups are broken, we don't actually need to track +# the flat versions of the contents. So this builder version is effectively a +# no-op, but we need it to maintain the same API. The only thing this can +# impact is that if there's a forced break in the flat contents, then we need +# to propagate that break up the whole tree. +# +# source://prettier_print//lib/prettier_print.rb#892 +class PrettierPrint::IfFlatIgnore + # @return [IfFlatIgnore] a new instance of IfFlatIgnore + # + # source://prettier_print//lib/prettier_print.rb#895 + def initialize(q); end + + # source://prettier_print//lib/prettier_print.rb#899 + def if_flat; end + + # Returns the value of attribute q. + # + # source://prettier_print//lib/prettier_print.rb#893 + def q; end +end + +# A node in the print tree that is a variant of the Align node that indents +# its contents by one level. +# +# source://prettier_print//lib/prettier_print.rb#200 +class PrettierPrint::Indent + # @return [Indent] a new instance of Indent + # + # source://prettier_print//lib/prettier_print.rb#203 + def initialize(contents: T.unsafe(nil)); end + + # Returns the value of attribute contents. + # + # source://prettier_print//lib/prettier_print.rb#201 + def contents; end + + # source://prettier_print//lib/prettier_print.rb#207 + def pretty_print(q); end +end + +# A node in the print tree that has its own special buffer for implementing +# content that should flush before any newline. +# +# Useful for implementating trailing content, as it's not always practical to +# constantly check where the line ends to avoid accidentally printing some +# content after a line suffix node. +# +# source://prettier_print//lib/prettier_print.rb#220 +class PrettierPrint::LineSuffix + # @return [LineSuffix] a new instance of LineSuffix + # + # source://prettier_print//lib/prettier_print.rb#225 + def initialize(priority: T.unsafe(nil), contents: T.unsafe(nil)); end + + # Returns the value of attribute contents. + # + # source://prettier_print//lib/prettier_print.rb#223 + def contents; end + + # source://prettier_print//lib/prettier_print.rb#230 + def pretty_print(q); end + + # Returns the value of attribute priority. + # + # source://prettier_print//lib/prettier_print.rb#223 + def priority; end +end + +# source://prettier_print//lib/prettier_print.rb#221 +PrettierPrint::LineSuffix::DEFAULT_PRIORITY = T.let(T.unsafe(nil), Integer) + +# There are two modes in printing, break and flat. When we're in break mode, +# any lines will use their newline, any if-breaks will use their break +# contents, etc. +# +# source://prettier_print//lib/prettier_print.rb#356 +PrettierPrint::MODE_BREAK = T.let(T.unsafe(nil), Integer) + +# This is another print mode much like MODE_BREAK. When we're in flat mode, we +# attempt to print everything on one line until we either hit a broken group, +# a forced line, or the maximum width. +# +# source://prettier_print//lib/prettier_print.rb#361 +PrettierPrint::MODE_FLAT = T.let(T.unsafe(nil), Integer) + +# PrettierPrint::SingleLine is used by PrettierPrint.singleline_format +# +# It is passed to be similar to a PrettierPrint object itself, by responding to +# all of the same print tree node builder methods, as well as the #flush +# method. +# +# The significant difference here is that there are no line breaks in the +# output. If an IfBreak node is used, only the flat contents are printed. +# LineSuffix nodes are printed at the end of the buffer when #flush is called. +# +# source://prettier_print//lib/prettier_print/single_line.rb#13 +class PrettierPrint::SingleLine + # Create a PrettierPrint::SingleLine object + # + # Arguments: + # * +output+ - String (or similar) to store rendered text. Needs to respond + # to '<<'. + # * +maxwidth+ - Argument position expected to be here for compatibility. + # This argument is a noop. + # * +newline+ - Argument position expected to be here for compatibility. + # This argument is a noop. + # + # @return [SingleLine] a new instance of SingleLine + # + # source://prettier_print//lib/prettier_print/single_line.rb#34 + def initialize(output, _maxwidth = T.unsafe(nil), _newline = T.unsafe(nil)); end + + # Here for compatibility, does nothing. + # + # source://prettier_print//lib/prettier_print/single_line.rb#64 + def break_parent; end + + # Appends +separator+ to the text to be output. By default +separator+ is + # ' ' + # + # The +width+, +indent+, and +force+ arguments are here for compatibility. + # They are all noop arguments. + # + # source://prettier_print//lib/prettier_print/single_line.rb#54 + def breakable(separator = T.unsafe(nil), _width = T.unsafe(nil), indent: T.unsafe(nil), force: T.unsafe(nil)); end + + # Appends +separator+ to the output buffer. +width+ is a noop here for + # compatibility. + # + # source://prettier_print//lib/prettier_print/single_line.rb#69 + def fill_breakable(separator = T.unsafe(nil), _width = T.unsafe(nil)); end + + # Flushes the line suffixes onto the output buffer. + # + # source://prettier_print//lib/prettier_print/single_line.rb#41 + def flush; end + + # Opens a block for grouping objects to be pretty printed. + # + # Arguments: + # * +indent+ - noop argument. Present for compatibility. + # * +open_obj+ - text appended before the &block. Default is '' + # * +close_obj+ - text appended after the &block. Default is '' + # * +open_width+ - noop argument. Present for compatibility. + # * +close_width+ - noop argument. Present for compatibility. + # + # source://prettier_print//lib/prettier_print/single_line.rb#90 + def group(_indent = T.unsafe(nil), open_object = T.unsafe(nil), close_object = T.unsafe(nil), _open_width = T.unsafe(nil), _close_width = T.unsafe(nil)); end + + # Effectively unnecessary, but here for compatibility. + # + # source://prettier_print//lib/prettier_print/single_line.rb#113 + def if_break; end + + # Also effectively unnecessary, but here for compatibility. + # + # source://prettier_print//lib/prettier_print/single_line.rb#118 + def if_flat; end + + # A noop that immediately yields. + # + # source://prettier_print//lib/prettier_print/single_line.rb#122 + def indent; end + + # Changes the target output buffer to the line suffix output buffer which + # will get flushed at the end of printing. + # + # source://prettier_print//lib/prettier_print/single_line.rb#128 + def line_suffix; end + + # A buffer output that wraps any calls to line_suffix that will be flushed + # at the end of printing. + # + # source://prettier_print//lib/prettier_print/single_line.rb#23 + def line_suffixes; end + + # Takes +indent+ arg, but does nothing with it. + # + # Yields to a block. + # + # source://prettier_print//lib/prettier_print/single_line.rb#137 + def nest(_indent); end + + # The output object. It stores rendered text and should respond to <<. + # + # source://prettier_print//lib/prettier_print/single_line.rb#15 + def output; end + + # The current array of contents that the print tree builder methods should + # append to. + # + # source://prettier_print//lib/prettier_print/single_line.rb#19 + def target; end + + # Add +object+ to the text to be output. + # + # +width+ argument is here for compatibility. It is a noop argument. + # + # source://prettier_print//lib/prettier_print/single_line.rb#144 + def text(object = T.unsafe(nil), _width = T.unsafe(nil)); end + + # Immediately trims the output buffer. + # + # source://prettier_print//lib/prettier_print/single_line.rb#74 + def trim; end +end + +# A class that wraps the ability to call #if_flat. The contents of the +# #if_flat block are executed immediately, so effectively this class and the +# #if_break method that triggers it are unnecessary, but they're here to +# maintain compatibility. +# +# source://prettier_print//lib/prettier_print/single_line.rb#106 +class PrettierPrint::SingleLine::IfBreakBuilder + # source://prettier_print//lib/prettier_print/single_line.rb#107 + def if_flat; end +end + +# Since all of the instances here are the same, we can reuse the same one to +# cut down on allocations. +# +# source://prettier_print//lib/prettier_print.rb#270 +PrettierPrint::TRIM = T.let(T.unsafe(nil), PrettierPrint::Trim) + +# A node in the print tree that represents plain content that cannot be broken +# up (by default this assumes strings, but it can really be anything). +# +# source://prettier_print//lib/prettier_print.rb#239 +class PrettierPrint::Text + # @return [Text] a new instance of Text + # + # source://prettier_print//lib/prettier_print.rb#242 + def initialize; end + + # source://prettier_print//lib/prettier_print.rb#247 + def add(object: T.unsafe(nil), width: T.unsafe(nil)); end + + # Returns the value of attribute objects. + # + # source://prettier_print//lib/prettier_print.rb#240 + def objects; end + + # source://prettier_print//lib/prettier_print.rb#252 + def pretty_print(q); end + + # Returns the value of attribute width. + # + # source://prettier_print//lib/prettier_print.rb#240 + def width; end +end + +# A node in the print tree that represents trimming all of the indentation of +# the current line, in the rare case that you need to ignore the indentation +# that you've already created. This node should be placed after a Breakable. +# +# source://prettier_print//lib/prettier_print.rb#262 +class PrettierPrint::Trim + # source://prettier_print//lib/prettier_print.rb#263 + def pretty_print(q); end +end diff --git a/sorbet/rbi/gems/rainbow@3.1.1.rbi b/sorbet/rbi/gems/rainbow@3.1.1.rbi new file mode 100644 index 0000000..87f4c33 --- /dev/null +++ b/sorbet/rbi/gems/rainbow@3.1.1.rbi @@ -0,0 +1,402 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# 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 + def Rainbow(string); end +end + +# source://rainbow//lib/rainbow/string_utils.rb#3 +module Rainbow + class << self + # source://rainbow//lib/rainbow/global.rb#10 + def enabled; end + + # source://rainbow//lib/rainbow/global.rb#14 + def enabled=(value); end + + # source://rainbow//lib/rainbow/global.rb#6 + def global; end + + # source://rainbow//lib/rainbow.rb#6 + def new; end + + # source://rainbow//lib/rainbow/global.rb#18 + def uncolor(string); end + end +end + +# source://rainbow//lib/rainbow/color.rb#4 +class Rainbow::Color + # Returns the value of attribute ground. + # + # source://rainbow//lib/rainbow/color.rb#5 + def ground; end + + class << self + # source://rainbow//lib/rainbow/color.rb#7 + def build(ground, values); end + + # source://rainbow//lib/rainbow/color.rb#40 + def parse_hex_color(hex); end + end +end + +# source://rainbow//lib/rainbow/color.rb#54 +class Rainbow::Color::Indexed < ::Rainbow::Color + # @return [Indexed] a new instance of Indexed + # + # source://rainbow//lib/rainbow/color.rb#57 + def initialize(ground, num); end + + # source://rainbow//lib/rainbow/color.rb#62 + def codes; end + + # Returns the value of attribute num. + # + # source://rainbow//lib/rainbow/color.rb#55 + def num; end +end + +# source://rainbow//lib/rainbow/color.rb#69 +class Rainbow::Color::Named < ::Rainbow::Color::Indexed + # @return [Named] a new instance of Named + # + # source://rainbow//lib/rainbow/color.rb#90 + def initialize(ground, name); end + + class << self + # source://rainbow//lib/rainbow/color.rb#82 + def color_names; end + + # source://rainbow//lib/rainbow/color.rb#86 + def valid_names; end + end +end + +# source://rainbow//lib/rainbow/color.rb#70 +Rainbow::Color::Named::NAMES = T.let(T.unsafe(nil), Hash) + +# source://rainbow//lib/rainbow/color.rb#100 +class Rainbow::Color::RGB < ::Rainbow::Color::Indexed + # @return [RGB] a new instance of RGB + # + # source://rainbow//lib/rainbow/color.rb#107 + def initialize(ground, *values); end + + # Returns the value of attribute b. + # + # source://rainbow//lib/rainbow/color.rb#101 + def b; end + + # source://rainbow//lib/rainbow/color.rb#116 + def codes; end + + # Returns the value of attribute g. + # + # source://rainbow//lib/rainbow/color.rb#101 + def g; end + + # Returns the value of attribute r. + # + # source://rainbow//lib/rainbow/color.rb#101 + def r; end + + private + + # source://rainbow//lib/rainbow/color.rb#122 + def code_from_rgb; end + + class << self + # source://rainbow//lib/rainbow/color.rb#103 + def to_ansi_domain(value); end + end +end + +# source://rainbow//lib/rainbow/color.rb#129 +class Rainbow::Color::X11Named < ::Rainbow::Color::RGB + include ::Rainbow::X11ColorNames + + # @return [X11Named] a new instance of X11Named + # + # source://rainbow//lib/rainbow/color.rb#140 + def initialize(ground, name); end + + class << self + # source://rainbow//lib/rainbow/color.rb#132 + def color_names; end + + # source://rainbow//lib/rainbow/color.rb#136 + def valid_names; end + end +end + +# source://rainbow//lib/rainbow/null_presenter.rb#4 +class Rainbow::NullPresenter < ::String + # source://rainbow//lib/rainbow/null_presenter.rb#9 + def background(*_values); end + + # source://rainbow//lib/rainbow/null_presenter.rb#9 + def bg(*_values); end + + # source://rainbow//lib/rainbow/null_presenter.rb#49 + def black; end + + # source://rainbow//lib/rainbow/null_presenter.rb#33 + def blink; end + + # source://rainbow//lib/rainbow/null_presenter.rb#65 + def blue; end + + # source://rainbow//lib/rainbow/null_presenter.rb#17 + def bold; end + + # source://rainbow//lib/rainbow/null_presenter.rb#17 + def bright; end + + # source://rainbow//lib/rainbow/null_presenter.rb#5 + def color(*_values); end + + # source://rainbow//lib/rainbow/null_presenter.rb#45 + def cross_out; end + + # source://rainbow//lib/rainbow/null_presenter.rb#73 + def cyan; end + + # source://rainbow//lib/rainbow/null_presenter.rb#21 + def dark; end + + # source://rainbow//lib/rainbow/null_presenter.rb#21 + def faint; end + + # source://rainbow//lib/rainbow/null_presenter.rb#5 + def fg(*_values); end + + # source://rainbow//lib/rainbow/null_presenter.rb#5 + def foreground(*_values); end + + # source://rainbow//lib/rainbow/null_presenter.rb#57 + def green; end + + # source://rainbow//lib/rainbow/null_presenter.rb#41 + def hide; end + + # source://rainbow//lib/rainbow/null_presenter.rb#37 + def inverse; end + + # source://rainbow//lib/rainbow/null_presenter.rb#25 + def italic; end + + # source://rainbow//lib/rainbow/null_presenter.rb#69 + def magenta; end + + # source://rainbow//lib/rainbow/null_presenter.rb#81 + def method_missing(method_name, *args); end + + # source://rainbow//lib/rainbow/null_presenter.rb#53 + def red; end + + # source://rainbow//lib/rainbow/null_presenter.rb#13 + def reset; end + + # source://rainbow//lib/rainbow/null_presenter.rb#45 + def strike; end + + # source://rainbow//lib/rainbow/null_presenter.rb#29 + def underline; end + + # source://rainbow//lib/rainbow/null_presenter.rb#77 + def white; end + + # source://rainbow//lib/rainbow/null_presenter.rb#61 + def yellow; end + + private + + # @return [Boolean] + # + # source://rainbow//lib/rainbow/null_presenter.rb#89 + def respond_to_missing?(method_name, *args); end +end + +# source://rainbow//lib/rainbow/presenter.rb#8 +class Rainbow::Presenter < ::String + # Sets background color of this text. + # + # source://rainbow//lib/rainbow/presenter.rb#30 + def background(*values); end + + # Sets background color of this text. + # + # source://rainbow//lib/rainbow/presenter.rb#30 + def bg(*values); end + + # source://rainbow//lib/rainbow/presenter.rb#92 + def black; end + + # Turns on blinking attribute for this text (not well supported by terminal + # emulators). + # + # source://rainbow//lib/rainbow/presenter.rb#72 + def blink; end + + # source://rainbow//lib/rainbow/presenter.rb#108 + def blue; end + + # Turns on bright/bold for this text. + # + # source://rainbow//lib/rainbow/presenter.rb#45 + def bold; end + + # Turns on bright/bold for this text. + # + # source://rainbow//lib/rainbow/presenter.rb#45 + def bright; end + + # Sets color of this text. + # + # source://rainbow//lib/rainbow/presenter.rb#22 + def color(*values); end + + # source://rainbow//lib/rainbow/presenter.rb#86 + def cross_out; end + + # source://rainbow//lib/rainbow/presenter.rb#116 + def cyan; end + + # Turns on faint/dark for this text (not well supported by terminal + # emulators). + # + # source://rainbow//lib/rainbow/presenter.rb#53 + def dark; end + + # Turns on faint/dark for this text (not well supported by terminal + # emulators). + # + # source://rainbow//lib/rainbow/presenter.rb#53 + def faint; end + + # Sets color of this text. + # + # source://rainbow//lib/rainbow/presenter.rb#22 + def fg(*values); end + + # Sets color of this text. + # + # source://rainbow//lib/rainbow/presenter.rb#22 + def foreground(*values); end + + # source://rainbow//lib/rainbow/presenter.rb#100 + def green; end + + # Hides this text (set its color to the same as background). + # + # source://rainbow//lib/rainbow/presenter.rb#82 + def hide; end + + # Inverses current foreground/background colors. + # + # source://rainbow//lib/rainbow/presenter.rb#77 + def inverse; end + + # Turns on italic style for this text (not well supported by terminal + # emulators). + # + # source://rainbow//lib/rainbow/presenter.rb#61 + def italic; end + + # source://rainbow//lib/rainbow/presenter.rb#112 + def magenta; end + + # We take care of X11 color method call here. + # Such as #aqua, #ghostwhite. + # + # source://rainbow//lib/rainbow/presenter.rb#126 + def method_missing(method_name, *args); end + + # source://rainbow//lib/rainbow/presenter.rb#96 + def red; end + + # Resets terminal to default colors/backgrounds. + # + # It shouldn't be needed to use this method because all methods + # append terminal reset code to end of string. + # + # source://rainbow//lib/rainbow/presenter.rb#40 + def reset; end + + # source://rainbow//lib/rainbow/presenter.rb#86 + def strike; end + + # Turns on underline decoration for this text. + # + # source://rainbow//lib/rainbow/presenter.rb#66 + def underline; end + + # source://rainbow//lib/rainbow/presenter.rb#120 + def white; end + + # source://rainbow//lib/rainbow/presenter.rb#104 + def yellow; end + + private + + # @return [Boolean] + # + # source://rainbow//lib/rainbow/presenter.rb#134 + def respond_to_missing?(method_name, *args); end + + # source://rainbow//lib/rainbow/presenter.rb#140 + def wrap_with_sgr(codes); end +end + +# source://rainbow//lib/rainbow/presenter.rb#9 +Rainbow::Presenter::TERM_EFFECTS = T.let(T.unsafe(nil), Hash) + +# source://rainbow//lib/rainbow/string_utils.rb#4 +class Rainbow::StringUtils + class << self + # source://rainbow//lib/rainbow/string_utils.rb#17 + def uncolor(string); end + + # source://rainbow//lib/rainbow/string_utils.rb#5 + def wrap_with_sgr(string, codes); end + end +end + +# source://rainbow//lib/rainbow/wrapper.rb#7 +class Rainbow::Wrapper + # @return [Wrapper] a new instance of Wrapper + # + # source://rainbow//lib/rainbow/wrapper.rb#10 + def initialize(enabled = T.unsafe(nil)); end + + # Returns the value of attribute enabled. + # + # source://rainbow//lib/rainbow/wrapper.rb#8 + def enabled; end + + # Sets the attribute enabled + # + # @param value the value to set the attribute enabled to. + # + # source://rainbow//lib/rainbow/wrapper.rb#8 + def enabled=(_arg0); end + + # source://rainbow//lib/rainbow/wrapper.rb#14 + def wrap(string); end +end + +# source://rainbow//lib/rainbow/x11_color_names.rb#4 +module Rainbow::X11ColorNames; end + +# source://rainbow//lib/rainbow/x11_color_names.rb#5 +Rainbow::X11ColorNames::NAMES = T.let(T.unsafe(nil), Hash) diff --git a/sorbet/rbi/gems/rake@13.0.6.rbi b/sorbet/rbi/gems/rake@13.0.6.rbi new file mode 100644 index 0000000..0202f06 --- /dev/null +++ b/sorbet/rbi/gems/rake@13.0.6.rbi @@ -0,0 +1,3024 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rake` gem. +# Please instead update this file by running `bin/tapioca gem rake`. + +# :stopdoc: +# +# Some top level Constants. +# +# source://rake//lib/rake.rb#70 +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 +module FileUtils + # Run a Ruby interpreter with the given arguments. + # + # Example: + # ruby %{-pe '$_.upcase!' ; rm # -rf /. + # + # If a block is given, upon command completion the block is called with an + # OK flag (true on a zero exit status) and a Process::Status object. + # Without a block a RuntimeError is raised when the command exits non-zero. + # + # Examples: + # + # sh 'ls -ltr' + # + # sh 'ls', 'file with spaces' + # + # # check exit status after command runs + # sh %{grep pattern file} do |ok, res| + # if !ok + # puts "pattern not found (status = #{res.exitstatus})" + # end + # end + # + # source://rake//lib/rake/file_utils.rb#43 + def sh(*cmd, &block); end + + # Split a file path into individual directory names. + # + # Example: + # split_all("a/b/c") => ['a', 'b', 'c'] + # + # source://rake//lib/rake/file_utils.rb#128 + def split_all(path); end + + private + + # source://rake//lib/rake/file_utils.rb#61 + def create_shell_runner(cmd); end + + # source://rake//lib/rake/file_utils.rb#86 + def set_verbose_option(options); end + + # source://rake//lib/rake/file_utils.rb#73 + def sh_show_command(cmd); end +end + +# source://rake//lib/rake/file_utils.rb#108 +FileUtils::LN_SUPPORTED = T.let(T.unsafe(nil), Array) + +# Path to the currently running Ruby program +# +# source://rake//lib/rake/file_utils.rb#10 +FileUtils::RUBY = T.let(T.unsafe(nil), String) + +# source://rake//lib/rake/ext/core.rb#2 +class Module + # Check for an existing method in the current class before extending. If + # the method already exists, then a warning is printed and the extension is + # not added. Otherwise the block is yielded and any definitions in the + # block will take effect. + # + # Usage: + # + # class String + # rake_extension("xyz") do + # def xyz + # ... + # end + # end + # end + # + # source://rake//lib/rake/ext/core.rb#18 + def rake_extension(method); end +end + +# source://rake//lib/rake.rb#24 +module Rake + extend ::FileUtils::StreamUtils_ + extend ::FileUtils + extend ::Rake::FileUtilsExt + + class << self + # Add files to the rakelib list + # + # source://rake//lib/rake/rake_module.rb#33 + def add_rakelib(*files); end + + # Current Rake Application + # + # source://rake//lib/rake/rake_module.rb#8 + def application; end + + # Set the current Rake application object. + # + # source://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 + 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 + def from_pathname(path); end + + # Load a rakefile. + # + # source://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 + def original_dir; end + + # source://rake//lib/rake/rake_module.rb#17 + def suggested_thread_count; end + + # Make +block_application+ the default rake application inside a block so + # you can load rakefiles into a different application. + # + # This is useful when you want to run rake tasks inside a library without + # running rake in a sub-shell. + # + # Example: + # + # Dir.chdir 'other/directory' + # + # other_rake = Rake.with_application do |rake| + # rake.load_rakefile + # end + # + # puts other_rake.tasks + # + # source://rake//lib/rake/rake_module.rb#54 + def with_application(block_application = T.unsafe(nil)); end + end +end + +# Rake main application object. When invoking +rake+ from the +# command line, a Rake::Application object is created and run. +# +# source://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 + def initialize; end + + # Add a file to the list of files to be imported. + # + # source://rake//lib/rake/application.rb#777 + def add_import(fn); end + + # Add a loader to handle imported files ending in the extension + # +ext+. + # + # source://rake//lib/rake/application.rb#139 + def add_loader(ext, loader); end + + # Collect the list of tasks on the command line. If no tasks are + # given, return a list containing only the default task. + # Environmental assignments are processed at this time as well. + # + # `args` is the list of arguments to peruse to get the list of tasks. + # It should be the command line that was given to rake, less any + # recognised command-line options, which OptionParser.parse will + # have taken care of already. + # + # source://rake//lib/rake/application.rb#758 + def collect_command_line_tasks(args); end + + # Default task name ("default"). + # (May be overridden by subclasses) + # + # source://rake//lib/rake/application.rb#772 + def default_task_name; end + + # Warn about deprecated usage. + # + # Example: + # Rake.application.deprecate("import", "Rake.import", caller.first) + # + # source://rake//lib/rake/application.rb#258 + def deprecate(old_usage, new_usage, call_site); end + + # source://rake//lib/rake/application.rb#222 + def display_cause_details(ex); end + + # Display the error message that caused the exception. + # + # source://rake//lib/rake/application.rb#206 + def display_error_message(ex); end + + # source://rake//lib/rake/application.rb#245 + def display_exception_backtrace(ex); end + + # source://rake//lib/rake/application.rb#214 + def display_exception_details(ex); end + + # source://rake//lib/rake/application.rb#229 + def display_exception_details_seen; end + + # source://rake//lib/rake/application.rb#237 + def display_exception_message_details(ex); end + + # Display the tasks and prerequisites + # + # source://rake//lib/rake/application.rb#381 + def display_prerequisites; end + + # Display the tasks and comments. + # + # source://rake//lib/rake/application.rb#298 + def display_tasks_and_comments; end + + # Calculate the dynamic width of the + # + # source://rake//lib/rake/application.rb#349 + def dynamic_width; end + + # source://rake//lib/rake/application.rb#353 + def dynamic_width_stty; end + + # source://rake//lib/rake/application.rb#357 + 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 + def exit_because_of_exception(ex); end + + # source://rake//lib/rake/application.rb#678 + 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 + def handle_options(argv); end + + # @return [Boolean] + # + # source://rake//lib/rake/application.rb#233 + 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 + def have_rakefile; end + + # Initialize the command line parameters and app name. + # + # source://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 + def invoke_task(task_string); end + + # Load the pending list of imported files. + # + # source://rake//lib/rake/application.rb#782 + def load_imports; end + + # Find the rakefile and then load it and any pending imports. + # + # source://rake//lib/rake/application.rb#102 + def load_rakefile; end + + # The name of the application (typically 'rake') + # + # source://rake//lib/rake/application.rb#24 + def name; end + + # Application options from the command line + # + # source://rake//lib/rake/application.rb#145 + def options; end + + # The original directory where rake was invoked. + # + # source://rake//lib/rake/application.rb#27 + def original_dir; end + + # source://rake//lib/rake/application.rb#163 + def parse_task_string(string); end + + # source://rake//lib/rake/application.rb#690 + 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 + 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 + def rakefile; end + + # source://rake//lib/rake/application.rb#798 + def rakefile_location(backtrace = T.unsafe(nil)); end + + # source://rake//lib/rake/application.rb#695 + def raw_load_rakefile; end + + # Run the Rake application. The run method performs the following + # three steps: + # + # * Initialize the command line options (+init+). + # * Define the tasks (+load_rakefile+). + # * Run the top level tasks (+top_level+). + # + # If you wish to build a custom rake command, you should call + # +init+ on your application. Then define any tasks. Finally, + # call +top_level+ to run your top level tasks. + # + # source://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 + def run_with_threads; end + + # source://rake//lib/rake/application.rb#807 + def set_default_options; end + + # Provide standard exception handling for the given block. + # + # source://rake//lib/rake/application.rb#185 + 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 + def standard_rake_options; end + + # The directory path containing the system wide rakefiles. + # + # source://rake//lib/rake/application.rb#727 + def system_dir; end + + # Number of columns on the terminal + # + # source://rake//lib/rake/application.rb#33 + def terminal_columns; end + + # Number of columns on the terminal + # + # source://rake//lib/rake/application.rb#33 + def terminal_columns=(_arg0); end + + # source://rake//lib/rake/application.rb#337 + def terminal_width; end + + # Return the thread pool used for multithreaded processing. + # + # source://rake//lib/rake/application.rb#150 + def thread_pool; end + + # Run the top level tasks of a Rake application. + # + # source://rake//lib/rake/application.rb#109 + def top_level; end + + # List of the top level task names (task names from the command line). + # + # source://rake//lib/rake/application.rb#36 + def top_level_tasks; end + + # source://rake//lib/rake/application.rb#388 + def trace(*strings); end + + # source://rake//lib/rake/application.rb#370 + 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 + def truncate_output?; end + + # Override the detected TTY output state (mostly for testing) + # + # source://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 + def tty_output?; end + + # @return [Boolean] + # + # source://rake//lib/rake/application.rb#361 + def unix?; end + + # @return [Boolean] + # + # source://rake//lib/rake/application.rb#366 + def windows?; end + + private + + # source://rake//lib/rake/application.rb#721 + def glob(path, &block); end + + # Does the exception have a task invocation chain? + # + # @return [Boolean] + # + # source://rake//lib/rake/application.rb#267 + def has_chain?(exception); end + + # source://rake//lib/rake/application.rb#620 + def select_tasks_to_show(options, show_tasks, value); end + + # source://rake//lib/rake/application.rb#627 + def select_trace_output(options, trace_option, value); end + + # source://rake//lib/rake/application.rb#393 + def sort_options(options); end + + # source://rake//lib/rake/application.rb#744 + def standard_system_dir; end +end + +# source://rake//lib/rake/application.rb#41 +Rake::Application::DEFAULT_RAKEFILES = T.let(T.unsafe(nil), Array) + +# source://rake//lib/rake/backtrace.rb#3 +module Rake::Backtrace + class << self + # source://rake//lib/rake/backtrace.rb#18 + def collapse(backtrace); end + end +end + +# source://rake//lib/rake/backtrace.rb#8 +Rake::Backtrace::SUPPRESSED_PATHS = T.let(T.unsafe(nil), Array) + +# source://rake//lib/rake/backtrace.rb#12 +Rake::Backtrace::SUPPRESSED_PATHS_RE = T.let(T.unsafe(nil), String) + +# source://rake//lib/rake/backtrace.rb#16 +Rake::Backtrace::SUPPRESS_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://rake//lib/rake/backtrace.rb#4 +Rake::Backtrace::SYS_KEYS = T.let(T.unsafe(nil), Array) + +# source://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 +module Rake::Cloneable + private + + # The hook that is invoked by 'clone' and 'dup' methods. + # + # source://rake//lib/rake/cloneable.rb#8 + def initialize_copy(source); end +end + +# source://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 +class Rake::CpuCounter + # source://rake//lib/rake/cpu_counter.rb#22 + def count; end + + # source://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 + def count; end + end +end + +# DSL is a module that provides #task, #desc, #namespace, etc. Use this +# when you'd like to use rake outside the top level scope. +# +# For a Rakefile you run from the command line this module is automatically +# included. +# +# source://rake//lib/rake/dsl_definition.rb#14 +module Rake::DSL + include ::FileUtils::StreamUtils_ + include ::FileUtils + include ::Rake::FileUtilsExt + + private + + # source://rake//lib/rake/file_utils_ext.rb#34 + def cd(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def chdir(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def chmod(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def chmod_R(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def chown(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def chown_R(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def copy(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def cp(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def cp_lr(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def cp_r(*args, **options, &block); end + + # Describes the next rake task. Duplicate descriptions are discarded. + # Descriptions are shown with rake -T (up to the first + # sentence) and rake -D (the entire description). + # + # Example: + # desc "Run the Unit Tests" + # task test: [:build] + # # ... run tests + # end + # + # source://rake//lib/rake/dsl_definition.rb#165 + def desc(description); end + + # Declare a set of files tasks to create the given directories on + # demand. + # + # Example: + # directory "testdata/doc" + # + # source://rake//lib/rake/dsl_definition.rb#92 + def directory(*args, &block); end + + # Declare a file task. + # + # Example: + # file "config.cfg" => ["config.template"] do + # open("config.cfg", "w") do |outfile| + # open("config.template") do |infile| + # while line = infile.gets + # outfile.puts line + # end + # end + # end + # end + # + # source://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 + def file_create(*args, &block); end + + # Import the partial Rakefiles +fn+. Imported files are loaded + # _after_ the current file is completely loaded. This allows the + # import statement to appear anywhere in the importing file, and yet + # allowing the imported files to depend on objects defined in the + # importing file. + # + # A common use of the import statement is to include files + # containing dependency declarations. + # + # See also the --rakelibdir command line option. + # + # Example: + # import ".depend", "my_rules" + # + # source://rake//lib/rake/dsl_definition.rb#183 + def import(*fns); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def install(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def link(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def ln(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def ln_s(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def ln_sf(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def ln_sr(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def makedirs(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def mkdir(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def mkdir_p(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def mkpath(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def move(*args, **options, &block); end + + # Declare a task that performs its prerequisites in + # parallel. Multitasks does *not* guarantee that its prerequisites + # will execute in any given order (which is obvious when you think + # about it) + # + # Example: + # multitask deploy: %w[deploy_gem deploy_rdoc] + # + # source://rake//lib/rake/dsl_definition.rb#112 + def multitask(*args, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def mv(*args, **options, &block); end + + # Create a new rake namespace and use it for evaluating the given + # block. Returns a NameSpace object that can be used to lookup + # tasks defined in the namespace. + # + # Example: + # + # ns = namespace "nested" do + # # the "nested:run" task + # task :run + # end + # task_run = ns[:run] # find :run in the given namespace. + # + # Tasks can also be defined in a namespace by using a ":" in the task + # name: + # + # task "nested:test" do + # # ... + # end + # + # source://rake//lib/rake/dsl_definition.rb#135 + def namespace(name = T.unsafe(nil), &block); end + + # source://rake//lib/rake/file_utils_ext.rb#77 + def nowrite(value = T.unsafe(nil)); end + + # source://rake//lib/rake/file_utils_ext.rb#123 + def rake_check_options(options, *optdecl); end + + # source://rake//lib/rake/file_utils_ext.rb#116 + def rake_output_message(message); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def remove(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def rm(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def rm_f(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def rm_r(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def rm_rf(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def rmdir(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def rmtree(*args, **options, &block); end + + # source://rake//lib/rake/file_utils.rb#100 + 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 + # end + # + # source://rake//lib/rake/dsl_definition.rb#151 + def rule(*args, &block); end + + # source://rake//lib/rake/file_utils.rb#112 + def safe_ln(*args, **options); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def safe_unlink(*args, **options, &block); end + + # source://rake//lib/rake/file_utils.rb#43 + def sh(*cmd, &block); end + + # source://rake//lib/rake/file_utils.rb#128 + def split_all(path); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def symlink(*args, **options, &block); end + + # :call-seq: + # task(task_name) + # task(task_name: dependencies) + # task(task_name, arguments => dependencies) + # + # Declare a basic task. The +task_name+ is always the first argument. If + # the task name contains a ":" it is defined in that namespace. + # + # The +dependencies+ may be a single task name or an Array of task names. + # The +argument+ (a single name) or +arguments+ (an Array of names) define + # the arguments provided to the task. + # + # The task, argument and dependency names may be either symbols or + # strings. + # + # A task with a single dependency: + # + # task clobber: %w[clean] do + # rm_rf "html" + # end + # + # A task with an argument and a dependency: + # + # task :package, [:version] => :test do |t, args| + # # ... + # end + # + # To invoke this task from the command line: + # + # $ rake package[1.2.3] + # + # source://rake//lib/rake/dsl_definition.rb#59 + def task(*args, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def touch(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#53 + def verbose(value = T.unsafe(nil)); end + + # source://rake//lib/rake/file_utils_ext.rb#107 + def when_writing(msg = T.unsafe(nil)); end +end + +# Default Rakefile loader used by +import+. +# +# source://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 + def load(fn); end +end + +# source://rake//lib/rake/early_time.rb#21 +Rake::EARLY = T.let(T.unsafe(nil), Rake::EarlyTime) + +# source://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 +class Rake::EarlyTime + include ::Comparable + include ::Singleton + extend ::Singleton::SingletonClassMethods + + # The EarlyTime always comes before +other+! + # + # source://rake//lib/rake/early_time.rb#12 + def <=>(other); end + + # source://rake//lib/rake/early_time.rb#16 + def to_s; end + + class << self + private + + def allocate; end + def new(*_arg0); end + end +end + +# A FileCreationTask is a file task that when used as a dependency will be +# needed if and only if the file has not been created. Once created, it is +# not re-triggered if any of its dependencies are newer, nor does trigger +# any rebuilds of tasks that depend on it whenever it is updated. +# +# source://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 + 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 + def timestamp; end +end + +# A FileList is essentially an array with a few helper methods defined to +# make file manipulation a bit easier. +# +# FileLists are lazy. When given a list of glob patterns for possible files +# to be included in the file list, instead of searching the file structures +# to find the files, a FileList holds the pattern for latter use. +# +# This allows us to define a number of FileList to match any number of +# files, but only search out the actual files when then FileList itself is +# actually used. The key is that the first time an element of the +# FileList/Array is requested, the pending patterns are resolved into a real +# list of file names. +# +# source://rake//lib/rake/file_list.rb#22 +class Rake::FileList + include ::Rake::Cloneable + + # Create a file list from the globbable patterns given. If you wish to + # perform multiple includes or excludes at object build time, use the + # "yield self" pattern. + # + # Example: + # file_list = FileList.new('lib/**/*.rb', 'test/test*.rb') + # + # pkg_files = FileList.new('lib/**/*') do |fl| + # fl.exclude(/\bCVS\b/) + # end + # + # @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 + def initialize(*patterns); end + + # source://rake//lib/rake/file_list.rb#68 + def &(*args, &block); end + + # Redefine * to return either a string or a new file list. + # + # source://rake//lib/rake/file_list.rb#193 + def *(other); end + + # source://rake//lib/rake/file_list.rb#68 + def +(*args, &block); end + + # source://rake//lib/rake/file_list.rb#68 + def -(*args, &block); end + + # source://rake//lib/rake/file_list.rb#203 + def <<(obj); end + + # source://rake//lib/rake/file_list.rb#77 + def <=>(*args, &block); end + + # A FileList is equal through array equality. + # + # source://rake//lib/rake/file_list.rb#171 + def ==(array); end + + # source://rake//lib/rake/file_list.rb#77 + def [](*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + 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 + def add(*filenames); end + + # source://rake//lib/rake/file_list.rb#77 + def all?(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def any?(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def append(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def assoc(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def at(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def bsearch(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def bsearch_index(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def chain(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def chunk(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def chunk_while(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def clear(*args, &block); end + + # Clear all the exclude patterns so that we exclude nothing. + # + # source://rake//lib/rake/file_list.rb#164 + def clear_exclude; end + + # source://rake//lib/rake/file_list.rb#68 + def collect(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def collect!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def collect_concat(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def combination(*args, &block); end + + # source://rake//lib/rake/file_list.rb#68 + def compact(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def compact!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def concat(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def count(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def cycle(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def deconstruct(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def delete(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def delete_at(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def delete_if(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def detect(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def difference(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def dig(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def drop(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def drop_while(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def each(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def each_cons(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def each_entry(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def each_index(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def each_slice(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def each_with_index(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def each_with_object(*args, &block); end + + # Grep each of the files in the filelist using the given pattern. If a + # block is given, call the block on each matching line, passing the file + # name, line number, and the matching line of text. If no block is given, + # a standard emacs style file:linenumber:line message will be printed to + # standard out. Returns the number of matched items. + # + # source://rake//lib/rake/file_list.rb#293 + def egrep(pattern, *options); end + + # source://rake//lib/rake/file_list.rb#77 + def empty?(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def entries(*args, &block); end + + # Register a list of file name patterns that should be excluded from the + # list. Patterns may be regular expressions, glob patterns or regular + # strings. In addition, a block given to exclude will remove entries that + # return true when given to the block. + # + # Note that glob patterns are expanded against the file system. If a file + # is explicitly added to a file list, but does not exist in the file + # system, then an glob pattern in the exclude list will not exclude the + # file. + # + # Examples: + # FileList['a.c', 'b.c'].exclude("a.c") => ['b.c'] + # FileList['a.c', 'b.c'].exclude(/^a/) => ['b.c'] + # + # If "a.c" is a file, then ... + # FileList['a.c', 'b.c'].exclude("a.*") => ['b.c'] + # + # If "a.c" is not a file, then ... + # FileList['a.c', 'b.c'].exclude("a.*") => ['a.c', 'b.c'] + # + # source://rake//lib/rake/file_list.rb#150 + def exclude(*patterns, &block); end + + # Should the given file name be excluded from the list? + # + # NOTE: This method was formerly named "exclude?", but Rails + # introduced an exclude? method as an array method and setup a + # conflict with file list. We renamed the method to avoid + # confusion. If you were using "FileList#exclude?" in your user + # code, you will need to update. + # + # @return [Boolean] + # + # source://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 + 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 + def existing!; end + + # Return a new FileList with String#ext method applied to + # each member of the array. + # + # This method is a shortcut for: + # + # array.collect { |item| item.ext(newext) } + # + # +ext+ is a user added method for the Array class. + # + # source://rake//lib/rake/file_list.rb#284 + def ext(newext = T.unsafe(nil)); end + + # source://rake//lib/rake/file_list.rb#77 + def fetch(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def fill(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def filter(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def filter!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def filter_map(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def find(*args, &block); end + + # source://rake//lib/rake/file_list.rb#68 + def find_all(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def find_index(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def first(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def flat_map(*args, &block); end + + # source://rake//lib/rake/file_list.rb#68 + def flatten(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def flatten!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#68 + def grep(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def grep_v(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def group_by(*args, &block); end + + # Return a new FileList with the results of running +gsub+ against each + # element of the original list. + # + # Example: + # FileList['lib/test/file', 'x/y'].gsub(/\//, "\\") + # => ['lib\\test\\file', 'x\\y'] + # + # source://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 + def gsub!(pat, rep); end + + # source://rake//lib/rake/file_list.rb#391 + def import(array); end + + # Add file names defined by glob patterns to the file list. If an array + # is given, add each element of the array. + # + # Example: + # file_list.include("*.java", "*.cfg") + # file_list.include %w( math.c lib.h *.o ) + # + # source://rake//lib/rake/file_list.rb#116 + def include(*filenames); end + + # source://rake//lib/rake/file_list.rb#77 + def include?(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def index(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def inject(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def insert(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def inspect(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def intersect?(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def intersection(*args, &block); end + + # Lie about our class. + # + # @return [Boolean] + # + # source://rake//lib/rake/file_list.rb#187 + def is_a?(klass); end + + # source://rake//lib/rake/file_list.rb#77 + def join(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def keep_if(*args, &block); end + + # Lie about our class. + # + # @return [Boolean] + # + # source://rake//lib/rake/file_list.rb#187 + def kind_of?(klass); end + + # source://rake//lib/rake/file_list.rb#77 + def last(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def lazy(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def length(*args, &block); end + + # source://rake//lib/rake/file_list.rb#68 + def map(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def map!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def max(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def max_by(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def member?(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def min(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def min_by(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def minmax(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def minmax_by(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def none?(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def one?(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + 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 + 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 + def pathmap(spec = T.unsafe(nil), &block); end + + # source://rake//lib/rake/file_list.rb#77 + 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 + def pop(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def prepend(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def product(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def push(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def rassoc(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def reduce(*args, &block); end + + # source://rake//lib/rake/file_list.rb#68 + def reject(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def reject!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def repeated_combination(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def repeated_permutation(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def replace(*args, &block); end + + # Resolve all the pending adds now. + # + # source://rake//lib/rake/file_list.rb#210 + def resolve; end + + # source://rake//lib/rake/file_list.rb#77 + def reverse(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def reverse!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def reverse_each(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def rindex(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def rotate(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def rotate!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def sample(*args, &block); end + + # source://rake//lib/rake/file_list.rb#68 + def select(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def select!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def shelljoin(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def shift(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def shuffle(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def shuffle!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def size(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def slice(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def slice!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def slice_after(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def slice_before(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def slice_when(*args, &block); end + + # source://rake//lib/rake/file_list.rb#68 + def sort(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def sort!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#68 + def sort_by(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def sort_by!(*args, &block); end + + # Return a new FileList with the results of running +sub+ against each + # element of the original list. + # + # Example: + # FileList['a.c', 'b.c'].sub(/\.c$/, '.o') => ['a.o', 'b.o'] + # + # source://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 + def sub!(pat, rep); end + + # source://rake//lib/rake/file_list.rb#77 + def sum(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def take(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def take_while(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def tally(*args, &block); end + + # Return the internal array object. + # + # source://rake//lib/rake/file_list.rb#176 + def to_a; end + + # Return the internal array object. + # + # source://rake//lib/rake/file_list.rb#182 + def to_ary; end + + # source://rake//lib/rake/file_list.rb#77 + 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 + def to_s; end + + # source://rake//lib/rake/file_list.rb#77 + def to_set(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def transpose(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def union(*args, &block); end + + # source://rake//lib/rake/file_list.rb#68 + def uniq(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def uniq!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def unshift(*args, &block); end + + # source://rake//lib/rake/file_list.rb#68 + def values_at(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def zip(*args, &block); end + + # source://rake//lib/rake/file_list.rb#68 + def |(*args, &block); end + + private + + # Add matching glob patterns. + # + # source://rake//lib/rake/file_list.rb#350 + def add_matching(pattern); end + + # source://rake//lib/rake/file_list.rb#220 + def resolve_add(fn); end + + # source://rake//lib/rake/file_list.rb#230 + def resolve_exclude; end + + class << self + # Create a new file list including the files listed. Similar to: + # + # FileList.new(*args) + # + # source://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 + def glob(pattern, *args); end + end +end + +# List of array methods (that are not in +Object+) that need to be +# delegated. +# +# source://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 +Rake::FileList::DEFAULT_IGNORE_PATTERNS = T.let(T.unsafe(nil), Array) + +# source://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 +Rake::FileList::DELEGATING_METHODS = T.let(T.unsafe(nil), Array) + +# source://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 +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 +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 +Rake::FileList::SPECIAL_RETURN = T.let(T.unsafe(nil), Array) + +# A FileTask is a task that includes time based dependencies. If any of a +# FileTask's prerequisites have a timestamp that is later than the file +# represented by this task, then the file must be rebuilt (using the +# supplied actions). +# +# source://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 + def needed?; end + + # Time stamp for file task. + # + # source://rake//lib/rake/file_task.rb#21 + 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 + 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 + def scope_name(scope, task_name); end + end +end + +# FileUtilsExt provides a custom version of the FileUtils methods +# that respond to the verbose and nowrite +# commands. +# +# source://rake//lib/rake/file_utils_ext.rb#10 +module Rake::FileUtilsExt + include ::FileUtils::StreamUtils_ + include ::FileUtils + extend ::FileUtils::StreamUtils_ + extend ::FileUtils + extend ::Rake::FileUtilsExt + + # source://rake//lib/rake/file_utils_ext.rb#34 + def cd(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def chdir(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def chmod(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def chmod_R(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def chown(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def chown_R(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def copy(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def cp(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def cp_lr(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def cp_r(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def install(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def link(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def ln(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def ln_s(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def ln_sf(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def ln_sr(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def makedirs(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def mkdir(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def mkdir_p(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def mkpath(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def move(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def mv(*args, **options, &block); end + + # Get/set the nowrite flag controlling output from the FileUtils + # utilities. If verbose is true, then the utility method is + # echoed to standard output. + # + # Examples: + # nowrite # return the current value of the + # # nowrite flag + # nowrite(v) # set the nowrite flag to _v_. + # nowrite(v) { code } # Execute code with the nowrite flag set + # # temporarily to _v_. Return to the + # # original value when code is done. + # + # source://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 + 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 + def rake_output_message(message); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def remove(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def rm(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def rm_f(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def rm_r(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def rm_rf(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def rmdir(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def rmtree(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def safe_unlink(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def symlink(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def touch(*args, **options, &block); end + + # Get/set the verbose flag controlling output from the FileUtils + # utilities. If verbose is true, then the utility method is + # echoed to standard output. + # + # Examples: + # verbose # return the current value of the + # # verbose flag + # verbose(v) # set the verbose flag to _v_. + # verbose(v) { code } # Execute code with the verbose flag set + # # temporarily to _v_. Return to the + # # original value when code is done. + # + # source://rake//lib/rake/file_utils_ext.rb#53 + def verbose(value = T.unsafe(nil)); end + + # Use this function to prevent potentially destructive ruby code + # from running when the :nowrite flag is set. + # + # Example: + # + # when_writing("Building Project") do + # project.build + # end + # + # The following code will build the project under normal + # conditions. If the nowrite(true) flag is set, then the example + # will print: + # + # DRYRUN: Building Project + # + # instead of actually building the project. + # + # source://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 + 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 + def nowrite_flag=(_arg0); end + + # Returns the value of attribute verbose_flag. + # + # source://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 + def verbose_flag=(_arg0); end + end +end + +# source://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 +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 + def append(invocation); end + + # Is the invocation already in the chain? + # + # @return [Boolean] + # + # source://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 + def to_s; end + + private + + # source://rake//lib/rake/invocation_chain.rb#34 + def prefix; end + + class << self + # Class level append. + # + # source://rake//lib/rake/invocation_chain.rb#28 + def append(invocation, chain); end + end +end + +# source://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 +class Rake::InvocationChain::EmptyInvocationChain < ::Rake::LinkedList::EmptyLinkedList + # source://rake//lib/rake/invocation_chain.rb#46 + def append(invocation); end + + # @return [Boolean] + # + # source://rake//lib/rake/invocation_chain.rb#42 + def member?(obj); end + + # source://rake//lib/rake/invocation_chain.rb#50 + def to_s; end +end + +# source://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 + def chain; end + + # Set the invocation chain in effect when this exception was + # detected. + # + # source://rake//lib/rake/invocation_exception_mixin.rb#13 + def chain=(value); end +end + +# source://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 +class Rake::LateTime + include ::Comparable + include ::Singleton + extend ::Singleton::SingletonClassMethods + + # source://rake//lib/rake/late_time.rb#8 + def <=>(other); end + + # source://rake//lib/rake/late_time.rb#12 + def to_s; end + + class << self + private + + def allocate; end + def new(*_arg0); end + end +end + +# Polylithic linked list structure used to implement several data +# structures in Rake. +# +# source://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 + def initialize(head, tail = T.unsafe(nil)); end + + # Lists are structurally equivalent. + # + # source://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 + def conj(item); end + + # For each item in the list. + # + # source://rake//lib/rake/linked_list.rb#48 + def each; end + + # Is the list empty? + # .make guards against a list being empty making any instantiated LinkedList + # object not empty by default + # You should consider overriding this method if you implement your own .make method + # + # @return [Boolean] + # + # source://rake//lib/rake/linked_list.rb#20 + def empty?; end + + # Returns the value of attribute head. + # + # source://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 + def inspect; end + + # Returns the value of attribute tail. + # + # source://rake//lib/rake/linked_list.rb#8 + def tail; end + + # Convert to string: LL(item, item...) + # + # source://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 + def cons(head, tail); end + + # The standard empty list class for the given LinkedList class. + # + # source://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 + def make(*args); end + end +end + +# source://rake//lib/rake/linked_list.rb#110 +Rake::LinkedList::EMPTY = T.let(T.unsafe(nil), Rake::LinkedList::EmptyLinkedList) + +# Represent an empty list, using the Null Object Pattern. +# +# When inheriting from the LinkedList class, you should implement +# a type specific Empty class as well. Make sure you set the class +# instance variable @parent to the associated list class (this +# allows conj, cons and make to work polymorphically). +# +# source://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 + def initialize; end + + # @return [Boolean] + # + # source://rake//lib/rake/linked_list.rb#101 + def empty?; end + + class << self + # source://rake//lib/rake/linked_list.rb#105 + def cons(head, tail); end + end +end + +# Same as a regular task, but the immediate prerequisites are done in +# parallel using Ruby threads. +# +# source://rake//lib/rake/multi_task.rb#7 +class Rake::MultiTask < ::Rake::Task + private + + # source://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 +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 + def initialize(task_manager, scope_list); end + + # Lookup a task named +name+ in the namespace. + # + # source://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 + def scope; end + + # Return the list of tasks defined in this and nested namespaces. + # + # source://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 +module Rake::PrivateReader + mixes_in_class_methods ::Rake::PrivateReader::ClassMethods + + class << self + # source://rake//lib/rake/private_reader.rb#7 + def included(base); end + end +end + +# source://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 + def private_reader(*names); end +end + +# A Promise object represents a promise to do work (a chore) in the +# future. The promise is created with a block and a list of +# arguments for the block. Calling value will return the value of +# the promised chore. +# +# Used by ThreadPool. +# +# source://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 + def initialize(args, &block); end + + # source://rake//lib/rake/promise.rb#14 + def recorder; end + + # source://rake//lib/rake/promise.rb#14 + def recorder=(_arg0); end + + # Return the value of this promise. + # + # If the promised chore is not yet complete, then do the work + # synchronously. We will wait. + # + # source://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 + def work; end + + private + + # Perform the chore promised + # + # source://rake//lib/rake/promise.rb#57 + def chore; end + + # Are we done with the promise + # + # @return [Boolean] + # + # source://rake//lib/rake/promise.rb#83 + def complete?; end + + # free up these items for the GC + # + # source://rake//lib/rake/promise.rb#88 + def discard; end + + # Did the promise throw an error + # + # @return [Boolean] + # + # source://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 + def result?; end + + # Record execution statistics if there is a recorder + # + # source://rake//lib/rake/promise.rb#94 + def stat(*args); end +end + +# source://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 +class Rake::PseudoStatus + # @return [PseudoStatus] a new instance of PseudoStatus + # + # source://rake//lib/rake/pseudo_status.rb#9 + def initialize(code = T.unsafe(nil)); end + + # source://rake//lib/rake/pseudo_status.rb#17 + def >>(n); end + + # @return [Boolean] + # + # source://rake//lib/rake/pseudo_status.rb#25 + def exited?; end + + # source://rake//lib/rake/pseudo_status.rb#7 + def exitstatus; end + + # @return [Boolean] + # + # source://rake//lib/rake/pseudo_status.rb#21 + def stopped?; end + + # source://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 +class Rake::RuleRecursionOverflowError < ::StandardError + # @return [RuleRecursionOverflowError] a new instance of RuleRecursionOverflowError + # + # source://rake//lib/rake/rule_recursion_overflow_error.rb#6 + def initialize(*args); end + + # source://rake//lib/rake/rule_recursion_overflow_error.rb#11 + def add_target(target); end + + # source://rake//lib/rake/rule_recursion_overflow_error.rb#15 + def message; end +end + +# source://rake//lib/rake/scope.rb#3 +class Rake::Scope < ::Rake::LinkedList + # Path for the scope. + # + # source://rake//lib/rake/scope.rb#6 + def path; end + + # Path for the scope + the named path. + # + # source://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 + def trim(n); end +end + +# Singleton null object for an empty scope. +# +# source://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 +class Rake::Scope::EmptyScope < ::Rake::LinkedList::EmptyLinkedList + # source://rake//lib/rake/scope.rb#31 + def path; end + + # source://rake//lib/rake/scope.rb#35 + def path_with_task_name(task_name); end +end + +# A Task is the basic unit of work in a Rakefile. Tasks have associated +# actions (possibly more than one) and a list of prerequisites. When +# invoked, a task will first ensure that all of its prerequisites have an +# opportunity to run and then it will execute its own actions. +# +# Tasks are not usually created directly using the new method, but rather +# use the +file+ and +task+ convenience methods. +# +# source://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 + def initialize(task_name, app); end + + # List of actions attached to a task. + # + # source://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 + 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 + 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 + def already_invoked; end + + # Application owning this task. + # + # source://rake//lib/rake/task.rb#27 + def application; end + + # Application owning this task. + # + # source://rake//lib/rake/task.rb#27 + def application=(_arg0); end + + # Argument description (nil if none). + # + # source://rake//lib/rake/task.rb#136 + def arg_description; end + + # Name of arguments for this task. + # + # source://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 + def clear; end + + # Clear the existing actions on a rake task. + # + # source://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 + def clear_args; end + + # Clear the existing comments on a rake task. + # + # source://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 + def clear_prerequisites; end + + # First line (or sentence) of all comments. Multiple comments are + # separated by a "/". + # + # source://rake//lib/rake/task.rb#322 + def comment; end + + # source://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 + def enhance(deps = T.unsafe(nil), &block); end + + # Execute the actions associated with this task. + # + # source://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 + def full_comment; end + + # source://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 + def investigation; end + + # Invoke the task if it is needed. Prerequisites are invoked first. + # + # source://rake//lib/rake/task.rb#186 + def invoke(*args); end + + # Invoke all the prerequisites of a task. + # + # source://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 + 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 + def locations; end + + # Name of the task, including any namespace qualifiers. + # + # source://rake//lib/rake/task.rb#122 + def name; end + + # Name of task with argument list description. + # + # source://rake//lib/rake/task.rb#127 + def name_with_args; end + + # Is this task needed? + # + # @return [Boolean] + # + # source://rake//lib/rake/task.rb#286 + def needed?; end + + # List of order only prerequisites for a task. + # + # source://rake//lib/rake/task.rb#21 + def order_only_prerequisites; end + + # List of prerequisites for a task. + # + # source://rake//lib/rake/task.rb#17 + def prereqs; end + + # List of prerequisite tasks + # + # source://rake//lib/rake/task.rb#61 + def prerequisite_tasks; end + + # List of prerequisites for a task. + # + # source://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 + def reenable; end + + # Array of nested namespaces names used for task lookup by this task. + # + # source://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 + def set_arg_names(args); end + + # First source from a rule (nil if no sources) + # + # source://rake//lib/rake/task.rb#93 + def source; end + + # source://rake//lib/rake/task.rb#52 + def sources; end + + # List of sources for task. + # + # source://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 + def timestamp; end + + # Return task name + # + # source://rake//lib/rake/task.rb#42 + def to_s; end + + # Add order only dependencies. + # + # source://rake//lib/rake/task.rb#379 + def |(deps); end + + protected + + # source://rake//lib/rake/task.rb#83 + def collect_prerequisites(seen); end + + # Same as invoke, but explicitly pass a call chain to detect + # circular dependencies. + # + # If multiple tasks depend on this + # one in parallel, they will all fail if the first execution of + # this task fails. + # + # source://rake//lib/rake/task.rb#197 + def invoke_with_call_chain(task_args, invocation_chain); end + + private + + # source://rake//lib/rake/task.rb#229 + def add_chain_to(exception, new_chain); end + + # source://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 + def first_sentence(string); end + + # Format the trace flags for display. + # + # source://rake//lib/rake/task.rb#261 + def format_trace_flags; end + + # source://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 + def transform_comments(separator, &block); end + + class << self + # Return a task with the given name. If the task is not currently + # known, try to synthesize one from the defined rules. If no rules are + # found, but an existing file matches the task name, assume it is a file + # task with no dependencies or actions. + # + # source://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 + def clear; end + + # Define a rule for synthesizing tasks. + # + # source://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 + def define_task(*args, &block); end + + # Format dependencies parameter to pass to task. + # + # source://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 + def scope_name(scope, task_name); end + + # TRUE if the task name is already defined. + # + # @return [Boolean] + # + # source://rake//lib/rake/task.rb#409 + def task_defined?(task_name); end + + # List of all defined tasks. + # + # source://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 +class Rake::TaskArgumentError < ::ArgumentError; end + +# TaskArguments manage the arguments passed to a task. +# +# source://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 + 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 + def [](index); end + + # Enumerates the arguments and their values + # + # source://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 + def extras; end + + # source://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 + def has_key?(key); end + + # source://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 + def key?(key); end + + # Returns the value of the given argument via method_missing + # + # source://rake//lib/rake/task_arguments.rb#66 + def method_missing(sym, *args); end + + # Argument names + # + # source://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 + def new_scope(names); end + + # Retrieve the complete array of sequential values + # + # source://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 + def to_hash; end + + # source://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 + 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 + def with_defaults(defaults); end + + protected + + # source://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 +module Rake::TaskManager + # source://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 + def [](task_name, scopes = T.unsafe(nil)); end + + # Clear all tasks in this application. + # + # source://rake//lib/rake/task_manager.rb#182 + def clear; end + + # source://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 + def current_scope; end + + # source://rake//lib/rake/task_manager.rb#23 + def define_task(task_class, *args, &block); end + + # If a rule can be found that matches the task name, enhance the + # task with the prerequisites and actions from the rule. Set the + # source attribute of the task appropriately for the rule. Return + # the enhanced task or nil of no rule was found. + # + # source://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 + def generate_did_you_mean_suggestions(task_name); end + + # source://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 + 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 + def intern(task_class, task_name); end + + # Track the last comment made in the Rakefile. + # + # source://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 + def last_description=(_arg0); end + + # Lookup a task, using scope and the scope hints in the task name. + # This method performs straight lookups without trying to + # synthesize file tasks or rules. Special scope names (e.g. '^') + # are recognized. If no scope argument is supplied, use the + # current scope. Return nil if the task cannot be found. + # + # source://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 + def resolve_args(args); end + + # source://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 + 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 + 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 + def add_location(task); end + + # Attempt to create a rule given the list of prerequisites. + # + # source://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 + def find_location; end + + # Generate an anonymous namespace name. + # + # source://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 + def get_description(task); end + + # Lookup the task name + # + # source://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 + def make_sources(task_name, task_pattern, extensions); end + + # Resolve task arguments for a task or rule when there are + # dependencies declared. + # + # The patterns recognized by this argument resolving function are: + # + # task :t, order_only: [:e] + # task :t => [:d] + # task :t => [:d], order_only: [:e] + # task :t, [a] => [:d] + # task :t, [a] => [:d], order_only: [:e] + # + # source://rake//lib/rake/task_manager.rb#127 + def resolve_args_with_dependencies(args, hash); end + + # Resolve task arguments for a task or rule when there are no + # dependencies declared. + # + # The patterns recognized by this argument resolving function are: + # + # task :t + # task :t, [:a] + # + # source://rake//lib/rake/task_manager.rb#105 + def resolve_args_without_dependencies(args); end + + # source://rake//lib/rake/task_manager.rb#265 + def trace_rule(level, message); end + + class << self + # source://rake//lib/rake/task_manager.rb#326 + def record_task_metadata; end + + # source://rake//lib/rake/task_manager.rb#326 + def record_task_metadata=(_arg0); end + end +end + +# source://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 + def initialize(stats); end + + # source://rake//lib/rake/thread_history_display.rb#17 + def show; end + + private + + # source://rake//lib/rake/private_reader.rb#15 + def items; end + + # source://rake//lib/rake/thread_history_display.rb#35 + def rename(hash, key, renames); end + + # source://rake//lib/rake/private_reader.rb#15 + def stats; end + + # source://rake//lib/rake/private_reader.rb#15 + def threads; end +end + +# source://rake//lib/rake/thread_pool.rb#7 +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 + def initialize(thread_count); end + + # Creates a future executed by the +ThreadPool+. + # + # The args are passed to the block when executing (similarly to + # Thread#new) The return value is an object representing + # a future which has been created and added to the queue in the + # pool. Sending #value to the object will sleep the + # current thread until the future is finished and will return the + # result (or raise an exception thrown from the future) + # + # source://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 + def gather_history; end + + # Return a array of history events for the thread pool. + # + # History gathering must be enabled to be able to see the events + # (see #gather_history). Best to call this when the job is + # complete (i.e. after ThreadPool#join is called). + # + # source://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 + def join; end + + # Return a hash of always collected statistics for the thread pool. + # + # source://rake//lib/rake/thread_pool.rb#84 + def statistics; end + + private + + # for testing only + # + # source://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 + def process_queue_item; end + + # source://rake//lib/rake/thread_pool.rb#111 + def safe_thread_count; end + + # source://rake//lib/rake/thread_pool.rb#117 + def start_thread; end + + # source://rake//lib/rake/thread_pool.rb#145 + def stat(event, data = T.unsafe(nil)); end +end + +# source://rake//lib/rake/trace_output.rb#3 +module Rake::TraceOutput + # Write trace output to output stream +out+. + # + # The write is done as a single IO call (to print) to lessen the + # chance that the trace output is interrupted by other tasks also + # producing output. + # + # source://rake//lib/rake/trace_output.rb#10 + def trace_on(out, *strings); end +end + +# source://rake//lib/rake/version.rb#3 +Rake::VERSION = T.let(T.unsafe(nil), String) + +# source://rake//lib/rake/version.rb#5 +module Rake::Version; end + +# source://rake//lib/rake/version.rb#6 +Rake::Version::BUILD = T.let(T.unsafe(nil), String) + +# source://rake//lib/rake/version.rb#6 +Rake::Version::MAJOR = T.let(T.unsafe(nil), String) + +# source://rake//lib/rake/version.rb#6 +Rake::Version::MINOR = T.let(T.unsafe(nil), String) + +# source://rake//lib/rake/version.rb#8 +Rake::Version::NUMBERS = T.let(T.unsafe(nil), Array) + +# source://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 +module Rake::Win32 + class << self + # Normalize a win32 path so that the slashes are all forward slashes. + # + # source://rake//lib/rake/win32.rb#45 + def normalize(path); end + + # The standard directory containing system wide rake files on + # Win 32 systems. Try the following environment variables (in + # order): + # + # * HOME + # * HOMEDRIVE + HOMEPATH + # * APPDATA + # * USERPROFILE + # + # If the above are not defined, the return nil. + # + # @raise [Win32HomeError] + # + # source://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 + def windows?; end + end +end + +# Error indicating a problem in locating the home directory on a +# Win32 system. +# +# source://rake//lib/rake/win32.rb#11 +class Rake::Win32::Win32HomeError < ::RuntimeError; end + +# source://rake//lib/rake.rb#71 +RakeFileUtils = Rake::FileUtilsExt + +# source://rake//lib/rake/ext/string.rb#4 +class String + include ::Comparable + + # source://rake//lib/rake/ext/string.rb#14 + def ext(newext = T.unsafe(nil)); end + + # source://rake//lib/rake/ext/string.rb#138 + def pathmap(spec = T.unsafe(nil), &block); end + + protected + + # source://rake//lib/rake/ext/string.rb#27 + def pathmap_explode; end + + # source://rake//lib/rake/ext/string.rb#41 + def pathmap_partial(n); end + + # source://rake//lib/rake/ext/string.rb#59 + def pathmap_replace(patterns, &block); end +end diff --git a/sorbet/rbi/gems/redis-client@0.14.1.rbi b/sorbet/rbi/gems/redis-client@0.14.1.rbi new file mode 100644 index 0000000..024a264 --- /dev/null +++ b/sorbet/rbi/gems/redis-client@0.14.1.rbi @@ -0,0 +1,1123 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `redis-client` gem. +# Please instead update this file by running `bin/tapioca gem redis-client`. + +module Process + extend ::RedisClient::PIDCache::CoreExt + extend ::ConnectionPool::ForkTracker +end + +# source://redis-client//lib/redis_client/version.rb#3 +class RedisClient + include ::RedisClient::Common + + # @return [RedisClient] a new instance of RedisClient + # + # source://redis-client//lib/redis_client.rb#165 + def initialize(config, **_arg1); end + + # source://redis-client//lib/redis_client.rb#267 + def blocking_call(timeout, *command, **kwargs); end + + # source://redis-client//lib/redis_client.rb#287 + def blocking_call_v(timeout, command); end + + # source://redis-client//lib/redis_client.rb#207 + def call(*command, **kwargs); end + + # source://redis-client//lib/redis_client.rb#237 + def call_once(*command, **kwargs); end + + # source://redis-client//lib/redis_client.rb#252 + def call_once_v(command); end + + # source://redis-client//lib/redis_client.rb#222 + def call_v(command); end + + # source://redis-client//lib/redis_client.rb#347 + def close; end + + # @return [Boolean] + # + # source://redis-client//lib/redis_client.rb#343 + def connected?; end + + # source://redis-client//lib/redis_client.rb#325 + def hscan(key, *args, **kwargs, &block); end + + # source://redis-client//lib/redis_client.rb#172 + def inspect; end + + # source://redis-client//lib/redis_client.rb#370 + def multi(watch: T.unsafe(nil), &block); end + + # @yield [pipeline] + # + # source://redis-client//lib/redis_client.rb#352 + def pipelined; end + + # source://redis-client//lib/redis_client.rb#201 + def pubsub; end + + # source://redis-client//lib/redis_client.rb#191 + def read_timeout=(timeout); end + + # source://redis-client//lib/redis_client.rb#307 + def scan(*args, **kwargs, &block); end + + # source://redis-client//lib/redis_client.rb#177 + def size; end + + # source://redis-client//lib/redis_client.rb#316 + def sscan(key, *args, **kwargs, &block); end + + # @yield [_self] + # @yieldparam _self [RedisClient] the object that the method was called on + # + # source://redis-client//lib/redis_client.rb#181 + def then(_options = T.unsafe(nil)); end + + # source://redis-client//lib/redis_client.rb#186 + def timeout=(timeout); end + + # @yield [_self] + # @yieldparam _self [RedisClient] the object that the method was called on + # + # source://redis-client//lib/redis_client.rb#181 + def with(_options = T.unsafe(nil)); end + + # source://redis-client//lib/redis_client.rb#196 + def write_timeout=(timeout); end + + # source://redis-client//lib/redis_client.rb#334 + def zscan(key, *args, **kwargs, &block); end + + private + + # @yield [transaction] + # + # source://redis-client//lib/redis_client.rb#577 + def build_transaction; end + + # source://redis-client//lib/redis_client.rb#662 + def connect; end + + # source://redis-client//lib/redis_client.rb#611 + def ensure_connected(retryable: T.unsafe(nil)); end + + # source://redis-client//lib/redis_client.rb#655 + def raw_connection; end + + # source://redis-client//lib/redis_client.rb#585 + def scan_list(cursor_index, command, &block); end + + # source://redis-client//lib/redis_client.rb#595 + def scan_pairs(cursor_index, command); end + + class << self + # source://redis-client//lib/redis_client.rb#142 + def config(**kwargs); end + + # source://redis-client//lib/redis_client.rb#32 + def default_driver; end + + # source://redis-client//lib/redis_client.rb#44 + def default_driver=(name); end + + # source://redis-client//lib/redis_client.rb#21 + def driver(name); end + + # source://redis-client//lib/redis_client.rb#150 + def new(arg = T.unsafe(nil), **kwargs); end + + # source://redis-client//lib/redis_client.rb#158 + def register(middleware); end + + # source://redis-client//lib/redis_client.rb#17 + def register_driver(name, &block); end + + # source://redis-client//lib/redis_client.rb#146 + def sentinel(**kwargs); end + end +end + +# source://redis-client//lib/redis_client.rb#121 +class RedisClient::AuthenticationError < ::RedisClient::CommandError; end + +# source://redis-client//lib/redis_client/middlewares.rb#4 +class RedisClient::BasicMiddleware + # @return [BasicMiddleware] a new instance of BasicMiddleware + # + # source://redis-client//lib/redis_client/middlewares.rb#7 + def initialize(client); end + + # @yield [command] + # + # source://redis-client//lib/redis_client/middlewares.rb#15 + def call(command, _config); end + + # @yield [command] + # + # source://redis-client//lib/redis_client/middlewares.rb#15 + def call_pipelined(command, _config); end + + # Returns the value of attribute client. + # + # source://redis-client//lib/redis_client/middlewares.rb#5 + def client; end + + # source://redis-client//lib/redis_client/middlewares.rb#11 + def connect(_config); end +end + +# source://redis-client//lib/redis_client.rb#85 +class RedisClient::CannotConnectError < ::RedisClient::ConnectionError; end + +# source://redis-client//lib/redis_client.rb#92 +class RedisClient::CheckoutTimeoutError < ::RedisClient::TimeoutError; end + +# source://redis-client//lib/redis_client/circuit_breaker.rb#4 +class RedisClient::CircuitBreaker + # @return [CircuitBreaker] a new instance of CircuitBreaker + # + # source://redis-client//lib/redis_client/circuit_breaker.rb#23 + def initialize(error_threshold:, error_timeout:, error_threshold_timeout: T.unsafe(nil), success_threshold: T.unsafe(nil)); end + + # Returns the value of attribute error_threshold. + # + # source://redis-client//lib/redis_client/circuit_breaker.rb#21 + def error_threshold; end + + # Returns the value of attribute error_threshold_timeout. + # + # source://redis-client//lib/redis_client/circuit_breaker.rb#21 + def error_threshold_timeout; end + + # Returns the value of attribute error_timeout. + # + # source://redis-client//lib/redis_client/circuit_breaker.rb#21 + def error_timeout; end + + # source://redis-client//lib/redis_client/circuit_breaker.rb#34 + def protect; end + + # Returns the value of attribute success_threshold. + # + # source://redis-client//lib/redis_client/circuit_breaker.rb#21 + def success_threshold; end + + private + + # source://redis-client//lib/redis_client/circuit_breaker.rb#80 + def record_error; end + + # source://redis-client//lib/redis_client/circuit_breaker.rb#95 + def record_success; end + + # source://redis-client//lib/redis_client/circuit_breaker.rb#65 + def refresh_state; end +end + +# source://redis-client//lib/redis_client/circuit_breaker.rb#5 +module RedisClient::CircuitBreaker::Middleware + # source://redis-client//lib/redis_client/circuit_breaker.rb#10 + def call(_command, config); end + + # source://redis-client//lib/redis_client/circuit_breaker.rb#14 + def call_pipelined(_commands, config); end + + # source://redis-client//lib/redis_client/circuit_breaker.rb#6 + def connect(config); end +end + +# source://redis-client//lib/redis_client/circuit_breaker.rb#19 +class RedisClient::CircuitBreaker::OpenCircuitError < ::RedisClient::CannotConnectError; end + +# source://redis-client//lib/redis_client/command_builder.rb#4 +module RedisClient::CommandBuilder + extend ::RedisClient::CommandBuilder + + # source://redis-client//lib/redis_client/command_builder.rb#8 + def generate(args, kwargs = T.unsafe(nil)); end +end + +# source://redis-client//lib/redis_client.rb#102 +class RedisClient::CommandError < ::RedisClient::Error + include ::RedisClient::HasCommand + + class << self + # source://redis-client//lib/redis_client.rb#106 + def parse(error_message); end + end +end + +# source://redis-client//lib/redis_client.rb#132 +RedisClient::CommandError::ERRORS = T.let(T.unsafe(nil), Hash) + +# source://redis-client//lib/redis_client.rb#54 +module RedisClient::Common + # source://redis-client//lib/redis_client.rb#58 + def initialize(config, id: T.unsafe(nil), connect_timeout: T.unsafe(nil), read_timeout: T.unsafe(nil), write_timeout: T.unsafe(nil)); end + + # Returns the value of attribute config. + # + # source://redis-client//lib/redis_client.rb#55 + def config; end + + # Returns the value of attribute connect_timeout. + # + # source://redis-client//lib/redis_client.rb#56 + def connect_timeout; end + + # Sets the attribute connect_timeout + # + # @param value the value to set the attribute connect_timeout to. + # + # source://redis-client//lib/redis_client.rb#56 + def connect_timeout=(_arg0); end + + # Returns the value of attribute id. + # + # source://redis-client//lib/redis_client.rb#55 + def id; end + + # Returns the value of attribute read_timeout. + # + # source://redis-client//lib/redis_client.rb#56 + def read_timeout; end + + # Sets the attribute read_timeout + # + # @param value the value to set the attribute read_timeout to. + # + # source://redis-client//lib/redis_client.rb#56 + def read_timeout=(_arg0); end + + # source://redis-client//lib/redis_client.rb#74 + def timeout=(timeout); end + + # Returns the value of attribute write_timeout. + # + # source://redis-client//lib/redis_client.rb#56 + def write_timeout; end + + # Sets the attribute write_timeout + # + # @param value the value to set the attribute write_timeout to. + # + # source://redis-client//lib/redis_client.rb#56 + def write_timeout=(_arg0); end +end + +# source://redis-client//lib/redis_client/config.rb#7 +class RedisClient::Config + include ::RedisClient::Config::Common + + # @return [Config] a new instance of Config + # + # source://redis-client//lib/redis_client/config.rb#157 + def initialize(url: T.unsafe(nil), host: T.unsafe(nil), port: T.unsafe(nil), path: T.unsafe(nil), **kwargs); end + + # Returns the value of attribute host. + # + # source://redis-client//lib/redis_client/config.rb#155 + def host; end + + # Returns the value of attribute path. + # + # source://redis-client//lib/redis_client/config.rb#155 + def path; end + + # Returns the value of attribute port. + # + # source://redis-client//lib/redis_client/config.rb#155 + def port; end +end + +# source://redis-client//lib/redis_client/config.rb#14 +module RedisClient::Config::Common + # source://redis-client//lib/redis_client/config.rb#21 + def initialize(username: T.unsafe(nil), password: T.unsafe(nil), db: T.unsafe(nil), id: T.unsafe(nil), timeout: T.unsafe(nil), read_timeout: T.unsafe(nil), write_timeout: T.unsafe(nil), connect_timeout: T.unsafe(nil), ssl: T.unsafe(nil), custom: T.unsafe(nil), ssl_params: T.unsafe(nil), driver: T.unsafe(nil), protocol: T.unsafe(nil), client_implementation: T.unsafe(nil), command_builder: T.unsafe(nil), inherit_socket: T.unsafe(nil), reconnect_attempts: T.unsafe(nil), middlewares: T.unsafe(nil), circuit_breaker: T.unsafe(nil)); end + + # Returns the value of attribute circuit_breaker. + # + # source://redis-client//lib/redis_client/config.rb#15 + def circuit_breaker; end + + # Returns the value of attribute command_builder. + # + # source://redis-client//lib/redis_client/config.rb#15 + def command_builder; end + + # Returns the value of attribute connect_timeout. + # + # source://redis-client//lib/redis_client/config.rb#15 + def connect_timeout; end + + # Returns the value of attribute connection_prelude. + # + # source://redis-client//lib/redis_client/config.rb#15 + def connection_prelude; end + + # Returns the value of attribute custom. + # + # source://redis-client//lib/redis_client/config.rb#15 + def custom; end + + # Returns the value of attribute db. + # + # source://redis-client//lib/redis_client/config.rb#15 + def db; end + + # Returns the value of attribute driver. + # + # source://redis-client//lib/redis_client/config.rb#15 + def driver; end + + # Returns the value of attribute id. + # + # source://redis-client//lib/redis_client/config.rb#15 + def id; end + + # Returns the value of attribute inherit_socket. + # + # source://redis-client//lib/redis_client/config.rb#15 + def inherit_socket; end + + # Returns the value of attribute middlewares_stack. + # + # source://redis-client//lib/redis_client/config.rb#15 + def middlewares_stack; end + + # source://redis-client//lib/redis_client/config.rb#98 + def new_client(**kwargs); end + + # source://redis-client//lib/redis_client/config.rb#93 + def new_pool(**kwargs); end + + # Returns the value of attribute password. + # + # source://redis-client//lib/redis_client/config.rb#15 + def password; end + + # Returns the value of attribute protocol. + # + # source://redis-client//lib/redis_client/config.rb#15 + def protocol; end + + # Returns the value of attribute read_timeout. + # + # source://redis-client//lib/redis_client/config.rb#15 + def read_timeout; end + + # @return [Boolean] + # + # source://redis-client//lib/redis_client/config.rb#102 + def retry_connecting?(attempt, _error); end + + # @return [Boolean] + # + # source://redis-client//lib/redis_client/config.rb#89 + def sentinel?; end + + # source://redis-client//lib/redis_client/config.rb#120 + def server_url; end + + # Returns the value of attribute ssl. + # + # source://redis-client//lib/redis_client/config.rb#15 + def ssl; end + + # Returns the value of attribute ssl. + def ssl?; end + + # source://redis-client//lib/redis_client/config.rb#114 + def ssl_context; end + + # Returns the value of attribute ssl_params. + # + # source://redis-client//lib/redis_client/config.rb#15 + def ssl_params; end + + # source://redis-client//lib/redis_client/config.rb#85 + def username; end + + # Returns the value of attribute write_timeout. + # + # source://redis-client//lib/redis_client/config.rb#15 + def write_timeout; end + + private + + # source://redis-client//lib/redis_client/config.rb#130 + def build_connection_prelude; end +end + +# source://redis-client//lib/redis_client/config.rb#12 +RedisClient::Config::DEFAULT_DB = T.let(T.unsafe(nil), Integer) + +# source://redis-client//lib/redis_client/config.rb#9 +RedisClient::Config::DEFAULT_HOST = T.let(T.unsafe(nil), String) + +# source://redis-client//lib/redis_client/config.rb#10 +RedisClient::Config::DEFAULT_PORT = T.let(T.unsafe(nil), Integer) + +# source://redis-client//lib/redis_client/config.rb#8 +RedisClient::Config::DEFAULT_TIMEOUT = T.let(T.unsafe(nil), Float) + +# source://redis-client//lib/redis_client/config.rb#11 +RedisClient::Config::DEFAULT_USERNAME = T.let(T.unsafe(nil), String) + +# source://redis-client//lib/redis_client.rb#84 +class RedisClient::ConnectionError < ::RedisClient::Error; end + +# source://redis-client//lib/redis_client/connection_mixin.rb#4 +module RedisClient::ConnectionMixin + # source://redis-client//lib/redis_client/connection_mixin.rb#5 + def initialize; end + + # source://redis-client//lib/redis_client/connection_mixin.rb#28 + def call(command, timeout); end + + # source://redis-client//lib/redis_client/connection_mixin.rb#41 + def call_pipelined(commands, timeouts); end + + # source://redis-client//lib/redis_client/connection_mixin.rb#14 + def close; end + + # source://redis-client//lib/redis_client/connection_mixin.rb#9 + def reconnect; end + + # source://redis-client//lib/redis_client/connection_mixin.rb#19 + def revalidate; end +end + +# source://redis-client//lib/redis_client.rb#79 +class RedisClient::Error < ::StandardError; end + +# source://redis-client//lib/redis_client.rb#87 +class RedisClient::FailoverError < ::RedisClient::ConnectionError; end + +# source://redis-client//lib/redis_client.rb#94 +module RedisClient::HasCommand + # source://redis-client//lib/redis_client.rb#97 + def _set_command(command); end + + # Returns the value of attribute command. + # + # source://redis-client//lib/redis_client.rb#95 + def command; end +end + +# source://redis-client//lib/redis_client.rb#129 +class RedisClient::MasterDownError < ::RedisClient::ConnectionError + include ::RedisClient::HasCommand +end + +# source://redis-client//lib/redis_client/middlewares.rb#21 +class RedisClient::Middlewares < ::RedisClient::BasicMiddleware; end + +# source://redis-client//lib/redis_client.rb#451 +class RedisClient::Multi + # @return [Multi] a new instance of Multi + # + # source://redis-client//lib/redis_client.rb#452 + def initialize(command_builder); end + + # source://redis-client//lib/redis_client.rb#494 + def _blocks; end + + # source://redis-client//lib/redis_client.rb#514 + def _coerce!(results); end + + # source://redis-client//lib/redis_client.rb#490 + def _commands; end + + # @return [Boolean] + # + # source://redis-client//lib/redis_client.rb#502 + def _empty?; end + + # @return [Boolean] + # + # source://redis-client//lib/redis_client.rb#510 + def _retryable?; end + + # source://redis-client//lib/redis_client.rb#498 + def _size; end + + # source://redis-client//lib/redis_client.rb#506 + def _timeouts; end + + # source://redis-client//lib/redis_client.rb#460 + def call(*command, **kwargs, &block); end + + # source://redis-client//lib/redis_client.rb#474 + def call_once(*command, **kwargs, &block); end + + # source://redis-client//lib/redis_client.rb#482 + def call_once_v(command, &block); end + + # source://redis-client//lib/redis_client.rb#467 + def call_v(command, &block); end +end + +# source://redis-client//lib/redis_client.rb#124 +class RedisClient::OutOfMemoryError < ::RedisClient::CommandError; end + +# source://redis-client//lib/redis_client/pid_cache.rb#4 +module RedisClient::PIDCache + class << self + # Returns the value of attribute pid. + # + # source://redis-client//lib/redis_client/pid_cache.rb#10 + def pid; end + + # source://redis-client//lib/redis_client/pid_cache.rb#12 + def update!; end + end +end + +# source://redis-client//lib/redis_client/pid_cache.rb#18 +module RedisClient::PIDCache::CoreExt + # source://redis-client//lib/redis_client/pid_cache.rb#19 + def _fork; end +end + +# source://redis-client//lib/redis_client.rb#122 +class RedisClient::PermissionError < ::RedisClient::CommandError; end + +# source://redis-client//lib/redis_client.rb#530 +class RedisClient::Pipeline < ::RedisClient::Multi + # @return [Pipeline] a new instance of Pipeline + # + # source://redis-client//lib/redis_client.rb#531 + def initialize(_command_builder); end + + # source://redis-client//lib/redis_client.rb#562 + def _coerce!(results); end + + # @return [Boolean] + # + # source://redis-client//lib/redis_client.rb#558 + def _empty?; end + + # source://redis-client//lib/redis_client.rb#554 + def _timeouts; end + + # source://redis-client//lib/redis_client.rb#536 + def blocking_call(timeout, *command, **kwargs, &block); end + + # source://redis-client//lib/redis_client.rb#545 + def blocking_call_v(timeout, command, &block); end +end + +# source://redis-client//lib/redis_client/pooled.rb#6 +class RedisClient::Pooled + include ::RedisClient::Common + + # @return [Pooled] a new instance of Pooled + # + # source://redis-client//lib/redis_client/pooled.rb#11 + def initialize(config, id: T.unsafe(nil), connect_timeout: T.unsafe(nil), read_timeout: T.unsafe(nil), write_timeout: T.unsafe(nil), **kwargs); end + + # source://redis-client//lib/redis_client/pooled.rb#56 + def blocking_call(*args, **_arg1, &block); end + + # source://redis-client//lib/redis_client/pooled.rb#56 + def blocking_call_v(*args, **_arg1, &block); end + + # source://redis-client//lib/redis_client/pooled.rb#56 + def call(*args, **_arg1, &block); end + + # source://redis-client//lib/redis_client/pooled.rb#56 + def call_once(*args, **_arg1, &block); end + + # source://redis-client//lib/redis_client/pooled.rb#56 + def call_once_v(*args, **_arg1, &block); end + + # source://redis-client//lib/redis_client/pooled.rb#56 + def call_v(*args, **_arg1, &block); end + + # source://redis-client//lib/redis_client/pooled.rb#37 + def close; end + + # source://redis-client//lib/redis_client/pooled.rb#65 + def hscan(*args, **_arg1, &block); end + + # source://redis-client//lib/redis_client/pooled.rb#56 + def multi(*args, **_arg1, &block); end + + # source://redis-client//lib/redis_client/pooled.rb#56 + def pipelined(*args, **_arg1, &block); end + + # source://redis-client//lib/redis_client/pooled.rb#56 + def pubsub(*args, **_arg1, &block); end + + # source://redis-client//lib/redis_client/pooled.rb#65 + def scan(*args, **_arg1, &block); end + + # source://redis-client//lib/redis_client/pooled.rb#48 + def size; end + + # source://redis-client//lib/redis_client/pooled.rb#65 + def sscan(*args, **_arg1, &block); end + + # source://redis-client//lib/redis_client/pooled.rb#25 + def then(options = T.unsafe(nil)); end + + # source://redis-client//lib/redis_client/pooled.rb#25 + def with(options = T.unsafe(nil)); end + + # source://redis-client//lib/redis_client/pooled.rb#65 + def zscan(*args, **_arg1, &block); end + + private + + # source://redis-client//lib/redis_client/pooled.rb#82 + def new_pool; end + + # source://redis-client//lib/redis_client/pooled.rb#78 + def pool; end +end + +# source://redis-client//lib/redis_client/pooled.rb#7 +RedisClient::Pooled::EMPTY_HASH = T.let(T.unsafe(nil), Hash) + +# source://redis-client//lib/redis_client.rb#81 +class RedisClient::ProtocolError < ::RedisClient::Error; end + +# source://redis-client//lib/redis_client.rb#414 +class RedisClient::PubSub + # @return [PubSub] a new instance of PubSub + # + # source://redis-client//lib/redis_client.rb#415 + def initialize(raw_connection, command_builder); end + + # source://redis-client//lib/redis_client.rb#420 + def call(*command, **kwargs); end + + # source://redis-client//lib/redis_client.rb#425 + def call_v(command); end + + # source://redis-client//lib/redis_client.rb#430 + def close; end + + # source://redis-client//lib/redis_client.rb#436 + def next_event(timeout = T.unsafe(nil)); end + + private + + # Returns the value of attribute raw_connection. + # + # source://redis-client//lib/redis_client.rb#448 + def raw_connection; end +end + +# source://redis-client//lib/redis_client/ruby_connection/resp3.rb#4 +module RedisClient::RESP3 + private + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#36 + def dump(command, buffer = T.unsafe(nil)); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#57 + def dump_any(object, buffer); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#68 + def dump_array(array, buffer); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#84 + def dump_hash(hash, buffer); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#93 + def dump_numeric(numeric, buffer); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#76 + def dump_set(set, buffer); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#97 + def dump_string(string, buffer); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#103 + def dump_symbol(symbol, buffer); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#49 + def load(io); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#53 + def new_buffer; end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#112 + def parse(io); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#142 + def parse_array(io); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#192 + def parse_blob(io); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#131 + def parse_boolean(io); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#176 + def parse_double(io); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#127 + def parse_error(io); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#172 + def parse_integer(io); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#150 + def parse_map(io); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#187 + def parse_null(io); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#158 + def parse_push(io); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#162 + def parse_sequence(io, size); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#146 + def parse_set(io); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#120 + def parse_string(io); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#202 + def parse_verbatim_string(io); end + + class << self + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#36 + def dump(command, buffer = T.unsafe(nil)); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#57 + def dump_any(object, buffer); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#68 + def dump_array(array, buffer); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#84 + def dump_hash(hash, buffer); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#93 + def dump_numeric(numeric, buffer); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#76 + def dump_set(set, buffer); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#97 + def dump_string(string, buffer); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#103 + def dump_symbol(symbol, buffer); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#49 + def load(io); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#53 + def new_buffer; end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#112 + def parse(io); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#142 + def parse_array(io); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#192 + def parse_blob(io); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#131 + def parse_boolean(io); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#176 + def parse_double(io); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#127 + def parse_error(io); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#172 + def parse_integer(io); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#150 + def parse_map(io); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#187 + def parse_null(io); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#158 + def parse_push(io); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#162 + def parse_sequence(io, size); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#146 + def parse_set(io); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#120 + def parse_string(io); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#202 + def parse_verbatim_string(io); end + end +end + +# source://redis-client//lib/redis_client/ruby_connection/resp3.rb#13 +RedisClient::RESP3::DUMP_TYPES = T.let(T.unsafe(nil), Hash) + +# source://redis-client//lib/redis_client/ruby_connection/resp3.rb#11 +RedisClient::RESP3::EOL = T.let(T.unsafe(nil), String) + +# source://redis-client//lib/redis_client/ruby_connection/resp3.rb#12 +RedisClient::RESP3::EOL_SIZE = T.let(T.unsafe(nil), Integer) + +# source://redis-client//lib/redis_client/ruby_connection/resp3.rb#7 +class RedisClient::RESP3::Error < ::RedisClient::Error; end + +# source://redis-client//lib/redis_client/ruby_connection/resp3.rb#34 +RedisClient::RESP3::INTEGER_RANGE = T.let(T.unsafe(nil), Range) + +# source://redis-client//lib/redis_client/ruby_connection/resp3.rb#19 +RedisClient::RESP3::PARSER_TYPES = T.let(T.unsafe(nil), Hash) + +# source://redis-client//lib/redis_client/ruby_connection/resp3.rb#9 +class RedisClient::RESP3::SyntaxError < ::RedisClient::RESP3::Error; end + +# source://redis-client//lib/redis_client/ruby_connection/resp3.rb#8 +class RedisClient::RESP3::UnknownType < ::RedisClient::RESP3::Error; end + +# source://redis-client//lib/redis_client.rb#126 +class RedisClient::ReadOnlyError < ::RedisClient::ConnectionError + include ::RedisClient::HasCommand +end + +# source://redis-client//lib/redis_client.rb#90 +class RedisClient::ReadTimeoutError < ::RedisClient::TimeoutError; end + +# source://redis-client//lib/redis_client/ruby_connection/buffered_io.rb#6 +class RedisClient::RubyConnection + include ::RedisClient::ConnectionMixin + + # @return [RubyConnection] a new instance of RubyConnection + # + # source://redis-client//lib/redis_client/ruby_connection.rb#43 + def initialize(config, connect_timeout:, read_timeout:, write_timeout:); end + + # source://redis-client//lib/redis_client/ruby_connection.rb#56 + def close; end + + # @return [Boolean] + # + # source://redis-client//lib/redis_client/ruby_connection.rb#52 + def connected?; end + + # source://redis-client//lib/redis_client/ruby_connection.rb#92 + def read(timeout = T.unsafe(nil)); end + + # source://redis-client//lib/redis_client/ruby_connection.rb#61 + def read_timeout=(timeout); end + + # source://redis-client//lib/redis_client/ruby_connection.rb#71 + def write(command); end + + # source://redis-client//lib/redis_client/ruby_connection.rb#80 + def write_multi(commands); end + + # source://redis-client//lib/redis_client/ruby_connection.rb#66 + def write_timeout=(timeout); end + + private + + # source://redis-client//lib/redis_client/ruby_connection.rb#106 + def connect; end + + # unknown + # + # source://redis-client//lib/redis_client/ruby_connection.rb#163 + def enable_socket_keep_alive(socket); end + + class << self + # source://redis-client//lib/redis_client/ruby_connection.rb#14 + def ssl_context(ssl_params); end + end +end + +# source://redis-client//lib/redis_client/ruby_connection/buffered_io.rb#7 +class RedisClient::RubyConnection::BufferedIO + # @return [BufferedIO] a new instance of BufferedIO + # + # source://redis-client//lib/redis_client/ruby_connection/buffered_io.rb#13 + def initialize(io, read_timeout:, write_timeout:, chunk_size: T.unsafe(nil)); end + + # source://redis-client//lib/redis_client/ruby_connection/buffered_io.rb#23 + def close; end + + # @return [Boolean] + # + # source://redis-client//lib/redis_client/ruby_connection/buffered_io.rb#27 + def closed?; end + + # @return [Boolean] + # + # source://redis-client//lib/redis_client/ruby_connection/buffered_io.rb#31 + def eof?; end + + # source://redis-client//lib/redis_client/ruby_connection/buffered_io.rb#84 + def getbyte; end + + # source://redis-client//lib/redis_client/ruby_connection/buffered_io.rb#91 + def gets_chomp; end + + # source://redis-client//lib/redis_client/ruby_connection/buffered_io.rb#102 + def read_chomp(bytes); end + + # Returns the value of attribute read_timeout. + # + # source://redis-client//lib/redis_client/ruby_connection/buffered_io.rb#11 + def read_timeout; end + + # Sets the attribute read_timeout + # + # @param value the value to set the attribute read_timeout to. + # + # source://redis-client//lib/redis_client/ruby_connection/buffered_io.rb#11 + def read_timeout=(_arg0); end + + # source://redis-client//lib/redis_client/ruby_connection/buffered_io.rb#55 + def skip(offset); end + + # source://redis-client//lib/redis_client/ruby_connection/buffered_io.rb#35 + def with_timeout(new_timeout); end + + # source://redis-client//lib/redis_client/ruby_connection/buffered_io.rb#61 + def write(string); end + + # Returns the value of attribute write_timeout. + # + # source://redis-client//lib/redis_client/ruby_connection/buffered_io.rb#11 + def write_timeout; end + + # Sets the attribute write_timeout + # + # @param value the value to set the attribute write_timeout to. + # + # source://redis-client//lib/redis_client/ruby_connection/buffered_io.rb#11 + def write_timeout=(_arg0); end + + private + + # source://redis-client//lib/redis_client/ruby_connection/buffered_io.rb#111 + def ensure_remaining(bytes); end + + # source://redis-client//lib/redis_client/ruby_connection/buffered_io.rb#118 + def fill_buffer(strict, size = T.unsafe(nil)); end +end + +# source://redis-client//lib/redis_client/ruby_connection/buffered_io.rb#8 +RedisClient::RubyConnection::BufferedIO::EOL = T.let(T.unsafe(nil), String) + +# source://redis-client//lib/redis_client/ruby_connection/buffered_io.rb#9 +RedisClient::RubyConnection::BufferedIO::EOL_SIZE = T.let(T.unsafe(nil), Integer) + +# Same as hiredis defaults +# +# source://redis-client//lib/redis_client/ruby_connection.rb#148 +RedisClient::RubyConnection::KEEP_ALIVE_INTERVAL = T.let(T.unsafe(nil), Integer) + +# source://redis-client//lib/redis_client/ruby_connection.rb#150 +RedisClient::RubyConnection::KEEP_ALIVE_PROBES = T.let(T.unsafe(nil), Integer) + +# Longer than hiredis defaults +# +# source://redis-client//lib/redis_client/ruby_connection.rb#149 +RedisClient::RubyConnection::KEEP_ALIVE_TTL = T.let(T.unsafe(nil), Integer) + +# source://redis-client//lib/redis_client/ruby_connection.rb#41 +RedisClient::RubyConnection::SUPPORTS_RESOLV_TIMEOUT = T.let(T.unsafe(nil), TrueClass) + +# source://redis-client//lib/redis_client/sentinel_config.rb#4 +class RedisClient::SentinelConfig + include ::RedisClient::Config::Common + + # @return [SentinelConfig] a new instance of SentinelConfig + # + # source://redis-client//lib/redis_client/sentinel_config.rb#10 + def initialize(name:, sentinels:, role: T.unsafe(nil), **client_config); end + + # source://redis-client//lib/redis_client/sentinel_config.rb#73 + def check_role!(role); end + + # source://redis-client//lib/redis_client/sentinel_config.rb#52 + def host; end + + # source://redis-client//lib/redis_client/sentinel_config.rb#60 + def path; end + + # source://redis-client//lib/redis_client/sentinel_config.rb#56 + def port; end + + # source://redis-client//lib/redis_client/sentinel_config.rb#46 + def reset; end + + # @return [Boolean] + # + # source://redis-client//lib/redis_client/sentinel_config.rb#64 + def retry_connecting?(attempt, error); end + + # @return [Boolean] + # + # source://redis-client//lib/redis_client/sentinel_config.rb#69 + def sentinel?; end + + # source://redis-client//lib/redis_client/sentinel_config.rb#40 + def sentinels; end + + private + + # source://redis-client//lib/redis_client/sentinel_config.rb#100 + def config; end + + # source://redis-client//lib/redis_client/sentinel_config.rb#147 + def each_sentinel; end + + # source://redis-client//lib/redis_client/sentinel_config.rb#169 + def refresh_sentinels(sentinel_client); end + + # source://redis-client//lib/redis_client/sentinel_config.rb#110 + def resolve_master; end + + # source://redis-client//lib/redis_client/sentinel_config.rb#129 + def resolve_replica; end + + # source://redis-client//lib/redis_client/sentinel_config.rb#125 + def sentinel_client(sentinel_config); end + + # source://redis-client//lib/redis_client/sentinel_config.rb#89 + def sentinels_to_configs(sentinels); end +end + +# source://redis-client//lib/redis_client/sentinel_config.rb#8 +RedisClient::SentinelConfig::DEFAULT_RECONNECT_ATTEMPTS = T.let(T.unsafe(nil), Integer) + +# source://redis-client//lib/redis_client/sentinel_config.rb#7 +RedisClient::SentinelConfig::SENTINEL_DELAY = T.let(T.unsafe(nil), Float) + +# source://redis-client//lib/redis_client.rb#89 +class RedisClient::TimeoutError < ::RedisClient::ConnectionError; end + +# source://redis-client//lib/redis_client.rb#82 +class RedisClient::UnsupportedServer < ::RedisClient::Error; end + +# source://redis-client//lib/redis_client/version.rb#4 +RedisClient::VERSION = T.let(T.unsafe(nil), String) + +# source://redis-client//lib/redis_client.rb#91 +class RedisClient::WriteTimeoutError < ::RedisClient::TimeoutError; end + +# source://redis-client//lib/redis_client.rb#123 +class RedisClient::WrongTypeError < ::RedisClient::CommandError; end diff --git a/sorbet/rbi/gems/redis@5.0.6.rbi b/sorbet/rbi/gems/redis@5.0.6.rbi new file mode 100644 index 0000000..114aef2 --- /dev/null +++ b/sorbet/rbi/gems/redis@5.0.6.rbi @@ -0,0 +1,3178 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `redis` gem. +# Please instead update this file by running `bin/tapioca gem redis`. + +# source://redis//lib/redis/errors.rb#3 +class Redis + include ::Redis::Commands::Bitmaps + include ::Redis::Commands::Cluster + include ::Redis::Commands::Connection + include ::Redis::Commands::Geo + include ::Redis::Commands::Hashes + include ::Redis::Commands::HyperLogLog + include ::Redis::Commands::Keys + include ::Redis::Commands::Lists + include ::Redis::Commands::Pubsub + include ::Redis::Commands::Scripting + include ::Redis::Commands::Server + include ::Redis::Commands::Sets + include ::Redis::Commands::SortedSets + include ::Redis::Commands::Streams + include ::Redis::Commands::Strings + include ::Redis::Commands::Transactions + include ::Redis::Commands + + # Create a new client instance + # + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param options [Hash] + # @return [Redis] a new client instance + # + # source://redis//lib/redis.rb#63 + def initialize(options = T.unsafe(nil)); end + + # source://redis//lib/redis.rb#98 + def _client; end + + # Disconnect the client as quickly and silently as possible. + # + # source://redis//lib/redis.rb#88 + def close; end + + # Test whether or not the client is connected + # + # @return [Boolean] + # + # source://redis//lib/redis.rb#83 + def connected?; end + + # source://redis//lib/redis.rb#122 + def connection; end + + # Disconnect the client as quickly and silently as possible. + # + # source://redis//lib/redis.rb#88 + def disconnect!; end + + # source://redis//lib/redis.rb#118 + def dup; end + + # source://redis//lib/redis.rb#110 + def id; end + + # source://redis//lib/redis.rb#114 + def inspect; end + + # source://redis//lib/redis.rb#102 + def pipelined; end + + # @yield [_self] + # @yieldparam _self [Redis] the object that the method was called on + # + # source://redis//lib/redis.rb#94 + def with; end + + # Run code without the client reconnecting + # + # source://redis//lib/redis.rb#78 + def without_reconnect(&block); end + + private + + # source://redis//lib/redis.rb#177 + def _subscription(method, timeout, channels, block); end + + # source://redis//lib/redis.rb#134 + def initialize_client(options); end + + # source://redis//lib/redis.rb#171 + def send_blocking_command(command, timeout, &block); end + + # source://redis//lib/redis.rb#165 + def send_command(command, &block); end + + # source://redis//lib/redis.rb#161 + def synchronize; end + + class << self + # source://redis//lib/redis.rb#14 + def deprecate!(message); end + + # Returns the value of attribute raise_deprecations. + # + # source://redis//lib/redis.rb#12 + def raise_deprecations; end + + # Sets the attribute raise_deprecations + # + # @param value the value to set the attribute raise_deprecations to. + # + # source://redis//lib/redis.rb#12 + def raise_deprecations=(_arg0); end + + # Returns the value of attribute silence_deprecations. + # + # source://redis//lib/redis.rb#12 + def silence_deprecations; end + + # Sets the attribute silence_deprecations + # + # @param value the value to set the attribute silence_deprecations to. + # + # source://redis//lib/redis.rb#12 + def silence_deprecations=(_arg0); end + end +end + +# source://redis//lib/redis.rb#8 +Redis::BASE_PATH = T.let(T.unsafe(nil), String) + +# Base error for connection related errors. +# +# source://redis//lib/redis/errors.rb#33 +class Redis::BaseConnectionError < ::Redis::BaseError; end + +# Base error for all redis-rb errors. +# +# source://redis//lib/redis/errors.rb#5 +class Redis::BaseError < ::StandardError; end + +# Raised when connection to a Redis server cannot be made. +# +# source://redis//lib/redis/errors.rb#37 +class Redis::CannotConnectError < ::Redis::BaseConnectionError; end + +# source://redis//lib/redis/client.rb#6 +class Redis::Client < ::RedisClient + # source://redis//lib/redis/client.rb#78 + def blocking_call_v(timeout, command, &block); end + + # source://redis//lib/redis/client.rb#72 + def call_v(command, &block); end + + # source://redis//lib/redis/client.rb#43 + def db; end + + # source://redis//lib/redis/client.rb#103 + def disable_reconnection(&block); end + + # source://redis//lib/redis/client.rb#47 + def host; end + + # source://redis//lib/redis/client.rb#31 + def id; end + + # source://redis//lib/redis/client.rb#107 + def inherit_socket!; end + + # source://redis//lib/redis/client.rb#97 + def multi; end + + # source://redis//lib/redis/client.rb#63 + def password; end + + # source://redis//lib/redis/client.rb#55 + def path; end + + # source://redis//lib/redis/client.rb#91 + def pipelined; end + + # source://redis//lib/redis/client.rb#51 + def port; end + + # source://redis//lib/redis/client.rb#35 + def server_url; end + + # source://redis//lib/redis/client.rb#39 + def timeout; end + + # source://redis//lib/redis/client.rb#59 + def username; end + + private + + # @raise [redis_error] + # + # source://redis//lib/redis/client.rb#113 + def translate_error!(error); end + + # source://redis//lib/redis/client.rb#118 + def translate_error_class(error_class); end + + class << self + # source://redis//lib/redis/client.rb#22 + def config(**kwargs); end + + # source://redis//lib/redis/client.rb#26 + def sentinel(**kwargs); end + end +end + +# source://redis//lib/redis/client.rb#7 +Redis::Client::ERROR_MAPPING = T.let(T.unsafe(nil), Hash) + +# Raised by the client when command execution returns an error reply. +# +# source://redis//lib/redis/errors.rb#20 +class Redis::CommandError < ::Redis::BaseError; end + +# source://redis//lib/redis/commands/bitmaps.rb#4 +module Redis::Commands + include ::Redis::Commands::Bitmaps + include ::Redis::Commands::Cluster + include ::Redis::Commands::Connection + include ::Redis::Commands::Geo + include ::Redis::Commands::Hashes + include ::Redis::Commands::HyperLogLog + include ::Redis::Commands::Keys + include ::Redis::Commands::Lists + include ::Redis::Commands::Pubsub + include ::Redis::Commands::Scripting + include ::Redis::Commands::Server + include ::Redis::Commands::Sets + include ::Redis::Commands::SortedSets + include ::Redis::Commands::Streams + include ::Redis::Commands::Strings + include ::Redis::Commands::Transactions + + # Sends a command to Redis and returns its reply. + # + # Replies are converted to Ruby objects according to the RESP protocol, so + # you can expect a Ruby array, integer or nil when Redis sends one. Higher + # level transformations, such as converting an array of pairs into a Ruby + # hash, are up to consumers. + # + # Redis error replies are raised as Ruby exceptions. + # + # source://redis//lib/redis/commands.rb#202 + def call(*command); end + + # Interact with the sentinel command (masters, master, slaves, failover) + # + # @param subcommand [String] e.g. `masters`, `master`, `slaves` + # @param args [Array] depends on subcommand + # @return [Array, Hash, String] depends on subcommand + # + # source://redis//lib/redis/commands.rb#211 + def sentinel(subcommand, *args); end + + private + + # source://redis//lib/redis/commands.rb#233 + def method_missing(*command); end +end + +# source://redis//lib/redis/commands/bitmaps.rb#5 +module Redis::Commands::Bitmaps + # Count the number of set bits in a range of the string value stored at key. + # + # @param key [String] + # @param start [Integer] start index + # @param stop [Integer] stop index + # @return [Integer] the number of bits set to 1 + # + # source://redis//lib/redis/commands/bitmaps.rb#31 + def bitcount(key, start = T.unsafe(nil), stop = T.unsafe(nil)); end + + # Perform a bitwise operation between strings and store the resulting string in a key. + # + # @param operation [String] e.g. `and`, `or`, `xor`, `not` + # @param destkey [String] destination key + # @param keys [String, Array] one or more source keys to perform `operation` + # @return [Integer] the length of the string stored in `destkey` + # + # source://redis//lib/redis/commands/bitmaps.rb#41 + def bitop(operation, destkey, *keys); end + + # Return the position of the first bit set to 1 or 0 in a string. + # + # @param key [String] + # @param bit [Integer] whether to look for the first 1 or 0 bit + # @param start [Integer] start index + # @param stop [Integer] stop index + # @raise [ArgumentError] + # @return [Integer] the position of the first 1/0 bit. + # -1 if looking for 1 and it is not found or start and stop are given. + # + # source://redis//lib/redis/commands/bitmaps.rb#56 + def bitpos(key, bit, start = T.unsafe(nil), stop = T.unsafe(nil)); end + + # Returns the bit value at offset in the string value stored at key. + # + # @param key [String] + # @param offset [Integer] bit offset + # @return [Integer] `0` or `1` + # + # source://redis//lib/redis/commands/bitmaps.rb#21 + def getbit(key, offset); end + + # Sets or clears the bit at offset in the string value stored at key. + # + # @param key [String] + # @param offset [Integer] bit offset + # @param value [Integer] bit value `0` or `1` + # @return [Integer] the original bit value stored at `offset` + # + # source://redis//lib/redis/commands/bitmaps.rb#12 + def setbit(key, offset, value); end +end + +# Commands returning 1 for true and 0 for false may be executed in a pipeline +# where the method call will return nil. Propagate the nil instead of falsely +# returning false. +# +# source://redis//lib/redis/commands.rb#42 +Redis::Commands::Boolify = T.let(T.unsafe(nil), Proc) + +# source://redis//lib/redis/commands.rb#46 +Redis::Commands::BoolifySet = T.let(T.unsafe(nil), Proc) + +# source://redis//lib/redis/commands/cluster.rb#5 +module Redis::Commands::Cluster + # Sends `ASKING` command to random node and returns its reply. + # + # @return [String] `'OK'` + # @see https://redis.io/topics/cluster-spec#ask-redirection ASK redirection + # + # source://redis//lib/redis/commands/cluster.rb#23 + def asking; end + + # Sends `CLUSTER *` command to random node and returns its reply. + # + # @param subcommand [String, Symbol] the subcommand of cluster command + # e.g. `:slots`, `:nodes`, `:slaves`, `:info` + # @return [Object] depends on the subcommand + # @see https://redis.io/commands#cluster Reference of cluster command + # + # source://redis//lib/redis/commands/cluster.rb#14 + def cluster(subcommand, *args); end +end + +# source://redis//lib/redis/commands/connection.rb#5 +module Redis::Commands::Connection + # Authenticate to the server. + # + # @param args [Array] includes both username and password + # or only password + # @return [String] `OK` + # @see https://redis.io/commands/auth AUTH command + # + # source://redis//lib/redis/commands/connection.rb#12 + def auth(*args); end + + # Echo the given string. + # + # @param value [String] + # @return [String] + # + # source://redis//lib/redis/commands/connection.rb#28 + def echo(value); end + + # Ping the server. + # + # @param message [optional, String] + # @return [String] `PONG` + # + # source://redis//lib/redis/commands/connection.rb#20 + def ping(message = T.unsafe(nil)); end + + # Close the connection. + # + # @return [String] `OK` + # + # source://redis//lib/redis/commands/connection.rb#43 + def quit; end + + # Change the selected database for the current connection. + # + # @param db [Integer] zero-based index of the DB to use (0 to 15) + # @return [String] `OK` + # + # source://redis//lib/redis/commands/connection.rb#36 + def select(db); end +end + +# source://redis//lib/redis/commands.rb#110 +Redis::Commands::EMPTY_STREAM_RESPONSE = T.let(T.unsafe(nil), Array) + +# source://redis//lib/redis/commands.rb#73 +Redis::Commands::Floatify = T.let(T.unsafe(nil), Proc) + +# source://redis//lib/redis/commands.rb#86 +Redis::Commands::FloatifyPairs = T.let(T.unsafe(nil), Proc) + +# source://redis//lib/redis/commands/geo.rb#5 +module Redis::Commands::Geo + # Adds the specified geospatial items (latitude, longitude, name) to the specified key + # + # @param key [String] + # @param member [Array] arguemnts for member or members: longitude, latitude, name + # @return [Integer] number of elements added to the sorted set + # + # source://redis//lib/redis/commands/geo.rb#11 + def geoadd(key, *member); end + + # Returns the distance between two members of a geospatial index + # + # @param key [String] + # @param members [Array] + # @param unit ['m', 'km', 'mi', 'ft'] + # @return [String, nil] returns distance in spefied unit if both members present, nil otherwise. + # + # source://redis//lib/redis/commands/geo.rb#70 + def geodist(key, member1, member2, unit = T.unsafe(nil)); end + + # Returns geohash string representing position for specified members of the specified key. + # + # @param key [String] + # @param member [String, Array] one member or array of members + # @return [Array] returns array containg geohash string if member is present, nil otherwise + # + # source://redis//lib/redis/commands/geo.rb#20 + def geohash(key, member); end + + # Returns longitude and latitude of members of a geospatial index + # + # @param key [String] + # @param member [String, Array] one member or array of members + # @return [Array, nil>] returns array of elements, where each + # element is either array of longitude and latitude or nil + # + # source://redis//lib/redis/commands/geo.rb#60 + def geopos(key, member); end + + # Query a sorted set representing a geospatial index to fetch members matching a + # given maximum distance from a point + # + # @param args [Array] key, longitude, latitude, radius, unit(m|km|ft|mi) + # @param sort ['asc', 'desc'] sort returned items from the nearest to the farthest + # or the farthest to the nearest relative to the center + # @param count [Integer] limit the results to the first N matching items + # @param options ['WITHDIST', 'WITHCOORD', 'WITHHASH'] to return additional information + # @return [Array] may be changed with `options` + # + # source://redis//lib/redis/commands/geo.rb#33 + def georadius(*args, **geoptions); end + + # Query a sorted set representing a geospatial index to fetch members matching a + # given maximum distance from an already existing member + # + # @param args [Array] key, member, radius, unit(m|km|ft|mi) + # @param sort ['asc', 'desc'] sort returned items from the nearest to the farthest or the farthest + # to the nearest relative to the center + # @param count [Integer] limit the results to the first N matching items + # @param options ['WITHDIST', 'WITHCOORD', 'WITHHASH'] to return additional information + # @return [Array] may be changed with `options` + # + # source://redis//lib/redis/commands/geo.rb#48 + def georadiusbymember(*args, **geoptions); end + + private + + # source://redis//lib/redis/commands/geo.rb#76 + def _geoarguments(*args, options: T.unsafe(nil), sort: T.unsafe(nil), count: T.unsafe(nil)); end +end + +# source://redis//lib/redis/commands/hashes.rb#5 +module Redis::Commands::Hashes + # Delete one or more hash fields. + # + # @param key [String] + # @param field [String, Array] + # @return [Integer] the number of fields that were removed from the hash + # + # source://redis//lib/redis/commands/hashes.rb#156 + def hdel(key, *fields); end + + # Determine if a hash field exists. + # + # @param key [String] + # @param field [String] + # @return [Boolean] whether or not the field exists in the hash + # + # source://redis//lib/redis/commands/hashes.rb#166 + def hexists(key, field); end + + # Get the value of a hash field. + # + # @param key [String] + # @param field [String] + # @return [String] + # + # source://redis//lib/redis/commands/hashes.rb#74 + def hget(key, field); end + + # Get all the fields and values in a hash. + # + # @param key [String] + # @return [Hash] + # + # source://redis//lib/redis/commands/hashes.rb#210 + def hgetall(key); end + + # Increment the integer value of a hash field by the given integer number. + # + # @param key [String] + # @param field [String] + # @param increment [Integer] + # @return [Integer] value of the field after incrementing it + # + # source://redis//lib/redis/commands/hashes.rb#176 + def hincrby(key, field, increment); end + + # Increment the numeric value of a hash field by the given float number. + # + # @param key [String] + # @param field [String] + # @param increment [Float] + # @return [Float] value of the field after incrementing it + # + # source://redis//lib/redis/commands/hashes.rb#186 + def hincrbyfloat(key, field, increment); end + + # Get all the fields in a hash. + # + # @param key [String] + # @return [Array] + # + # source://redis//lib/redis/commands/hashes.rb#194 + def hkeys(key); end + + # Get the number of fields in a hash. + # + # @param key [String] + # @return [Integer] number of fields in the hash + # + # source://redis//lib/redis/commands/hashes.rb#10 + def hlen(key); end + + # Get the values of all the given hash fields. + # + # @example + # redis.hmget("hash", "f1", "f2") + # # => ["v1", "v2"] + # @param key [String] + # @param fields [Array] array of fields + # @return [Array] an array of values for the specified fields + # @see #mapped_hmget + # + # source://redis//lib/redis/commands/hashes.rb#89 + def hmget(key, *fields, &blk); end + + # Set one or more hash values. + # + # @example + # redis.hmset("hash", "f1", "v1", "f2", "v2") + # # => "OK" + # @param key [String] + # @param attrs [Array] array of fields and values + # @return [String] `"OK"` + # @see #mapped_hmset + # + # source://redis//lib/redis/commands/hashes.rb#50 + def hmset(key, *attrs); end + + # Get one or more random fields from a hash. + # + # @example Get one random field + # redis.hrandfield("hash") + # # => "f1" + # @example Get multiple random fields + # redis.hrandfield("hash", 2) + # # => ["f1, "f2"] + # @example Get multiple random fields with values + # redis.hrandfield("hash", 2, with_values: true) + # # => [["f1", "s1"], ["f2", "s2"]] + # @param key [String] + # @param count [Integer] + # @param options [Hash] - `:with_values => true`: include values in output + # @return [nil, String, Array, Array<[String, Float]>] - when `key` does not exist, `nil` + # - when `count` is not specified, a field name + # - when `count` is specified and `:with_values` is not specified, an array of field names + # - when `:with_values` is specified, an array with `[field, value]` pairs + # + # source://redis//lib/redis/commands/hashes.rb#138 + def hrandfield(key, count = T.unsafe(nil), withvalues: T.unsafe(nil), with_values: T.unsafe(nil)); end + + # Scan a hash + # + # @example Retrieve the first batch of key/value pairs in a hash + # redis.hscan("hash", 0) + # @param cursor [String, Integer] the cursor of the iteration + # @param options [Hash] - `:match => String`: only return keys matching the pattern + # - `:count => Integer`: return count keys at most per iteration + # @return [String, Array<[String, String]>] the next cursor and all found keys + # + # source://redis//lib/redis/commands/hashes.rb#225 + def hscan(key, cursor, **options); end + + # Scan a hash + # + # @example Retrieve all of the key/value pairs in a hash + # redis.hscan_each("hash").to_a + # # => [["key70", "70"], ["key80", "80"]] + # @param options [Hash] - `:match => String`: only return keys matching the pattern + # - `:count => Integer`: return count keys at most per iteration + # @return [Enumerator] an enumerator for all found keys + # + # source://redis//lib/redis/commands/hashes.rb#242 + def hscan_each(key, **options, &block); end + + # Set one or more hash values. + # + # @example + # redis.hset("hash", "f1", "v1", "f2", "v2") # => 2 + # redis.hset("hash", { "f1" => "v1", "f2" => "v2" }) # => 2 + # @param key [String] + # @param attrs [Array | Hash] array or hash of fields and values + # @return [Integer] The number of fields that were added to the hash + # + # source://redis//lib/redis/commands/hashes.rb#23 + def hset(key, *attrs); end + + # Set the value of a hash field, only if the field does not exist. + # + # @param key [String] + # @param field [String] + # @param value [String] + # @return [Boolean] whether or not the field was **added** to the hash + # + # source://redis//lib/redis/commands/hashes.rb#35 + def hsetnx(key, field, value); end + + # Get all the values in a hash. + # + # @param key [String] + # @return [Array] + # + # source://redis//lib/redis/commands/hashes.rb#202 + def hvals(key); end + + # Get the values of all the given hash fields. + # + # @example + # redis.mapped_hmget("hash", "f1", "f2") + # # => { "f1" => "v1", "f2" => "v2" } + # @param key [String] + # @param fields [Array] array of fields + # @return [Hash] a hash mapping the specified fields to their values + # @see #hmget + # + # source://redis//lib/redis/commands/hashes.rb#105 + def mapped_hmget(key, *fields); end + + # Set one or more hash values. + # + # @example + # redis.mapped_hmset("hash", { "f1" => "v1", "f2" => "v2" }) + # # => "OK" + # @param key [String] + # @param hash [Hash] a non-empty hash with fields mapping to values + # @return [String] `"OK"` + # @see #hmset + # + # source://redis//lib/redis/commands/hashes.rb#65 + def mapped_hmset(key, hash); end +end + +# source://redis//lib/redis/commands.rb#57 +Redis::Commands::Hashify = T.let(T.unsafe(nil), Proc) + +# source://redis//lib/redis/commands.rb#155 +Redis::Commands::HashifyClusterNodeInfo = T.let(T.unsafe(nil), Proc) + +# source://redis//lib/redis/commands.rb#184 +Redis::Commands::HashifyClusterNodes = T.let(T.unsafe(nil), Proc) + +# source://redis//lib/redis/commands.rb#188 +Redis::Commands::HashifyClusterSlaves = T.let(T.unsafe(nil), Proc) + +# source://redis//lib/redis/commands.rb#170 +Redis::Commands::HashifyClusterSlots = T.let(T.unsafe(nil), Proc) + +# source://redis//lib/redis/commands.rb#94 +Redis::Commands::HashifyInfo = T.let(T.unsafe(nil), Proc) + +# source://redis//lib/redis/commands.rb#119 +Redis::Commands::HashifyStreamAutoclaim = T.let(T.unsafe(nil), Proc) + +# source://redis//lib/redis/commands.rb#128 +Redis::Commands::HashifyStreamAutoclaimJustId = T.let(T.unsafe(nil), Proc) + +# source://redis//lib/redis/commands.rb#113 +Redis::Commands::HashifyStreamEntries = T.let(T.unsafe(nil), Proc) + +# source://redis//lib/redis/commands.rb#144 +Redis::Commands::HashifyStreamPendingDetails = T.let(T.unsafe(nil), Proc) + +# source://redis//lib/redis/commands.rb#135 +Redis::Commands::HashifyStreamPendings = T.let(T.unsafe(nil), Proc) + +# source://redis//lib/redis/commands.rb#101 +Redis::Commands::HashifyStreams = T.let(T.unsafe(nil), Proc) + +# source://redis//lib/redis/commands/hyper_log_log.rb#5 +module Redis::Commands::HyperLogLog + # Add one or more members to a HyperLogLog structure. + # + # @param key [String] + # @param member [String, Array] one member, or array of members + # @return [Boolean] true if at least 1 HyperLogLog internal register was altered. false otherwise. + # + # source://redis//lib/redis/commands/hyper_log_log.rb#11 + def pfadd(key, member); end + + # Get the approximate cardinality of members added to HyperLogLog structure. + # + # If called with multiple keys, returns the approximate cardinality of the + # union of the HyperLogLogs contained in the keys. + # + # @param keys [String, Array] + # @return [Integer] + # + # source://redis//lib/redis/commands/hyper_log_log.rb#22 + def pfcount(*keys); end + + # Merge multiple HyperLogLog values into an unique value that will approximate the cardinality of the union of + # the observed Sets of the source HyperLogLog structures. + # + # @param dest_key [String] destination key + # @param source_key [String, Array] source key, or array of keys + # @return [Boolean] + # + # source://redis//lib/redis/commands/hyper_log_log.rb#32 + def pfmerge(dest_key, *source_key); end +end + +# source://redis//lib/redis/commands/keys.rb#5 +module Redis::Commands::Keys + # Copy a value from one key to another. + # + # @example Copy a value to another key + # redis.set "foo", "value" + # # => "OK" + # redis.copy "foo", "bar" + # # => true + # redis.get "bar" + # # => "value" + # @example Copy a value to a key in another database + # redis.set "foo", "value" + # # => "OK" + # redis.copy "foo", "bar", db: 2 + # # => true + # redis.select 2 + # # => "OK" + # redis.get "bar" + # # => "value" + # @param source [String] + # @param destination [String] + # @param db [Integer] + # @param replace [Boolean] removes the `destination` key before copying value to it + # @return [Boolean] whether the key was copied or not + # + # source://redis//lib/redis/commands/keys.rb#327 + def copy(source, destination, db: T.unsafe(nil), replace: T.unsafe(nil)); end + + # Delete one or more keys. + # + # @param keys [String, Array] + # @return [Integer] number of keys that were deleted + # + # source://redis//lib/redis/commands/keys.rb#232 + def del(*keys); end + + # Return a serialized version of the value stored at a key. + # + # @param key [String] + # @return [String] serialized_value + # + # source://redis//lib/redis/commands/keys.rb#183 + def dump(key); end + + # Determine how many of the keys exists. + # + # @param keys [String, Array] + # @return [Integer] + # + # source://redis//lib/redis/commands/keys.rb#251 + def exists(*keys); end + + # Determine if any of the keys exists. + # + # @param keys [String, Array] + # @return [Boolean] + # + # source://redis//lib/redis/commands/keys.rb#259 + def exists?(*keys); end + + # Set a key's time to live in seconds. + # + # @param key [String] + # @param seconds [Integer] time to live + # @param options [Hash] - `:nx => true`: Set expiry only when the key has no expiry. + # - `:xx => true`: Set expiry only when the key has an existing expiry. + # - `:gt => true`: Set expiry only when the new expiry is greater than current one. + # - `:lt => true`: Set expiry only when the new expiry is less than current one. + # @return [Boolean] whether the timeout was set or not + # + # source://redis//lib/redis/commands/keys.rb#78 + def expire(key, seconds, nx: T.unsafe(nil), xx: T.unsafe(nil), gt: T.unsafe(nil), lt: T.unsafe(nil)); end + + # Set the expiration for a key as a UNIX timestamp. + # + # @param key [String] + # @param unix_time [Integer] expiry time specified as a UNIX timestamp + # @param options [Hash] - `:nx => true`: Set expiry only when the key has no expiry. + # - `:xx => true`: Set expiry only when the key has an existing expiry. + # - `:gt => true`: Set expiry only when the new expiry is greater than current one. + # - `:lt => true`: Set expiry only when the new expiry is less than current one. + # @return [Boolean] whether the timeout was set or not + # + # source://redis//lib/redis/commands/keys.rb#98 + def expireat(key, unix_time, nx: T.unsafe(nil), xx: T.unsafe(nil), gt: T.unsafe(nil), lt: T.unsafe(nil)); end + + # Find all keys matching the given pattern. + # + # @param pattern [String] + # @return [Array] + # + # source://redis//lib/redis/commands/keys.rb#269 + def keys(pattern = T.unsafe(nil)); end + + # Transfer a key from the connected instance to another instance. + # + # @param key [String, Array] + # @param options [Hash] - `:host => String`: host of instance to migrate to + # - `:port => Integer`: port of instance to migrate to + # - `:db => Integer`: database to migrate to (default: same as source) + # - `:timeout => Integer`: timeout (default: same as connection timeout) + # - `:copy => Boolean`: Do not remove the key from the local instance. + # - `:replace => Boolean`: Replace existing key on the remote instance. + # @return [String] `"OK"` + # + # source://redis//lib/redis/commands/keys.rb#214 + def migrate(key, options); end + + # Move a key to another database. + # + # @example Move a key to another database + # redis.set "foo", "bar" + # # => "OK" + # redis.move "foo", 2 + # # => true + # redis.exists "foo" + # # => false + # redis.select 2 + # # => "OK" + # redis.exists "foo" + # # => true + # redis.get "foo" + # # => "bar" + # @param key [String] + # @param db [Integer] + # @return [Boolean] whether the key was moved or not + # + # source://redis//lib/redis/commands/keys.rb#298 + def move(key, db); end + + # source://redis//lib/redis/commands/keys.rb#335 + def object(*args); end + + # Remove the expiration from a key. + # + # @param key [String] + # @return [Boolean] whether the timeout was removed or not + # + # source://redis//lib/redis/commands/keys.rb#64 + def persist(key); end + + # Set a key's time to live in milliseconds. + # + # @param key [String] + # @param milliseconds [Integer] time to live + # @param options [Hash] - `:nx => true`: Set expiry only when the key has no expiry. + # - `:xx => true`: Set expiry only when the key has an existing expiry. + # - `:gt => true`: Set expiry only when the new expiry is greater than current one. + # - `:lt => true`: Set expiry only when the new expiry is less than current one. + # @return [Boolean] whether the timeout was set or not + # + # source://redis//lib/redis/commands/keys.rb#134 + def pexpire(key, milliseconds, nx: T.unsafe(nil), xx: T.unsafe(nil), gt: T.unsafe(nil), lt: T.unsafe(nil)); end + + # Set the expiration for a key as number of milliseconds from UNIX Epoch. + # + # @param key [String] + # @param ms_unix_time [Integer] expiry time specified as number of milliseconds from UNIX Epoch. + # @param options [Hash] - `:nx => true`: Set expiry only when the key has no expiry. + # - `:xx => true`: Set expiry only when the key has an existing expiry. + # - `:gt => true`: Set expiry only when the new expiry is greater than current one. + # - `:lt => true`: Set expiry only when the new expiry is less than current one. + # @return [Boolean] whether the timeout was set or not + # + # source://redis//lib/redis/commands/keys.rb#154 + def pexpireat(key, ms_unix_time, nx: T.unsafe(nil), xx: T.unsafe(nil), gt: T.unsafe(nil), lt: T.unsafe(nil)); end + + # Get the time to live (in milliseconds) for a key. + # + # In Redis 2.6 or older the command returns -1 if the key does not exist or if + # the key exist but has no associated expire. + # + # Starting with Redis 2.8 the return value in case of error changed: + # + # - The command returns -2 if the key does not exist. + # - The command returns -1 if the key exists but has no associated expire. + # + # @param key [String] + # @return [Integer] remaining time to live in milliseconds + # + # source://redis//lib/redis/commands/keys.rb#175 + def pttl(key); end + + # Return a random key from the keyspace. + # + # @return [String] + # + # source://redis//lib/redis/commands/keys.rb#342 + def randomkey; end + + # Rename a key. If the new key already exists it is overwritten. + # + # @param old_name [String] + # @param new_name [String] + # @return [String] `OK` + # + # source://redis//lib/redis/commands/keys.rb#351 + def rename(old_name, new_name); end + + # Rename a key, only if the new key does not exist. + # + # @param old_name [String] + # @param new_name [String] + # @return [Boolean] whether the key was renamed or not + # + # source://redis//lib/redis/commands/keys.rb#360 + def renamenx(old_name, new_name); end + + # Create a key using the serialized value, previously obtained using DUMP. + # + # @param key [String] + # @param ttl [String] + # @param serialized_value [String] + # @param options [Hash] - `:replace => Boolean`: if false, raises an error if key already exists + # @raise [Redis::CommandError] + # @return [String] `"OK"` + # + # source://redis//lib/redis/commands/keys.rb#196 + def restore(key, ttl, serialized_value, replace: T.unsafe(nil)); end + + # Scan the keyspace + # + # @example Retrieve the first batch of keys + # redis.scan(0) + # # => ["4", ["key:21", "key:47", "key:42"]] + # @example Retrieve a batch of keys matching a pattern + # redis.scan(4, :match => "key:1?") + # # => ["92", ["key:13", "key:18"]] + # @example Retrieve a batch of keys of a certain type + # redis.scan(92, :type => "zset") + # # => ["173", ["sortedset:14", "sortedset:78"]] + # @param cursor [String, Integer] the cursor of the iteration + # @param options [Hash] - `:match => String`: only return keys matching the pattern + # - `:count => Integer`: return count keys at most per iteration + # - `:type => String`: return keys only of the given type + # @return [String, Array] the next cursor and all found keys + # + # source://redis//lib/redis/commands/keys.rb#25 + def scan(cursor, **options); end + + # Scan the keyspace + # + # @example Retrieve all of the keys (with possible duplicates) + # redis.scan_each.to_a + # # => ["key:21", "key:47", "key:42"] + # @example Execute block for each key matching a pattern + # redis.scan_each(:match => "key:1?") {|key| puts key} + # # => key:13 + # # => key:18 + # @example Execute block for each key of a type + # redis.scan_each(:type => "hash") {|key| puts redis.type(key)} + # # => "hash" + # # => "hash" + # @param options [Hash] - `:match => String`: only return keys matching the pattern + # - `:count => Integer`: return count keys at most per iteration + # - `:type => String`: return keys only of the given type + # @return [Enumerator] an enumerator for all found keys + # + # source://redis//lib/redis/commands/keys.rb#49 + def scan_each(**options, &block); end + + # Sort the elements in a list, set or sorted set. + # + # @example Retrieve the first 2 elements from an alphabetically sorted "list" + # redis.sort("list", :order => "alpha", :limit => [0, 2]) + # # => ["a", "b"] + # @example Store an alphabetically descending list in "target" + # redis.sort("list", :order => "desc alpha", :store => "target") + # # => 26 + # @param key [String] + # @param options [Hash] - `:by => String`: use external key to sort elements by + # - `:limit => [offset, count]`: skip `offset` elements, return a maximum + # of `count` elements + # - `:get => [String, Array]`: single key or array of keys to + # retrieve per element in the result + # - `:order => String`: combination of `ASC`, `DESC` and optionally `ALPHA` + # - `:store => String`: key to store the result at + # @return [Array, Array>, Integer] - when `:get` is not specified, or holds a single element, an array of elements + # - when `:get` is specified, and holds more than one element, an array of + # elements where every element is an array with the result for every + # element specified in `:get` + # - when `:store` is specified, the number of elements in the stored result + # + # source://redis//lib/redis/commands/keys.rb#389 + def sort(key, by: T.unsafe(nil), limit: T.unsafe(nil), get: T.unsafe(nil), order: T.unsafe(nil), store: T.unsafe(nil)); end + + # Get the time to live (in seconds) for a key. + # + # In Redis 2.6 or older the command returns -1 if the key does not exist or if + # the key exist but has no associated expire. + # + # Starting with Redis 2.8 the return value in case of error changed: + # + # - The command returns -2 if the key does not exist. + # - The command returns -1 if the key exists but has no associated expire. + # + # @param key [String] + # @return [Integer] remaining time to live in seconds. + # + # source://redis//lib/redis/commands/keys.rb#120 + def ttl(key); end + + # Determine the type stored at key. + # + # @param key [String] + # @return [String] `string`, `list`, `set`, `zset`, `hash` or `none` + # + # source://redis//lib/redis/commands/keys.rb#419 + def type(key); end + + # Unlink one or more keys. + # + # @param keys [String, Array] + # @return [Integer] number of keys that were unlinked + # + # source://redis//lib/redis/commands/keys.rb#243 + def unlink(*keys); end + + private + + # source://redis//lib/redis/commands/keys.rb#425 + def _scan(command, cursor, args, match: T.unsafe(nil), count: T.unsafe(nil), type: T.unsafe(nil), &block); end +end + +# source://redis//lib/redis/commands/lists.rb#5 +module Redis::Commands::Lists + # Remove the first/last element in a list and append/prepend it + # to another list and return it, or block until one is available. + # + # @example Without timeout + # element = redis.blmove("foo", "bar", "LEFT", "RIGHT") + # # => "element" + # @example With timeout + # element = redis.blmove("foo", "bar", "LEFT", "RIGHT", timeout: 5) + # # => nil on timeout + # # => "element" on success + # @param destination [String] destination key + # @param where_destination [String, Symbol] where to push the element to the source list + # e.g. 'LEFT' - to head, 'RIGHT' - to tail + # @param options [Hash] - `:timeout => [Float, Integer]`: timeout in seconds, defaults to no timeout + # @param where_source [String, Symbol] from where to remove the element from the source list + # e.g. 'LEFT' - from head, 'RIGHT' - from tail + # @param source [String] source key + # @return [nil, String] the element, or nil when the source key does not exist or the timeout expired + # + # source://redis//lib/redis/commands/lists.rb#55 + def blmove(source, destination, where_source, where_destination, timeout: T.unsafe(nil)); end + + # Remove and get the first element in a list, or block until one is available. + # + # @example With timeout + # list, element = redis.blpop("list", :timeout => 5) + # # => nil on timeout + # # => ["list", "element"] on success + # @example Without timeout + # list, element = redis.blpop("list") + # # => ["list", "element"] + # @example Blocking pop on multiple lists + # list, element = redis.blpop(["list", "another_list"]) + # # => ["list", "element"] + # @param keys [String, Array] one or more keys to perform the + # blocking pop on + # @param options [Hash] - `:timeout => [Float, Integer]`: timeout in seconds, defaults to no timeout + # @return [nil, [String, String]] - `nil` when the operation timed out + # - tuple of the list that was popped from and element was popped otherwise + # + # source://redis//lib/redis/commands/lists.rb#150 + def blpop(*args); end + + # Remove and get the last element in a list, or block until one is available. + # + # @param keys [String, Array] one or more keys to perform the + # blocking pop on + # @param options [Hash] - `:timeout => [Float, Integer]`: timeout in seconds, defaults to no timeout + # @return [nil, [String, String]] - `nil` when the operation timed out + # - tuple of the list that was popped from and element was popped otherwise + # @see #blpop + # + # source://redis//lib/redis/commands/lists.rb#166 + def brpop(*args); end + + # Pop a value from a list, push it to another list and return it; or block + # until one is available. + # + # @param source [String] source key + # @param destination [String] destination key + # @param options [Hash] - `:timeout => [Float, Integer]`: timeout in seconds, defaults to no timeout + # @return [nil, String] - `nil` when the operation timed out + # - the element was popped and pushed otherwise + # + # source://redis//lib/redis/commands/lists.rb#181 + def brpoplpush(source, destination, timeout: T.unsafe(nil)); end + + # Get an element from a list by its index. + # + # @param key [String] + # @param index [Integer] + # @return [String] + # + # source://redis//lib/redis/commands/lists.rb#191 + def lindex(key, index); end + + # Insert an element before or after another element in a list. + # + # @param key [String] + # @param where [String, Symbol] `BEFORE` or `AFTER` + # @param pivot [String] reference element + # @param value [String] + # @return [Integer] length of the list after the insert operation, or `-1` + # when the element `pivot` was not found + # + # source://redis//lib/redis/commands/lists.rb#203 + def linsert(key, where, pivot, value); end + + # Get the length of a list. + # + # @param key [String] + # @return [Integer] + # + # source://redis//lib/redis/commands/lists.rb#10 + def llen(key); end + + # Remove the first/last element in a list, append/prepend it to another list and return it. + # + # @note This command comes in place of the now deprecated RPOPLPUSH. + # Doing LMOVE RIGHT LEFT is equivalent. + # @param source [String] source key + # @param destination [String] destination key + # @param where_source [String, Symbol] from where to remove the element from the source list + # e.g. 'LEFT' - from head, 'RIGHT' - from tail + # @param where_destination [String, Symbol] where to push the element to the source list + # e.g. 'LEFT' - to head, 'RIGHT' - to tail + # @return [nil, String] the element, or nil when the source key does not exist + # + # source://redis//lib/redis/commands/lists.rb#27 + def lmove(source, destination, where_source, where_destination); end + + # Remove and get the first elements in a list. + # + # @param key [String] + # @param count [Integer] number of elements to remove + # @return [nil, String, Array] the values of the first elements + # + # source://redis//lib/redis/commands/lists.rb#103 + def lpop(key, count = T.unsafe(nil)); end + + # Prepend one or more values to a list, creating the list if it doesn't exist + # + # @param key [String] + # @param value [String, Array] string value, or array of string values to push + # @return [Integer] the length of the list after the push operation + # + # source://redis//lib/redis/commands/lists.rb#67 + def lpush(key, value); end + + # Prepend a value to a list, only if the list exists. + # + # @param key [String] + # @param value [String] + # @return [Integer] the length of the list after the push operation + # + # source://redis//lib/redis/commands/lists.rb#76 + def lpushx(key, value); end + + # Get a range of elements from a list. + # + # @param key [String] + # @param start [Integer] start index + # @param stop [Integer] stop index + # @return [Array] + # + # source://redis//lib/redis/commands/lists.rb#213 + def lrange(key, start, stop); end + + # Remove elements from a list. + # + # @param key [String] + # @param count [Integer] number of elements to remove. Use a positive + # value to remove the first `count` occurrences of `value`. A negative + # value to remove the last `count` occurrences of `value`. Or zero, to + # remove all occurrences of `value` from the list. + # @param value [String] + # @return [Integer] the number of removed elements + # + # source://redis//lib/redis/commands/lists.rb#226 + def lrem(key, count, value); end + + # Set the value of an element in a list by its index. + # + # @param key [String] + # @param index [Integer] + # @param value [String] + # @return [String] `OK` + # + # source://redis//lib/redis/commands/lists.rb#236 + def lset(key, index, value); end + + # Trim a list to the specified range. + # + # @param key [String] + # @param start [Integer] start index + # @param stop [Integer] stop index + # @return [String] `OK` + # + # source://redis//lib/redis/commands/lists.rb#246 + def ltrim(key, start, stop); end + + # Remove and get the last elements in a list. + # + # @param key [String] + # @param count [Integer] number of elements to remove + # @return [nil, String, Array] the values of the last elements + # + # source://redis//lib/redis/commands/lists.rb#114 + def rpop(key, count = T.unsafe(nil)); end + + # Remove the last element in a list, append it to another list and return it. + # + # @param source [String] source key + # @param destination [String] destination key + # @return [nil, String] the element, or nil when the source key does not exist + # + # source://redis//lib/redis/commands/lists.rb#125 + def rpoplpush(source, destination); end + + # Append one or more values to a list, creating the list if it doesn't exist + # + # @param key [String] + # @param value [String, Array] string value, or array of string values to push + # @return [Integer] the length of the list after the push operation + # + # source://redis//lib/redis/commands/lists.rb#85 + def rpush(key, value); end + + # Append a value to a list, only if the list exists. + # + # @param key [String] + # @param value [String] + # @return [Integer] the length of the list after the push operation + # + # source://redis//lib/redis/commands/lists.rb#94 + def rpushx(key, value); end + + private + + # source://redis//lib/redis/commands/lists.rb#252 + def _bpop(cmd, args, &blk); end + + # source://redis//lib/redis/commands/lists.rb#269 + def _normalize_move_wheres(where_source, where_destination); end +end + +# source://redis//lib/redis/commands.rb#192 +Redis::Commands::Noop = T.let(T.unsafe(nil), Proc) + +# source://redis//lib/redis/commands.rb#65 +Redis::Commands::Pairify = T.let(T.unsafe(nil), Proc) + +# source://redis//lib/redis/commands/pubsub.rb#5 +module Redis::Commands::Pubsub + # Listen for messages published to channels matching the given patterns. + # + # source://redis//lib/redis/commands/pubsub.rb#32 + def psubscribe(*channels, &block); end + + # Listen for messages published to channels matching the given patterns. + # Throw a timeout error if there is no messages for a timeout period. + # + # source://redis//lib/redis/commands/pubsub.rb#38 + def psubscribe_with_timeout(timeout, *channels, &block); end + + # Post a message to a channel. + # + # source://redis//lib/redis/commands/pubsub.rb#7 + def publish(channel, message); end + + # Inspect the state of the Pub/Sub subsystem. + # Possible subcommands: channels, numsub, numpat. + # + # source://redis//lib/redis/commands/pubsub.rb#49 + def pubsub(subcommand, *args); end + + # Stop listening for messages posted to channels matching the given patterns. + # + # source://redis//lib/redis/commands/pubsub.rb#43 + def punsubscribe(*channels); end + + # Listen for messages published to the given channels. + # + # source://redis//lib/redis/commands/pubsub.rb#16 + def subscribe(*channels, &block); end + + # Listen for messages published to the given channels. Throw a timeout error + # if there is no messages for a timeout period. + # + # source://redis//lib/redis/commands/pubsub.rb#22 + def subscribe_with_timeout(timeout, *channels, &block); end + + # @return [Boolean] + # + # source://redis//lib/redis/commands/pubsub.rb#11 + def subscribed?; end + + # Stop listening for messages posted to the given channels. + # + # source://redis//lib/redis/commands/pubsub.rb#27 + def unsubscribe(*channels); end +end + +# source://redis//lib/redis/commands/scripting.rb#5 +module Redis::Commands::Scripting + # Evaluate Lua script. + # + # @example EVAL with KEYS and ARGV as array arguments + # redis.eval("return { KEYS, ARGV }", ["k1", "k2"], ["a1", "a2"]) + # # => [["k1", "k2"], ["a1", "a2"]] + # @example EVAL without KEYS nor ARGV + # redis.eval("return 1") + # # => 1 + # @example EVAL with KEYS and ARGV in a hash argument + # redis.eval("return { KEYS, ARGV }", :keys => ["k1", "k2"], :argv => ["a1", "a2"]) + # # => [["k1", "k2"], ["a1", "a2"]] + # @param argv [Array] optional array with arguments to pass to the script + # @param keys [Array] optional array with keys to pass to the script + # @param options [Hash] - `:keys => Array`: optional array with keys to pass to the script + # - `:argv => Array`: optional array with arguments to pass to the script + # @return depends on the script + # @see #script + # @see #evalsha + # + # source://redis//lib/redis/commands/scripting.rb#71 + def eval(*args); end + + # Evaluate Lua script by its SHA. + # + # @example EVALSHA with KEYS and ARGV as array arguments + # redis.evalsha(sha, ["k1", "k2"], ["a1", "a2"]) + # # => + # @example EVALSHA without KEYS nor ARGV + # redis.evalsha(sha) + # # => + # @example EVALSHA with KEYS and ARGV in a hash argument + # redis.evalsha(sha, :keys => ["k1", "k2"], :argv => ["a1", "a2"]) + # # => + # @param argv [Array] optional array with arguments to pass to the script + # @param keys [Array] optional array with keys to pass to the script + # @param options [Hash] - `:keys => Array`: optional array with keys to pass to the script + # - `:argv => Array`: optional array with arguments to pass to the script + # @return depends on the script + # @see #script + # @see #eval + # + # source://redis//lib/redis/commands/scripting.rb#96 + def evalsha(*args); end + + # Control remote script registry. + # + # @example Load a script + # sha = redis.script(:load, "return 1") + # # => + # @example Check if a script exists + # redis.script(:exists, sha) + # # => true + # @example Check if multiple scripts exist + # redis.script(:exists, [sha, other_sha]) + # # => [true, false] + # @example Flush the script registry + # redis.script(:flush) + # # => "OK" + # @example Kill a running script + # redis.script(:kill) + # # => "OK" + # @param subcommand [String] e.g. `exists`, `flush`, `load`, `kill` + # @param args [Array] depends on subcommand + # @return [String, Boolean, Array, ...] depends on subcommand + # @see #eval + # @see #evalsha + # + # source://redis//lib/redis/commands/scripting.rb#30 + def script(subcommand, *args); end + + private + + # source://redis//lib/redis/commands/scripting.rb#102 + def _eval(cmd, args); end +end + +# source://redis//lib/redis/commands/server.rb#5 +module Redis::Commands::Server + # Asynchronously rewrite the append-only file. + # + # @return [String] `OK` + # + # source://redis//lib/redis/commands/server.rb#9 + def bgrewriteaof; end + + # Asynchronously save the dataset to disk. + # + # @return [String] `OK` + # + # source://redis//lib/redis/commands/server.rb#16 + def bgsave; end + + # Manage client connections. + # + # @param subcommand [String, Symbol] e.g. `kill`, `list`, `getname`, `setname` + # @return [String, Hash] depends on subcommand + # + # source://redis//lib/redis/commands/server.rb#39 + def client(subcommand, *args); end + + # Get or set server configuration parameters. + # + # @param action [Symbol] e.g. `:get`, `:set`, `:resetstat` + # @return [String, Hash] string reply, or hash when retrieving more than one + # property with `CONFIG GET` + # + # source://redis//lib/redis/commands/server.rb#25 + def config(action, *args); end + + # Return the number of keys in the selected database. + # + # @return [Integer] + # + # source://redis//lib/redis/commands/server.rb#55 + def dbsize; end + + # source://redis//lib/redis/commands/server.rb#183 + def debug(*args); end + + # Remove all keys from all databases. + # + # @param options [Hash] - `:async => Boolean`: async flush (default: false) + # @return [String] `OK` + # + # source://redis//lib/redis/commands/server.rb#64 + def flushall(options = T.unsafe(nil)); end + + # Remove all keys from the current database. + # + # @param options [Hash] - `:async => Boolean`: async flush (default: false) + # @return [String] `OK` + # + # source://redis//lib/redis/commands/server.rb#77 + def flushdb(options = T.unsafe(nil)); end + + # Get information and statistics about the server. + # + # @param cmd [String, Symbol] e.g. "commandstats" + # @return [Hash] + # + # source://redis//lib/redis/commands/server.rb#89 + def info(cmd = T.unsafe(nil)); end + + # Get the UNIX time stamp of the last successful save to disk. + # + # @return [Integer] + # + # source://redis//lib/redis/commands/server.rb#110 + def lastsave; end + + # Listen for all requests received by the server in real time. + # + # There is no way to interrupt this command. + # + # @yield a block to be called for every line of output + # @yieldparam line [String] timestamp and command that was executed + # + # source://redis//lib/redis/commands/server.rb#120 + def monitor; end + + # Synchronously save the dataset to disk. + # + # @return [String] + # + # source://redis//lib/redis/commands/server.rb#133 + def save; end + + # Synchronously save the dataset to disk and then shut down the server. + # + # source://redis//lib/redis/commands/server.rb#138 + def shutdown; end + + # Make the server a slave of another instance, or promote it as master. + # + # source://redis//lib/redis/commands/server.rb#150 + def slaveof(host, port); end + + # Interact with the slowlog (get, len, reset) + # + # @param subcommand [String] e.g. `get`, `len`, `reset` + # @param length [Integer] maximum number of entries to return + # @return [Array, Integer, String] depends on subcommand + # + # source://redis//lib/redis/commands/server.rb#159 + def slowlog(subcommand, length = T.unsafe(nil)); end + + # Internal command used for replication. + # + # source://redis//lib/redis/commands/server.rb#166 + def sync; end + + # Return the server time. + # + # @example + # r.time # => [ 1333093196, 606806 ] + # @return [Array] tuple of seconds since UNIX epoch and + # microseconds in the current second + # + # source://redis//lib/redis/commands/server.rb#177 + def time; end +end + +# source://redis//lib/redis/commands/sets.rb#5 +module Redis::Commands::Sets + # Add one or more members to a set. + # + # @param key [String] + # @param member [String, Array] one member, or array of members + # @return [Integer] The number of members that were successfully added + # + # source://redis//lib/redis/commands/sets.rb#19 + def sadd(key, *members); end + + # Add one or more members to a set. + # + # @param key [String] + # @param member [String, Array] one member, or array of members + # @return [Boolean] Wether at least one member was successfully added. + # + # source://redis//lib/redis/commands/sets.rb#29 + def sadd?(key, *members); end + + # Get the number of members in a set. + # + # @param key [String] + # @return [Integer] + # + # source://redis//lib/redis/commands/sets.rb#10 + def scard(key); end + + # Subtract multiple sets. + # + # @param keys [String, Array] keys pointing to sets to subtract + # @return [Array] members in the difference + # + # source://redis//lib/redis/commands/sets.rb#123 + def sdiff(*keys); end + + # Subtract multiple sets and store the resulting set in a key. + # + # @param destination [String] destination key + # @param keys [String, Array] keys pointing to sets to subtract + # @return [Integer] number of elements in the resulting set + # + # source://redis//lib/redis/commands/sets.rb#133 + def sdiffstore(destination, *keys); end + + # Intersect multiple sets. + # + # @param keys [String, Array] keys pointing to sets to intersect + # @return [Array] members in the intersection + # + # source://redis//lib/redis/commands/sets.rb#142 + def sinter(*keys); end + + # Intersect multiple sets and store the resulting set in a key. + # + # @param destination [String] destination key + # @param keys [String, Array] keys pointing to sets to intersect + # @return [Integer] number of elements in the resulting set + # + # source://redis//lib/redis/commands/sets.rb#152 + def sinterstore(destination, *keys); end + + # Determine if a given value is a member of a set. + # + # @param key [String] + # @param member [String] + # @return [Boolean] + # + # source://redis//lib/redis/commands/sets.rb#95 + def sismember(key, member); end + + # Get all the members in a set. + # + # @param key [String] + # @return [Array] + # + # source://redis//lib/redis/commands/sets.rb#115 + def smembers(key); end + + # Determine if multiple values are members of a set. + # + # @param key [String] + # @param members [String, Array] + # @return [Array] + # + # source://redis//lib/redis/commands/sets.rb#104 + def smismember(key, *members); end + + # Move a member from one set to another. + # + # @param source [String] source key + # @param destination [String] destination key + # @param member [String] member to move from `source` to `destination` + # @return [Boolean] + # + # source://redis//lib/redis/commands/sets.rb#86 + def smove(source, destination, member); end + + # Remove and return one or more random member from a set. + # + # @param key [String] + # @param count [Integer] + # @return [String] + # + # source://redis//lib/redis/commands/sets.rb#59 + def spop(key, count = T.unsafe(nil)); end + + # Get one or more random members from a set. + # + # @param key [String] + # @param count [Integer] + # @return [String] + # + # source://redis//lib/redis/commands/sets.rb#72 + def srandmember(key, count = T.unsafe(nil)); end + + # Remove one or more members from a set. + # + # @param key [String] + # @param member [String, Array] one member, or array of members + # @return [Integer] The number of members that were successfully removed + # + # source://redis//lib/redis/commands/sets.rb#39 + def srem(key, *members); end + + # Remove one or more members from a set. + # + # @param key [String] + # @param member [String, Array] one member, or array of members + # @return [Boolean] Wether at least one member was successfully removed. + # + # source://redis//lib/redis/commands/sets.rb#49 + def srem?(key, *members); end + + # Scan a set + # + # @example Retrieve the first batch of keys in a set + # redis.sscan("set", 0) + # @param cursor [String, Integer] the cursor of the iteration + # @param options [Hash] - `:match => String`: only return keys matching the pattern + # - `:count => Integer`: return count keys at most per iteration + # @return [String, Array] the next cursor and all found members + # + # source://redis//lib/redis/commands/sets.rb#187 + def sscan(key, cursor, **options); end + + # Scan a set + # + # @example Retrieve all of the keys in a set + # redis.sscan_each("set").to_a + # # => ["key1", "key2", "key3"] + # @param options [Hash] - `:match => String`: only return keys matching the pattern + # - `:count => Integer`: return count keys at most per iteration + # @return [Enumerator] an enumerator for all keys in the set + # + # source://redis//lib/redis/commands/sets.rb#202 + def sscan_each(key, **options, &block); end + + # Add multiple sets. + # + # @param keys [String, Array] keys pointing to sets to unify + # @return [Array] members in the union + # + # source://redis//lib/redis/commands/sets.rb#161 + def sunion(*keys); end + + # Add multiple sets and store the resulting set in a key. + # + # @param destination [String] destination key + # @param keys [String, Array] keys pointing to sets to unify + # @return [Integer] number of elements in the resulting set + # + # source://redis//lib/redis/commands/sets.rb#171 + def sunionstore(destination, *keys); end +end + +# source://redis//lib/redis/commands/sorted_sets.rb#5 +module Redis::Commands::SortedSets + # Removes and returns up to count members with the highest scores in the sorted set stored at keys, + # or block until one is available. + # + # @example Popping a member from a sorted set + # redis.bzpopmax('zset', 1) + # #=> ['zset', 'b', 2.0] + # @example Popping a member from multiple sorted sets + # redis.bzpopmax('zset1', 'zset2', 1) + # #=> ['zset1', 'b', 2.0] + # @return [Array] a touple of key, member and score + # @return [nil] when no element could be popped and the timeout expired + # + # source://redis//lib/redis/commands/sorted_sets.rb#185 + def bzpopmax(*args); end + + # Removes and returns up to count members with the lowest scores in the sorted set stored at keys, + # or block until one is available. + # + # @example Popping a member from a sorted set + # redis.bzpopmin('zset', 1) + # #=> ['zset', 'a', 1.0] + # @example Popping a member from multiple sorted sets + # redis.bzpopmin('zset1', 'zset2', 1) + # #=> ['zset1', 'a', 1.0] + # @return [Array] a touple of key, member and score + # @return [nil] when no element could be popped and the timeout expired + # + # source://redis//lib/redis/commands/sorted_sets.rb#206 + def bzpopmin(*args); end + + # Add one or more members to a sorted set, or update the score for members + # that already exist. + # + # @example Add a single `[score, member]` pair to a sorted set + # redis.zadd("zset", 32.0, "member") + # @example Add an array of `[score, member]` pairs to a sorted set + # redis.zadd("zset", [[32.0, "a"], [64.0, "b"]]) + # @param key [String] + # @param args [[Float, String], Array<[Float, String]>] - a single `[score, member]` pair + # - an array of `[score, member]` pairs + # @param options [Hash] - `:xx => true`: Only update elements that already exist (never + # add elements) + # - `:nx => true`: Don't update already existing elements (always + # add new elements) + # - `:lt => true`: Only update existing elements if the new score + # is less than the current score + # - `:gt => true`: Only update existing elements if the new score + # is greater than the current score + # - `:ch => true`: Modify the return value from the number of new + # elements added, to the total number of elements changed (CH is an + # abbreviation of changed); changed elements are new elements added + # and elements already existing for which the score was updated + # - `:incr => true`: When this option is specified ZADD acts like + # ZINCRBY; only one score-element pair can be specified in this mode + # @return [Boolean, Integer, Float] - `Boolean` when a single pair is specified, holding whether or not it was + # **added** to the sorted set. + # - `Integer` when an array of pairs is specified, holding the number of + # pairs that were **added** to the sorted set. + # - `Float` when option :incr is specified, holding the score of the member + # after incrementing it. + # + # source://redis//lib/redis/commands/sorted_sets.rb#53 + def zadd(key, *args, nx: T.unsafe(nil), xx: T.unsafe(nil), lt: T.unsafe(nil), gt: T.unsafe(nil), ch: T.unsafe(nil), incr: T.unsafe(nil)); end + + # Get the number of members in a sorted set. + # + # @example + # redis.zcard("zset") + # # => 4 + # @param key [String] + # @return [Integer] + # + # source://redis//lib/redis/commands/sorted_sets.rb#14 + def zcard(key); end + + # Count the members in a sorted set with scores within the given values. + # + # @example Count members with score `>= 5` and `< 100` + # redis.zcount("zset", "5", "(100") + # # => 2 + # @example Count members with scores `> 5` + # redis.zcount("zset", "(5", "+inf") + # # => 2 + # @param key [String] + # @param min [String] - inclusive minimum score is specified verbatim + # - exclusive minimum score is specified by prefixing `(` + # @param max [String] - inclusive maximum score is specified verbatim + # - exclusive maximum score is specified by prefixing `(` + # @return [Integer] number of members in within the specified range + # + # source://redis//lib/redis/commands/sorted_sets.rb#612 + def zcount(key, min, max); end + + # Return the difference between the first and all successive input sorted sets + # + # @example + # redis.zadd("zsetA", [[1.0, "v1"], [2.0, "v2"]]) + # redis.zadd("zsetB", [[3.0, "v2"], [2.0, "v3"]]) + # redis.zdiff("zsetA", "zsetB") + # => ["v1"] + # @example With scores + # redis.zadd("zsetA", [[1.0, "v1"], [2.0, "v2"]]) + # redis.zadd("zsetB", [[3.0, "v2"], [2.0, "v3"]]) + # redis.zdiff("zsetA", "zsetB", :with_scores => true) + # => [["v1", 1.0]] + # @param keys [String, Array] one or more keys to compute the difference + # @param options [Hash] - `:with_scores => true`: include scores in output + # @return [Array, Array<[String, Float]>] - when `:with_scores` is not specified, an array of members + # - when `:with_scores` is specified, an array with `[member, score]` pairs + # + # source://redis//lib/redis/commands/sorted_sets.rb#721 + def zdiff(*keys, with_scores: T.unsafe(nil)); end + + # Compute the difference between the first and all successive input sorted sets + # and store the resulting sorted set in a new key + # + # @example + # redis.zadd("zsetA", [[1.0, "v1"], [2.0, "v2"]]) + # redis.zadd("zsetB", [[3.0, "v2"], [2.0, "v3"]]) + # redis.zdiffstore("zsetA", "zsetB") + # # => 1 + # @param destination [String] destination key + # @param keys [Array] source keys + # @return [Integer] number of elements in the resulting sorted set + # + # source://redis//lib/redis/commands/sorted_sets.rb#737 + def zdiffstore(*args, **_arg1); end + + # Increment the score of a member in a sorted set. + # + # @example + # redis.zincrby("zset", 32.0, "a") + # # => 64.0 + # @param key [String] + # @param increment [Float] + # @param member [String] + # @return [Float] score of the member after incrementing it + # + # source://redis//lib/redis/commands/sorted_sets.rb#86 + def zincrby(key, increment, member); end + + # Return the intersection of multiple sorted sets + # + # @example Retrieve the intersection of `2*zsetA` and `1*zsetB` + # redis.zinter("zsetA", "zsetB", :weights => [2.0, 1.0]) + # # => ["v1", "v2"] + # @example Retrieve the intersection of `2*zsetA` and `1*zsetB`, and their scores + # redis.zinter("zsetA", "zsetB", :weights => [2.0, 1.0], :with_scores => true) + # # => [["v1", 3.0], ["v2", 6.0]] + # @param keys [String, Array] one or more keys to intersect + # @param options [Hash] - `:weights => [Float, Float, ...]`: weights to associate with source + # sorted sets + # - `:aggregate => String`: aggregate function to use (sum, min, max, ...) + # - `:with_scores => true`: include scores in output + # @return [Array, Array<[String, Float]>] - when `:with_scores` is not specified, an array of members + # - when `:with_scores` is specified, an array with `[member, score]` pairs + # + # source://redis//lib/redis/commands/sorted_sets.rb#635 + def zinter(*args, **_arg1); end + + # Intersect multiple sorted sets and store the resulting sorted set in a new + # key. + # + # @example Compute the intersection of `2*zsetA` with `1*zsetB`, summing their scores + # redis.zinterstore("zsetC", ["zsetA", "zsetB"], :weights => [2.0, 1.0], :aggregate => "sum") + # # => 4 + # @param destination [String] destination key + # @param keys [Array] source keys + # @param options [Hash] - `:weights => [Array]`: weights to associate with source + # sorted sets + # - `:aggregate => String`: aggregate function to use (sum, min, max) + # @return [Integer] number of elements in the resulting sorted set + # + # source://redis//lib/redis/commands/sorted_sets.rb#654 + def zinterstore(*args, **_arg1); end + + # Count the members, with the same score in a sorted set, within the given lexicographical range. + # + # @example Count members matching a + # redis.zlexcount("zset", "[a", "[a\xff") + # # => 1 + # @example Count members matching a-z + # redis.zlexcount("zset", "[a", "[z\xff") + # # => 26 + # @param key [String] + # @param min [String] - inclusive minimum is specified by prefixing `(` + # - exclusive minimum is specified by prefixing `[` + # @param max [String] - inclusive maximum is specified by prefixing `(` + # - exclusive maximum is specified by prefixing `[` + # @return [Integer] number of members within the specified lexicographical range + # + # source://redis//lib/redis/commands/sorted_sets.rb#443 + def zlexcount(key, min, max); end + + # Get the scores associated with the given members in a sorted set. + # + # @example Get the scores for members "a" and "b" + # redis.zmscore("zset", "a", "b") + # # => [32.0, 48.0] + # @param key [String] + # @param members [String, Array] + # @return [Array] scores of the members + # + # source://redis//lib/redis/commands/sorted_sets.rb#234 + def zmscore(key, *members); end + + # Removes and returns up to count members with the highest scores in the sorted set stored at key. + # + # @example Popping a member + # redis.zpopmax('zset') + # #=> ['b', 2.0] + # @example With count option + # redis.zpopmax('zset', 2) + # #=> [['b', 2.0], ['a', 1.0]] + # @return [Array] element and score pair if count is not specified + # @return [Array>] list of popped elements and scores + # + # source://redis//lib/redis/commands/sorted_sets.rb#138 + def zpopmax(key, count = T.unsafe(nil)); end + + # Removes and returns up to count members with the lowest scores in the sorted set stored at key. + # + # @example Popping a member + # redis.zpopmin('zset') + # #=> ['a', 1.0] + # @example With count option + # redis.zpopmin('zset', 2) + # #=> [['a', 1.0], ['b', 2.0]] + # @return [Array] element and score pair if count is not specified + # @return [Array>] list of popped elements and scores + # + # source://redis//lib/redis/commands/sorted_sets.rb#161 + def zpopmin(key, count = T.unsafe(nil)); end + + # Get one or more random members from a sorted set. + # + # @example Get one random member + # redis.zrandmember("zset") + # # => "a" + # @example Get multiple random members + # redis.zrandmember("zset", 2) + # # => ["a", "b"] + # @example Get multiple random members with scores + # redis.zrandmember("zset", 2, with_scores: true) + # # => [["a", 2.0], ["b", 3.0]] + # @param key [String] + # @param count [Integer] + # @param options [Hash] - `:with_scores => true`: include scores in output + # @return [nil, String, Array, Array<[String, Float]>] - when `key` does not exist or set is empty, `nil` + # - when `count` is not specified, a member + # - when `count` is specified and `:with_scores` is not specified, an array of members + # - when `:with_scores` is specified, an array with `[member, score]` pairs + # + # source://redis//lib/redis/commands/sorted_sets.rb#262 + def zrandmember(key, count = T.unsafe(nil), withscores: T.unsafe(nil), with_scores: T.unsafe(nil)); end + + # Return a range of members in a sorted set, by index, score or lexicographical ordering. + # + # @example Retrieve all members from a sorted set, by index + # redis.zrange("zset", 0, -1) + # # => ["a", "b"] + # @example Retrieve all members and their scores from a sorted set + # redis.zrange("zset", 0, -1, :with_scores => true) + # # => [["a", 32.0], ["b", 64.0]] + # @param key [String] + # @param start [Integer] start index + # @param stop [Integer] stop index + # @param options [Hash] - `:by_score => false`: return members by score + # - `:by_lex => false`: return members by lexicographical ordering + # - `:rev => false`: reverse the ordering, from highest to lowest + # - `:limit => [offset, count]`: skip `offset` members, return a maximum of + # `count` members + # - `:with_scores => true`: include scores in output + # @return [Array, Array<[String, Float]>] - when `:with_scores` is not specified, an array of members + # - when `:with_scores` is specified, an array with `[member, score]` pairs + # + # source://redis//lib/redis/commands/sorted_sets.rb#301 + def zrange(key, start, stop, byscore: T.unsafe(nil), by_score: T.unsafe(nil), bylex: T.unsafe(nil), by_lex: T.unsafe(nil), rev: T.unsafe(nil), limit: T.unsafe(nil), withscores: T.unsafe(nil), with_scores: T.unsafe(nil)); end + + # Return a range of members with the same score in a sorted set, by lexicographical ordering + # + # @example Retrieve members matching a + # redis.zrangebylex("zset", "[a", "[a\xff") + # # => ["aaren", "aarika", "abagael", "abby"] + # @example Retrieve the first 2 members matching a + # redis.zrangebylex("zset", "[a", "[a\xff", :limit => [0, 2]) + # # => ["aaren", "aarika"] + # @param key [String] + # @param min [String] - inclusive minimum is specified by prefixing `(` + # - exclusive minimum is specified by prefixing `[` + # @param max [String] - inclusive maximum is specified by prefixing `(` + # - exclusive maximum is specified by prefixing `[` + # @param options [Hash] - `:limit => [offset, count]`: skip `offset` members, return a maximum of + # `count` members + # @return [Array, Array<[String, Float]>] + # + # source://redis//lib/redis/commands/sorted_sets.rb#468 + def zrangebylex(key, min, max, limit: T.unsafe(nil)); end + + # Return a range of members in a sorted set, by score. + # + # @example Retrieve members with score `>= 5` and `< 100` + # redis.zrangebyscore("zset", "5", "(100") + # # => ["a", "b"] + # @example Retrieve members and their scores with scores `> 5` + # redis.zrangebyscore("zset", "(5", "+inf", :with_scores => true) + # # => [["a", 32.0], ["b", 64.0]] + # @example Retrieve the first 2 members with score `>= 0` + # redis.zrangebyscore("zset", "0", "+inf", :limit => [0, 2]) + # # => ["a", "b"] + # @param options [Hash] - `:with_scores => true`: include scores in output + # - `:limit => [offset, count]`: skip `offset` members, return a maximum of + # `count` members + # @param min [String] - inclusive minimum score is specified verbatim + # - exclusive minimum score is specified by prefixing `(` + # @param key [String] + # @param max [String] - inclusive maximum score is specified verbatim + # - exclusive maximum score is specified by prefixing `(` + # @return [Array, Array<[String, Float]>] - when `:with_scores` is not specified, an array of members + # - when `:with_scores` is specified, an array with `[member, score]` pairs + # + # source://redis//lib/redis/commands/sorted_sets.rb#528 + def zrangebyscore(key, min, max, withscores: T.unsafe(nil), with_scores: T.unsafe(nil), limit: T.unsafe(nil)); end + + # Select a range of members in a sorted set, by index, score or lexicographical ordering + # and store the resulting sorted set in a new key. + # + # @example + # redis.zadd("foo", [[1.0, "s1"], [2.0, "s2"], [3.0, "s3"]]) + # redis.zrangestore("bar", "foo", 0, 1) + # # => 2 + # redis.zrange("bar", 0, -1) + # # => ["s1", "s2"] + # @return [Integer] the number of elements in the resulting sorted set + # @see #zrange + # + # source://redis//lib/redis/commands/sorted_sets.rb#343 + def zrangestore(dest_key, src_key, start, stop, byscore: T.unsafe(nil), by_score: T.unsafe(nil), bylex: T.unsafe(nil), by_lex: T.unsafe(nil), rev: T.unsafe(nil), limit: T.unsafe(nil)); end + + # Determine the index of a member in a sorted set. + # + # @param key [String] + # @param member [String] + # @return [Integer] + # + # source://redis//lib/redis/commands/sorted_sets.rb#394 + def zrank(key, member); end + + # Remove one or more members from a sorted set. + # + # @example Remove a single member from a sorted set + # redis.zrem("zset", "a") + # @example Remove an array of members from a sorted set + # redis.zrem("zset", ["a", "b"]) + # @param key [String] + # @param member [String, Array] - a single member + # - an array of members + # @return [Boolean, Integer] - `Boolean` when a single member is specified, holding whether or not it + # was removed from the sorted set + # - `Integer` when an array of pairs is specified, holding the number of + # members that were removed to the sorted set + # + # source://redis//lib/redis/commands/sorted_sets.rb#107 + def zrem(key, member); end + + # Remove all members in a sorted set within the given indexes. + # + # @example Remove first 5 members + # redis.zremrangebyrank("zset", 0, 4) + # # => 5 + # @example Remove last 5 members + # redis.zremrangebyrank("zset", -5, -1) + # # => 5 + # @param key [String] + # @param start [Integer] start index + # @param stop [Integer] stop index + # @return [Integer] number of members that were removed + # + # source://redis//lib/redis/commands/sorted_sets.rb#421 + def zremrangebyrank(key, start, stop); end + + # Remove all members in a sorted set within the given scores. + # + # @example Remove members with score `>= 5` and `< 100` + # redis.zremrangebyscore("zset", "5", "(100") + # # => 2 + # @example Remove members with scores `> 5` + # redis.zremrangebyscore("zset", "(5", "+inf") + # # => 2 + # @param key [String] + # @param min [String] - inclusive minimum score is specified verbatim + # - exclusive minimum score is specified by prefixing `(` + # @param max [String] - inclusive maximum score is specified verbatim + # - exclusive maximum score is specified by prefixing `(` + # @return [Integer] number of members that were removed + # + # source://redis//lib/redis/commands/sorted_sets.rb#591 + def zremrangebyscore(key, min, max); end + + # Return a range of members in a sorted set, by index, with scores ordered + # from high to low. + # + # @example Retrieve all members from a sorted set + # redis.zrevrange("zset", 0, -1) + # # => ["b", "a"] + # @example Retrieve all members and their scores from a sorted set + # redis.zrevrange("zset", 0, -1, :with_scores => true) + # # => [["b", 64.0], ["a", 32.0]] + # @see #zrange + # + # source://redis//lib/redis/commands/sorted_sets.rb#378 + def zrevrange(key, start, stop, withscores: T.unsafe(nil), with_scores: T.unsafe(nil)); end + + # Return a range of members with the same score in a sorted set, by reversed lexicographical ordering. + # Apart from the reversed ordering, #zrevrangebylex is similar to #zrangebylex. + # + # @example Retrieve members matching a + # redis.zrevrangebylex("zset", "[a", "[a\xff") + # # => ["abbygail", "abby", "abagael", "aaren"] + # @example Retrieve the last 2 members matching a + # redis.zrevrangebylex("zset", "[a", "[a\xff", :limit => [0, 2]) + # # => ["abbygail", "abby"] + # @see #zrangebylex + # + # source://redis//lib/redis/commands/sorted_sets.rb#490 + def zrevrangebylex(key, max, min, limit: T.unsafe(nil)); end + + # Return a range of members in a sorted set, by score, with scores ordered + # from high to low. + # + # @example Retrieve members with score `< 100` and `>= 5` + # redis.zrevrangebyscore("zset", "(100", "5") + # # => ["b", "a"] + # @example Retrieve the first 2 members with score `<= 0` + # redis.zrevrangebyscore("zset", "0", "-inf", :limit => [0, 2]) + # # => ["b", "a"] + # @example Retrieve members and their scores with scores `> 5` + # redis.zrevrangebyscore("zset", "+inf", "(5", :with_scores => true) + # # => [["b", 64.0], ["a", 32.0]] + # @see #zrangebyscore + # + # source://redis//lib/redis/commands/sorted_sets.rb#558 + def zrevrangebyscore(key, max, min, withscores: T.unsafe(nil), with_scores: T.unsafe(nil), limit: T.unsafe(nil)); end + + # Determine the index of a member in a sorted set, with scores ordered from + # high to low. + # + # @param key [String] + # @param member [String] + # @return [Integer] + # + # source://redis//lib/redis/commands/sorted_sets.rb#404 + def zrevrank(key, member); end + + # Scan a sorted set + # + # @example Retrieve the first batch of key/value pairs in a hash + # redis.zscan("zset", 0) + # @param cursor [String, Integer] the cursor of the iteration + # @param options [Hash] - `:match => String`: only return keys matching the pattern + # - `:count => Integer`: return count keys at most per iteration + # @return [String, Array<[String, Float]>] the next cursor and all found + # members and scores + # + # source://redis//lib/redis/commands/sorted_sets.rb#754 + def zscan(key, cursor, **options); end + + # Scan a sorted set + # + # @example Retrieve all of the members/scores in a sorted set + # redis.zscan_each("zset").to_a + # # => [["key70", "70"], ["key80", "80"]] + # @param options [Hash] - `:match => String`: only return keys matching the pattern + # - `:count => Integer`: return count keys at most per iteration + # @return [Enumerator] an enumerator for all found scores and members + # + # source://redis//lib/redis/commands/sorted_sets.rb#771 + def zscan_each(key, **options, &block); end + + # Get the score associated with the given member in a sorted set. + # + # @example Get the score for member "a" + # redis.zscore("zset", "a") + # # => 32.0 + # @param key [String] + # @param member [String] + # @return [Float] score of the member + # + # source://redis//lib/redis/commands/sorted_sets.rb#221 + def zscore(key, member); end + + # Return the union of multiple sorted sets + # + # @example Retrieve the union of `2*zsetA` and `1*zsetB` + # redis.zunion("zsetA", "zsetB", :weights => [2.0, 1.0]) + # # => ["v1", "v2"] + # @example Retrieve the union of `2*zsetA` and `1*zsetB`, and their scores + # redis.zunion("zsetA", "zsetB", :weights => [2.0, 1.0], :with_scores => true) + # # => [["v1", 3.0], ["v2", 6.0]] + # @param keys [String, Array] one or more keys to union + # @param options [Hash] - `:weights => [Array]`: weights to associate with source + # sorted sets + # - `:aggregate => String`: aggregate function to use (sum, min, max) + # - `:with_scores => true`: include scores in output + # @return [Array, Array<[String, Float]>] - when `:with_scores` is not specified, an array of members + # - when `:with_scores` is specified, an array with `[member, score]` pairs + # + # source://redis//lib/redis/commands/sorted_sets.rb#678 + def zunion(*args, **_arg1); end + + # Add multiple sorted sets and store the resulting sorted set in a new key. + # + # @example Compute the union of `2*zsetA` with `1*zsetB`, summing their scores + # redis.zunionstore("zsetC", ["zsetA", "zsetB"], :weights => [2.0, 1.0], :aggregate => "sum") + # # => 8 + # @param destination [String] destination key + # @param keys [Array] source keys + # @param options [Hash] - `:weights => [Float, Float, ...]`: weights to associate with source + # sorted sets + # - `:aggregate => String`: aggregate function to use (sum, min, max, ...) + # @return [Integer] number of elements in the resulting sorted set + # + # source://redis//lib/redis/commands/sorted_sets.rb#696 + def zunionstore(*args, **_arg1); end + + private + + # source://redis//lib/redis/commands/sorted_sets.rb#784 + def _zsets_operation(cmd, *keys, weights: T.unsafe(nil), aggregate: T.unsafe(nil), with_scores: T.unsafe(nil)); end + + # source://redis//lib/redis/commands/sorted_sets.rb#803 + def _zsets_operation_store(cmd, destination, keys, weights: T.unsafe(nil), aggregate: T.unsafe(nil)); end +end + +# source://redis//lib/redis/commands/streams.rb#5 +module Redis::Commands::Streams + # Removes one or multiple entries from the pending entries list of a stream consumer group. + # + # @example With a entry id + # redis.xack('mystream', 'mygroup', '1526569495631-0') + # @example With splatted entry ids + # redis.xack('mystream', 'mygroup', '0-1', '0-2') + # @example With arrayed entry ids + # redis.xack('mystream', 'mygroup', %w[0-1 0-2]) + # @param key [String] the stream key + # @param group [String] the consumer group name + # @param ids [Array] one or multiple entry ids + # @return [Integer] the number of entries successfully acknowledged + # + # source://redis//lib/redis/commands/streams.rb#266 + def xack(key, group, *ids); end + + # Add new entry to the stream. + # + # @example With options + # redis.xadd('mystream', { f1: 'v1', f2: 'v2' }, id: '0-0', maxlen: 1000, approximate: true, nomkstream: true) + # @example Without options + # redis.xadd('mystream', f1: 'v1', f2: 'v2') + # @option opts + # @option opts + # @option opts + # @option opts + # @param key [String] the stream key + # @param entry [Hash] one or multiple field-value pairs + # @param opts [Hash] several options for `XADD` command + # @return [String] the entry id + # + # source://redis//lib/redis/commands/streams.rb#49 + def xadd(key, entry, approximate: T.unsafe(nil), maxlen: T.unsafe(nil), nomkstream: T.unsafe(nil), id: T.unsafe(nil)); end + + # Transfers ownership of pending stream entries that match the specified criteria. + # + # @example Claim next pending message after this id stuck > 5 minutes and mark as retry + # redis.xautoclaim('mystream', 'mygroup', 'consumer1', 3600000, '1641321233-0') + # @example Claim 50 next pending messages stuck > 5 minutes and mark as retry + # redis.xclaim('mystream', 'mygroup', 'consumer1', 3600000, '0-0', count: 50) + # @example Claim next pending message stuck > 5 minutes and don't mark as retry + # redis.xclaim('mystream', 'mygroup', 'consumer1', 3600000, '0-0', justid: true) + # @example Claim next pending message stuck > 5 minutes and mark as retry + # redis.xautoclaim('mystream', 'mygroup', 'consumer1', 3600000, '0-0') + # @param start [String] entry id to start scanning from or 0-0 for everything + # @param count [Integer] number of messages to claim (default 1) + # @param justid [Boolean] whether to fetch just an array of entry ids or not. + # Does not increment retry count when true + # @param consumer [String] the consumer name + # @param key [String] the stream key + # @param group [String] the consumer group name + # @param min_idle_time [Integer] the number of milliseconds + # @return [Hash{String => Hash}] the entries successfully claimed + # @return [Array] the entry ids successfully claimed if justid option is `true` + # + # source://redis//lib/redis/commands/streams.rb#336 + def xautoclaim(key, group, consumer, min_idle_time, start, count: T.unsafe(nil), justid: T.unsafe(nil)); end + + # Changes the ownership of a pending entry + # + # @example With arrayed entry ids + # redis.xclaim('mystream', 'mygroup', 'consumer1', 3600000, %w[0-1 0-2]) + # @example With idle option + # redis.xclaim('mystream', 'mygroup', 'consumer1', 3600000, %w[0-1 0-2], idle: 1000) + # @example With time option + # redis.xclaim('mystream', 'mygroup', 'consumer1', 3600000, %w[0-1 0-2], time: 1542866959000) + # @example With splatted entry ids + # redis.xclaim('mystream', 'mygroup', 'consumer1', 3600000, '0-1', '0-2') + # @example With retrycount option + # redis.xclaim('mystream', 'mygroup', 'consumer1', 3600000, %w[0-1 0-2], retrycount: 10) + # @example With force option + # redis.xclaim('mystream', 'mygroup', 'consumer1', 3600000, %w[0-1 0-2], force: true) + # @example With justid option + # redis.xclaim('mystream', 'mygroup', 'consumer1', 3600000, %w[0-1 0-2], justid: true) + # @option opts + # @option opts + # @option opts + # @option opts + # @option opts + # @param key [String] the stream key + # @param group [String] the consumer group name + # @param consumer [String] the consumer name + # @param min_idle_time [Integer] the number of milliseconds + # @param ids [Array] one or multiple entry ids + # @param opts [Hash] several options for `XCLAIM` command + # @return [Hash{String => Hash}] the entries successfully claimed + # @return [Array] the entry ids successfully claimed if justid option is `true` + # + # source://redis//lib/redis/commands/streams.rb#303 + def xclaim(key, group, consumer, min_idle_time, *ids, **opts); end + + # Delete entries by entry ids. + # + # @example With splatted entry ids + # redis.xdel('mystream', '0-1', '0-2') + # @example With arrayed entry ids + # redis.xdel('mystream', ['0-1', '0-2']) + # @param key [String] the stream key + # @param ids [Array] one or multiple entry ids + # @return [Integer] the number of entries actually deleted + # + # source://redis//lib/redis/commands/streams.rb#106 + def xdel(key, *ids); end + + # Manages the consumer group of the stream. + # + # @example With `create` subcommand + # redis.xgroup(:create, 'mystream', 'mygroup', '$') + # @example With `destroy` subcommand + # redis.xgroup(:destroy, 'mystream', 'mygroup') + # @example With `delconsumer` subcommand + # redis.xgroup(:delconsumer, 'mystream', 'mygroup', 'consumer1') + # @example With `setid` subcommand + # redis.xgroup(:setid, 'mystream', 'mygroup', '$') + # @param mkstream [Boolean] whether to create an empty stream automatically or not + # @param key [String] the stream key + # @param subcommand [String] `create` `setid` `destroy` `delconsumer` + # @param group [String] the consumer group name + # @param id_or_consumer [String] * the entry id or `$`, required if subcommand is `create` or `setid` + # * the consumer name, required if subcommand is `delconsumer` + # @return [String] `OK` if subcommand is `create` or `setid` + # @return [Integer] effected count if subcommand is `destroy` or `delconsumer` + # + # source://redis//lib/redis/commands/streams.rb#214 + def xgroup(subcommand, key, group, id_or_consumer = T.unsafe(nil), mkstream: T.unsafe(nil)); end + + # Returns the stream information each subcommand. + # + # @example groups + # redis.xinfo(:groups, 'mystream') + # @example stream + # redis.xinfo(:stream, 'mystream') + # @example consumers + # redis.xinfo(:consumers, 'mystream', 'mygroup') + # @param key [String] the stream key + # @param subcommand [String] e.g. `stream` `groups` `consumers` + # @param group [String] the consumer group name, required if subcommand is `consumers` + # @return [Hash] information of the stream if subcommand is `stream` + # @return [Array] information of the consumer groups if subcommand is `groups` + # @return [Array] information of the consumers if subcommand is `consumers` + # + # source://redis//lib/redis/commands/streams.rb#22 + def xinfo(subcommand, key, group = T.unsafe(nil)); end + + # Returns the number of entries inside a stream. + # + # @example With key + # redis.xlen('mystream') + # @param key [String] the stream key + # @return [Integer] the number of entries + # + # source://redis//lib/redis/commands/streams.rb#165 + def xlen(key); end + + # Fetches not acknowledging pending entries + # + # @example With key and group + # redis.xpending('mystream', 'mygroup') + # @example With range and consumer options + # redis.xpending('mystream', 'mygroup', '-', '+', 10, 'consumer1') + # @example With range options + # redis.xpending('mystream', 'mygroup', '-', '+', 10) + # @example With range and idle time options + # redis.xpending('mystream', 'mygroup', '-', '+', 10, idle: 9000) + # @option opts + # @param consumer [String] the consumer name + # @param opts [Hash] a customizable set of options + # @param start [String] start first entry id of range + # @param key [String] the stream key + # @param group [String] the consumer group name + # @param end [String] end last entry id of range + # @param count [Integer] count the number of entries as limit + # @return [Hash] the summary of pending entries + # @return [Array] the pending entries details if options were specified + # + # source://redis//lib/redis/commands/streams.rb#368 + def xpending(key, group, *args, idle: T.unsafe(nil)); end + + # Fetches entries of the stream in ascending order. + # + # @example Without options + # redis.xrange('mystream') + # @example With a specific start + # redis.xrange('mystream', '0-1') + # @example With a specific start and end + # redis.xrange('mystream', '0-1', '0-3') + # @example With count options + # redis.xrange('mystream', count: 10) + # @param key [String] the stream key + # @param start [String] first entry id of range, default value is `-` + # @param end [String] last entry id of range, default value is `+` + # @param count [Integer] the number of entries as limit + # @return [Array>] the ids and entries pairs + # + # source://redis//lib/redis/commands/streams.rb#128 + def xrange(key, start = T.unsafe(nil), range_end = T.unsafe(nil), count: T.unsafe(nil)); end + + # Fetches entries from one or multiple streams. Optionally blocking. + # + # @example With a key + # redis.xread('mystream', '0-0') + # @example With multiple keys + # redis.xread(%w[mystream1 mystream2], %w[0-0 0-0]) + # @example With count option + # redis.xread('mystream', '0-0', count: 2) + # @example With block option + # redis.xread('mystream', '$', block: 1000) + # @param keys [Array] one or multiple stream keys + # @param ids [Array] one or multiple entry ids + # @param count [Integer] the number of entries as limit per stream + # @param block [Integer] the number of milliseconds as blocking timeout + # @return [Hash{String => Hash{String => Hash}}] the entries + # + # source://redis//lib/redis/commands/streams.rb#186 + def xread(keys, ids, count: T.unsafe(nil), block: T.unsafe(nil)); end + + # Fetches a subset of the entries from one or multiple streams related with the consumer group. + # Optionally blocking. + # + # @example With multiple keys + # redis.xreadgroup('mygroup', 'consumer1', %w[mystream1 mystream2], %w[> >]) + # @example With count option + # redis.xreadgroup('mygroup', 'consumer1', 'mystream', '>', count: 2) + # @example With a key + # redis.xreadgroup('mygroup', 'consumer1', 'mystream', '>') + # @example With block option + # redis.xreadgroup('mygroup', 'consumer1', 'mystream', '>', block: 1000) + # @example With noack option + # redis.xreadgroup('mygroup', 'consumer1', 'mystream', '>', noack: true) + # @option opts + # @option opts + # @option opts + # @param group [String] the consumer group name + # @param consumer [String] the consumer name + # @param keys [Array] one or multiple stream keys + # @param ids [Array] one or multiple entry ids + # @param opts [Hash] several options for `XREADGROUP` command + # @return [Hash{String => Hash{String => Hash}}] the entries + # + # source://redis//lib/redis/commands/streams.rb#244 + def xreadgroup(group, consumer, keys, ids, count: T.unsafe(nil), block: T.unsafe(nil), noack: T.unsafe(nil)); end + + # Fetches entries of the stream in descending order. + # + # @example Without options + # redis.xrevrange('mystream') + # @example With a specific end + # redis.xrevrange('mystream', '0-3') + # @example With a specific end and start + # redis.xrevrange('mystream', '0-3', '0-1') + # @example With count options + # redis.xrevrange('mystream', count: 10) + # @param key [String] the stream key + # @param end [String] first entry id of range, default value is `+` + # @param start [String] last entry id of range, default value is `-` + # @return [Array>] the ids and entries pairs + # + # source://redis//lib/redis/commands/streams.rb#151 + def xrevrange(key, range_end = T.unsafe(nil), start = T.unsafe(nil), count: T.unsafe(nil)); end + + # Trims older entries of the stream if needed. + # + # @example Without options + # redis.xtrim('mystream', 1000) + # @example With options + # redis.xtrim('mystream', 1000, approximate: true) + # @example With strategy + # redis.xtrim('mystream', '1-0', strategy: 'MINID') + # @overload xtrim + # @overload xtrim + # @return [Integer] the number of entries actually deleted + # + # source://redis//lib/redis/commands/streams.rb#85 + def xtrim(key, len_or_id, strategy: T.unsafe(nil), approximate: T.unsafe(nil), limit: T.unsafe(nil)); end + + private + + # source://redis//lib/redis/commands/streams.rb#385 + def _xread(args, keys, ids, blocking_timeout_msec); end +end + +# source://redis//lib/redis/commands/strings.rb#5 +module Redis::Commands::Strings + # Append a value to a key. + # + # @param key [String] + # @param value [String] value to append + # @return [Integer] length of the string after appending + # + # source://redis//lib/redis/commands/strings.rb#255 + def append(key, value); end + + # Decrement the integer value of a key by one. + # + # @example + # redis.decr("value") + # # => 4 + # @param key [String] + # @return [Integer] value after decrementing it + # + # source://redis//lib/redis/commands/strings.rb#14 + def decr(key); end + + # Decrement the integer value of a key by the given number. + # + # @example + # redis.decrby("value", 5) + # # => 0 + # @param key [String] + # @param decrement [Integer] + # @return [Integer] value after decrementing it + # + # source://redis//lib/redis/commands/strings.rb#27 + def decrby(key, decrement); end + + # Get the value of a key. + # + # @param key [String] + # @return [String] + # + # source://redis//lib/redis/commands/strings.rb#190 + def get(key); end + + # Get the value of key and delete the key. This command is similar to GET, + # except for the fact that it also deletes the key on success. + # + # @param key [String] + # @return [String] the old value stored in the key, or `nil` if the key + # did not exist + # + # source://redis//lib/redis/commands/strings.rb#275 + def getdel(key); end + + # Get the value of key and optionally set its expiration. GETEX is similar to + # GET, but is a write command with additional options. When no options are + # provided, GETEX behaves like GET. + # + # @param key [String] + # @param options [Hash] - `:ex => Integer`: Set the specified expire time, in seconds. + # - `:px => Integer`: Set the specified expire time, in milliseconds. + # - `:exat => true`: Set the specified Unix time at which the key will + # expire, in seconds. + # - `:pxat => true`: Set the specified Unix time at which the key will + # expire, in milliseconds. + # - `:persist => true`: Remove the time to live associated with the key. + # @return [String] The value of key, or nil when key does not exist. + # + # source://redis//lib/redis/commands/strings.rb#293 + def getex(key, ex: T.unsafe(nil), px: T.unsafe(nil), exat: T.unsafe(nil), pxat: T.unsafe(nil), persist: T.unsafe(nil)); end + + # Get a substring of the string stored at a key. + # + # @param key [String] + # @param start [Integer] zero-based start offset + # @param stop [Integer] zero-based end offset. Use -1 for representing + # the end of the string + # @return [Integer] `0` or `1` + # + # source://redis//lib/redis/commands/strings.rb#246 + def getrange(key, start, stop); end + + # Set the string value of a key and return its old value. + # + # @param key [String] + # @param value [String] value to replace the current value with + # @return [String] the old value stored in the key, or `nil` if the key + # did not exist + # + # source://redis//lib/redis/commands/strings.rb#265 + def getset(key, value); end + + # Increment the integer value of a key by one. + # + # @example + # redis.incr("value") + # # => 6 + # @param key [String] + # @return [Integer] value after incrementing it + # + # source://redis//lib/redis/commands/strings.rb#39 + def incr(key); end + + # Increment the integer value of a key by the given integer number. + # + # @example + # redis.incrby("value", 5) + # # => 10 + # @param key [String] + # @param increment [Integer] + # @return [Integer] value after incrementing it + # + # source://redis//lib/redis/commands/strings.rb#52 + def incrby(key, increment); end + + # Increment the numeric value of a key by the given float number. + # + # @example + # redis.incrbyfloat("value", 1.23) + # # => 1.23 + # @param key [String] + # @param increment [Float] + # @return [Float] value after incrementing it + # + # source://redis//lib/redis/commands/strings.rb#65 + def incrbyfloat(key, increment); end + + # Get the values of all the given keys. + # + # @example + # redis.mapped_mget("key1", "key2") + # # => { "key1" => "v1", "key2" => "v2" } + # @param keys [Array] array of keys + # @return [Hash] a hash mapping the specified keys to their values + # @see #mget + # + # source://redis//lib/redis/commands/strings.rb#219 + def mapped_mget(*keys); end + + # Set one or more values. + # + # @example + # redis.mapped_mset({ "f1" => "v1", "f2" => "v2" }) + # # => "OK" + # @param hash [Hash] keys mapping to values + # @return [String] `"OK"` + # @see #mset + # + # source://redis//lib/redis/commands/strings.rb#154 + def mapped_mset(hash); end + + # Set one or more values, only if none of the keys exist. + # + # @example + # redis.mapped_msetnx({ "key1" => "v1", "key2" => "v2" }) + # # => true + # @param hash [Hash] keys mapping to values + # @return [Boolean] whether or not all values were set + # @see #msetnx + # + # source://redis//lib/redis/commands/strings.rb#182 + def mapped_msetnx(hash); end + + # Get the values of all the given keys. + # + # @example + # redis.mget("key1", "key2") + # # => ["v1", "v2"] + # @param keys [Array] + # @return [Array] an array of values for the specified keys + # @see #mapped_mget + # + # source://redis//lib/redis/commands/strings.rb#204 + def mget(*keys, &blk); end + + # Set one or more values. + # + # @example + # redis.mset("key1", "v1", "key2", "v2") + # # => "OK" + # @param args [Array] array of keys and values + # @return [String] `"OK"` + # @see #mapped_mset + # + # source://redis//lib/redis/commands/strings.rb#140 + def mset(*args); end + + # Set one or more values, only if none of the keys exist. + # + # @example + # redis.msetnx("key1", "v1", "key2", "v2") + # # => true + # @param args [Array] array of keys and values + # @return [Boolean] whether or not all values were set + # @see #mapped_msetnx + # + # source://redis//lib/redis/commands/strings.rb#168 + def msetnx(*args); end + + # Set the time to live in milliseconds of a key. + # + # @param key [String] + # @param ttl [Integer] + # @param value [String] + # @return [String] `"OK"` + # + # source://redis//lib/redis/commands/strings.rb#117 + def psetex(key, ttl, value); end + + # Set the string value of a key. + # + # @param key [String] + # @param value [String] + # @param options [Hash] - `:ex => Integer`: Set the specified expire time, in seconds. + # - `:px => Integer`: Set the specified expire time, in milliseconds. + # - `:exat => Integer` : Set the specified Unix time at which the key will expire, in seconds. + # - `:pxat => Integer` : Set the specified Unix time at which the key will expire, in milliseconds. + # - `:nx => true`: Only set the key if it does not already exist. + # - `:xx => true`: Only set the key if it already exist. + # - `:keepttl => true`: Retain the time to live associated with the key. + # - `:get => true`: Return the old string stored at key, or nil if key did not exist. + # @return [String, Boolean] `"OK"` or true, false if `:nx => true` or `:xx => true` + # + # source://redis//lib/redis/commands/strings.rb#83 + def set(key, value, ex: T.unsafe(nil), px: T.unsafe(nil), exat: T.unsafe(nil), pxat: T.unsafe(nil), nx: T.unsafe(nil), xx: T.unsafe(nil), keepttl: T.unsafe(nil), get: T.unsafe(nil)); end + + # Set the time to live in seconds of a key. + # + # @param key [String] + # @param ttl [Integer] + # @param value [String] + # @return [String] `"OK"` + # + # source://redis//lib/redis/commands/strings.rb#107 + def setex(key, ttl, value); end + + # Set the value of a key, only if the key does not exist. + # + # @param key [String] + # @param value [String] + # @return [Boolean] whether the key was set or not + # + # source://redis//lib/redis/commands/strings.rb#126 + def setnx(key, value); end + + # Overwrite part of a string at key starting at the specified offset. + # + # @param key [String] + # @param offset [Integer] byte offset + # @param value [String] + # @return [Integer] length of the string after it was modified + # + # source://redis//lib/redis/commands/strings.rb#235 + def setrange(key, offset, value); end + + # Get the length of the value stored in a key. + # + # @param key [String] + # @return [Integer] the length of the value stored in the key, or 0 + # if the key does not exist + # + # source://redis//lib/redis/commands/strings.rb#309 + def strlen(key); end +end + +# source://redis//lib/redis/commands/transactions.rb#5 +module Redis::Commands::Transactions + # Discard all commands issued after MULTI. + # + # @return [String] `"OK"` + # @see #multi + # @see #exec + # + # source://redis//lib/redis/commands/transactions.rb#110 + def discard; end + + # Execute all commands issued after MULTI. + # + # Only call this method when `#multi` was called **without** a block. + # + # @return [nil, Array<...>] - when commands were not executed, `nil` + # - when commands were executed, an array with their replies + # @see #multi + # @see #discard + # + # source://redis//lib/redis/commands/transactions.rb#100 + def exec; end + + # Mark the start of a transaction block. + # + # @example With a block + # redis.multi do |multi| + # multi.set("key", "value") + # multi.incr("counter") + # end # => ["OK", 6] + # @return [Array<...>] - an array with replies + # @see #watch + # @see #unwatch + # @yield [multi] the commands that are called inside this block are cached + # and written to the server upon returning from it + # @yieldparam multi [Redis] `self` + # + # source://redis//lib/redis/commands/transactions.rb#23 + def multi; end + + # Forget about all watched keys. + # + # @return [String] `OK` + # @see #watch + # @see #multi + # + # source://redis//lib/redis/commands/transactions.rb#86 + def unwatch; end + + # Watch the given keys to determine execution of the MULTI/EXEC block. + # + # Using a block is optional, but is necessary for thread-safety. + # + # An `#unwatch` is automatically issued if an exception is raised within the + # block that is a subclass of StandardError and is not a ConnectionError. + # + # @example With a block + # redis.watch("key") do + # if redis.get("key") == "some value" + # redis.multi do |multi| + # multi.set("key", "other value") + # multi.incr("counter") + # end + # else + # redis.unwatch + # end + # end + # # => ["OK", 6] + # @example Without a block + # redis.watch("key") + # # => "OK" + # @param keys [String, Array] one or more keys to watch + # @return [Object] if using a block, returns the return value of the block + # @return [String] if not using a block, returns `OK` + # @see #unwatch + # @see #multi + # + # source://redis//lib/redis/commands/transactions.rb#61 + def watch(*keys); end +end + +# soft-deprecated +# We added this back for older sidekiq releases +# +# source://redis//lib/redis.rb#27 +module Redis::Connection + class << self + # source://redis//lib/redis.rb#29 + def drivers; end + end +end + +# Raised when connection to a Redis server is lost. +# +# source://redis//lib/redis/errors.rb#41 +class Redis::ConnectionError < ::Redis::BaseConnectionError; end + +# source://redis//lib/redis.rb#9 +class Redis::Deprecated < ::StandardError; end + +# source://redis//lib/redis/pipeline.rb#79 +class Redis::Future < ::BasicObject + # @return [Future] a new instance of Future + # + # source://redis//lib/redis/pipeline.rb#82 + def initialize(command, coerce); end + + # source://redis//lib/redis/pipeline.rb#92 + def _set(object); end + + # source://redis//lib/redis/pipeline.rb#106 + def class; end + + # source://redis//lib/redis/pipeline.rb#88 + def inspect; end + + # @return [Boolean] + # + # source://redis//lib/redis/pipeline.rb#102 + def is_a?(other); end + + # source://redis//lib/redis/pipeline.rb#97 + def value; end +end + +# source://redis//lib/redis/pipeline.rb#80 +Redis::Future::FutureNotReady = T.let(T.unsafe(nil), Redis::FutureNotReady) + +# source://redis//lib/redis/pipeline.rb#73 +class Redis::FutureNotReady < ::RuntimeError + # @return [FutureNotReady] a new instance of FutureNotReady + # + # source://redis//lib/redis/pipeline.rb#74 + def initialize; end +end + +# Raised when the connection was inherited by a child process. +# +# source://redis//lib/redis/errors.rb#49 +class Redis::InheritedError < ::Redis::BaseConnectionError; end + +# Raised when client options are invalid. +# +# source://redis//lib/redis/errors.rb#57 +class Redis::InvalidClientOptionError < ::Redis::BaseError; end + +# source://redis//lib/redis/pipeline.rb#58 +class Redis::MultiConnection < ::Redis::PipelinedConnection + # @raise [Redis::Error] + # + # source://redis//lib/redis/pipeline.rb#59 + def multi; end + + private + + # Blocking commands inside transaction behave like non-blocking. + # It shouldn't be done though. + # https://redis.io/commands/blpop/#blpop-inside-a-multi--exec-transaction + # + # source://redis//lib/redis/pipeline.rb#68 + def send_blocking_command(command, _timeout, &block); end +end + +# source://redis//lib/redis/pipeline.rb#111 +class Redis::MultiFuture < ::Redis::Future + # @return [MultiFuture] a new instance of MultiFuture + # + # source://redis//lib/redis/pipeline.rb#112 + def initialize(futures); end + + # source://redis//lib/redis/pipeline.rb#118 + def _set(replies); end +end + +# source://redis//lib/redis/errors.rb#29 +class Redis::OutOfMemoryError < ::Redis::CommandError; end + +# source://redis//lib/redis/errors.rb#23 +class Redis::PermissionError < ::Redis::CommandError; end + +# source://redis//lib/redis/pipeline.rb#6 +class Redis::PipelinedConnection + include ::Redis::Commands::Bitmaps + include ::Redis::Commands::Cluster + include ::Redis::Commands::Connection + include ::Redis::Commands::Geo + include ::Redis::Commands::Hashes + include ::Redis::Commands::HyperLogLog + include ::Redis::Commands::Keys + include ::Redis::Commands::Lists + include ::Redis::Commands::Pubsub + include ::Redis::Commands::Scripting + include ::Redis::Commands::Server + include ::Redis::Commands::Sets + include ::Redis::Commands::SortedSets + include ::Redis::Commands::Streams + include ::Redis::Commands::Strings + include ::Redis::Commands::Transactions + include ::Redis::Commands + + # @return [PipelinedConnection] a new instance of PipelinedConnection + # + # source://redis//lib/redis/pipeline.rb#9 + def initialize(pipeline, futures = T.unsafe(nil)); end + + # Returns the value of attribute db. + # + # source://redis//lib/redis/pipeline.rb#7 + def db; end + + # Sets the attribute db + # + # @param value the value to set the attribute db to. + # + # source://redis//lib/redis/pipeline.rb#7 + def db=(_arg0); end + + # @yield [transaction] + # + # source://redis//lib/redis/pipeline.rb#20 + def multi; end + + # @yield [_self] + # @yieldparam _self [Redis::PipelinedConnection] the object that the method was called on + # + # source://redis//lib/redis/pipeline.rb#16 + def pipelined; end + + private + + # source://redis//lib/redis/pipeline.rb#48 + def send_blocking_command(command, timeout, &block); end + + # source://redis//lib/redis/pipeline.rb#39 + def send_command(command, &block); end + + # @yield [_self] + # @yieldparam _self [Redis::PipelinedConnection] the object that the method was called on + # + # source://redis//lib/redis/pipeline.rb#35 + def synchronize; end +end + +# Raised by the connection when a protocol error occurs. +# +# source://redis//lib/redis/errors.rb#9 +class Redis::ProtocolError < ::Redis::BaseError + # @return [ProtocolError] a new instance of ProtocolError + # + # source://redis//lib/redis/errors.rb#10 + def initialize(reply_type); end +end + +# Generally raised during Redis failover scenarios +# +# source://redis//lib/redis/errors.rb#53 +class Redis::ReadOnlyError < ::Redis::BaseConnectionError; end + +# source://redis//lib/redis.rb#37 +Redis::SERVER_URL_OPTIONS = T.let(T.unsafe(nil), Array) + +# source://redis//lib/redis/subscribe.rb#4 +class Redis::SubscribedClient + # @return [SubscribedClient] a new instance of SubscribedClient + # + # source://redis//lib/redis/subscribe.rb#5 + def initialize(client); end + + # source://redis//lib/redis/subscribe.rb#10 + def call_v(command); end + + # source://redis//lib/redis/subscribe.rb#40 + def close; end + + # source://redis//lib/redis/subscribe.rb#24 + def psubscribe(*channels, &block); end + + # source://redis//lib/redis/subscribe.rb#28 + def psubscribe_with_timeout(timeout, *channels, &block); end + + # source://redis//lib/redis/subscribe.rb#36 + def punsubscribe(*channels); end + + # source://redis//lib/redis/subscribe.rb#16 + def subscribe(*channels, &block); end + + # source://redis//lib/redis/subscribe.rb#20 + def subscribe_with_timeout(timeout, *channels, &block); end + + # source://redis//lib/redis/subscribe.rb#32 + def unsubscribe(*channels); end + + protected + + # source://redis//lib/redis/subscribe.rb#46 + def subscription(start, stop, channels, block, timeout = T.unsafe(nil)); end +end + +# source://redis//lib/redis/subscribe.rb#66 +class Redis::Subscription + # @return [Subscription] a new instance of Subscription + # @yield [_self] + # @yieldparam _self [Redis::Subscription] the object that the method was called on + # + # source://redis//lib/redis/subscribe.rb#69 + def initialize; end + + # Returns the value of attribute callbacks. + # + # source://redis//lib/redis/subscribe.rb#67 + def callbacks; end + + # source://redis//lib/redis/subscribe.rb#82 + def message(&block); end + + # source://redis//lib/redis/subscribe.rb#94 + def pmessage(&block); end + + # source://redis//lib/redis/subscribe.rb#86 + def psubscribe(&block); end + + # source://redis//lib/redis/subscribe.rb#90 + def punsubscribe(&block); end + + # source://redis//lib/redis/subscribe.rb#74 + def subscribe(&block); end + + # source://redis//lib/redis/subscribe.rb#78 + def unsubscribe(&block); end +end + +# source://redis//lib/redis/errors.rb#60 +class Redis::SubscriptionError < ::Redis::BaseError; end + +# Raised when performing I/O times out. +# +# source://redis//lib/redis/errors.rb#45 +class Redis::TimeoutError < ::Redis::BaseConnectionError; end + +# source://redis//lib/redis/version.rb#4 +Redis::VERSION = T.let(T.unsafe(nil), String) + +# source://redis//lib/redis/errors.rb#26 +class Redis::WrongTypeError < ::Redis::CommandError; end diff --git a/sorbet/rbi/gems/regexp_parser@2.8.1.rbi b/sorbet/rbi/gems/regexp_parser@2.8.1.rbi new file mode 100644 index 0000000..e10d9b8 --- /dev/null +++ b/sorbet/rbi/gems/regexp_parser@2.8.1.rbi @@ -0,0 +1,3749 @@ +# 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 +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 +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 +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#9 + def initialize(token, options = T.unsafe(nil)); end + + # source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#19 + 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#15 + def negate; end + + # Returns the value of attribute negative. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#3 + def negated?; 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 + + # Returns the value of attribute negative. + # + # source://regexp_parser//lib/regexp_parser/expression/classes/character_set.rb#3 + 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 +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 + +# TOOD: 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#14 +Regexp::Expression::Nonposixclass = Regexp::Expression::PosixClass + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#121 +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#7 + def name; end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/classes/posix_class.rb#3 + 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#13 +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#120 +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#25 +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 + + # 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#112 +class Regexp::Expression::UnicodeProperty::Age < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#17 +class Regexp::Expression::UnicodeProperty::Alnum < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#18 +class Regexp::Expression::UnicodeProperty::Alpha < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#35 +class Regexp::Expression::UnicodeProperty::Any < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#19 +class Regexp::Expression::UnicodeProperty::Ascii < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#36 +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#8 + def name; end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#4 + def negative?; end + + # source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#12 + def shortcut; end +end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#20 +class Regexp::Expression::UnicodeProperty::Blank < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#116 +class Regexp::Expression::UnicodeProperty::Block < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#21 +class Regexp::Expression::UnicodeProperty::Cntrl < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#101 +module Regexp::Expression::UnicodeProperty::Codepoint; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#104 +class Regexp::Expression::UnicodeProperty::Codepoint::Any < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#102 +class Regexp::Expression::UnicodeProperty::Codepoint::Base < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#105 +class Regexp::Expression::UnicodeProperty::Codepoint::Control < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#106 +class Regexp::Expression::UnicodeProperty::Codepoint::Format < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#108 +class Regexp::Expression::UnicodeProperty::Codepoint::PrivateUse < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#107 +class Regexp::Expression::UnicodeProperty::Codepoint::Surrogate < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#109 +class Regexp::Expression::UnicodeProperty::Codepoint::Unassigned < ::Regexp::Expression::UnicodeProperty::Codepoint::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#113 +class Regexp::Expression::UnicodeProperty::Derived < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#22 +class Regexp::Expression::UnicodeProperty::Digit < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#114 +class Regexp::Expression::UnicodeProperty::Emoji < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#23 +class Regexp::Expression::UnicodeProperty::Graph < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#38 +module Regexp::Expression::UnicodeProperty::Letter; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#41 +class Regexp::Expression::UnicodeProperty::Letter::Any < ::Regexp::Expression::UnicodeProperty::Letter::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#39 +class Regexp::Expression::UnicodeProperty::Letter::Base < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#42 +class Regexp::Expression::UnicodeProperty::Letter::Cased < ::Regexp::Expression::UnicodeProperty::Letter::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#44 +class Regexp::Expression::UnicodeProperty::Letter::Lowercase < ::Regexp::Expression::UnicodeProperty::Letter::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#46 +class Regexp::Expression::UnicodeProperty::Letter::Modifier < ::Regexp::Expression::UnicodeProperty::Letter::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#47 +class Regexp::Expression::UnicodeProperty::Letter::Other < ::Regexp::Expression::UnicodeProperty::Letter::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#45 +class Regexp::Expression::UnicodeProperty::Letter::Titlecase < ::Regexp::Expression::UnicodeProperty::Letter::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#43 +class Regexp::Expression::UnicodeProperty::Letter::Uppercase < ::Regexp::Expression::UnicodeProperty::Letter::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#24 +class Regexp::Expression::UnicodeProperty::Lower < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#50 +module Regexp::Expression::UnicodeProperty::Mark; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#53 +class Regexp::Expression::UnicodeProperty::Mark::Any < ::Regexp::Expression::UnicodeProperty::Mark::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#51 +class Regexp::Expression::UnicodeProperty::Mark::Base < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#54 +class Regexp::Expression::UnicodeProperty::Mark::Combining < ::Regexp::Expression::UnicodeProperty::Mark::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#57 +class Regexp::Expression::UnicodeProperty::Mark::Enclosing < ::Regexp::Expression::UnicodeProperty::Mark::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#55 +class Regexp::Expression::UnicodeProperty::Mark::Nonspacing < ::Regexp::Expression::UnicodeProperty::Mark::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#56 +class Regexp::Expression::UnicodeProperty::Mark::Spacing < ::Regexp::Expression::UnicodeProperty::Mark::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#33 +class Regexp::Expression::UnicodeProperty::Newline < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#60 +module Regexp::Expression::UnicodeProperty::Number; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#63 +class Regexp::Expression::UnicodeProperty::Number::Any < ::Regexp::Expression::UnicodeProperty::Number::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#61 +class Regexp::Expression::UnicodeProperty::Number::Base < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#64 +class Regexp::Expression::UnicodeProperty::Number::Decimal < ::Regexp::Expression::UnicodeProperty::Number::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#65 +class Regexp::Expression::UnicodeProperty::Number::Letter < ::Regexp::Expression::UnicodeProperty::Number::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#66 +class Regexp::Expression::UnicodeProperty::Number::Other < ::Regexp::Expression::UnicodeProperty::Number::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#25 +class Regexp::Expression::UnicodeProperty::Print < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#26 +class Regexp::Expression::UnicodeProperty::Punct < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#69 +module Regexp::Expression::UnicodeProperty::Punctuation; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#72 +class Regexp::Expression::UnicodeProperty::Punctuation::Any < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#70 +class Regexp::Expression::UnicodeProperty::Punctuation::Base < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#76 +class Regexp::Expression::UnicodeProperty::Punctuation::Close < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#73 +class Regexp::Expression::UnicodeProperty::Punctuation::Connector < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#74 +class Regexp::Expression::UnicodeProperty::Punctuation::Dash < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#78 +class Regexp::Expression::UnicodeProperty::Punctuation::Final < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#77 +class Regexp::Expression::UnicodeProperty::Punctuation::Initial < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#75 +class Regexp::Expression::UnicodeProperty::Punctuation::Open < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#79 +class Regexp::Expression::UnicodeProperty::Punctuation::Other < ::Regexp::Expression::UnicodeProperty::Punctuation::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#115 +class Regexp::Expression::UnicodeProperty::Script < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#82 +module Regexp::Expression::UnicodeProperty::Separator; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#85 +class Regexp::Expression::UnicodeProperty::Separator::Any < ::Regexp::Expression::UnicodeProperty::Separator::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#83 +class Regexp::Expression::UnicodeProperty::Separator::Base < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#87 +class Regexp::Expression::UnicodeProperty::Separator::Line < ::Regexp::Expression::UnicodeProperty::Separator::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#88 +class Regexp::Expression::UnicodeProperty::Separator::Paragraph < ::Regexp::Expression::UnicodeProperty::Separator::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#86 +class Regexp::Expression::UnicodeProperty::Separator::Space < ::Regexp::Expression::UnicodeProperty::Separator::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#27 +class Regexp::Expression::UnicodeProperty::Space < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#91 +module Regexp::Expression::UnicodeProperty::Symbol; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#94 +class Regexp::Expression::UnicodeProperty::Symbol::Any < ::Regexp::Expression::UnicodeProperty::Symbol::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#92 +class Regexp::Expression::UnicodeProperty::Symbol::Base < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#96 +class Regexp::Expression::UnicodeProperty::Symbol::Currency < ::Regexp::Expression::UnicodeProperty::Symbol::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#95 +class Regexp::Expression::UnicodeProperty::Symbol::Math < ::Regexp::Expression::UnicodeProperty::Symbol::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#97 +class Regexp::Expression::UnicodeProperty::Symbol::Modifier < ::Regexp::Expression::UnicodeProperty::Symbol::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#98 +class Regexp::Expression::UnicodeProperty::Symbol::Other < ::Regexp::Expression::UnicodeProperty::Symbol::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#28 +class Regexp::Expression::UnicodeProperty::Upper < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#29 +class Regexp::Expression::UnicodeProperty::Word < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#31 +class Regexp::Expression::UnicodeProperty::XPosixPunct < ::Regexp::Expression::UnicodeProperty::Base; end + +# source://regexp_parser//lib/regexp_parser/expression/classes/unicode_property.rb#30 +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#573 + 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 refering 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#580 + 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#569 + 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#537 + 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#508 + def increase_group_level(exp); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#548 + 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#533 + 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#526 + 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#478 + def quantifier(token); end + + # source://regexp_parser//lib/regexp_parser/parser.rb#541 + 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#514 + 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#552 + 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#2388 + def emit(type, token, text); end + + # only public for #||= to work on ruby <= 2.5 + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2413 + def literal_run; end + + # only public for #||= to work on ruby <= 2.5 + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2413 + 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#2450 + def append_literal(data, ts, te); end + + # Returns the value of attribute block. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2417 + 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#2417 + def block=(_arg0); end + + # Returns the value of attribute char_pos. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2417 + 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#2417 + def char_pos=(_arg0); end + + # Returns the value of attribute collect_tokens. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2417 + 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#2417 + def collect_tokens=(_arg0); end + + # Returns the value of attribute conditional_stack. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2417 + 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#2417 + def conditional_stack=(_arg0); end + + # Copy from ts to te from data as text + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2444 + 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#2455 + def emit_literal; end + + # source://regexp_parser//lib/regexp_parser/scanner.rb#2490 + def emit_meta_control_sequence(data, ts, te, token); end + + # source://regexp_parser//lib/regexp_parser/scanner.rb#2461 + def emit_options(text); end + + # Returns the value of attribute free_spacing. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2417 + 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#2417 + def free_spacing=(_arg0); end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2423 + def free_spacing?(input_object, options); end + + # Returns the value of attribute group_depth. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2417 + 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#2417 + def group_depth=(_arg0); end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2435 + def in_group?; end + + # @return [Boolean] + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2439 + def in_set?; end + + # Returns the value of attribute prev_token. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2417 + 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#2417 + def prev_token=(_arg0); end + + # Returns the value of attribute set_depth. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2417 + 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#2417 + def set_depth=(_arg0); end + + # Returns the value of attribute spacing_stack. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2417 + 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#2417 + def spacing_stack=(_arg0); end + + # Returns the value of attribute tokens. + # + # source://regexp_parser//lib/regexp_parser/scanner.rb#2417 + 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#2417 + def tokens=(_arg0); end + + class << self + # source://regexp_parser//lib/regexp_parser/scanner.rb#2374 + def long_prop_map; end + + # source://regexp_parser//lib/regexp_parser/scanner.rb#2378 + def parse_prop_map(name); end + + # source://regexp_parser//lib/regexp_parser/scanner.rb#2382 + 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#2370 + 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#731 +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#721 +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#706 +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#724 +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#723 +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#708 +Regexp::Syntax::Token::UnicodeProperty::V1_9_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#709 +Regexp::Syntax::Token::UnicodeProperty::V1_9_3 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#710 +Regexp::Syntax::Token::UnicodeProperty::V2_0_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#711 +Regexp::Syntax::Token::UnicodeProperty::V2_2_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#712 +Regexp::Syntax::Token::UnicodeProperty::V2_3_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#713 +Regexp::Syntax::Token::UnicodeProperty::V2_4_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#714 +Regexp::Syntax::Token::UnicodeProperty::V2_5_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#715 +Regexp::Syntax::Token::UnicodeProperty::V2_6_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#716 +Regexp::Syntax::Token::UnicodeProperty::V2_6_2 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#717 +Regexp::Syntax::Token::UnicodeProperty::V2_6_3 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#718 +Regexp::Syntax::Token::UnicodeProperty::V3_1_0 = T.let(T.unsafe(nil), Array) + +# source://regexp_parser//lib/regexp_parser/syntax/token/unicode_property.rb#719 +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/rexml@3.2.5.rbi b/sorbet/rbi/gems/rexml@3.2.5.rbi new file mode 100644 index 0000000..a94e567 --- /dev/null +++ b/sorbet/rbi/gems/rexml@3.2.5.rbi @@ -0,0 +1,4717 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rexml` gem. +# Please instead update this file by running `bin/tapioca gem rexml`. + +# This class needs: +# * Documentation +# * Work! Not all types of attlists are intelligently parsed, so we just +# spew back out what we get in. This works, but it would be better if +# we formatted the output ourselves. +# +# AttlistDecls provide *just* enough support to allow namespace +# declarations. If you need some sort of generalized support, or have an +# interesting idea about how to map the hideous, terrible design of DTD +# AttlistDecls onto an intuitive Ruby interface, let me know. I'm desperate +# for anything to make DTDs more palateable. +# +# source://rexml//lib/rexml/attlistdecl.rb#18 +class REXML::AttlistDecl < ::REXML::Child + include ::Enumerable + + # Create an AttlistDecl, pulling the information from a Source. Notice + # that this isn't very convenient; to create an AttlistDecl, you basically + # have to format it yourself, and then have the initializer parse it. + # Sorry, but for the foreseeable future, DTD support in REXML is pretty + # weak on convenience. Have I mentioned how much I hate DTDs? + # + # @return [AttlistDecl] a new instance of AttlistDecl + # + # source://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 + def [](key); end + + # Iterate over the key/value pairs: + # attlist_decl.each { |attribute_name, attribute_value| ... } + # + # source://rexml//lib/rexml/attlistdecl.rb#50 + def each(&block); end + + # What is this? Got me. + # + # source://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 + def include?(key); end + + # source://rexml//lib/rexml/attlistdecl.rb#59 + def node_type; end + + # Write out exactly what we got in. + # + # source://rexml//lib/rexml/attlistdecl.rb#55 + def write(out, indent = T.unsafe(nil)); end +end + +# Defines an Element Attribute; IE, a attribute=value pair, as in: +# . Attributes can be in their own +# namespaces. General users of REXML will not interact with the +# Attribute class much. +# +# source://rexml//lib/rexml/attribute.rb#10 +class REXML::Attribute + include ::REXML::Node + include ::REXML::XMLTokens + include ::REXML::Namespace + + # Constructor. + # FIXME: The parser doesn't catch illegal characters in attributes + # + # first:: + # Either: an Attribute, which this new attribute will become a + # clone of; or a String, which is the name of this attribute + # second:: + # If +first+ is an Attribute, then this may be an Element, or nil. + # If nil, then the Element parent of this attribute is the parent + # of the +first+ Attribute. If the first argument is a String, + # then this must also be a String, and is the content of the attribute. + # If this is the content, it must be fully normalized (contain no + # illegal characters). + # parent:: + # Ignored unless +first+ is a String; otherwise, may be the Element + # parent of this attribute, or nil. + # + # + # Attribute.new( attribute_to_clone ) + # Attribute.new( attribute_to_clone, parent_element ) + # Attribute.new( "attr", "attr_value" ) + # Attribute.new( "attr", "attr_value", parent_element ) + # + # @return [Attribute] a new instance of Attribute + # + # source://rexml//lib/rexml/attribute.rb#45 + 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#109 + def ==(other); end + + # Returns a copy of this attribute + # + # source://rexml//lib/rexml/attribute.rb#158 + def clone; end + + # source://rexml//lib/rexml/attribute.rb#132 + def doctype; end + + # The element to which this attribute belongs + # + # source://rexml//lib/rexml/attribute.rb#15 + def element; end + + # Sets the element of which this object is an attribute. Normally, this + # is not directly called. + # + # Returns this attribute + # + # source://rexml//lib/rexml/attribute.rb#166 + def element=(element); end + + # Creates (and returns) a hash from both the name and value + # + # source://rexml//lib/rexml/attribute.rb#114 + def hash; end + + # source://rexml//lib/rexml/attribute.rb#192 + def inspect; end + + # Returns the namespace URL, if defined, or nil otherwise + # + # e = Element.new("el") + # e.add_namespace("ns", "http://url") + # e.add_attribute("ns:a", "b") + # e.add_attribute("nsx:a", "c") + # e.attribute("ns:a").namespace # => "http://url" + # e.attribute("nsx:a").namespace # => nil + # + # This method always returns "" for no namespace attribute. Because + # the default namespace doesn't apply to attribute names. + # + # From https://www.w3.org/TR/xml-names/#uniqAttrs + # + # > the default namespace does not apply to attribute names + # + # e = REXML::Element.new("el") + # e.add_namespace("", "http://example.com/") + # e.namespace # => "http://example.com/" + # e.add_attribute("a", "b") + # e.attribute("a").namespace # => "" + # + # source://rexml//lib/rexml/attribute.rb#98 + def namespace(arg = T.unsafe(nil)); end + + # source://rexml//lib/rexml/attribute.rb#188 + def node_type; end + + # The normalized value of this attribute. That is, the attribute with + # entities intact. + # + # source://rexml//lib/rexml/attribute.rb#18 + def normalized=(_arg0); end + + # Returns the namespace of the attribute. + # + # e = Element.new( "elns:myelement" ) + # e.add_attribute( "nsa:a", "aval" ) + # e.add_attribute( "b", "bval" ) + # e.attributes.get_attribute( "a" ).prefix # -> "nsa" + # e.attributes.get_attribute( "b" ).prefix # -> "" + # a = Attribute.new( "x", "y" ) + # a.prefix # -> "" + # + # source://rexml//lib/rexml/attribute.rb#73 + 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#179 + def remove; end + + # Returns the attribute value, with entities replaced + # + # source://rexml//lib/rexml/attribute.rb#140 + def to_s; end + + # Returns this attribute out as XML source, expanding the name + # + # a = Attribute.new( "x", "y" ) + # a.to_string # -> "x='y'" + # b = Attribute.new( "ns:x", "y" ) + # b.to_string # -> "ns:x='y'" + # + # source://rexml//lib/rexml/attribute.rb#124 + 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#150 + def value; end + + # Writes this attribute (EG, puts 'key="value"' to the output) + # + # source://rexml//lib/rexml/attribute.rb#184 + def write(output, indent = T.unsafe(nil)); end + + # source://rexml//lib/rexml/attribute.rb#198 + 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#2141 +class REXML::Attributes < ::Hash + # :call-seq: + # new(element) + # + # Creates and returns a new \REXML::Attributes object. + # The element given by argument +element+ is stored, + # but its own attributes are not modified: + # + # ele = REXML::Element.new('foo') + # attrs = REXML::Attributes.new(ele) + # attrs.object_id == ele.attributes.object_id # => false + # + # Other instance methods in class \REXML::Attributes may refer to: + # + # - +element.document+. + # - +element.prefix+. + # - +element.expanded_name+. + # + # @return [Attributes] a new instance of Attributes + # + # source://rexml//lib/rexml/element.rb#2160 + 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#2537 + def <<(attribute); end + + # :call-seq: + # [name] -> attribute_value or nil + # + # Returns the value for the attribute given by +name+, + # if it exists; otherwise +nil+. + # The value returned is the unnormalized attribute value, + # with entities expanded: + # + # xml_string = <<-EOT + # + # + # + # EOT + # d = REXML::Document.new(xml_string) + # ele = d.elements['//ele'] # => + # ele.attributes['att'] # => "<" + # ele.attributes['bar:att'] # => "2" + # ele.attributes['nosuch'] # => nil + # + # Related: get_attribute (returns an \Attribute object). + # + # source://rexml//lib/rexml/element.rb#2185 + def [](name); end + + # :call-seq: + # [name] = value -> value + # + # When +value+ is non-+nil+, + # assigns that to the attribute for the given +name+, + # overwriting the previous value if it exists: + # + # xml_string = <<-EOT + # + # + # + # EOT + # d = REXML::Document.new(xml_string) + # ele = d.root.elements['//ele'] # => + # attrs = ele.attributes + # attrs['foo:att'] = '2' # => "2" + # attrs['baz:att'] = '3' # => "3" + # + # When +value+ is +nil+, deletes the attribute if it exists: + # + # attrs['baz:att'] = nil + # attrs.include?('baz:att') # => false + # + # source://rexml//lib/rexml/element.rb#2369 + def []=(name, value); end + + # :call-seq: + # add(attribute) -> attribute + # + # Adds attribute +attribute+, replacing the previous + # attribute of the same name if it exists; + # returns +attribute+: + # + # xml_string = <<-EOT + # + # + # + # EOT + # d = REXML::Document.new(xml_string) + # ele = d.root.elements['//ele'] # => + # attrs = ele.attributes + # attrs # => {"att"=>{"foo"=>foo:att='1', "bar"=>bar:att='2', ""=>att='<'}} + # attrs.add(REXML::Attribute.new('foo:att', '2')) # => foo:att='2' + # attrs.add(REXML::Attribute.new('baz', '3')) # => baz='3' + # attrs.include?('baz') # => true + # + # source://rexml//lib/rexml/element.rb#2537 + def add(attribute); end + + # :call-seq: + # delete(name) -> element + # delete(attribute) -> element + # + # Removes a specified attribute if it exists; + # returns the attributes' element. + # + # When string argument +name+ is given, + # removes the attribute of that name if it exists: + # + # xml_string = <<-EOT + # + # + # + # EOT + # d = REXML::Document.new(xml_string) + # ele = d.root.elements['//ele'] # => + # attrs = ele.attributes + # attrs.delete('foo:att') # => + # attrs.delete('foo:att') # => + # + # When attribute argument +attribute+ is given, + # removes that attribute if it exists: + # + # attr = REXML::Attribute.new('bar:att', '2') + # attrs.delete(attr) # => # => + # attrs.delete(attr) # => # => + # + # source://rexml//lib/rexml/element.rb#2490 + def delete(attribute); end + + # :call-seq: + # delete_all(name) -> array_of_removed_attributes + # + # Removes all attributes matching the given +name+; + # returns an array of the removed attributes: + # + # xml_string = <<-EOT + # + # + # + # EOT + # d = REXML::Document.new(xml_string) + # ele = d.root.elements['//ele'] # => + # attrs = ele.attributes + # attrs.delete_all('att') # => [att='<'] + # + # source://rexml//lib/rexml/element.rb#2559 + def delete_all(name); end + + # :call-seq: + # each {|expanded_name, value| ... } + # + # Calls the given block with each expanded-name/value pair: + # + # xml_string = <<-EOT + # + # + # + # EOT + # d = REXML::Document.new(xml_string) + # ele = d.root.elements['//ele'] # => + # ele.attributes.each do |expanded_name, value| + # p [expanded_name, value] + # end + # + # Output: + # + # ["foo:att", "1"] + # ["bar:att", "2"] + # ["att", "<"] + # + # source://rexml//lib/rexml/element.rb#2287 + def each; end + + # :call-seq: + # each_attribute {|attr| ... } + # + # Calls the given block with each \REXML::Attribute object: + # + # xml_string = <<-EOT + # + # + # + # EOT + # d = REXML::Document.new(xml_string) + # ele = d.root.elements['//ele'] # => + # ele.attributes.each_attribute do |attr| + # p [attr.class, attr] + # end + # + # Output: + # + # [REXML::Attribute, foo:att='1'] + # [REXML::Attribute, bar:att='2'] + # [REXML::Attribute, att='<'] + # + # source://rexml//lib/rexml/element.rb#2254 + def each_attribute; end + + # :call-seq: + # get_attribute(name) -> attribute_object or nil + # + # Returns the \REXML::Attribute object for the given +name+: + # + # xml_string = <<-EOT + # + # + # + # EOT + # d = REXML::Document.new(xml_string) + # ele = d.root.elements['//ele'] # => + # attrs = ele.attributes + # attrs.get_attribute('foo:att') # => foo:att='1' + # attrs.get_attribute('foo:att').class # => REXML::Attribute + # attrs.get_attribute('bar:att') # => bar:att='2' + # attrs.get_attribute('att') # => att='<' + # attrs.get_attribute('nosuch') # => nil + # + # source://rexml//lib/rexml/element.rb#2313 + def get_attribute(name); end + + # :call-seq: + # get_attribute_ns(namespace, name) + # + # Returns the \REXML::Attribute object among the attributes + # that matches the given +namespace+ and +name+: + # + # xml_string = <<-EOT + # + # + # + # EOT + # d = REXML::Document.new(xml_string) + # ele = d.root.elements['//ele'] # => + # attrs = ele.attributes + # attrs.get_attribute_ns('http://foo', 'att') # => foo:att='1' + # attrs.get_attribute_ns('http://foo', 'nosuch') # => nil + # + # source://rexml//lib/rexml/element.rb#2585 + def get_attribute_ns(namespace, name); end + + # :call-seq: + # length + # + # Returns the count of attributes: + # + # xml_string = <<-EOT + # + # + # + # EOT + # d = REXML::Document.new(xml_string) + # ele = d.root.elements['//ele'] # => + # ele.attributes.length # => 3 + # + # source://rexml//lib/rexml/element.rb#2225 + def length; end + + # :call-seq: + # namespaces + # + # Returns a hash of name/value pairs for the namespaces: + # + # xml_string = '' + # d = REXML::Document.new(xml_string) + # d.root.attributes.namespaces # => {"xmlns"=>"foo", "x"=>"bar", "y"=>"twee"} + # + # source://rexml//lib/rexml/element.rb#2446 + def namespaces; end + + # :call-seq: + # prefixes -> array_of_prefix_strings + # + # Returns an array of prefix strings in the attributes. + # The array does not include the default + # namespace declaration, if one exists. + # + # xml_string = '' + # d = REXML::Document.new(xml_string) + # d.root.attributes.prefixes # => ["x", "y"] + # + # source://rexml//lib/rexml/element.rb#2421 + 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#2225 + def size; end + + # :call-seq: + # to_a -> array_of_attribute_objects + # + # Returns an array of \REXML::Attribute objects representing + # the attributes: + # + # xml_string = <<-EOT + # + # + # + # EOT + # d = REXML::Document.new(xml_string) + # ele = d.root.elements['//ele'] # => + # attrs = ele.attributes.to_a # => [foo:att='1', bar:att='2', att='<'] + # attrs.first.class # => REXML::Attribute + # + # source://rexml//lib/rexml/element.rb#2207 + def to_a; end +end + +# source://rexml//lib/rexml/cdata.rb#5 +class REXML::CData < ::REXML::Text + # Constructor. CData is data between + # + # _Examples_ + # CData.new( source ) + # CData.new( "Here is some CDATA" ) + # CData.new( "Some unprocessed data", respect_whitespace_TF, parent_element ) + # + # @return [CData] a new instance of CData + # + # source://rexml//lib/rexml/cdata.rb#16 + def initialize(first, whitespace = T.unsafe(nil), parent = T.unsafe(nil)); end + + # Make a copy of this object + # + # _Examples_ + # c = CData.new( "Some text" ) + # d = c.clone + # d.to_s # -> "Some text" + # + # source://rexml//lib/rexml/cdata.rb#26 + def clone; end + + # Returns the content of this CData object + # + # _Examples_ + # c = CData.new( "Some text" ) + # c.to_s # -> "Some text" + # + # source://rexml//lib/rexml/cdata.rb#35 + def to_s; end + + # source://rexml//lib/rexml/cdata.rb#39 + def value; end + + # == DEPRECATED + # See the rexml/formatters package + # + # Generates XML output of this object + # + # output:: + # Where to write the string. Defaults to $stdout + # indent:: + # The amount to indent this node by + # transitive:: + # Ignored + # ie_hack:: + # Ignored + # + # _Examples_ + # c = CData.new( " Some text " ) + # c.write( $stdout ) #-> + # + # source://rexml//lib/rexml/cdata.rb#60 + def write(output = T.unsafe(nil), indent = T.unsafe(nil), transitive = T.unsafe(nil), ie_hack = T.unsafe(nil)); end +end + +# A Child object is something contained by a parent, and this class +# contains methods to support that. Most user code will not use this +# class directly. +# +# source://rexml//lib/rexml/child.rb#9 +class REXML::Child + include ::REXML::Node + + # Constructor. Any inheritors of this class should call super to make + # sure this method is called. + # parent:: + # if supplied, the parent of this child will be set to the + # supplied value, and self will be added to the parent + # + # @return [Child] a new instance of Child + # + # source://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 + 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 + def document; end + + # source://rexml//lib/rexml/node.rb#11 + def next_sibling; end + + # Sets the next sibling of this child. This can be used to insert a child + # after some other child. + # a = Element.new("a") + # b = a.add_element("b") + # c = Element.new("c") + # b.next_sibling = c + # # => + # + # source://rexml//lib/rexml/child.rb#68 + def next_sibling=(other); end + + # The Parent of this object + # + # source://rexml//lib/rexml/child.rb#11 + def parent; end + + # Sets the parent of this child to the supplied argument. + # + # other:: + # Must be a Parent object. If this object is the same object as the + # existing parent of this child, no action is taken. Otherwise, this + # child is removed from the current parent (if one exists), and is added + # to the new parent. + # Returns:: The parent added + # + # source://rexml//lib/rexml/child.rb#52 + def parent=(other); end + + # source://rexml//lib/rexml/node.rb#17 + def previous_sibling; end + + # Sets the previous sibling of this child. This can be used to insert a + # child before some other child. + # a = Element.new("a") + # b = a.add_element("b") + # c = Element.new("c") + # b.previous_sibling = c + # # => + # + # source://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 + def remove; end + + # Replaces this object with another object. Basically, calls + # Parent.replace_child + # + # Returns:: self + # + # source://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 +class REXML::Comment < ::REXML::Child + include ::Comparable + + # Constructor. The first argument can be one of three types: + # argument. If Comment, the argument is duplicated. If + # Source, the argument is scanned for a comment. + # 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 + 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 + 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 + def ==(other); end + + # source://rexml//lib/rexml/comment.rb#33 + def clone; end + + # source://rexml//lib/rexml/comment.rb#75 + def node_type; end + + # The content text + # + # source://rexml//lib/rexml/comment.rb#14 + def string; end + + # The content text + # + # source://rexml//lib/rexml/comment.rb#14 + def string=(_arg0); end + + # The content text + # + # source://rexml//lib/rexml/comment.rb#14 + def to_s; end + + # == DEPRECATED + # See REXML::Formatters + # + # output:: + # Where to write the string + # indent:: + # An integer. If -1, no indenting will be used; otherwise, the + # indentation will be this number of spaces, and children will be + # indented an additional amount. + # transitive:: + # Ignored by this class. The contents of comments are never modified. + # ie_hack:: + # Needed for conformity to the child API, but not used by this class. + # + # source://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 +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 +class REXML::Declaration < ::REXML::Child + # @return [Declaration] a new instance of Declaration + # + # source://rexml//lib/rexml/doctype.rb#243 + def initialize(src); end + + # source://rexml//lib/rexml/doctype.rb#248 + def to_s; end + + # == DEPRECATED + # See REXML::Formatters + # + # source://rexml//lib/rexml/doctype.rb#255 + def write(output, indent); end +end + +# Represents an XML DOCTYPE declaration; that is, the contents of . DOCTYPES can be used to declare the DTD of a document, as well as +# being used to declare entities used in the document. +# +# source://rexml//lib/rexml/doctype.rb#51 +class REXML::DocType < ::REXML::Parent + include ::REXML::XMLTokens + + # Constructor + # + # dt = DocType.new( 'foo', '-//I/Hate/External/IDs' ) + # # + # dt = DocType.new( doctype_to_clone ) + # # Incomplete. Shallow clone of doctype + # + # +Note+ that the constructor: + # + # Doctype.new( Source.new( "" ) ) + # + # is _deprecated_. Do not use it. It will probably disappear. + # + # @return [DocType] a new instance of DocType + # + # source://rexml//lib/rexml/doctype.rb#80 + def initialize(first, parent = T.unsafe(nil)); end + + # source://rexml//lib/rexml/doctype.rb#185 + def add(child); end + + # source://rexml//lib/rexml/doctype.rb#125 + def attribute_of(element, attribute); end + + # source://rexml//lib/rexml/doctype.rb#115 + def attributes_of(element); end + + # source://rexml//lib/rexml/doctype.rb#135 + def clone; end + + # source://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 + def entities; end + + # source://rexml//lib/rexml/doctype.rb#181 + 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 + 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 + 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 + def namespaces; end + + # source://rexml//lib/rexml/doctype.rb#111 + def node_type; end + + # Retrieves a named notation. Only notations declared in the internal + # DTD subset can be retrieved. + # + # Method contributed by Henrik Martensson + # + # source://rexml//lib/rexml/doctype.rb#229 + def notation(name); end + + # This method returns a list of notations that have been declared in the + # _internal_ DTD subset. Notations in the external DTD subset are not + # listed. + # + # Method contributed by Henrik Martensson + # + # source://rexml//lib/rexml/doctype.rb#221 + def notations; end + + # This method retrieves the public identifier identifying the document's + # DTD. + # + # Method contributed by Henrik Martensson + # + # source://rexml//lib/rexml/doctype.rb#195 + 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 + def system; end + + # output:: + # Where to write the string + # indent:: + # An integer. If -1, no indentation will be used; otherwise, the + # indentation will be this number of spaces, and children will be + # indented an additional amount. + # transitive:: + # Ignored + # ie_hack:: + # Ignored + # + # source://rexml//lib/rexml/doctype.rb#149 + def write(output, indent = T.unsafe(nil), transitive = T.unsafe(nil), ie_hack = T.unsafe(nil)); end +end + +# Represents an XML document. +# +# A document may have: +# +# - A single child that may be accessed via method #root. +# - An XML declaration. +# - A document type. +# - Processing instructions. +# +# == In a Hurry? +# +# If you're somewhat familiar with XML +# and have a particular task in mind, +# you may want to see the +# {tasks pages}[../doc/rexml/tasks/tocs/master_toc_rdoc.html], +# and in particular, the +# {tasks page for documents}[../doc/rexml/tasks/tocs/document_toc_rdoc.html]. +# +# source://rexml//lib/rexml/document.rb#35 +class REXML::Document < ::REXML::Element + # :call-seq: + # new(string = nil, context = {}) -> new_document + # new(io_stream = nil, context = {}) -> new_document + # new(document = nil, context = {}) -> new_document + # + # Returns a new \REXML::Document object. + # + # When no arguments are given, + # returns an empty document: + # + # d = REXML::Document.new + # d.to_s # => "" + # + # When argument +string+ is given, it must be a string + # containing a valid XML document: + # + # xml_string = 'FooBar' + # d = REXML::Document.new(xml_string) + # d.to_s # => "FooBar" + # + # When argument +io_stream+ is given, it must be an \IO object + # that is opened for reading, and when read must return a valid XML document: + # + # File.write('t.xml', xml_string) + # d = File.open('t.xml', 'r') do |io| + # REXML::Document.new(io) + # end + # d.to_s # => "FooBar" + # + # When argument +document+ is given, it must be an existing + # document object, whose context and attributes (but not chidren) + # are cloned into the new document: + # + # d = REXML::Document.new(xml_string) + # d.children # => [ ... ] + # d.context = {raw: :all, compress_whitespace: :all} + # d.add_attributes({'bar' => 0, 'baz' => 1}) + # d1 = REXML::Document.new(d) + # d1.children # => [] + # d1.context # => {:raw=>:all, :compress_whitespace=>:all} + # d1.attributes # => {"bar"=>bar='0', "baz"=>baz='1'} + # + # When argument +context+ is given, it must be a hash + # containing context entries for the document; + # see {Element Context}[../doc/rexml/context_rdoc.html]: + # + # context = {raw: :all, compress_whitespace: :all} + # d = REXML::Document.new(xml_string, context) + # d.context # => {:raw=>:all, :compress_whitespace=>:all} + # + # @return [Document] a new instance of Document + # + # source://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#170 + def <<(child); end + + # :call-seq: + # add(xml_decl) -> self + # add(doc_type) -> self + # add(object) -> self + # + # Adds an object to the document; returns +self+. + # + # When argument +xml_decl+ is given, + # it must be an REXML::XMLDecl object, + # which becomes the XML declaration for the document, + # replacing the previous XML declaration if any: + # + # d = REXML::Document.new + # d.xml_decl.to_s # => "" + # d.add(REXML::XMLDecl.new('2.0')) + # d.xml_decl.to_s # => "" + # + # When argument +doc_type+ is given, + # it must be an REXML::DocType object, + # which becomes the document type for the document, + # replacing the previous document type, if any: + # + # d = REXML::Document.new + # d.doctype.to_s # => "" + # d.add(REXML::DocType.new('foo')) + # d.doctype.to_s # => "" + # + # When argument +object+ (not an REXML::XMLDecl or REXML::DocType object) + # is given it is added as the last child: + # + # d = REXML::Document.new + # d.add(REXML::Element.new('foo')) + # d.to_s # => "" + # + # source://rexml//lib/rexml/document.rb#170 + def add(child); end + + # :call-seq: + # add_element(name_or_element = nil, attributes = nil) -> new_element + # + # Adds an element to the document by calling REXML::Element.add_element: + # + # REXML::Element.add_element(name_or_element, attributes) + # + # source://rexml//lib/rexml/document.rb#209 + def add_element(arg = T.unsafe(nil), arg2 = T.unsafe(nil)); end + + # :call-seq: + # clone -> new_document + # + # Returns the new document resulting from executing + # Document.new(self). See Document.new. + # + # source://rexml//lib/rexml/document.rb#120 + def clone; end + + # :call-seq: + # doctype -> doc_type or nil + # + # Returns the DocType object for the document, if it exists, otherwise +nil+: + # + # d = REXML::Document.new('') + # d.doctype.class # => REXML::DocType + # d = REXML::Document.new('') + # d.doctype.class # => nil + # + # source://rexml//lib/rexml/document.rb#241 + def doctype; end + + # source://rexml//lib/rexml/document.rb#442 + def document; end + + # :call-seq: + # encoding -> encoding_string + # + # Returns the XMLDecl encoding of the document, + # + # d = REXML::Document.new('') + # d.encoding # => "UTF-16" + # d = REXML::Document.new('') + # d.encoding # => "UTF-8" + # + # source://rexml//lib/rexml/document.rb#290 + def encoding; end + + # Returns the value of attribute entity_expansion_count. + # + # source://rexml//lib/rexml/document.rb#433 + def entity_expansion_count; end + + # :call-seq: + # expanded_name -> empty_string + # + # Returns an empty string. + # + # source://rexml//lib/rexml/document.rb#129 + 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#129 + def name; end + + # :call-seq: + # node_type -> :document + # + # Returns the symbol +:document+. + # + # source://rexml//lib/rexml/document.rb#110 + def node_type; end + + # source://rexml//lib/rexml/document.rb#435 + def record_entity_expansion; end + + # :call-seq: + # root -> root_element or nil + # + # Returns the root element of the document, if it exists, otherwise +nil+: + # + # d = REXML::Document.new('') + # d.root # => + # d = REXML::Document.new('') + # d.root # => nil + # + # source://rexml//lib/rexml/document.rb#225 + def root; end + + # :call-seq: + # stand_alone? + # + # Returns the XMLDecl standalone value of the document as a string, + # if it has been set, otherwise the default standalone value: + # + # d = REXML::Document.new('') + # d.stand_alone? # => "yes" + # d = REXML::Document.new('') + # d.stand_alone? # => nil + # + # @return [Boolean] + # + # source://rexml//lib/rexml/document.rb#305 + def stand_alone?; end + + # :call-seq: + # version -> version_string + # + # Returns the XMLDecl version of this document as a string, + # if it has been set, otherwise the default version: + # + # d = REXML::Document.new('') + # d.version # => "2.0" + # d = REXML::Document.new('') + # d.version # => "1.0" + # + # source://rexml//lib/rexml/document.rb#275 + 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}) + # + # Write the XML tree out, optionally with indent. This writes out the + # entire XML document, including XML declarations, doctype declarations, + # and processing instructions (if any are given). + # + # A controversial point is whether Document should always write the XML + # declaration () whether or not one is given by the + # user (or source document). REXML does not write one if one was not + # specified, because it adds unnecessary bandwidth to applications such + # as XML-RPC. + # + # Accept Nth argument style and options Hash style as argument. + # The recommended style is options Hash style for one or more + # arguments case. + # + # _Examples_ + # Document.new("").write + # + # output = "" + # Document.new("").write(output) + # + # output = "" + # Document.new("").write(:output => output, :indent => 2) + # + # See also the classes in the rexml/formatters package for the proper way + # to change the default formatting of XML output. + # + # _Examples_ + # + # output = "" + # tr = Transitive.new + # tr.write(Document.new(""), output) + # + # output:: + # output an object which supports '<< string'; this is where the + # document will be written. + # indent:: + # An integer. If -1, no indenting will be used; otherwise, the + # indentation will be twice this number of spaces, and children will be + # indented an additional amount. For a value of 3, every item will be + # indented 3 more levels, or 6 more spaces (2 * 3). Defaults to -1 + # transitive:: + # If transitive is true and indent is >= 0, then the output will be + # pretty-printed in such a way that the added whitespace does not affect + # the absolute *value* of the document -- that is, it leaves the value + # and number of Text nodes in the document unchanged. + # ie_hack:: + # This hack inserts a space before the /> on empty tags to address + # a limitation of Internet Explorer. Defaults to false + # Encoding name as String. Change output encoding to specified encoding + # instead of encoding in XML declaration. + # Defaults to nil. It means encoding in XML declaration is used. + # + # source://rexml//lib/rexml/document.rb#365 + def write(*arguments); end + + # :call-seq: + # xml_decl -> xml_decl + # + # Returns the XMLDecl object for the document, if it exists, + # otherwise the default XMLDecl object: + # + # d = REXML::Document.new('') + # d.xml_decl.class # => REXML::XMLDecl + # d.xml_decl.to_s # => "" + # d = REXML::Document.new('') + # d.xml_decl.class # => REXML::XMLDecl + # d.xml_decl.to_s # => "" + # + # source://rexml//lib/rexml/document.rb#258 + def xml_decl; end + + private + + # source://rexml//lib/rexml/document.rb#447 + def build(source); 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#415 + 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#408 + 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#429 + 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#422 + def entity_expansion_text_limit=(val); end + + # source://rexml//lib/rexml/document.rb#401 + def parse_stream(source, listener); end + end +end + +# An \REXML::Element object represents an XML element. +# +# An element: +# +# - Has a name (string). +# - May have a parent (another element). +# - Has zero or more children +# (other elements, text, CDATA, processing instructions, and comments). +# - Has zero or more siblings +# (other elements, text, CDATA, processing instructions, and comments). +# - Has zero or more named attributes. +# +# == In a Hurry? +# +# If you're somewhat familiar with XML +# and have a particular task in mind, +# you may want to see the +# {tasks pages}[../doc/rexml/tasks/tocs/master_toc_rdoc.html], +# and in particular, the +# {tasks page for elements}[../doc/rexml/tasks/tocs/element_toc_rdoc.html]. +# +# === Name +# +# An element has a name, which is initially set when the element is created: +# +# e = REXML::Element.new('foo') +# e.name # => "foo" +# +# The name may be changed: +# +# e.name = 'bar' +# e.name # => "bar" +# +# +# === \Parent +# +# An element may have a parent. +# +# Its parent may be assigned explicitly when the element is created: +# +# e0 = REXML::Element.new('foo') +# e1 = REXML::Element.new('bar', e0) +# e1.parent # => ... +# +# Note: the representation of an element always shows the element's name. +# If the element has children, the representation indicates that +# by including an ellipsis (...). +# +# The parent may be assigned explicitly at any time: +# +# e2 = REXML::Element.new('baz') +# e1.parent = e2 +# e1.parent # => +# +# When an element is added as a child, its parent is set automatically: +# +# e1.add_element(e0) +# e0.parent # => ... +# +# For an element that has no parent, method +parent+ returns +nil+. +# +# === Children +# +# An element has zero or more children. +# The children are an ordered collection +# of all objects whose parent is the element itself. +# +# The children may include any combination of elements, text, comments, +# processing instructions, and CDATA. +# (This example keeps things clean by controlling whitespace +# via a +context+ setting.) +# +# xml_string = <<-EOT +# +# +# text 0 +# +# +# +# +# text 1 +# +# +# +# +# EOT +# context = {ignore_whitespace_nodes: :all, compress_whitespace: :all} +# d = REXML::Document.new(xml_string, context) +# root = d.root +# root.children.size # => 10 +# root.each {|child| p "#{child.class}: #{child}" } +# +# Output: +# +# "REXML::Element: " +# "REXML::Text: \n text 0\n " +# "REXML::Comment: comment 0" +# "REXML::Instruction: " +# "REXML::CData: cdata 0" +# "REXML::Element: " +# "REXML::Text: \n text 1\n " +# "REXML::Comment: comment 1" +# "REXML::Instruction: " +# "REXML::CData: cdata 1" +# +# A child may be added using inherited methods +# Parent#insert_before or Parent#insert_after: +# +# xml_string = '' +# d = REXML::Document.new(xml_string) +# root = d.root +# c = d.root[1] # => +# root.insert_before(c, REXML::Element.new('b')) +# root.to_a # => [, , , ] +# +# A child may be replaced using Parent#replace_child: +# +# root.replace_child(c, REXML::Element.new('x')) +# root.to_a # => [, , , ] +# +# A child may be removed using Parent#delete: +# +# x = root[2] # => +# root.delete(x) +# root.to_a # => [, , ] +# +# === Siblings +# +# An element has zero or more siblings, +# which are the other children of the element's parent. +# +# In the example above, element +ele_1+ is between a CDATA sibling +# and a text sibling: +# +# ele_1 = root[5] # => +# ele_1.previous_sibling # => "cdata 0" +# ele_1.next_sibling # => "\n text 1\n " +# +# === \Attributes +# +# An element has zero or more named attributes. +# +# A new element has no attributes: +# +# e = REXML::Element.new('foo') +# e.attributes # => {} +# +# Attributes may be added: +# +# e.add_attribute('bar', 'baz') +# e.add_attribute('bat', 'bam') +# e.attributes.size # => 2 +# e['bar'] # => "baz" +# e['bat'] # => "bam" +# +# An existing attribute may be modified: +# +# e.add_attribute('bar', 'bad') +# e.attributes.size # => 2 +# e['bar'] # => "bad" +# +# An existing attribute may be deleted: +# +# e.delete_attribute('bar') +# e.attributes.size # => 1 +# e['bar'] # => nil +# +# == What's Here +# +# To begin with, what's elsewhere? +# +# \Class \REXML::Element inherits from its ancestor classes: +# +# - REXML::Child +# - REXML::Parent +# +# \REXML::Element itself and its ancestors also include modules: +# +# - {Enumerable}[https://docs.ruby-lang.org/en/master/Enumerable.html] +# - REXML::Namespace +# - REXML::Node +# - REXML::XMLTokens +# +# === Methods for Creating an \Element +# +# ::new:: Returns a new empty element. +# #clone:: Returns a clone of another element. +# +# === Methods for Attributes +# +# {[attribute_name]}[#method-i-5B-5D]:: Returns an attribute value. +# #add_attribute:: Adds a new attribute. +# #add_attributes:: Adds multiple new attributes. +# #attribute:: Returns the attribute value for a given name and optional namespace. +# #delete_attribute:: Removes an attribute. +# +# === Methods for Children +# +# {[index]}[#method-i-5B-5D]:: Returns the child at the given offset. +# #add_element:: Adds an element as the last child. +# #delete_element:: Deletes a child element. +# #each_element:: Calls the given block with each child element. +# #each_element_with_attribute:: Calls the given block with each child element +# that meets given criteria, +# which can include the attribute name. +# #each_element_with_text:: Calls the given block with each child element +# that meets given criteria, +# which can include text. +# #get_elements:: Returns an array of element children that match a given xpath. +# +# === Methods for \Text Children +# +# #add_text:: Adds a text node to the element. +# #get_text:: Returns a text node that meets specified criteria. +# #text:: Returns the text string from the first node that meets specified criteria. +# #texts:: Returns an array of the text children of the element. +# #text=:: Adds, removes, or replaces the first text child of the element +# +# === Methods for Other Children +# +# #cdatas:: Returns an array of the cdata children of the element. +# #comments:: Returns an array of the comment children of the element. +# #instructions:: Returns an array of the instruction children of the element. +# +# === Methods for Namespaces +# +# #add_namespace:: Adds a namespace to the element. +# #delete_namespace:: Removes a namespace from the element. +# #namespace:: Returns the string namespace URI for the element. +# #namespaces:: Returns a hash of all defined namespaces in the element. +# #prefixes:: Returns an array of the string prefixes (names) +# of all defined namespaces in the element +# +# === Methods for Querying +# +# #document:: Returns the document, if any, that the element belongs to. +# #root:: Returns the most distant element (not document) ancestor of the element. +# #root_node:: Returns the most distant ancestor of the element. +# #xpath:: Returns the string xpath to the element +# relative to the most distant parent +# #has_attributes?:: Returns whether the element has attributes. +# #has_elements?:: Returns whether the element has elements. +# #has_text?:: Returns whether the element has text. +# #next_element:: Returns the next sibling that is an element. +# #previous_element:: Returns the previous sibling that is an element. +# #raw:: Returns whether raw mode is set for the element. +# #whitespace:: Returns whether whitespace is respected for the element. +# #ignore_whitespace_nodes:: Returns whether whitespace nodes +# are to be ignored for the element. +# #node_type:: Returns symbol :element. +# +# === One More Method +# +# #inspect:: Returns a string representation of the element. +# +# === Accessors +# +# #elements:: Returns the REXML::Elements object for the element. +# #attributes:: Returns the REXML::Attributes object for the element. +# #context:: Returns or sets the context hash for the element. +# +# source://rexml//lib/rexml/element.rb#279 +class REXML::Element < ::REXML::Parent + include ::REXML::XMLTokens + include ::REXML::Namespace + + # :call-seq: + # Element.new(name = 'UNDEFINED', parent = nil, context = nil) -> new_element + # Element.new(element, parent = nil, context = nil) -> new_element + # + # Returns a new \REXML::Element object. + # + # When no arguments are given, + # returns an element with name 'UNDEFINED': + # + # e = REXML::Element.new # => + # e.class # => REXML::Element + # e.name # => "UNDEFINED" + # + # When only argument +name+ is given, + # returns an element of the given name: + # + # REXML::Element.new('foo') # => + # + # When only argument +element+ is given, it must be an \REXML::Element object; + # returns a shallow copy of the given element: + # + # e0 = REXML::Element.new('foo') + # e1 = REXML::Element.new(e0) # => + # + # When argument +parent+ is also given, it must be an REXML::Parent object: + # + # e = REXML::Element.new('foo', REXML::Parent.new) + # e.parent # => #]> + # + # When argument +context+ is also given, it must be a hash + # representing the context for the element; + # see {Element Context}[../doc/rexml/context_rdoc.html]: + # + # e = REXML::Element.new('foo', nil, {raw: :all}) + # e.context # => {:raw=>:all} + # + # @return [Element] a new instance of Element + # + # source://rexml//lib/rexml/element.rb#327 + def initialize(arg = T.unsafe(nil), parent = T.unsafe(nil), context = T.unsafe(nil)); end + + # :call-seq: + # [index] -> object + # [attr_name] -> attr_value + # [attr_sym] -> attr_value + # + # With integer argument +index+ given, + # returns the child at offset +index+, or +nil+ if none: + # + # d = REXML::Document.new '>textmore' + # root = d.root + # (0..root.size).each do |index| + # node = root[index] + # p "#{index}: #{node} (#{node.class})" + # end + # + # Output: + # + # "0: (REXML::Element)" + # "1: text (REXML::Text)" + # "2: (REXML::Element)" + # "3: more (REXML::Text)" + # "4: (REXML::Element)" + # "5: (NilClass)" + # + # With string argument +attr_name+ given, + # returns the string value for the given attribute name if it exists, + # otherwise +nil+: + # + # d = REXML::Document.new('') + # root = d.root + # root['attr'] # => "value" + # root['nosuch'] # => nil + # + # With symbol argument +attr_sym+ given, + # returns [attr_sym.to_s]: + # + # root[:attr] # => "value" + # root[:nosuch] # => nil + # + # source://rexml//lib/rexml/element.rb#1245 + def [](name_or_index); end + + # :call-seq: + # add_attribute(name, value) -> value + # add_attribute(attribute) -> attribute + # + # Adds an attribute to this element, overwriting any existing attribute + # by the same name. + # + # With string argument +name+ and object +value+ are given, + # adds the attribute created with that name and value: + # + # e = REXML::Element.new + # e.add_attribute('attr', 'value') # => "value" + # e['attr'] # => "value" + # e.add_attribute('attr', 'VALUE') # => "VALUE" + # e['attr'] # => "VALUE" + # + # With only attribute object +attribute+ given, + # adds the given attribute: + # + # a = REXML::Attribute.new('attr', 'value') + # e.add_attribute(a) # => attr='value' + # e['attr'] # => "value" + # a = REXML::Attribute.new('attr', 'VALUE') + # e.add_attribute(a) # => attr='VALUE' + # e['attr'] # => "VALUE" + # + # source://rexml//lib/rexml/element.rb#1349 + def add_attribute(key, value = T.unsafe(nil)); end + + # :call-seq: + # add_attributes(hash) -> hash + # add_attributes(array) + # + # Adds zero or more attributes to the element; + # returns the argument. + # + # If hash argument +hash+ is given, + # each key must be a string; + # adds each attribute created with the key/value pair: + # + # e = REXML::Element.new + # h = {'foo' => 'bar', 'baz' => 'bat'} + # e.add_attributes(h) + # + # If argument +array+ is given, + # each array member must be a 2-element array [name, value]; + # each name must be a string: + # + # e = REXML::Element.new + # a = [['foo' => 'bar'], ['baz' => 'bat']] + # e.add_attributes(a) + # + # source://rexml//lib/rexml/element.rb#1380 + def add_attributes(hash); end + + # :call-seq: + # add_element(name, attributes = nil) -> new_element + # add_element(element, attributes = nil) -> element + # + # Adds a child element, optionally setting attributes + # on the added element; returns the added element. + # + # With string argument +name+, creates a new element with that name + # and adds the new element as a child: + # + # e0 = REXML::Element.new('foo') + # e0.add_element('bar') + # e0[0] # => + # + # + # With argument +name+ and hash argument +attributes+, + # sets attributes on the new element: + # + # e0.add_element('baz', {'bat' => '0', 'bam' => '1'}) + # e0[1] # => + # + # With element argument +element+, adds that element as a child: + # + # e0 = REXML::Element.new('foo') + # e1 = REXML::Element.new('bar') + # e0.add_element(e1) + # e0[0] # => + # + # With argument +element+ and hash argument +attributes+, + # sets attributes on the added element: + # + # e0.add_element(e1, {'bat' => '0', 'bam' => '1'}) + # e0[1] # => + # + # source://rexml//lib/rexml/element.rb#731 + def add_element(element, attrs = T.unsafe(nil)); end + + # :call-seq: + # add_namespace(prefix, uri = nil) -> self + # + # Adds a namespace to the element; returns +self+. + # + # With the single argument +prefix+, + # adds a namespace using the given +prefix+ and the namespace URI: + # + # e = REXML::Element.new('foo') + # e.add_namespace('bar') + # e.namespaces # => {"xmlns"=>"bar"} + # + # With both arguments +prefix+ and +uri+ given, + # adds a namespace using both arguments: + # + # e.add_namespace('baz', 'bat') + # e.namespaces # => {"xmlns"=>"bar", "baz"=>"bat"} + # + # source://rexml//lib/rexml/element.rb#654 + def add_namespace(prefix, uri = T.unsafe(nil)); end + + # :call-seq: + # add_text(string) -> nil + # add_text(text_node) -> self + # + # Adds text to the element. + # + # When string argument +string+ is given, returns +nil+. + # + # If the element has no child text node, + # creates a \REXML::Text object using the string, + # honoring the current settings for whitespace and raw, + # then adds that node to the element: + # + # d = REXML::Document.new('') + # a = d.root + # a.add_text('foo') + # a.to_a # => [, "foo"] + # + # If the element has child text nodes, + # appends the string to the _last_ text node: + # + # d = REXML::Document.new('foobar') + # a = d.root + # a.add_text('baz') + # a.to_a # => ["foo", , "barbaz"] + # a.add_text('baz') + # a.to_a # => ["foo", , "barbazbaz"] + # + # When text node argument +text_node+ is given, + # appends the node as the last text node in the element; + # returns +self+: + # + # d = REXML::Document.new('foobar') + # a = d.root + # a.add_text(REXML::Text.new('baz')) + # a.to_a # => ["foo", , "bar", "baz"] + # a.add_text(REXML::Text.new('baz')) + # a.to_a # => ["foo", , "bar", "baz", "baz"] + # + # source://rexml//lib/rexml/element.rb#1146 + def add_text(text); end + + # :call-seq: + # attribute(name, namespace = nil) + # + # Returns the string value for the given attribute name. + # + # With only argument +name+ given, + # returns the value of the named attribute if it exists, otherwise +nil+: + # + # xml_string = <<-EOT + # + # + # + # + # + # EOT + # d = REXML::Document.new(xml_string) + # root = d.root + # a = root[1] # => + # a.attribute('attr') # => attr='value' + # a.attribute('nope') # => nil + # + # With arguments +name+ and +namespace+ given, + # returns the value of the named attribute if it exists, otherwise +nil+: + # + # xml_string = "" + # document = REXML::Document.new(xml_string) + # document.root.attribute("x") # => x='x' + # document.root.attribute("x", "a") # => a:x='a:x' + # + # source://rexml//lib/rexml/element.rb#1286 + def attribute(name, namespace = T.unsafe(nil)); end + + # Mechanisms for accessing attributes and child elements of this + # element. + # + # source://rexml//lib/rexml/element.rb#286 + def attributes; end + + # :call-seq: + # cdatas -> array_of_cdata_children + # + # Returns a frozen array of the REXML::CData children of the element: + # + # xml_string = <<-EOT + # + # + # + # + # EOT + # d = REXML::Document.new(xml_string) + # cds = d.root.cdatas # => ["foo", "bar"] + # cds.frozen? # => true + # cds.map {|cd| cd.class } # => [REXML::CData, REXML::CData] + # + # source://rexml//lib/rexml/element.rb#1424 + def cdatas; end + + # :call-seq: + # clone -> new_element + # + # Returns a shallow copy of the element, containing the name and attributes, + # but not the parent or children: + # + # e = REXML::Element.new('foo') + # e.add_attributes({'bar' => 0, 'baz' => 1}) + # e.clone # => + # + # source://rexml//lib/rexml/element.rb#391 + def clone; end + + # :call-seq: + # comments -> array_of_comment_children + # + # Returns a frozen array of the REXML::Comment children of the element: + # + # xml_string = <<-EOT + # + # + # + # + # EOT + # d = REXML::Document.new(xml_string) + # cs = d.root.comments + # cs.frozen? # => true + # cs.map {|c| c.class } # => [REXML::Comment, REXML::Comment] + # cs.map {|c| c.to_s } # => ["foo", "bar"] + # + # source://rexml//lib/rexml/element.rb#1445 + def comments; end + + # The context holds information about the processing environment, such as + # whitespace handling. + # + # source://rexml//lib/rexml/element.rb#289 + def context; end + + # The context holds information about the processing environment, such as + # whitespace handling. + # + # source://rexml//lib/rexml/element.rb#289 + def context=(_arg0); end + + # :call-seq: + # delete_attribute(name) -> removed_attribute or nil + # + # Removes a named attribute if it exists; + # returns the removed attribute if found, otherwise +nil+: + # + # e = REXML::Element.new('foo') + # e.add_attribute('bar', 'baz') + # e.delete_attribute('bar') # => + # e.delete_attribute('bar') # => nil + # + # source://rexml//lib/rexml/element.rb#1399 + def delete_attribute(key); end + + # :call-seq: + # delete_element(index) -> removed_element or nil + # delete_element(element) -> removed_element or nil + # delete_element(xpath) -> removed_element or nil + # + # Deletes a child element. + # + # When 1-based integer argument +index+ is given, + # removes and returns the child element at that offset if it exists; + # indexing does not include text nodes; + # returns +nil+ if the element does not exist: + # + # d = REXML::Document.new 'text' + # a = d.root # => ... + # a.delete_element(1) # => + # a.delete_element(1) # => + # a.delete_element(1) # => nil + # + # When element argument +element+ is given, + # removes and returns that child element if it exists, + # otherwise returns +nil+: + # + # d = REXML::Document.new 'text' + # a = d.root # => ... + # c = a[2] # => + # a.delete_element(c) # => + # a.delete_element(c) # => nil + # + # When xpath argument +xpath+ is given, + # removes and returns the element at xpath if it exists, + # otherwise returns +nil+: + # + # d = REXML::Document.new 'text' + # a = d.root # => ... + # a.delete_element('//c') # => + # a.delete_element('//c') # => nil + # + # source://rexml//lib/rexml/element.rb#777 + def delete_element(element); end + + # :call-seq: + # delete_namespace(namespace = 'xmlns') -> self + # + # Removes a namespace from the element. + # + # With no argument, removes the default namespace: + # + # d = REXML::Document.new "" + # d.to_s # => "" + # d.root.delete_namespace # => + # d.to_s # => "" + # + # With argument +namespace+, removes the specified namespace: + # + # d.root.delete_namespace('foo') + # d.to_s # => "" + # + # Does nothing if no such namespace is found: + # + # d.root.delete_namespace('nosuch') + # d.to_s # => "" + # + # source://rexml//lib/rexml/element.rb#686 + def delete_namespace(namespace = T.unsafe(nil)); end + + # :call-seq: + # document -> document or nil + # + # If the element is part of a document, returns that document: + # + # d = REXML::Document.new('') + # top_element = d.first + # child = top_element.first + # top_element.document == d # => true + # child.document == d # => true + # + # If the element is not part of a document, returns +nil+: + # + # REXML::Element.new.document # => nil + # + # For a document, returns +self+: + # + # d.document == d # => true + # + # Related: #root, #root_node. + # + # source://rexml//lib/rexml/element.rb#478 + def document; end + + # :call-seq: + # each_element {|e| ... } + # + # Calls the given block with each child element: + # + # d = REXML::Document.new 'bbd' + # a = d.root + # a.each_element {|e| p e } + # + # Output: + # + # ... + # ... + # ... + # + # + # source://rexml//lib/rexml/element.rb#929 + def each_element(xpath = T.unsafe(nil), &block); end + + # :call-seq: + # each_element_with_attribute(attr_name, value = nil, max = 0, xpath = nil) {|e| ... } + # + # Calls the given block with each child element that meets given criteria. + # + # When only string argument +attr_name+ is given, + # calls the block with each child element that has that attribute: + # + # d = REXML::Document.new '' + # a = d.root + # a.each_element_with_attribute('id') {|e| p e } + # + # Output: + # + # + # + # + # + # With argument +attr_name+ and string argument +value+ given, + # calls the block with each child element that has that attribute + # with that value: + # + # a.each_element_with_attribute('id', '1') {|e| p e } + # + # Output: + # + # + # + # + # With arguments +attr_name+, +value+, and integer argument +max+ given, + # calls the block with at most +max+ child elements: + # + # a.each_element_with_attribute('id', '1', 1) {|e| p e } + # + # Output: + # + # + # + # With all arguments given, including +xpath+, + # calls the block with only those child elements + # that meet the first three criteria, + # and also match the given +xpath+: + # + # a.each_element_with_attribute('id', '1', 2, '//d') {|e| p e } + # + # Output: + # + # + # + # source://rexml//lib/rexml/element.rb#846 + def each_element_with_attribute(key, value = T.unsafe(nil), max = T.unsafe(nil), name = T.unsafe(nil), &block); end + + # :call-seq: + # each_element_with_text(text = nil, max = 0, xpath = nil) {|e| ... } + # + # Calls the given block with each child element that meets given criteria. + # + # With no arguments, calls the block with each child element that has text: + # + # d = REXML::Document.new 'bbd' + # a = d.root + # a.each_element_with_text {|e| p e } + # + # Output: + # + # ... + # ... + # ... + # + # With the single string argument +text+, + # calls the block with each element that has exactly that text: + # + # a.each_element_with_text('b') {|e| p e } + # + # Output: + # + # ... + # ... + # + # With argument +text+ and integer argument +max+, + # calls the block with at most +max+ elements: + # + # a.each_element_with_text('b', 1) {|e| p e } + # + # Output: + # + # ... + # + # With all arguments given, including +xpath+, + # calls the block with only those child elements + # that meet the first two criteria, + # and also match the given +xpath+: + # + # a.each_element_with_text('b', 2, '//c') {|e| p e } + # + # Output: + # + # ... + # + # source://rexml//lib/rexml/element.rb#903 + 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#286 + def elements; end + + # :call-seq: + # get_elements(xpath) + # + # Returns an array of the elements that match the given +xpath+: + # + # xml_string = <<-EOT + # + # + # + # + # + # EOT + # d = REXML::Document.new(xml_string) + # d.root.get_elements('//a') # => [ ... , ] + # + # source://rexml//lib/rexml/element.rb#948 + def get_elements(xpath); end + + # :call-seq: + # get_text(xpath = nil) -> text_node or nil + # + # Returns the first text node child in a specified element, if it exists, + # +nil+ otherwise. + # + # With no argument, returns the first text node from +self+: + # + # d = REXML::Document.new "

some text this is bold! more text

" + # d.root.get_text.class # => REXML::Text + # d.root.get_text # => "some text " + # + # With argument +xpath+, returns the first text node from the element + # that matches +xpath+: + # + # d.root.get_text(1) # => "this is bold!" + # + # source://rexml//lib/rexml/element.rb#1052 + def get_text(path = T.unsafe(nil)); end + + # :call-seq: + # has_attributes? -> true or false + # + # Returns +true+ if the element has attributes, +false+ otherwise: + # + # d = REXML::Document.new('
') + # a, b = *d.root + # a.has_attributes? # => true + # b.has_attributes? # => false + # + # @return [Boolean] + # + # source://rexml//lib/rexml/element.rb#1319 + def has_attributes?; end + + # :call-seq: + # has_elements? + # + # Returns +true+ if the element has one or more element children, + # +false+ otherwise: + # + # d = REXML::Document.new 'text' + # a = d.root # => ... + # a.has_elements? # => true + # b = a[0] # => + # b.has_elements? # => false + # + # @return [Boolean] + # + # source://rexml//lib/rexml/element.rb#793 + def has_elements?; end + + # :call-seq: + # has_text? -> true or false + # + # Returns +true if the element has one or more text noded, + # +false+ otherwise: + # + # d = REXML::Document.new 'text' + # a = d.root + # a.has_text? # => true + # b = a[0] + # b.has_text? # => false + # + # @return [Boolean] + # + # source://rexml//lib/rexml/element.rb#1001 + def has_text?; end + + # :call-seq: + # ignore_whitespace_nodes + # + # Returns +true+ if whitespace nodes are ignored for the element. + # + # See {Element Context}[../doc/rexml/context_rdoc.html]. + # + # source://rexml//lib/rexml/element.rb#516 + def ignore_whitespace_nodes; end + + # :call-seq: + # inspect -> string + # + # Returns a string representation of the element. + # + # For an element with no attributes and no children, shows the element name: + # + # REXML::Element.new.inspect # => "" + # + # Shows attributes, if any: + # + # e = REXML::Element.new('foo') + # e.add_attributes({'bar' => 0, 'baz' => 1}) + # e.inspect # => "" + # + # Shows an ellipsis (...), if there are child elements: + # + # e.add_element(REXML::Element.new('bar')) + # e.add_element(REXML::Element.new('baz')) + # e.inspect # => " ... " + # + # source://rexml//lib/rexml/element.rb#366 + def inspect; end + + # :call-seq: + # instructions -> array_of_instruction_children + # + # Returns a frozen array of the REXML::Instruction children of the element: + # + # xml_string = <<-EOT + # + # + # + # + # EOT + # d = REXML::Document.new(xml_string) + # is = d.root.instructions + # is.frozen? # => true + # is.map {|i| i.class } # => [REXML::Instruction, REXML::Instruction] + # is.map {|i| i.to_s } # => ["", ""] + # + # source://rexml//lib/rexml/element.rb#1466 + def instructions; end + + # :call-seq: + # namespace(prefix = nil) -> string_uri or nil + # + # Returns the string namespace URI for the element, + # possibly deriving from one of its ancestors. + # + # xml_string = <<-EOT + # + # + # + # + # + # + # EOT + # d = REXML::Document.new(xml_string) + # b = d.elements['//b'] + # b.namespace # => "1" + # b.namespace('y') # => "2" + # b.namespace('nosuch') # => nil + # + # source://rexml//lib/rexml/element.rb#621 + def namespace(prefix = T.unsafe(nil)); end + + # :call-seq: + # namespaces -> array_of_namespace_names + # + # Returns a hash of all defined namespaces + # in the element and its ancestors: + # + # xml_string = <<-EOT + # + # + # + # + # + # + # EOT + # d = REXML::Document.new(xml_string) + # d.elements['//a'].namespaces # => {"x"=>"1", "y"=>"2"} + # d.elements['//b'].namespaces # => {"x"=>"1", "y"=>"2"} + # d.elements['//c'].namespaces # => {"x"=>"1", "y"=>"2", "z"=>"3"} + # + # source://rexml//lib/rexml/element.rb#594 + def namespaces; end + + # :call-seq: + # next_element + # + # Returns the next sibling that is an element if it exists, + # +niL+ otherwise: + # + # d = REXML::Document.new 'text' + # d.root.elements['b'].next_element #-> + # d.root.elements['c'].next_element #-> nil + # + # source://rexml//lib/rexml/element.rb#962 + def next_element; end + + # :call-seq: + # node_type -> :element + # + # Returns symbol :element: + # + # d = REXML::Document.new('') + # a = d.root # => + # a.node_type # => :element + # + # source://rexml//lib/rexml/element.rb#1167 + def node_type; end + + # :call-seq: + # prefixes -> array_of_namespace_prefixes + # + # Returns an array of the string prefixes (names) of all defined namespaces + # in the element and its ancestors: + # + # xml_string = <<-EOT + # + # + # + # + # + # + # EOT + # d = REXML::Document.new(xml_string, {compress_whitespace: :all}) + # d.elements['//a'].prefixes # => ["x", "y"] + # d.elements['//b'].prefixes # => ["x", "y"] + # d.elements['//c'].prefixes # => ["x", "y", "z"] + # + # source://rexml//lib/rexml/element.rb#568 + def prefixes; end + + # :call-seq: + # previous_element + # + # Returns the previous sibling that is an element if it exists, + # +niL+ otherwise: + # + # d = REXML::Document.new 'text' + # d.root.elements['c'].previous_element #-> + # d.root.elements['b'].previous_element #-> nil + # + # source://rexml//lib/rexml/element.rb#978 + def previous_element; end + + # :call-seq: + # raw + # + # Returns +true+ if raw mode is set for the element. + # + # See {Element Context}[../doc/rexml/context_rdoc.html]. + # + # The evaluation is tested against +expanded_name+, and so is namespace + # sensitive. + # + # source://rexml//lib/rexml/element.rb#536 + def raw; end + + # :call-seq: + # root -> element + # + # Returns the most distant _element_ (not document) ancestor of the element: + # + # d = REXML::Document.new('') + # top_element = d.first + # child = top_element.first + # top_element.root == top_element # => true + # child.root == top_element # => true + # + # For a document, returns the topmost element: + # + # d.root == top_element # => true + # + # Related: #root_node, #document. + # + # source://rexml//lib/rexml/element.rb#451 + def root; end + + # :call-seq: + # root_node -> document or element + # + # Returns the most distant ancestor of +self+. + # + # When the element is part of a document, + # returns the root node of the document. + # Note that the root node is different from the document element; + # in this example +a+ is document element and the root node is its parent: + # + # d = REXML::Document.new('') + # top_element = d.first # => ... + # child = top_element.first # => ... + # d.root_node == d # => true + # top_element.root_node == d # => true + # child.root_node == d # => true + # + # When the element is not part of a document, but does have ancestor elements, + # returns the most distant ancestor element: + # + # e0 = REXML::Element.new('foo') + # e1 = REXML::Element.new('bar') + # e1.parent = e0 + # e2 = REXML::Element.new('baz') + # e2.parent = e1 + # e2.root_node == e0 # => true + # + # When the element has no ancestor elements, + # returns +self+: + # + # e = REXML::Element.new('foo') + # e.root_node == e # => true + # + # Related: #root, #document. + # + # source://rexml//lib/rexml/element.rb#430 + def root_node; end + + # :call-seq: + # text(xpath = nil) -> text_string or nil + # + # Returns the text string from the first text node child + # in a specified element, if it exists, # +nil+ otherwise. + # + # With no argument, returns the text from the first text node in +self+: + # + # d = REXML::Document.new "

some text this is bold! more text

" + # d.root.text.class # => String + # d.root.text # => "some text " + # + # With argument +xpath+, returns text from the the first text node + # in the element that matches +xpath+: + # + # d.root.text(1) # => "this is bold!" + # + # Note that an element may have multiple text nodes, + # possibly separated by other non-text children, as above. + # Even so, the returned value is the string text from the first such node. + # + # Note also that the text note is retrieved by method get_text, + # and so is always normalized text. + # + # source://rexml//lib/rexml/element.rb#1029 + def text(path = T.unsafe(nil)); end + + # :call-seq: + # text = string -> string + # text = nil -> nil + # + # Adds, replaces, or removes the first text node child in the element. + # + # With string argument +string+, + # creates a new \REXML::Text node containing that string, + # honoring the current settings for whitespace and row, + # then places the node as the first text child in the element; + # returns +string+. + # + # If the element has no text child, the text node is added: + # + # d = REXML::Document.new '
' + # d.root.text = 'foo' #-> 'foo' + # + # If the element has a text child, it is replaced: + # + # d.root.text = 'bar' #-> 'bar' + # + # With argument +nil+, removes the first text child: + # + # d.root.text = nil #-> '' + # + # source://rexml//lib/rexml/element.rb#1088 + def text=(text); end + + # :call-seq: + # texts -> array_of_text_children + # + # Returns a frozen array of the REXML::Text children of the element: + # + # xml_string = 'textmore' + # d = REXML::Document.new(xml_string) + # ts = d.root.texts + # ts.frozen? # => true + # ts.map {|t| t.class } # => [REXML::Text, REXML::Text] + # ts.map {|t| t.to_s } # => ["text", "more"] + # + # source://rexml//lib/rexml/element.rb#1482 + def texts; end + + # :call-seq: + # whitespace + # + # Returns +true+ if whitespace is respected for this element, + # +false+ otherwise. + # + # See {Element Context}[../doc/rexml/context_rdoc.html]. + # + # The evaluation is tested against the element's +expanded_name+, + # and so is namespace-sensitive. + # + # source://rexml//lib/rexml/element.rb#493 + def whitespace; end + + # == DEPRECATED + # See REXML::Formatters + # + # Writes out this element, and recursively, all children. + # output:: + # output an object which supports '<< string'; this is where the + # document will be written. + # indent:: + # An integer. If -1, no indenting will be used; otherwise, the + # indentation will be this number of spaces, and children will be + # indented an additional amount. Defaults to -1 + # transitive:: + # If transitive is true and indent is >= 0, then the output will be + # pretty-printed in such a way that the added whitespace does not affect + # the parse tree of the document + # ie_hack:: + # This hack inserts a space before the /> on empty tags to address + # a limitation of Internet Explorer. Defaults to false + # + # out = '' + # doc.write( out ) #-> doc is written to the string 'out' + # doc.write( $stdout ) #-> doc written to the console + # + # source://rexml//lib/rexml/element.rb#1508 + def write(output = T.unsafe(nil), indent = T.unsafe(nil), transitive = T.unsafe(nil), ie_hack = T.unsafe(nil)); end + + # :call-seq: + # xpath -> string_xpath + # + # Returns the string xpath to the element + # relative to the most distant parent: + # + # d = REXML::Document.new('') + # a = d.root # => ... + # b = a[0] # => ... + # c = b[0] # => + # d.xpath # => "" + # a.xpath # => "/a" + # b.xpath # => "/a/b" + # c.xpath # => "/a/b/c" + # + # If there is no parent, returns the expanded name of the element: + # + # e = REXML::Element.new('foo') + # e.xpath # => "foo" + # + # source://rexml//lib/rexml/element.rb#1191 + def xpath; end + + private + + # source://rexml//lib/rexml/element.rb#1525 + def __to_xpath_helper(node); end + + # A private helper method + # + # source://rexml//lib/rexml/element.rb#1540 + def each_with_something(test, max = T.unsafe(nil), name = T.unsafe(nil)); end +end + +# source://rexml//lib/rexml/doctype.rb#261 +class REXML::ElementDecl < ::REXML::Declaration + # @return [ElementDecl] a new instance of ElementDecl + # + # source://rexml//lib/rexml/doctype.rb#262 + def initialize(src); end +end + +# A class which provides filtering of children for Elements, and +# XPath search support. You are expected to only encounter this class as +# the element.elements object. Therefore, you are +# _not_ expected to instantiate this yourself. +# +# xml_string = <<-EOT +# +# +# +# Everyday Italian +# Giada De Laurentiis +# 2005 +# 30.00 +# +# +# Harry Potter +# J K. Rowling +# 2005 +# 29.99 +# +# +# XQuery Kick Start +# James McGovern +# Per Bothner +# Kurt Cagle +# James Linn +# Vaidyanathan Nagarajan +# 2003 +# 49.99 +# +# +# Learning XML +# Erik T. Ray +# 2003 +# 39.95 +# +# +# EOT +# d = REXML::Document.new(xml_string) +# elements = d.root.elements +# elements # => # ... > +# +# source://rexml//lib/rexml/element.rb#1595 +class REXML::Elements + include ::Enumerable + + # :call-seq: + # new(parent) -> new_elements_object + # + # Returns a new \Elements object with the given +parent+. + # Does _not_ assign parent.elements = self: + # + # d = REXML::Document.new(xml_string) + # eles = REXML::Elements.new(d.root) + # eles # => # ... > + # eles == d.root.elements # => false + # + # @return [Elements] a new instance of Elements + # + # source://rexml//lib/rexml/element.rb#1608 + 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#1925 + def <<(element = T.unsafe(nil)); end + + # :call-seq: + # elements[index] -> element or nil + # elements[xpath] -> element or nil + # elements[n, name] -> element or nil + # + # Returns the first \Element object selected by the arguments, + # if any found, or +nil+ if none found. + # + # Notes: + # - The +index+ is 1-based, not 0-based, so that: + # - The first element has index 1 + # - The _nth_ element has index +n+. + # - The selection ignores non-\Element nodes. + # + # When the single argument +index+ is given, + # returns the element given by the index, if any; otherwise, +nil+: + # + # d = REXML::Document.new(xml_string) + # eles = d.root.elements + # eles # => # ... > + # eles[1] # => ... + # eles.size # => 4 + # eles[4] # => ... + # eles[5] # => nil + # + # The node at this index is not an \Element, and so is not returned: + # + # eles = d.root.first.first # => ... </> + # eles.to_a # => ["Everyday Italian"] + # eles[1] # => nil + # + # When the single argument +xpath+ is given, + # returns the first element found via that +xpath+, if any; otherwise, +nil+: + # + # eles = d.root.elements # => #<REXML::Elements @element=<bookstore> ... </>> + # eles['/bookstore'] # => <bookstore> ... </> + # eles['//book'] # => <book category='cooking'> ... </> + # eles['//book [@category="children"]'] # => <book category='children'> ... </> + # eles['/nosuch'] # => nil + # eles['//nosuch'] # => nil + # eles['//book [@category="nosuch"]'] # => nil + # eles['.'] # => <bookstore> ... </> + # eles['..'].class # => REXML::Document + # + # With arguments +n+ and +name+ given, + # returns the _nth_ found element that has the given +name+, + # or +nil+ if there is no such _nth_ element: + # + # eles = d.root.elements # => #<REXML::Elements @element=<bookstore> ... </>> + # eles[1, 'book'] # => <book category='cooking'> ... </> + # eles[4, 'book'] # => <book category='web' cover='paperback'> ... </> + # eles[5, 'book'] # => nil + # + # source://rexml//lib/rexml/element.rb#1680 + def [](index, name = T.unsafe(nil)); end + + # :call-seq: + # elements[] = index, replacement_element -> replacement_element or nil + # + # Replaces or adds an element. + # + # When <tt>eles[index]</tt> exists, replaces it with +replacement_element+ + # and returns +replacement_element+: + # + # d = REXML::Document.new(xml_string) + # eles = d.root.elements # => #<REXML::Elements @element=<bookstore> ... </>> + # eles[1] # => <book category='cooking'> ... </> + # eles[1] = REXML::Element.new('foo') + # eles[1] # => <foo/> + # + # Does nothing (or raises an exception) + # if +replacement_element+ is not an \Element: + # eles[2] # => <book category='web' cover='paperback'> ... </> + # eles[2] = REXML::Text.new('bar') + # eles[2] # => <book category='web' cover='paperback'> ... </> + # + # When <tt>eles[index]</tt> does not exist, + # adds +replacement_element+ to the element and returns + # + # d = REXML::Document.new(xml_string) + # eles = d.root.elements # => #<REXML::Elements @element=<bookstore> ... </>> + # eles.size # => 4 + # eles[50] = REXML::Element.new('foo') # => <foo/> + # eles.size # => 5 + # eles[5] # => <foo/> + # + # Does nothing (or raises an exception) + # if +replacement_element+ is not an \Element: + # + # eles[50] = REXML::Text.new('bar') # => "bar" + # eles.size # => 5 + # + # source://rexml//lib/rexml/element.rb#1735 + def []=(index, element); end + + # :call-seq: + # add -> new_element + # add(name) -> new_element + # add(element) -> element + # + # Adds an element; returns the element added. + # + # With no argument, creates and adds a new element. + # The new element has: + # + # - No name. + # - \Parent from the \Elements object. + # - Context from the that parent. + # + # Example: + # + # d = REXML::Document.new(xml_string) + # elements = d.root.elements + # parent = elements.parent # => <bookstore> ... </> + # parent.context = {raw: :all} + # elements.size # => 4 + # new_element = elements.add # => </> + # elements.size # => 5 + # new_element.name # => nil + # new_element.parent # => <bookstore> ... </> + # new_element.context # => {:raw=>:all} + # + # With string argument +name+, creates and adds a new element. + # The new element has: + # + # - Name +name+. + # - \Parent from the \Elements object. + # - Context from the that parent. + # + # Example: + # + # d = REXML::Document.new(xml_string) + # elements = d.root.elements + # parent = elements.parent # => <bookstore> ... </> + # parent.context = {raw: :all} + # elements.size # => 4 + # new_element = elements.add('foo') # => <foo/> + # elements.size # => 5 + # new_element.name # => "foo" + # new_element.parent # => <bookstore> ... </> + # new_element.context # => {:raw=>:all} + # + # With argument +element+, + # creates and adds a clone of the given +element+. + # The new element has name, parent, and context from the given +element+. + # + # d = REXML::Document.new(xml_string) + # elements = d.root.elements + # elements.size # => 4 + # e0 = REXML::Element.new('foo') + # e1 = REXML::Element.new('bar', e0, {raw: :all}) + # element = elements.add(e1) # => <bar/> + # elements.size # => 5 + # element.name # => "bar" + # element.parent # => <bookstore> ... </> + # element.context # => {:raw=>:all} + # + # source://rexml//lib/rexml/element.rb#1925 + def add(element = T.unsafe(nil)); end + + # :call-seq: + # collect(xpath = nil) {|element| ... } -> array + # + # Iterates over the elements; returns the array of block return values. + # + # With no argument, iterates over all elements: + # + # d = REXML::Document.new(xml_string) + # elements = d.root.elements + # elements.collect {|element| element.size } # => [9, 9, 17, 9] + # + # With argument +xpath+, iterates over elements that match + # the given +xpath+: + # + # xpath = '//book [@category="web"]' + # elements.collect(xpath) {|element| element.size } # => [17, 9] + # + # source://rexml//lib/rexml/element.rb#1988 + def collect(xpath = T.unsafe(nil)); end + + # :call-seq: + # delete(index) -> removed_element or nil + # delete(element) -> removed_element or nil + # delete(xpath) -> removed_element or nil + # + # Removes an element; returns the removed element, or +nil+ if none removed. + # + # With integer argument +index+ given, + # removes the child element at that offset: + # + # d = REXML::Document.new(xml_string) + # elements = d.root.elements + # elements.size # => 4 + # elements[2] # => <book category='children'> ... </> + # elements.delete(2) # => <book category='children'> ... </> + # elements.size # => 3 + # elements[2] # => <book category='web'> ... </> + # elements.delete(50) # => nil + # + # With element argument +element+ given, + # removes that child element: + # + # d = REXML::Document.new(xml_string) + # elements = d.root.elements + # ele_1, ele_2, ele_3, ele_4 = *elements + # elements.size # => 4 + # elements[2] # => <book category='children'> ... </> + # elements.delete(ele_2) # => <book category='children'> ... </> + # elements.size # => 3 + # elements[2] # => <book category='web'> ... </> + # elements.delete(ele_2) # => nil + # + # With string argument +xpath+ given, + # removes the first element found via that xpath: + # + # d = REXML::Document.new(xml_string) + # elements = d.root.elements + # elements.delete('//book') # => <book category='cooking'> ... </> + # elements.delete('//book [@category="children"]') # => <book category='children'> ... </> + # elements.delete('//nosuch') # => nil + # + # source://rexml//lib/rexml/element.rb#1825 + def delete(element); end + + # :call-seq: + # delete_all(xpath) + # + # Removes all elements found via the given +xpath+; + # returns the array of removed elements, if any, else +nil+. + # + # d = REXML::Document.new(xml_string) + # elements = d.root.elements + # elements.size # => 4 + # deleted_elements = elements.delete_all('//book [@category="web"]') + # deleted_elements.size # => 2 + # elements.size # => 2 + # deleted_elements = elements.delete_all('//book') + # deleted_elements.size # => 2 + # elements.size # => 0 + # elements.delete_all('//book') # => [] + # + # source://rexml//lib/rexml/element.rb#1851 + def delete_all(xpath); end + + # :call-seq: + # each(xpath = nil) {|element| ... } -> self + # + # Iterates over the elements. + # + # With no argument, calls the block with each element: + # + # d = REXML::Document.new(xml_string) + # elements = d.root.elements + # elements.each {|element| p element } + # + # Output: + # + # <book category='cooking'> ... </> + # <book category='children'> ... </> + # <book category='web'> ... </> + # <book category='web' cover='paperback'> ... </> + # + # With argument +xpath+, calls the block with each element + # that matches the given +xpath+: + # + # elements.each('//book [@category="web"]') {|element| p element } + # + # Output: + # + # <book category='web'> ... </> + # <book category='web' cover='paperback'> ... </> + # + # source://rexml//lib/rexml/element.rb#1967 + def each(xpath = T.unsafe(nil)); end + + # :call-seq: + # empty? -> true or false + # + # Returns +true+ if there are no children, +false+ otherwise. + # + # d = REXML::Document.new('') + # d.elements.empty? # => true + # d = REXML::Document.new(xml_string) + # d.elements.empty? # => false + # + # @return [Boolean] + # + # source://rexml//lib/rexml/element.rb#1755 + def empty?; end + + # :call-seq: + # index(element) + # + # Returns the 1-based index of the given +element+, if found; + # otherwise, returns -1: + # + # d = REXML::Document.new(xml_string) + # elements = d.root.elements + # ele_1, ele_2, ele_3, ele_4 = *elements + # elements.index(ele_4) # => 4 + # elements.delete(ele_3) + # elements.index(ele_4) # => 3 + # elements.index(ele_3) # => -1 + # + # source://rexml//lib/rexml/element.rb#1773 + def index(element); end + + # :call-seq: + # inject(xpath = nil, initial = nil) -> object + # + # Calls the block with elements; returns the last block return value. + # + # With no argument, iterates over the elements, calling the block + # <tt>elements.size - 1</tt> times. + # + # - The first call passes the first and second elements. + # - The second call passes the first block return value and the third element. + # - The third call passes the second block return value and the fourth element. + # - And so on. + # + # In this example, the block returns the passed element, + # which is then the object argument to the next call: + # + # d = REXML::Document.new(xml_string) + # elements = d.root.elements + # elements.inject do |object, element| + # p [elements.index(object), elements.index(element)] + # element + # end + # + # Output: + # + # [1, 2] + # [2, 3] + # [3, 4] + # + # With the single argument +xpath+, calls the block only with + # elements matching that xpath: + # + # elements.inject('//book [@category="web"]') do |object, element| + # p [elements.index(object), elements.index(element)] + # element + # end + # + # Output: + # + # [3, 4] + # + # With argument +xpath+ given as +nil+ + # and argument +initial+ also given, + # calls the block once for each element. + # + # - The first call passes the +initial+ and the first element. + # - The second call passes the first block return value and the second element. + # - The third call passes the second block return value and the third element. + # - And so on. + # + # In this example, the first object index is <tt>-1</tt> + # + # elements.inject(nil, 'Initial') do |object, element| + # p [elements.index(object), elements.index(element)] + # element + # end + # + # Output: + # + # [-1, 1] + # [1, 2] + # [2, 3] + # [3, 4] + # + # In this form the passed object can be used as an accumulator: + # + # elements.inject(nil, 0) do |total, element| + # total += element.size + # end # => 44 + # + # With both arguments +xpath+ and +initial+ are given, + # calls the block only with elements matching that xpath: + # + # elements.inject('//book [@category="web"]', 0) do |total, element| + # total += element.size + # end # => 26 + # + # source://rexml//lib/rexml/element.rb#2073 + def inject(xpath = T.unsafe(nil), initial = T.unsafe(nil)); end + + # :call-seq: + # parent + # + # Returns the parent element cited in creating the \Elements object. + # This element is also the default starting point for searching + # in the \Elements object. + # + # d = REXML::Document.new(xml_string) + # elements = REXML::Elements.new(d.root) + # elements.parent == d.root # => true + # + # source://rexml//lib/rexml/element.rb#1623 + def parent; end + + # :call-seq: + # size -> integer + # + # Returns the count of \Element children: + # + # d = REXML::Document.new '<a>sean<b/>elliott<b/>russell<b/></a>' + # d.root.elements.size # => 3 # Three elements. + # d.root.size # => 6 # Three elements plus three text nodes.. + # + # source://rexml//lib/rexml/element.rb#2097 + def size; end + + # :call-seq: + # to_a(xpath = nil) -> array_of_elements + # + # Returns an array of element children (not including non-element children). + # + # With no argument, returns an array of all element children: + # + # d = REXML::Document.new '<a>sean<b/>elliott<c/></a>' + # elements = d.root.elements + # elements.to_a # => [<b/>, <c/>] # Omits non-element children. + # children = d.root.children + # children # => ["sean", <b/>, "elliott", <c/>] # Includes non-element children. + # + # With argument +xpath+, returns an array of element children + # that match the xpath: + # + # elements.to_a('//c') # => [<c/>] + # + # source://rexml//lib/rexml/element.rb#2121 + def to_a(xpath = T.unsafe(nil)); end + + private + + # Private helper class. Removes quotes from quoted strings + # + # source://rexml//lib/rexml/element.rb#2129 + def literalize(name); end +end + +# source://rexml//lib/rexml/encoding.rb#4 +module REXML::Encoding + # source://rexml//lib/rexml/encoding.rb#29 + def decode(string); end + + # source://rexml//lib/rexml/encoding.rb#25 + def encode(string); end + + # ID ---> Encoding name + # + # source://rexml//lib/rexml/encoding.rb#6 + def encoding; end + + # source://rexml//lib/rexml/encoding.rb#7 + def encoding=(encoding); end + + private + + # source://rexml//lib/rexml/encoding.rb#34 + def find_encoding(name); end +end + +# source://rexml//lib/rexml/entity.rb#7 +class REXML::Entity < ::REXML::Child + include ::REXML::XMLTokens + + # Create a new entity. Simple entities can be constructed by passing a + # name, value to the constructor; this creates a generic, plain entity + # reference. For anything more complicated, you have to pass a Source to + # the constructor with the entity definition, or use the accessor methods. + # +WARNING+: There is no validation of entity state except when the entity + # is read from a stream. If you start poking around with the accessors, + # you can easily create a non-conformant Entity. + # + # e = Entity.new( 'amp', '&' ) + # + # @return [Entity] a new instance of Entity + # + # source://rexml//lib/rexml/entity.rb#33 + 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#22 + def external; end + + # Returns the value of attribute name. + # + # source://rexml//lib/rexml/entity.rb#22 + def name; end + + # Returns the value of attribute ndata. + # + # source://rexml//lib/rexml/entity.rb#22 + 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#85 + def normalized; end + + # Returns the value of attribute pubid. + # + # source://rexml//lib/rexml/entity.rb#22 + def pubid; end + + # Returns the value of attribute ref. + # + # source://rexml//lib/rexml/entity.rb#22 + def ref; end + + # Returns this entity as a string. See write(). + # + # source://rexml//lib/rexml/entity.rb#119 + def to_s; end + + # Evaluates to the unnormalized value of this entity; that is, replacing + # all entities -- both %ent; and &ent; entities. This differs from + # +value()+ in that +value+ only replaces %ent; entities. + # + # source://rexml//lib/rexml/entity.rb#73 + def unnormalized; end + + # Returns the value of this entity. At the moment, only internal entities + # are processed. If the value contains internal references (IE, + # %blah;), those are replaced with their values. IE, if the doctype + # contains: + # <!ENTITY % foo "bar"> + # <!ENTITY yada "nanoo %foo; nanoo> + # then: + # doctype.entity('yada').value #-> "nanoo bar nanoo" + # + # source://rexml//lib/rexml/entity.rb#134 + def value; end + + # Write out a fully formed, correct entity definition (assuming the Entity + # object itself is valid.) + # + # out:: + # An object implementing <TT><<</TT> to which the entity will be + # output + # indent:: + # *DEPRECATED* and ignored + # + # source://rexml//lib/rexml/entity.rb#97 + 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#66 + def matches?(string); end + end +end + +# source://rexml//lib/rexml/doctype.rb#267 +class REXML::ExternalEntity < ::REXML::Child + # @return [ExternalEntity] a new instance of ExternalEntity + # + # source://rexml//lib/rexml/doctype.rb#268 + def initialize(src); end + + # source://rexml//lib/rexml/doctype.rb#272 + def to_s; end + + # source://rexml//lib/rexml/doctype.rb#275 + def write(output, indent); end +end + +# source://rexml//lib/rexml/formatters/default.rb#5 +class REXML::Formatters::Default + # Prints out the XML document with no formatting -- except if ie_hack is + # set. + # + # ie_hack:: + # If set to true, then inserts whitespace before the close of an empty + # tag, so that IE's bad XML parser doesn't choke. + # + # @return [Default] a new instance of Default + # + # source://rexml//lib/rexml/formatters/default.rb#12 + def initialize(ie_hack = T.unsafe(nil)); end + + # Writes the node to some output. + # + # node:: + # The node to write + # output:: + # A class implementing <TT><<</TT>. Pass in an Output object to + # change the output encoding. + # + # source://rexml//lib/rexml/formatters/default.rb#23 + def write(node, output); end + + protected + + # source://rexml//lib/rexml/formatters/default.rb#98 + def write_cdata(node, output); end + + # source://rexml//lib/rexml/formatters/default.rb#92 + def write_comment(node, output); end + + # source://rexml//lib/rexml/formatters/default.rb#61 + def write_document(node, output); end + + # source://rexml//lib/rexml/formatters/default.rb#65 + def write_element(node, output); end + + # source://rexml//lib/rexml/formatters/default.rb#104 + def write_instruction(node, output); end + + # source://rexml//lib/rexml/formatters/default.rb#88 + def write_text(node, output); end +end + +# Pretty-prints an XML document. This destroys whitespace in text nodes +# and will insert carriage returns and indentations. +# +# TODO: Add an option to print attributes on new lines +# +# source://rexml//lib/rexml/formatters/pretty.rb#10 +class REXML::Formatters::Pretty < ::REXML::Formatters::Default + # Create a new pretty printer. + # + # output:: + # An object implementing '<<(String)', to which the output will be written. + # indentation:: + # An integer greater than 0. The indentation of each level will be + # this number of spaces. If this is < 1, the behavior of this object + # is undefined. Defaults to 2. + # ie_hack:: + # If true, the printer will insert whitespace before closing empty + # tags, thereby allowing Internet Explorer's XML parser to + # function. Defaults to false. + # + # @return [Pretty] a new instance of Pretty + # + # source://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 + 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 + def compact=(_arg0); end + + # The width of a page. Used for formatting text + # + # source://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 + def width=(_arg0); end + + protected + + # source://rexml//lib/rexml/formatters/pretty.rb#102 + def write_cdata(node, output); end + + # source://rexml//lib/rexml/formatters/pretty.rb#97 + def write_comment(node, output); end + + # source://rexml//lib/rexml/formatters/pretty.rb#107 + def write_document(node, output); end + + # source://rexml//lib/rexml/formatters/pretty.rb#39 + def write_element(node, output); end + + # source://rexml//lib/rexml/formatters/pretty.rb#88 + def write_text(node, output); end + + private + + # source://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 + def wrap(string, width); end +end + +# A Source that wraps an IO. See the Source class for method +# documentation +# +# source://rexml//lib/rexml/source.rb#159 +class REXML::IOSource < ::REXML::Source + # block_size has been deprecated + # + # @return [IOSource] a new instance of IOSource + # + # source://rexml//lib/rexml/source.rb#163 + def initialize(arg, block_size = T.unsafe(nil), encoding = T.unsafe(nil)); end + + # source://rexml//lib/rexml/source.rb#215 + def consume(pattern); end + + # @return the current line in the source + # + # source://rexml//lib/rexml/source.rb#244 + def current_line; end + + # @return [Boolean] + # + # source://rexml//lib/rexml/source.rb#235 + def empty?; end + + # source://rexml//lib/rexml/source.rb#219 + def match(pattern, cons = T.unsafe(nil)); end + + # source://rexml//lib/rexml/source.rb#239 + def position; end + + # source://rexml//lib/rexml/source.rb#207 + def read; end + + # source://rexml//lib/rexml/source.rb#184 + def scan(pattern, cons = T.unsafe(nil)); end + + private + + # source://rexml//lib/rexml/source.rb#286 + def encoding_updated; end + + # source://rexml//lib/rexml/source.rb#266 + def readline; end +end + +# Represents an XML Instruction; IE, <? ... ?> +# TODO: Add parent arg (3rd arg) to constructor +# +# source://rexml//lib/rexml/instruction.rb#9 +class REXML::Instruction < ::REXML::Child + # Constructs a new Instruction + # the target of this instruction is set to this. If an Instruction, + # then the Instruction is shallowly cloned (target and content are + # copied). + # 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 + 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 + # + # source://rexml//lib/rexml/instruction.rb#65 + def ==(other); end + + # source://rexml//lib/rexml/instruction.rb#44 + def clone; end + + # target is the "name" of the Instruction; IE, the "tag" in <?tag ...?> + # content is everything else. + # + # source://rexml//lib/rexml/instruction.rb#15 + def content; end + + # target is the "name" of the Instruction; IE, the "tag" in <?tag ...?> + # content is everything else. + # + # source://rexml//lib/rexml/instruction.rb#15 + def content=(_arg0); end + + # source://rexml//lib/rexml/instruction.rb#75 + def inspect; end + + # source://rexml//lib/rexml/instruction.rb#71 + def node_type; end + + # target is the "name" of the Instruction; IE, the "tag" in <?tag ...?> + # content is everything else. + # + # source://rexml//lib/rexml/instruction.rb#15 + def target; end + + # target is the "name" of the Instruction; IE, the "tag" in <?tag ...?> + # content is everything else. + # + # source://rexml//lib/rexml/instruction.rb#15 + def target=(_arg0); end + + # == DEPRECATED + # See the rexml/formatters package + # + # source://rexml//lib/rexml/instruction.rb#51 + def write(writer, indent = T.unsafe(nil), transitive = T.unsafe(nil), ie_hack = T.unsafe(nil)); end +end + +# source://rexml//lib/rexml/doctype.rb#280 +class REXML::NotationDecl < ::REXML::Child + # @return [NotationDecl] a new instance of NotationDecl + # + # source://rexml//lib/rexml/doctype.rb#282 + 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 + def name; end + + # Returns the value of attribute public. + # + # source://rexml//lib/rexml/doctype.rb#281 + def public; end + + # Sets the attribute public + # + # @param value the value to set the attribute public to. + # + # source://rexml//lib/rexml/doctype.rb#281 + def public=(_arg0); end + + # Returns the value of attribute system. + # + # source://rexml//lib/rexml/doctype.rb#281 + def system; end + + # Sets the attribute system + # + # @param value the value to set the attribute system to. + # + # source://rexml//lib/rexml/doctype.rb#281 + def system=(_arg0); end + + # source://rexml//lib/rexml/doctype.rb#290 + def to_s; end + + # source://rexml//lib/rexml/doctype.rb#300 + def write(output, indent = T.unsafe(nil)); end +end + +# source://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 + def initialize(real_IO, encd = T.unsafe(nil)); end + + # source://rexml//lib/rexml/output.rb#22 + def <<(content); end + + # Returns the value of attribute encoding. + # + # source://rexml//lib/rexml/output.rb#8 + def encoding; end + + # source://rexml//lib/rexml/output.rb#26 + def to_s; end +end + +# A parent has children, and has methods for accessing them. The Parent +# class is never encountered except as the superclass for some other +# object. +# +# source://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 + def initialize(parent = T.unsafe(nil)); end + + # source://rexml//lib/rexml/parent.rb#18 + 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 + 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 + def []=(*args); end + + # source://rexml//lib/rexml/parent.rb#18 + def add(object); end + + # source://rexml//lib/rexml/parent.rb#115 + 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 + def deep_clone; end + + # source://rexml//lib/rexml/parent.rb#32 + def delete(object); end + + # source://rexml//lib/rexml/parent.rb#47 + def delete_at(index); end + + # source://rexml//lib/rexml/parent.rb#43 + def delete_if(&block); end + + # source://rexml//lib/rexml/parent.rb#39 + def each(&block); end + + # source://rexml//lib/rexml/parent.rb#39 + def each_child(&block); end + + # source://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 + # + # source://rexml//lib/rexml/parent.rb#123 + def index(child); end + + # Inserts an child after another child + # 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 + def insert_after(child1, child2); end + + # Inserts an child before another child + # 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 + def insert_before(child1, child2); end + + # @return the number of children of this parent + # + # source://rexml//lib/rexml/parent.rb#130 + def length; end + + # @return [Boolean] + # + # source://rexml//lib/rexml/parent.rb#162 + def parent?; end + + # source://rexml//lib/rexml/parent.rb#18 + 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 + # + # source://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 + def size; end + + # source://rexml//lib/rexml/parent.rb#115 + def to_a; end + + # source://rexml//lib/rexml/parent.rb#27 + def unshift(object); end +end + +# source://rexml//lib/rexml/parseexception.rb#3 +class REXML::ParseException < ::RuntimeError + # @return [ParseException] a new instance of ParseException + # + # source://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#48 + def context; end + + # Returns the value of attribute continued_exception. + # + # source://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 + def continued_exception=(_arg0); end + + # source://rexml//lib/rexml/parseexception.rb#43 + def line; end + + # Returns the value of attribute parser. + # + # source://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 + def parser=(_arg0); end + + # source://rexml//lib/rexml/parseexception.rb#38 + def position; end + + # Returns the value of attribute source. + # + # source://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 + def source=(_arg0); end + + # source://rexml//lib/rexml/parseexception.rb#13 + def to_s; end +end + +# = Using the Pull Parser +# <em>This API is experimental, and subject to change.</em> +# parser = PullParser.new( "<a>text<b att='val'/>txet</a>" ) +# while parser.has_next? +# res = parser.next +# puts res[1]['att'] if res.start_tag? and res[0] == 'b' +# end +# See the PullEvent class for information on the content of the results. +# The data is identical to the arguments passed for the various events to +# the StreamListener API. +# +# Notice that: +# parser = PullParser.new( "<a>BAD DOCUMENT" ) +# while parser.has_next? +# res = parser.next +# raise res[1] if res.error? +# end +# +# Nat Price gave me some good ideas for the API. +# +# source://rexml//lib/rexml/parsers/baseparser.rb#29 +class REXML::Parsers::BaseParser + # @return [BaseParser] a new instance of BaseParser + # + # source://rexml//lib/rexml/parsers/baseparser.rb#115 + def initialize(source); end + + # source://rexml//lib/rexml/parsers/baseparser.rb#120 + def add_listener(listener); end + + # Returns true if there are no more events + # + # @return [Boolean] + # + # source://rexml//lib/rexml/parsers/baseparser.rb#146 + def empty?; end + + # source://rexml//lib/rexml/parsers/baseparser.rb#438 + def entity(reference, entities); end + + # Returns true if there are more events. Synonymous with !empty? + # + # @return [Boolean] + # + # source://rexml//lib/rexml/parsers/baseparser.rb#151 + def has_next?; end + + # Escapes all possible entities + # + # source://rexml//lib/rexml/parsers/baseparser.rb#449 + def normalize(input, entities = T.unsafe(nil), entity_filter = T.unsafe(nil)); end + + # Peek at the +depth+ event in the stack. The first element on the stack + # is at depth 0. If +depth+ is -1, will parse to the end of the input + # stream and return the last event, which is always :end_document. + # Be aware that this causes the stream to be parsed up to the +depth+ + # event, so you can effectively pre-parse the entire document (pull the + # entire thing into memory) using this method. + # + # source://rexml//lib/rexml/parsers/baseparser.rb#167 + def peek(depth = T.unsafe(nil)); end + + # source://rexml//lib/rexml/parsers/baseparser.rb#136 + def position; end + + # Returns the next event. This is a +PullEvent+ object. + # + # source://rexml//lib/rexml/parsers/baseparser.rb#182 + def pull; end + + # Returns the value of attribute source. + # + # source://rexml//lib/rexml/parsers/baseparser.rb#124 + def source; end + + # source://rexml//lib/rexml/parsers/baseparser.rb#126 + def stream=(source); end + + # Unescapes all possible entities + # + # source://rexml//lib/rexml/parsers/baseparser.rb#465 + 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#157 + def unshift(token); end + + private + + # @return [Boolean] + # + # source://rexml//lib/rexml/parsers/baseparser.rb#495 + def need_source_encoding_update?(xml_declaration_encoding); end + + # source://rexml//lib/rexml/parsers/baseparser.rb#589 + def parse_attributes(prefixes, curr_ns); end + + # source://rexml//lib/rexml/parsers/baseparser.rb#514 + def parse_id(base_error_message, accept_external_id:, accept_public_id:); end + + # source://rexml//lib/rexml/parsers/baseparser.rb#542 + def parse_id_invalid_details(accept_external_id:, accept_public_id:); end + + # source://rexml//lib/rexml/parsers/baseparser.rb#501 + def parse_name(base_error_message); end + + # source://rexml//lib/rexml/parsers/baseparser.rb#580 + def process_instruction; end + + # source://rexml//lib/rexml/parsers/baseparser.rb#190 + def pull_event; end +end + +# source://rexml//lib/rexml/parsers/baseparser.rb#102 +REXML::Parsers::BaseParser::EXTERNAL_ID_PUBLIC = T.let(T.unsafe(nil), Regexp) + +# source://rexml//lib/rexml/parsers/baseparser.rb#103 +REXML::Parsers::BaseParser::EXTERNAL_ID_SYSTEM = T.let(T.unsafe(nil), Regexp) + +# source://rexml//lib/rexml/parsers/baseparser.rb#104 +REXML::Parsers::BaseParser::PUBLIC_ID = T.let(T.unsafe(nil), Regexp) + +# source://rexml//lib/rexml/parsers/baseparser.rb#38 +REXML::Parsers::BaseParser::QNAME = T.let(T.unsafe(nil), Regexp) + +# source://rexml//lib/rexml/parsers/baseparser.rb#37 +REXML::Parsers::BaseParser::QNAME_STR = T.let(T.unsafe(nil), String) + +# source://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 + def initialize(source, listener); end + + # source://rexml//lib/rexml/parsers/streamparser.rb#13 + def add_listener(listener); end + + # source://rexml//lib/rexml/parsers/streamparser.rb#17 + def parse; end +end + +# source://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 + def initialize(source, build_context = T.unsafe(nil)); end + + # source://rexml//lib/rexml/parsers/treeparser.rb#13 + def add_listener(listener); end + + # source://rexml//lib/rexml/parsers/treeparser.rb#17 + def parse; end +end + +# You don't want to use this class. Really. Use XPath, which is a wrapper +# for this class. Believe me. You don't want to poke around in here. +# There is strange, dark magic at work in this code. Beware. Go back! Go +# back while you still can! +# +# source://rexml//lib/rexml/parsers/xpathparser.rb#11 +class REXML::Parsers::XPathParser + include ::REXML::XMLTokens + + # source://rexml//lib/rexml/parsers/xpathparser.rb#41 + def abbreviate(path); end + + # source://rexml//lib/rexml/parsers/xpathparser.rb#99 + def expand(path); end + + # source://rexml//lib/rexml/parsers/xpathparser.rb#15 + def namespaces=(namespaces); end + + # source://rexml//lib/rexml/parsers/xpathparser.rb#20 + def parse(path); end + + # source://rexml//lib/rexml/parsers/xpathparser.rb#35 + def predicate(path); end + + # source://rexml//lib/rexml/parsers/xpathparser.rb#138 + def predicate_to_string(path, &block); end + + private + + # | AdditiveExpr ('+' | '-') MultiplicativeExpr + # | MultiplicativeExpr + # + # source://rexml//lib/rexml/parsers/xpathparser.rb#455 + def AdditiveExpr(path, parsed); end + + # | AndExpr S 'and' S EqualityExpr + # | EqualityExpr + # + # source://rexml//lib/rexml/parsers/xpathparser.rb#388 + def AndExpr(path, parsed); end + + # | EqualityExpr ('=' | '!=') RelationalExpr + # | RelationalExpr + # + # source://rexml//lib/rexml/parsers/xpathparser.rb#407 + def EqualityExpr(path, parsed); end + + # | FilterExpr Predicate + # | PrimaryExpr + # + # source://rexml//lib/rexml/parsers/xpathparser.rb#558 + def FilterExpr(path, parsed); end + + # | FUNCTION_NAME '(' ( expr ( ',' expr )* )? ')' + # + # source://rexml//lib/rexml/parsers/xpathparser.rb#613 + def FunctionCall(rest, parsed); end + + # LocationPath + # | RelativeLocationPath + # | '/' RelativeLocationPath? + # | '//' RelativeLocationPath + # + # source://rexml//lib/rexml/parsers/xpathparser.rb#193 + def LocationPath(path, parsed); end + + # | MultiplicativeExpr ('*' | S ('div' | 'mod') S) UnaryExpr + # | UnaryExpr + # + # source://rexml//lib/rexml/parsers/xpathparser.rb#478 + def MultiplicativeExpr(path, parsed); end + + # source://rexml//lib/rexml/parsers/xpathparser.rb#293 + def NodeTest(path, parsed); end + + # | OrExpr S 'or' S AndExpr + # | AndExpr + # + # source://rexml//lib/rexml/parsers/xpathparser.rb#369 + def OrExpr(path, parsed); end + + # | LocationPath + # | FilterExpr ('/' | '//') RelativeLocationPath + # + # source://rexml//lib/rexml/parsers/xpathparser.rb#540 + def PathExpr(path, parsed); end + + # Filters the supplied nodeset on the predicate(s) + # + # source://rexml//lib/rexml/parsers/xpathparser.rb#345 + def Predicate(path, parsed); end + + # source://rexml//lib/rexml/parsers/xpathparser.rb#576 + def PrimaryExpr(path, parsed); end + + # | RelationalExpr ('<' | '>' | '<=' | '>=') AdditiveExpr + # | AdditiveExpr + # + # source://rexml//lib/rexml/parsers/xpathparser.rb#430 + def RelationalExpr(path, parsed); end + + # source://rexml//lib/rexml/parsers/xpathparser.rb#217 + def RelativeLocationPath(path, parsed); end + + # | '-' UnaryExpr + # | UnionExpr + # + # source://rexml//lib/rexml/parsers/xpathparser.rb#503 + def UnaryExpr(path, parsed); end + + # | UnionExpr '|' PathExpr + # | PathExpr + # + # source://rexml//lib/rexml/parsers/xpathparser.rb#521 + def UnionExpr(path, parsed); end + + # get_group( '[foo]bar' ) -> ['bar', '[foo]'] + # + # source://rexml//lib/rexml/parsers/xpathparser.rb#626 + def get_group(string); end + + # source://rexml//lib/rexml/parsers/xpathparser.rb#644 + def parse_args(string); end +end + +# source://rexml//lib/rexml/parsers/xpathparser.rb#289 +REXML::Parsers::XPathParser::LOCAL_NAME_WILDCARD = T.let(T.unsafe(nil), Regexp) + +# Returns a 1-1 map of the nodeset +# The contents of the resulting array are either: +# true/false, if a positive match +# String, if a name match +# NodeTest +# | ('*' | NCNAME ':' '*' | QNAME) NameTest +# | '*' ':' NCNAME NameTest since XPath 2.0 +# | NODE_TYPE '(' ')' NodeType +# | PI '(' LITERAL ')' PI +# | '[' expr ']' Predicate +# +# source://rexml//lib/rexml/parsers/xpathparser.rb#288 +REXML::Parsers::XPathParser::PREFIX_WILDCARD = T.let(T.unsafe(nil), Regexp) + +# source://rexml//lib/rexml/doctype.rb#10 +class REXML::ReferenceWriter + # @return [ReferenceWriter] a new instance of ReferenceWriter + # + # source://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 + def write(output); 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#31 +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 + # + # source://rexml//lib/rexml/source.rb#43 + def initialize(arg, encoding = T.unsafe(nil)); end + + # The current buffer (what we're going to read next) + # + # source://rexml//lib/rexml/source.rb#34 + def buffer; end + + # source://rexml//lib/rexml/source.rb#87 + def consume(pattern); end + + # @return the current line in the source + # + # source://rexml//lib/rexml/source.rb#117 + def current_line; end + + # @return [Boolean] true if the Source is exhausted + # + # source://rexml//lib/rexml/source.rb#108 + def empty?; end + + # Returns the value of attribute encoding. + # + # source://rexml//lib/rexml/source.rb#37 + def encoding; end + + # Inherited from Encoding + # Overridden to support optimized en/decoding + # + # source://rexml//lib/rexml/source.rb#56 + def encoding=(enc); end + + # The line number of the last consumed text + # + # source://rexml//lib/rexml/source.rb#36 + def line; end + + # source://rexml//lib/rexml/source.rb#101 + def match(pattern, cons = T.unsafe(nil)); end + + # source://rexml//lib/rexml/source.rb#91 + def match_to(char, pattern); end + + # source://rexml//lib/rexml/source.rb#95 + def match_to_consume(char, pattern); end + + # source://rexml//lib/rexml/source.rb#112 + def position; end + + # source://rexml//lib/rexml/source.rb#84 + def read; end + + # Scans the source for a given pattern. Note, that this is not your + # usual scan() method. For one thing, the pattern argument has some + # requirements; for another, the source can be consumed. You can easily + # confuse this method. Originally, the patterns were easier + # to construct and this method more robust, because this method + # generated search regexps on the fly; however, this was + # computationally expensive and slowed down the entire REXML package + # considerably, since this is by far the most commonly called method. + # /^\s*(#{your pattern, with no groups})(.*)/. The first group + # will be returned; the second group is used if the consume flag is + # set. + # everything after it in the Source. + # pattern is not found. + # + # @param pattern must be a Regexp, and must be in the form of + # @param consume if true, the pattern returned will be consumed, leaving + # @return the pattern, if found, or nil if the Source is empty or the + # + # source://rexml//lib/rexml/source.rb#77 + def scan(pattern, cons = T.unsafe(nil)); end + + private + + # source://rexml//lib/rexml/source.rb#125 + def detect_encoding; end + + # source://rexml//lib/rexml/source.rb#146 + def encoding_updated; end +end + +# Represents text nodes in an XML document +# +# source://rexml//lib/rexml/text.rb#11 +class REXML::Text < ::REXML::Child + include ::Comparable + + # Constructor + # +arg+ if a String, the content is set to the String. If a Text, + # the object is shallowly cloned. + # + # +respect_whitespace+ (boolean, false) if true, whitespace is + # respected + # + # +parent+ (nil) if this is a Parent object, the parent + # will be set to this. + # + # +raw+ (nil) This argument can be given three values. + # If true, then the value of used to construct this object is expected to + # contain no unescaped XML markup, and REXML will not change the text. If + # this value is false, the string may contain any characters, and REXML will + # escape any and all defined entities whose values are contained in the + # text. If this value is nil (the default), then the raw value of the + # parent will be used as the raw value for this node. If there is no raw + # value for the parent, and no value is supplied, the default is false. + # Use this field if you have entities defined for some text, and you don't + # want REXML to escape that text in output. + # Text.new( "<&", false, nil, false ) #-> "<&" + # Text.new( "<&", false, nil, false ) #-> "&lt;&amp;" + # Text.new( "<&", false, nil, true ) #-> Parse exception + # Text.new( "<&", false, nil, true ) #-> "<&" + # # Assume that the entity "s" is defined to be "sean" + # # and that the entity "r" is defined to be "russell" + # Text.new( "sean russell" ) #-> "&s; &r;" + # Text.new( "sean russell", false, nil, true ) #-> "sean russell" + # + # +entity_filter+ (nil) This can be an array of entities to match in the + # supplied text. This argument is only useful if +raw+ is set to false. + # Text.new( "sean russell", false, nil, false, ["s"] ) #-> "&s; russell" + # Text.new( "sean russell", false, nil, true, ["s"] ) #-> "sean russell" + # In the last example, the +entity_filter+ argument is ignored. + # + # +illegal+ INTERNAL USE ONLY + # + # @return [Text] a new instance of Text + # + # source://rexml//lib/rexml/text.rb#94 + def initialize(arg, respect_whitespace = T.unsafe(nil), parent = T.unsafe(nil), raw = T.unsafe(nil), entity_filter = T.unsafe(nil), illegal = T.unsafe(nil)); end + + # Appends text to this text node. The text is appended in the +raw+ mode + # of this text node. + # + # +returns+ the text itself to enable method chain like + # 'text << "XXX" << "YYY"'. + # + # source://rexml//lib/rexml/text.rb#194 + def <<(to_append); end + + # +other+ a String or a Text + # +returns+ the result of (to_s <=> arg.to_s) + # + # source://rexml//lib/rexml/text.rb#203 + def <=>(other); end + + # source://rexml//lib/rexml/text.rb#184 + def clone; end + + # source://rexml//lib/rexml/text.rb#207 + def doctype; end + + # @return [Boolean] + # + # source://rexml//lib/rexml/text.rb#179 + def empty?; end + + # source://rexml//lib/rexml/text.rb#278 + def indent_text(string, level = T.unsafe(nil), style = T.unsafe(nil), indentfirstline = T.unsafe(nil)); end + + # source://rexml//lib/rexml/text.rb#233 + def inspect; end + + # source://rexml//lib/rexml/text.rb#175 + def node_type; end + + # source://rexml//lib/rexml/text.rb#125 + def parent=(parent); end + + # If +raw+ is true, then REXML leaves the value alone + # + # source://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 + def raw=(_arg0); end + + # Returns the string value of this text node. This string is always + # escaped, meaning that it is a valid XML text node string, and all + # entities that can be escaped, have been inserted. This method respects + # the entity filter set in the constructor. + # + # # Assume that the entity "s" is defined to be "sean", and that the + # # entity "r" is defined to be "russell" + # t = Text.new( "< & sean russell", false, nil, false, ['s'] ) + # t.to_s #-> "< & &s; russell" + # t = Text.new( "< & &s; russell", false, nil, false ) + # t.to_s #-> "< & &s; russell" + # u = Text.new( "sean russell", false, nil, true ) + # u.to_s #-> "sean russell" + # + # source://rexml//lib/rexml/text.rb#228 + def to_s; end + + # Returns the string value of this text. This is the text without + # entities, as it might be used programmatically, or printed to the + # console. This ignores the 'raw' attribute setting, and any + # entity_filter. + # + # # Assume that the entity "s" is defined to be "sean", and that the + # # entity "r" is defined to be "russell" + # t = Text.new( "< & sean russell", false, nil, false, ['s'] ) + # t.value #-> "< & sean russell" + # t = Text.new( "< & &s; russell", false, nil, false ) + # t.value #-> "< & sean russell" + # u = Text.new( "sean russell", false, nil, true ) + # u.value #-> "sean russell" + # + # source://rexml//lib/rexml/text.rb#250 + def value; end + + # Sets the contents of this text node. This expects the text to be + # unnormalized. It returns self. + # + # e = Element.new( "a" ) + # e.add_text( "foo" ) # <a>foo</a> + # e[0].value = "bar" # <a>bar</a> + # e[0].value = "<a>" # <a><a></a> + # + # source://rexml//lib/rexml/text.rb#261 + def value=(val); end + + # source://rexml//lib/rexml/text.rb#267 + def wrap(string, width, addnewline = T.unsafe(nil)); end + + # == DEPRECATED + # See REXML::Formatters + # + # source://rexml//lib/rexml/text.rb#293 + def write(writer, indent = T.unsafe(nil), transitive = T.unsafe(nil), ie_hack = T.unsafe(nil)); end + + # Writes out text, substituting special characters beforehand. + # +out+ A String, IO, or any other object supporting <<( String ) + # +input+ the text to substitute and the write out + # + # z=utf8.unpack("U*") + # ascOut="" + # z.each{|r| + # if r < 0x100 + # ascOut.concat(r.chr) + # else + # ascOut.concat(sprintf("&#x%x;", r)) + # end + # } + # puts ascOut + # + # source://rexml//lib/rexml/text.rb#325 + def write_with_substitution(out, input); end + + # FIXME + # This probably won't work properly + # + # source://rexml//lib/rexml/text.rb#305 + def xpath; end + + private + + # source://rexml//lib/rexml/text.rb#338 + def clear_cache; end + + class << self + # check for illegal characters + # + # source://rexml//lib/rexml/text.rb#131 + def check(string, pattern, doctype); end + + # source://rexml//lib/rexml/text.rb#405 + def expand(ref, doctype, filter); end + + # Escapes all possible entities + # + # source://rexml//lib/rexml/text.rb#370 + def normalize(input, doctype = T.unsafe(nil), entity_filter = T.unsafe(nil)); end + + # Reads text, substituting entities + # + # source://rexml//lib/rexml/text.rb#344 + def read_with_substitution(input, illegal = T.unsafe(nil)); end + + # Unescapes all possible entities + # + # source://rexml//lib/rexml/text.rb#392 + def unnormalize(string, doctype = T.unsafe(nil), filter = T.unsafe(nil), illegal = T.unsafe(nil)); end + end +end + +# source://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 + def initialize(prefix, source, parser); end +end + +# source://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 + def initialize(msg); end +end + +# NEEDS DOCUMENTATION +# +# source://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 + def initialize(version = T.unsafe(nil), encoding = T.unsafe(nil), standalone = T.unsafe(nil)); end + + # source://rexml//lib/rexml/xmldecl.rb#56 + def ==(other); end + + # source://rexml//lib/rexml/xmldecl.rb#39 + def clone; end + + # source://rexml//lib/rexml/xmldecl.rb#102 + def dowrite; end + + # source://rexml//lib/rexml/xmldecl.rb#76 + def encoding=(enc); end + + # source://rexml//lib/rexml/xmldecl.rb#106 + def inspect; end + + # source://rexml//lib/rexml/xmldecl.rb#69 + def node_type; end + + # source://rexml//lib/rexml/xmldecl.rb#98 + def nowrite; end + + # source://rexml//lib/rexml/encoding.rb#7 + def old_enc=(encoding); end + + # Returns the value of attribute standalone. + # + # source://rexml//lib/rexml/xmldecl.rb#17 + def stand_alone?; end + + # Returns the value of attribute standalone. + # + # source://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 + def standalone=(_arg0); end + + # Returns the value of attribute version. + # + # source://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 + def version=(_arg0); end + + # indent:: + # Ignored. There must be no whitespace before an XML declaration + # transitive:: + # Ignored + # ie_hack:: + # Ignored + # + # source://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 + def writeencoding; end + + # Returns the value of attribute writethis. + # + # source://rexml//lib/rexml/xmldecl.rb#18 + def writethis; end + + # source://rexml//lib/rexml/xmldecl.rb#63 + def xmldecl(version, encoding, standalone); end + + private + + # source://rexml//lib/rexml/xmldecl.rb#111 + def content(enc); end + + class << self + # Only use this if you do not want the XML declaration to be written; + # this object is ignored by the XML writer. Otherwise, instantiate your + # own XMLDecl and add it to the document. + # + # Note that XML 1.1 documents *must* include an XML declaration + # + # source://rexml//lib/rexml/xmldecl.rb#92 + def default; end + end +end + +# @private +# +# source://rexml//lib/rexml/xpath_parser.rb#959 +class REXML::XPathNode + # @return [XPathNode] a new instance of XPathNode + # + # source://rexml//lib/rexml/xpath_parser.rb#961 + def initialize(node, context = T.unsafe(nil)); end + + # Returns the value of attribute context. + # + # source://rexml//lib/rexml/xpath_parser.rb#960 + def context; end + + # source://rexml//lib/rexml/xpath_parser.rb#970 + def position; end + + # Returns the value of attribute raw_node. + # + # source://rexml//lib/rexml/xpath_parser.rb#960 + def raw_node; end +end + +# You don't want to use this class. Really. Use XPath, which is a wrapper +# for this class. Believe me. You don't want to poke around in here. +# There is strange, dark magic at work in this code. Beware. Go back! Go +# back while you still can! +# +# source://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 + def initialize(strict: T.unsafe(nil)); end + + # source://rexml//lib/rexml/xpath_parser.rb#94 + def []=(variable_name, value); end + + # Performs a depth-first (document order) XPath search, and returns the + # first match. This is the fastest, lightest way to return a single result. + # + # FIXME: This method is incomplete! + # + # source://rexml//lib/rexml/xpath_parser.rb#103 + def first(path_stack, node); end + + # source://rexml//lib/rexml/xpath_parser.rb#84 + def get_first(path, nodeset); end + + # source://rexml//lib/rexml/xpath_parser.rb#139 + def match(path_stack, nodeset); end + + # source://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 + + # source://rexml//lib/rexml/xpath_parser.rb#89 + def predicate(path, nodeset); end + + # source://rexml//lib/rexml/xpath_parser.rb#74 + def variables=(vars = T.unsafe(nil)); end + + private + + # source://rexml//lib/rexml/xpath_parser.rb#775 + def child(nodeset); end + + # source://rexml//lib/rexml/xpath_parser.rb#916 + def compare(a, operator, b); end + + # source://rexml//lib/rexml/xpath_parser.rb#678 + def descendant(nodeset, include_self); end + + # source://rexml//lib/rexml/xpath_parser.rb#689 + def descendant_recursive(raw_node, new_nodeset, new_nodes, include_self); end + + # source://rexml//lib/rexml/xpath_parser.rb#938 + def each_unnode(nodeset); end + + # source://rexml//lib/rexml/xpath_parser.rb#637 + def enter(tag, *args); end + + # source://rexml//lib/rexml/xpath_parser.rb#815 + def equality_relational_compare(set1, op, set2); end + + # source://rexml//lib/rexml/xpath_parser.rb#591 + 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 + def expr(path_stack, nodeset, context = T.unsafe(nil)); end + + # source://rexml//lib/rexml/xpath_parser.rb#582 + def filter_nodeset(nodeset); end + + # source://rexml//lib/rexml/xpath_parser.rb#745 + def following(node); end + + # source://rexml//lib/rexml/xpath_parser.rb#756 + def following_node_of(node); end + + # Returns a String namespace for a node, given a prefix + # The rules are: + # + # 1. Use the supplied namespace mapping first. + # 2. If no mapping was supplied, use the context node to look up the namespace + # + # source://rexml//lib/rexml/xpath_parser.rb#163 + def get_namespace(node, prefix); end + + # source://rexml//lib/rexml/xpath_parser.rb#642 + def leave(tag, *args); end + + # source://rexml//lib/rexml/xpath_parser.rb#763 + def next_sibling_node(node); end + + # source://rexml//lib/rexml/xpath_parser.rb#477 + def node_test(path_stack, nodesets, any_type: T.unsafe(nil)); end + + # source://rexml//lib/rexml/xpath_parser.rb#802 + def norm(b); end + + # source://rexml//lib/rexml/xpath_parser.rb#890 + def normalize_compare_values(a, operator, b); end + + # Builds a nodeset of all of the preceding nodes of the supplied node, + # in reverse document order + # preceding:: includes every element in the document that precedes this node, + # except for ancestors + # + # source://rexml//lib/rexml/xpath_parser.rb#708 + def preceding(node); end + + # source://rexml//lib/rexml/xpath_parser.rb#730 + def preceding_node_of(node); end + + # Reorders an array of nodes so that they are in document order + # It tries to do this efficiently. + # + # FIXME: I need to get rid of this, but the issue is that most of the XPath + # interpreter functions as a filter, which means that we lose context going + # in and out of function calls. If I knew what the index of the nodes was, + # I wouldn't have to do this. Maybe add a document IDX for each node? + # Problems with mutable documents. Or, rewrite everything. + # + # source://rexml//lib/rexml/xpath_parser.rb#655 + def sort(array_of_nodes, order); end + + # source://rexml//lib/rexml/xpath_parser.rb#441 + def step(path_stack, any_type: T.unsafe(nil), order: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rexml//lib/rexml/xpath_parser.rb#154 + def strict?; end + + # source://rexml//lib/rexml/xpath_parser.rb#630 + def trace(*args); end + + # source://rexml//lib/rexml/xpath_parser.rb#950 + def unnode(nodeset); end + + # source://rexml//lib/rexml/xpath_parser.rb#877 + def value_type(value); end +end + +# source://rexml//lib/rexml/xpath_parser.rb#58 +REXML::XPathParser::DEBUG = T.let(T.unsafe(nil), FalseClass) diff --git a/sorbet/rbi/gems/rspec@3.12.0.rbi b/sorbet/rbi/gems/rspec@3.12.0.rbi new file mode 100644 index 0000000..50c2701 --- /dev/null +++ b/sorbet/rbi/gems/rspec@3.12.0.rbi @@ -0,0 +1,82 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rspec` gem. +# Please instead update this file by running `bin/tapioca gem rspec`. + +# source://rspec//lib/rspec/version.rb#1 +module RSpec + class << self + # source://rspec-core/3.12.2/lib/rspec/core.rb#70 + def clear_examples; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#85 + def configuration; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#49 + def configuration=(_arg0); end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#97 + def configure; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#194 + def const_missing(name); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def context(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#122 + def current_example; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#128 + def current_example=(example); end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#154 + def current_scope; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#134 + def current_scope=(scope); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def describe(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def example_group(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def fcontext(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def fdescribe(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#58 + def reset; end + + # source://rspec-core/3.12.2/lib/rspec/core/shared_example_group.rb#110 + def shared_context(name, *args, &block); end + + # source://rspec-core/3.12.2/lib/rspec/core/shared_example_group.rb#110 + def shared_examples(name, *args, &block); end + + # source://rspec-core/3.12.2/lib/rspec/core/shared_example_group.rb#110 + def shared_examples_for(name, *args, &block); end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#160 + def world; end + + # source://rspec-core/3.12.2/lib/rspec/core.rb#49 + def world=(_arg0); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def xcontext(*args, &example_group_block); end + + # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + def xdescribe(*args, &example_group_block); end + end +end + +# source://rspec//lib/rspec/version.rb#2 +module RSpec::Version; end + +# source://rspec//lib/rspec/version.rb#3 +RSpec::Version::STRING = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi b/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi new file mode 100644 index 0000000..fe14ff9 --- /dev/null +++ b/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi @@ -0,0 +1,1317 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `ruby-progressbar` gem. +# Please instead update this file by running `bin/tapioca gem ruby-progressbar`. + +# source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#4 +class ProgressBar + class << self + # source://ruby-progressbar//lib/ruby-progressbar.rb#9 + def create(*args); end + end +end + +# source://ruby-progressbar//lib/ruby-progressbar/base.rb#17 +class ProgressBar::Base + extend ::Forwardable + + # @return [Base] a new instance of Base + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#45 + def initialize(options = T.unsafe(nil)); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def clear(*args, **_arg1, &block); end + + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#137 + def decrement; end + + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#92 + def finish; end + + # @return [Boolean] + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#129 + def finished?; end + + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#203 + def format(other); end + + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#203 + def format=(other); end + + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#141 + def increment; end + + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#199 + def inspect; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def log(*args, **_arg1, &block); end + + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#102 + def pause; end + + # @return [Boolean] + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#123 + def paused?; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def progress(*args, **_arg1, &block); end + + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#145 + def progress=(new_progress); end + + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#153 + def progress_mark=(mark); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def refresh(*args, **_arg1, &block); end + + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#157 + def remainder_mark=(mark); end + + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#114 + def reset; end + + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#110 + def resume; end + + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#87 + def start(options = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#133 + def started?; end + + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#106 + def stop; end + + # @return [Boolean] + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#123 + def stopped?; end + + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#161 + def title; end + + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#165 + def title=(title); end + + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#176 + def to_h; end + + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#169 + def to_s(new_format = T.unsafe(nil)); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def total(*args, **_arg1, &block); end + + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#149 + def total=(new_total); end + + protected + + # Returns the value of attribute autofinish. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def autofinish; end + + # Sets the attribute autofinish + # + # @param value the value to set the attribute autofinish to. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def autofinish=(_arg0); end + + # Returns the value of attribute autostart. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def autostart; end + + # Sets the attribute autostart + # + # @param value the value to set the attribute autostart to. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def autostart=(_arg0); end + + # Returns the value of attribute bar_component. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def bar_component; end + + # Sets the attribute bar_component + # + # @param value the value to set the attribute bar_component to. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def bar_component=(_arg0); end + + # Returns the value of attribute finished. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def finished; end + + # Sets the attribute finished + # + # @param value the value to set the attribute finished to. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def finished=(_arg0); end + + # Returns the value of attribute output. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def output; end + + # Sets the attribute output + # + # @param value the value to set the attribute output to. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def output=(_arg0); end + + # Returns the value of attribute percentage_component. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def percentage_component; end + + # Sets the attribute percentage_component + # + # @param value the value to set the attribute percentage_component to. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def percentage_component=(_arg0); end + + # Returns the value of attribute progressable. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def progressable; end + + # Sets the attribute progressable + # + # @param value the value to set the attribute progressable to. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def progressable=(_arg0); end + + # Returns the value of attribute projector. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def projector; end + + # Sets the attribute projector + # + # @param value the value to set the attribute projector to. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def projector=(_arg0); end + + # Returns the value of attribute rate_component. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def rate_component; end + + # Sets the attribute rate_component + # + # @param value the value to set the attribute rate_component to. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def rate_component=(_arg0); end + + # Returns the value of attribute time_component. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def time_component; end + + # Sets the attribute time_component + # + # @param value the value to set the attribute time_component to. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def time_component=(_arg0); end + + # Returns the value of attribute timer. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def timer; end + + # Sets the attribute timer + # + # @param value the value to set the attribute timer to. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def timer=(_arg0); end + + # Returns the value of attribute title_component. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def title_component; end + + # Sets the attribute title_component + # + # @param value the value to set the attribute title_component to. + # + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#213 + def title_component=(_arg0); end + + # source://ruby-progressbar//lib/ruby-progressbar/base.rb#226 + def update_progress(*args); end +end + +# source://ruby-progressbar//lib/ruby-progressbar/base.rb#28 +ProgressBar::Base::RUNNING_AVERAGE_RATE_DEPRECATION_WARNING = T.let(T.unsafe(nil), String) + +# source://ruby-progressbar//lib/ruby-progressbar/base.rb#21 +ProgressBar::Base::SMOOTHING_DEPRECATION_WARNING = T.let(T.unsafe(nil), String) + +# source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#2 +module ProgressBar::Calculators; end + +# source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#3 +class ProgressBar::Calculators::Length + # @return [Length] a new instance of Length + # + # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#8 + def initialize(options = T.unsafe(nil)); end + + # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#25 + def calculate_length; end + + # Returns the value of attribute current_length. + # + # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#5 + def current_length; end + + # Sets the attribute current_length + # + # @param value the value to set the attribute current_length to. + # + # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#5 + def current_length=(_arg0); end + + # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#14 + def length; end + + # @return [Boolean] + # + # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#18 + def length_changed?; end + + # Returns the value of attribute length_override. + # + # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#4 + def length_override; end + + # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#33 + def length_override=(other); end + + # Returns the value of attribute output. + # + # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#5 + def output; end + + # Sets the attribute output + # + # @param value the value to set the attribute output to. + # + # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#5 + def output=(_arg0); end + + # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#29 + def reset_length; end + + private + + # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#56 + def dynamic_width; end + + # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#85 + def dynamic_width_stty; end + + # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#89 + def dynamic_width_tput; end + + # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#76 + def dynamic_width_via_io_object; end + + # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#71 + def dynamic_width_via_output_stream_object; end + + # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#81 + def dynamic_width_via_system_calls; end + + # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#43 + def terminal_width; end + + # @return [Boolean] + # + # source://ruby-progressbar//lib/ruby-progressbar/calculators/length.rb#93 + def unix?; end +end + +# source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#5 +module ProgressBar::Components; end + +# source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#6 +class ProgressBar::Components::Bar + # @return [Bar] a new instance of Bar + # + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#17 + def initialize(options = T.unsafe(nil)); end + + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#35 + def bar(length); end + + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#63 + def bar_with_percentage(length); end + + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#41 + def complete_bar(length); end + + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#47 + def complete_bar_with_percentage(length); end + + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#53 + def incomplete_space(length); end + + # Returns the value of attribute length. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#11 + def length; end + + # Sets the attribute length + # + # @param value the value to set the attribute length to. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#11 + def length=(_arg0); end + + # Returns the value of attribute progress. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#11 + def progress; end + + # Sets the attribute progress + # + # @param value the value to set the attribute progress to. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#11 + def progress=(_arg0); end + + # Returns the value of attribute progress_mark. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#11 + def progress_mark; end + + # Sets the attribute progress_mark + # + # @param value the value to set the attribute progress_mark to. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#11 + def progress_mark=(_arg0); end + + # Returns the value of attribute remainder_mark. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#11 + def remainder_mark; end + + # Sets the attribute remainder_mark + # + # @param value the value to set the attribute remainder_mark to. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#11 + def remainder_mark=(_arg0); end + + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#25 + def to_s(options = T.unsafe(nil)); end + + # Returns the value of attribute upa_steps. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#11 + def upa_steps; end + + # Sets the attribute upa_steps + # + # @param value the value to set the attribute upa_steps to. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#11 + def upa_steps=(_arg0); end + + private + + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#91 + def completed_length; end + + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#81 + def incomplete_string; end + + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#71 + def integrated_percentage_complete_string; end + + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#77 + def standard_complete_string; end + + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#95 + def unknown_progress_frame; end + + # source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#85 + def unknown_string; end +end + +# source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#7 +ProgressBar::Components::Bar::DEFAULT_PROGRESS_MARK = T.let(T.unsafe(nil), String) + +# source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#8 +ProgressBar::Components::Bar::DEFAULT_REMAINDER_MARK = T.let(T.unsafe(nil), String) + +# source://ruby-progressbar//lib/ruby-progressbar/components/bar.rb#9 +ProgressBar::Components::Bar::DEFAULT_UPA_STEPS = T.let(T.unsafe(nil), Array) + +# source://ruby-progressbar//lib/ruby-progressbar/components/percentage.rb#3 +class ProgressBar::Components::Percentage + # @return [Percentage] a new instance of Percentage + # + # source://ruby-progressbar//lib/ruby-progressbar/components/percentage.rb#6 + def initialize(options = T.unsafe(nil)); end + + # source://ruby-progressbar//lib/ruby-progressbar/components/percentage.rb#14 + def justified_percentage; end + + # source://ruby-progressbar//lib/ruby-progressbar/components/percentage.rb#22 + def justified_percentage_with_precision; end + + # source://ruby-progressbar//lib/ruby-progressbar/components/percentage.rb#10 + def percentage; end + + # source://ruby-progressbar//lib/ruby-progressbar/components/percentage.rb#18 + def percentage_with_precision; end + + # Returns the value of attribute progress. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/percentage.rb#4 + def progress; end + + # Sets the attribute progress + # + # @param value the value to set the attribute progress to. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/percentage.rb#4 + def progress=(_arg0); end +end + +# source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#3 +class ProgressBar::Components::Rate + # @return [Rate] a new instance of Rate + # + # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#8 + def initialize(options = T.unsafe(nil)); end + + # Returns the value of attribute progress. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#4 + def progress; end + + # Sets the attribute progress + # + # @param value the value to set the attribute progress to. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#4 + def progress=(_arg0); end + + # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#14 + def rate_of_change(format_string = T.unsafe(nil)); end + + # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#20 + def rate_of_change_with_precision; end + + # Returns the value of attribute rate_scale. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#4 + def rate_scale; end + + # Sets the attribute rate_scale + # + # @param value the value to set the attribute rate_scale to. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#4 + def rate_scale=(_arg0); end + + # Returns the value of attribute timer. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#4 + def timer; end + + # Sets the attribute timer + # + # @param value the value to set the attribute timer to. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#4 + def timer=(_arg0); end + + private + + # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#30 + def base_rate; end + + # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#34 + def elapsed_seconds; end + + # source://ruby-progressbar//lib/ruby-progressbar/components/rate.rb#26 + def scaled_rate; end +end + +# source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#6 +class ProgressBar::Components::Time + # @return [Time] a new instance of Time + # + # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#21 + def initialize(options = T.unsafe(nil)); end + + # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#31 + def elapsed_with_label; end + + # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#47 + def estimated_wall_clock; end + + # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#43 + def estimated_with_friendly_oob; end + + # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#27 + def estimated_with_label(out_of_bounds_time_format = T.unsafe(nil)); end + + # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#35 + def estimated_with_no_oob; end + + # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#39 + def estimated_with_unknown_oob; end + + protected + + # Returns the value of attribute progress. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#60 + def progress; end + + # Sets the attribute progress + # + # @param value the value to set the attribute progress to. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#60 + def progress=(_arg0); end + + # Returns the value of attribute projector. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#60 + def projector; end + + # Sets the attribute projector + # + # @param value the value to set the attribute projector to. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#60 + def projector=(_arg0); end + + # Returns the value of attribute timer. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#60 + def timer; end + + # Sets the attribute timer + # + # @param value the value to set the attribute timer to. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#60 + def timer=(_arg0); end + + private + + # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#80 + def elapsed; end + + # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#66 + def estimated(out_of_bounds_time_format); end + + # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#94 + def estimated_seconds_remaining; end + + # source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#88 + def estimated_with_elapsed_fallback(out_of_bounds_time_format); end +end + +# source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#14 +ProgressBar::Components::Time::ELAPSED_LABEL = T.let(T.unsafe(nil), String) + +# source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#13 +ProgressBar::Components::Time::ESTIMATED_LABEL = T.let(T.unsafe(nil), String) + +# source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#12 +ProgressBar::Components::Time::NO_TIME_ELAPSED_TEXT = T.let(T.unsafe(nil), String) + +# source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#11 +ProgressBar::Components::Time::OOB_FRIENDLY_TIME_TEXT = T.let(T.unsafe(nil), String) + +# source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#9 +ProgressBar::Components::Time::OOB_LIMIT_IN_HOURS = T.let(T.unsafe(nil), Integer) + +# source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#16 +ProgressBar::Components::Time::OOB_TEXT_TO_FORMAT = T.let(T.unsafe(nil), Hash) + +# source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#8 +ProgressBar::Components::Time::OOB_TIME_FORMATS = T.let(T.unsafe(nil), Array) + +# source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#10 +ProgressBar::Components::Time::OOB_UNKNOWN_TIME_TEXT = T.let(T.unsafe(nil), String) + +# source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#7 +ProgressBar::Components::Time::TIME_FORMAT = T.let(T.unsafe(nil), String) + +# source://ruby-progressbar//lib/ruby-progressbar/components/time.rb#15 +ProgressBar::Components::Time::WALL_CLOCK_FORMAT = T.let(T.unsafe(nil), String) + +# source://ruby-progressbar//lib/ruby-progressbar/components/title.rb#3 +class ProgressBar::Components::Title + # @return [Title] a new instance of Title + # + # source://ruby-progressbar//lib/ruby-progressbar/components/title.rb#8 + def initialize(options = T.unsafe(nil)); end + + # Returns the value of attribute title. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/title.rb#6 + def title; end + + # Sets the attribute title + # + # @param value the value to set the attribute title to. + # + # source://ruby-progressbar//lib/ruby-progressbar/components/title.rb#6 + def title=(_arg0); end +end + +# source://ruby-progressbar//lib/ruby-progressbar/components/title.rb#4 +ProgressBar::Components::Title::DEFAULT_TITLE = T.let(T.unsafe(nil), String) + +# source://ruby-progressbar//lib/ruby-progressbar/format/formatter.rb#2 +module ProgressBar::Format; end + +# source://ruby-progressbar//lib/ruby-progressbar/format/formatter.rb#3 +class ProgressBar::Format::Formatter + class << self + # source://ruby-progressbar//lib/ruby-progressbar/format/formatter.rb#4 + def process(format_string, max_length, bar); end + end +end + +# source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#3 +class ProgressBar::Format::Molecule + # @return [Molecule] a new instance of Molecule + # + # source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#33 + def initialize(letter); end + + # @return [Boolean] + # + # source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#38 + def bar_molecule?; end + + # source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#46 + def full_key; end + + # Returns the value of attribute key. + # + # source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#30 + def key; end + + # Sets the attribute key + # + # @param value the value to set the attribute key to. + # + # source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#30 + def key=(_arg0); end + + # source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#50 + def lookup_value(environment, length = T.unsafe(nil)); end + + # Returns the value of attribute method_name. + # + # source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#30 + def method_name; end + + # Sets the attribute method_name + # + # @param value the value to set the attribute method_name to. + # + # source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#30 + def method_name=(_arg0); end + + # @return [Boolean] + # + # source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#42 + def non_bar_molecule?; end +end + +# source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#28 +ProgressBar::Format::Molecule::BAR_MOLECULES = T.let(T.unsafe(nil), Array) + +# source://ruby-progressbar//lib/ruby-progressbar/format/molecule.rb#4 +ProgressBar::Format::Molecule::MOLECULES = T.let(T.unsafe(nil), Hash) + +# source://ruby-progressbar//lib/ruby-progressbar/format/string.rb#5 +class ProgressBar::Format::String < ::String + # source://ruby-progressbar//lib/ruby-progressbar/format/string.rb#13 + def bar_molecule_placeholder_length; end + + # source://ruby-progressbar//lib/ruby-progressbar/format/string.rb#21 + def bar_molecules; end + + # source://ruby-progressbar//lib/ruby-progressbar/format/string.rb#9 + def displayable_length; end + + # source://ruby-progressbar//lib/ruby-progressbar/format/string.rb#25 + def molecules; end + + # source://ruby-progressbar//lib/ruby-progressbar/format/string.rb#17 + def non_bar_molecules; end +end + +# source://ruby-progressbar//lib/ruby-progressbar/format/string.rb#7 +ProgressBar::Format::String::ANSI_SGR_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://ruby-progressbar//lib/ruby-progressbar/format/string.rb#6 +ProgressBar::Format::String::MOLECULE_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://ruby-progressbar//lib/ruby-progressbar/errors/invalid_progress_error.rb#2 +class ProgressBar::InvalidProgressError < ::RuntimeError; end + +# source://ruby-progressbar//lib/ruby-progressbar/output.rb#5 +class ProgressBar::Output + # @return [Output] a new instance of Output + # + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#10 + def initialize(options = T.unsafe(nil)); end + + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#37 + def clear_string; end + + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#41 + def length; end + + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#30 + def log(string); end + + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#50 + def refresh(options = T.unsafe(nil)); end + + # Returns the value of attribute stream. + # + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#8 + def stream; end + + # Sets the attribute stream + # + # @param value the value to set the attribute stream to. + # + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#8 + def stream=(_arg0); end + + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#45 + def with_refresh; end + + protected + + # Returns the value of attribute bar. + # + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#60 + def bar; end + + # Sets the attribute bar + # + # @param value the value to set the attribute bar to. + # + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#60 + def bar=(_arg0); end + + # Returns the value of attribute length_calculator. + # + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#60 + def length_calculator; end + + # Sets the attribute length_calculator + # + # @param value the value to set the attribute length_calculator to. + # + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#60 + def length_calculator=(_arg0); end + + # Returns the value of attribute throttle. + # + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#60 + def throttle; end + + # Sets the attribute throttle + # + # @param value the value to set the attribute throttle to. + # + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#60 + def throttle=(_arg0); end + + private + + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#66 + def print_and_flush; end + + class << self + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#20 + def detect(options = T.unsafe(nil)); end + end +end + +# source://ruby-progressbar//lib/ruby-progressbar/output.rb#6 +ProgressBar::Output::DEFAULT_OUTPUT_STREAM = T.let(T.unsafe(nil), IO) + +# source://ruby-progressbar//lib/ruby-progressbar/outputs/non_tty.rb#4 +module ProgressBar::Outputs; end + +# source://ruby-progressbar//lib/ruby-progressbar/outputs/non_tty.rb#5 +class ProgressBar::Outputs::NonTty < ::ProgressBar::Output + # source://ruby-progressbar//lib/ruby-progressbar/outputs/non_tty.rb#18 + def bar_update_string; end + + # source://ruby-progressbar//lib/ruby-progressbar/outputs/non_tty.rb#8 + def clear; end + + # source://ruby-progressbar//lib/ruby-progressbar/outputs/non_tty.rb#28 + def default_format; end + + # source://ruby-progressbar//lib/ruby-progressbar/outputs/non_tty.rb#38 + def eol; end + + # source://ruby-progressbar//lib/ruby-progressbar/outputs/non_tty.rb#14 + def last_update_length; end + + # source://ruby-progressbar//lib/ruby-progressbar/outputs/non_tty.rb#36 + def refresh_with_format_change(*_arg0); end + + # source://ruby-progressbar//lib/ruby-progressbar/outputs/non_tty.rb#32 + def resolve_format(*_arg0); end + + protected + + # Sets the attribute last_update_length + # + # @param value the value to set the attribute last_update_length to. + # + # source://ruby-progressbar//lib/ruby-progressbar/outputs/non_tty.rb#44 + def last_update_length=(_arg0); end +end + +# source://ruby-progressbar//lib/ruby-progressbar/outputs/non_tty.rb#6 +ProgressBar::Outputs::NonTty::DEFAULT_FORMAT_STRING = T.let(T.unsafe(nil), String) + +# source://ruby-progressbar//lib/ruby-progressbar/outputs/tty.rb#5 +class ProgressBar::Outputs::Tty < ::ProgressBar::Output + # source://ruby-progressbar//lib/ruby-progressbar/outputs/tty.rb#15 + def bar_update_string; end + + # source://ruby-progressbar//lib/ruby-progressbar/outputs/tty.rb#10 + def clear; end + + # source://ruby-progressbar//lib/ruby-progressbar/outputs/tty.rb#19 + def default_format; end + + # source://ruby-progressbar//lib/ruby-progressbar/outputs/tty.rb#27 + def eol; end + + # source://ruby-progressbar//lib/ruby-progressbar/output.rb#45 + def refresh_with_format_change; end + + # source://ruby-progressbar//lib/ruby-progressbar/outputs/tty.rb#23 + def resolve_format(other_format); end +end + +# source://ruby-progressbar//lib/ruby-progressbar/outputs/tty.rb#6 +ProgressBar::Outputs::Tty::DEFAULT_FORMAT_STRING = T.let(T.unsafe(nil), String) + +# source://ruby-progressbar//lib/ruby-progressbar/progress.rb#4 +class ProgressBar::Progress + # @return [Progress] a new instance of Progress + # + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#12 + def initialize(options = T.unsafe(nil)); end + + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#104 + def absolute; end + + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#41 + def decrement; end + + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#23 + def finish; end + + # @return [Boolean] + # + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#27 + def finished?; end + + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#31 + def increment; end + + # @return [Boolean] + # + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#85 + def none?; end + + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#73 + def percentage_completed; end + + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#97 + def percentage_completed_with_precision; end + + # Returns the value of attribute progress. + # + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#8 + def progress; end + + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#55 + def progress=(new_progress); end + + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#51 + def reset; end + + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#18 + def start(options = T.unsafe(nil)); end + + # Returns the value of attribute starting_position. + # + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#10 + def starting_position; end + + # Sets the attribute starting_position + # + # @param value the value to set the attribute starting_position to. + # + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#10 + def starting_position=(_arg0); end + + # Returns the value of attribute total. + # + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#8 + def total; end + + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#64 + def total=(new_total); end + + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#93 + def total_with_unknown_indicator; end + + # @return [Boolean] + # + # source://ruby-progressbar//lib/ruby-progressbar/progress.rb#89 + def unknown?; end +end + +# source://ruby-progressbar//lib/ruby-progressbar/progress.rb#6 +ProgressBar::Progress::DEFAULT_BEGINNING_POSITION = T.let(T.unsafe(nil), Integer) + +# source://ruby-progressbar//lib/ruby-progressbar/progress.rb#5 +ProgressBar::Progress::DEFAULT_TOTAL = T.let(T.unsafe(nil), Integer) + +# source://ruby-progressbar//lib/ruby-progressbar/projector.rb#4 +class ProgressBar::Projector + class << self + # source://ruby-progressbar//lib/ruby-progressbar/projector.rb#10 + def from_type(name); end + end +end + +# source://ruby-progressbar//lib/ruby-progressbar/projector.rb#5 +ProgressBar::Projector::DEFAULT_PROJECTOR = ProgressBar::Projectors::SmoothedAverage + +# source://ruby-progressbar//lib/ruby-progressbar/projector.rb#6 +ProgressBar::Projector::NAME_TO_PROJECTOR_MAP = T.let(T.unsafe(nil), Hash) + +# source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#2 +module ProgressBar::Projectors; end + +# source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#3 +class ProgressBar::Projectors::SmoothedAverage + # @return [SmoothedAverage] a new instance of SmoothedAverage + # + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#11 + def initialize(options = T.unsafe(nil)); end + + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#24 + def decrement; end + + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#28 + def increment; end + + # @return [Boolean] + # + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#52 + def none?; end + + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#32 + def progress; end + + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#42 + def progress=(new_progress); end + + # Returns the value of attribute projection. + # + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#9 + def projection; end + + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#38 + def reset; end + + # Returns the value of attribute samples. + # + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#7 + def samples; end + + # Sets the attribute samples + # + # @param value the value to set the attribute samples to. + # + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#7 + def samples=(_arg0); end + + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#19 + def start(options = T.unsafe(nil)); end + + # Returns the value of attribute strength. + # + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#7 + def strength; end + + # Sets the attribute strength + # + # @param value the value to set the attribute strength to. + # + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#7 + def strength=(_arg0); end + + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#36 + def total=(_new_total); end + + protected + + # Sets the attribute projection + # + # @param value the value to set the attribute projection to. + # + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#62 + def projection=(_arg0); end + + private + + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#66 + def absolute; end + + class << self + # source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#56 + def calculate(current_projection, new_value, rate); end + end +end + +# source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#5 +ProgressBar::Projectors::SmoothedAverage::DEFAULT_BEGINNING_POSITION = T.let(T.unsafe(nil), Integer) + +# source://ruby-progressbar//lib/ruby-progressbar/projectors/smoothed_average.rb#4 +ProgressBar::Projectors::SmoothedAverage::DEFAULT_STRENGTH = T.let(T.unsafe(nil), Float) + +# source://ruby-progressbar//lib/ruby-progressbar/refinements/progress_enumerator.rb#2 +module ProgressBar::Refinements; end + +# source://ruby-progressbar//lib/ruby-progressbar/refinements/progress_enumerator.rb#3 +module ProgressBar::Refinements::Enumerator; end + +# source://ruby-progressbar//lib/ruby-progressbar/refinements/progress_enumerator.rb#4 +ProgressBar::Refinements::Enumerator::ARITY_ERROR_MESSAGE = T.let(T.unsafe(nil), String) + +# source://ruby-progressbar//lib/ruby-progressbar/throttle.rb#2 +class ProgressBar::Throttle + # @return [Throttle] a new instance of Throttle + # + # source://ruby-progressbar//lib/ruby-progressbar/throttle.rb#8 + def initialize(options = T.unsafe(nil)); end + + # source://ruby-progressbar//lib/ruby-progressbar/throttle.rb#15 + def choke(options = T.unsafe(nil)); end + + # Returns the value of attribute rate. + # + # source://ruby-progressbar//lib/ruby-progressbar/throttle.rb#3 + def rate; end + + # Sets the attribute rate + # + # @param value the value to set the attribute rate to. + # + # source://ruby-progressbar//lib/ruby-progressbar/throttle.rb#3 + def rate=(_arg0); end + + # Returns the value of attribute started_at. + # + # source://ruby-progressbar//lib/ruby-progressbar/throttle.rb#3 + def started_at; end + + # Sets the attribute started_at + # + # @param value the value to set the attribute started_at to. + # + # source://ruby-progressbar//lib/ruby-progressbar/throttle.rb#3 + def started_at=(_arg0); end + + # Returns the value of attribute stopped_at. + # + # source://ruby-progressbar//lib/ruby-progressbar/throttle.rb#3 + def stopped_at; end + + # Sets the attribute stopped_at + # + # @param value the value to set the attribute stopped_at to. + # + # source://ruby-progressbar//lib/ruby-progressbar/throttle.rb#3 + def stopped_at=(_arg0); end + + # Returns the value of attribute timer. + # + # source://ruby-progressbar//lib/ruby-progressbar/throttle.rb#3 + def timer; end + + # Sets the attribute timer + # + # @param value the value to set the attribute timer to. + # + # source://ruby-progressbar//lib/ruby-progressbar/throttle.rb#3 + def timer=(_arg0); end +end + +# source://ruby-progressbar//lib/ruby-progressbar/time.rb#3 +class ProgressBar::Time + # @return [Time] a new instance of Time + # + # source://ruby-progressbar//lib/ruby-progressbar/time.rb#11 + def initialize(time = T.unsafe(nil)); end + + # source://ruby-progressbar//lib/ruby-progressbar/time.rb#15 + def now; end + + # source://ruby-progressbar//lib/ruby-progressbar/time.rb#19 + def unmocked_time_method; end + + protected + + # Returns the value of attribute time. + # + # source://ruby-progressbar//lib/ruby-progressbar/time.rb#27 + def time; end + + # Sets the attribute time + # + # @param value the value to set the attribute time to. + # + # source://ruby-progressbar//lib/ruby-progressbar/time.rb#27 + def time=(_arg0); end +end + +# source://ruby-progressbar//lib/ruby-progressbar/time.rb#4 +ProgressBar::Time::TIME_MOCKING_LIBRARY_METHODS = T.let(T.unsafe(nil), Array) + +# source://ruby-progressbar//lib/ruby-progressbar/timer.rb#4 +class ProgressBar::Timer + # @return [Timer] a new instance of Timer + # + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#8 + def initialize(options = T.unsafe(nil)); end + + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#67 + def divide_seconds(seconds); end + + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#57 + def elapsed_seconds; end + + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#63 + def elapsed_whole_seconds; end + + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#31 + def now; end + + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#23 + def pause; end + + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#43 + def reset; end + + # @return [Boolean] + # + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#48 + def reset?; end + + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#52 + def restart; end + + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#27 + def resume; end + + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#12 + def start; end + + # @return [Boolean] + # + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#35 + def started?; end + + # Returns the value of attribute started_at. + # + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#5 + def started_at; end + + # Sets the attribute started_at + # + # @param value the value to set the attribute started_at to. + # + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#5 + def started_at=(_arg0); end + + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#17 + def stop; end + + # @return [Boolean] + # + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#39 + def stopped?; end + + # Returns the value of attribute stopped_at. + # + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#5 + def stopped_at; end + + # Sets the attribute stopped_at + # + # @param value the value to set the attribute stopped_at to. + # + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#5 + def stopped_at=(_arg0); end + + protected + + # Returns the value of attribute time. + # + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#76 + def time; end + + # Sets the attribute time + # + # @param value the value to set the attribute time to. + # + # source://ruby-progressbar//lib/ruby-progressbar/timer.rb#76 + def time=(_arg0); end +end diff --git a/sorbet/rbi/gems/thor@1.2.2.rbi b/sorbet/rbi/gems/thor@1.2.2.rbi new file mode 100644 index 0000000..dcb11ee --- /dev/null +++ b/sorbet/rbi/gems/thor@1.2.2.rbi @@ -0,0 +1,3965 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `thor` gem. +# Please instead update this file by running `bin/tapioca gem thor`. + +# source://thor//lib/thor/command.rb#1 +class Thor + include ::Thor::Base + include ::Thor::Invocation + include ::Thor::Shell + extend ::Thor::Base::ClassMethods + extend ::Thor::Invocation::ClassMethods + + # source://thor//lib/thor.rb#505 + def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end + + class << self + # Extend check unknown options to accept a hash of conditions. + # + # === Parameters + # options<Hash>: A hash containing :only and/or :except keys + # + # source://thor//lib/thor.rb#255 + def check_unknown_options!(options = T.unsafe(nil)); end + + # Overwrite check_unknown_options? to take subcommands and options into account. + # + # @return [Boolean] + # + # source://thor//lib/thor.rb#268 + def check_unknown_options?(config); end + + # Prints help information for the given command. + # + # ==== Parameters + # shell<Thor::Shell> + # command_name<String> + # + # source://thor//lib/thor.rb#172 + def command_help(shell, command_name); end + + # Sets the default command when thor is executed without an explicit command to be called. + # + # ==== Parameters + # meth<Symbol>:: name of the default command + # + # source://thor//lib/thor.rb#21 + def default_command(meth = T.unsafe(nil)); end + + # Sets the default command when thor is executed without an explicit command to be called. + # + # ==== Parameters + # meth<Symbol>:: name of the default command + # + # source://thor//lib/thor.rb#21 + def default_task(meth = T.unsafe(nil)); end + + # source://thor//lib/thor/base.rb#26 + def deprecation_warning(message); end + + # Defines the usage and the description of the next command. + # + # ==== Parameters + # usage<String> + # description<String> + # options<String> + # + # source://thor//lib/thor.rb#54 + def desc(usage, description, options = T.unsafe(nil)); end + + # Disable the check for required options for the given commands. + # This is useful if you have a command that does not need the required options + # to work, like help. + # + # ==== Parameters + # Symbol ...:: A list of commands that should be affected. + # + # source://thor//lib/thor.rb#339 + def disable_required_check!(*command_names); end + + # @return [Boolean] + # + # source://thor//lib/thor.rb#343 + def disable_required_check?(command); end + + # Prints help information for this class. + # + # ==== Parameters + # shell<Thor::Shell> + # + # source://thor//lib/thor.rb#195 + def help(shell, subcommand = T.unsafe(nil)); end + + # Defines the long description of the next command. + # + # ==== Parameters + # long description<String> + # + # source://thor//lib/thor.rb#71 + def long_desc(long_description, options = T.unsafe(nil)); end + + # Maps an input to a command. If you define: + # + # map "-T" => "list" + # + # Running: + # + # thor -T + # + # Will invoke the list command. + # + # ==== Parameters + # Hash[String|Array => Symbol]:: Maps the string or the strings in the array to the given command. + # + # source://thor//lib/thor.rb#93 + def map(mappings = T.unsafe(nil), **kw); end + + # Adds an option to the set of method options. If :for is given as option, + # it allows you to change the options from a previous defined command. + # + # def previous_command + # # magic + # end + # + # method_option :foo => :bar, :for => :previous_command + # + # def next_command + # # magic + # end + # + # ==== Parameters + # name<Symbol>:: The name of the argument. + # options<Hash>:: Described below. + # + # ==== Options + # :desc - Description for the argument. + # :required - If the argument is required or not. + # :default - Default value for this argument. It cannot be required and have default values. + # :aliases - Aliases for this option. + # :type - The type of the argument, can be :string, :hash, :array, :numeric or :boolean. + # :banner - String to show on usage notes. + # :hide - If you want to hide this option from the help. + # + # source://thor//lib/thor.rb#155 + def method_option(name, options = T.unsafe(nil)); end + + # Declares the options for the next command to be declared. + # + # ==== Parameters + # Hash[Symbol => Object]:: The hash key is the name of the option and the value + # is the type of the option. Can be :string, :array, :hash, :boolean, :numeric + # or :required (string). If you give a value, the type of the value is used. + # + # source://thor//lib/thor.rb#121 + def method_options(options = T.unsafe(nil)); end + + # Adds an option to the set of method options. If :for is given as option, + # it allows you to change the options from a previous defined command. + # + # def previous_command + # # magic + # end + # + # method_option :foo => :bar, :for => :previous_command + # + # def next_command + # # magic + # end + # + # ==== Parameters + # name<Symbol>:: The name of the argument. + # options<Hash>:: Described below. + # + # ==== Options + # :desc - Description for the argument. + # :required - If the argument is required or not. + # :default - Default value for this argument. It cannot be required and have default values. + # :aliases - Aliases for this option. + # :type - The type of the argument, can be :string, :hash, :array, :numeric or :boolean. + # :banner - String to show on usage notes. + # :hide - If you want to hide this option from the help. + # + # source://thor//lib/thor.rb#155 + def option(name, options = T.unsafe(nil)); end + + # Declares the options for the next command to be declared. + # + # ==== Parameters + # Hash[Symbol => Object]:: The hash key is the name of the option and the value + # is the type of the option. Can be :string, :array, :hash, :boolean, :numeric + # or :required (string). If you give a value, the type of the value is used. + # + # source://thor//lib/thor.rb#121 + def options(options = T.unsafe(nil)); end + + # Allows for custom "Command" package naming. + # + # === Parameters + # name<String> + # options<Hash> + # + # source://thor//lib/thor.rb#12 + def package_name(name, _ = T.unsafe(nil)); end + + # Returns commands ready to be printed. + # + # source://thor//lib/thor.rb#214 + def printable_commands(all = T.unsafe(nil), subcommand = T.unsafe(nil)); end + + # Returns commands ready to be printed. + # + # source://thor//lib/thor.rb#214 + def printable_tasks(all = T.unsafe(nil), subcommand = T.unsafe(nil)); end + + # Registers another Thor subclass as a command. + # + # ==== Parameters + # klass<Class>:: Thor subclass to register + # command<String>:: Subcommand name to use + # usage<String>:: Short usage for the subcommand + # description<String>:: Description for the subcommand + # + # source://thor//lib/thor.rb#37 + def register(klass, subcommand_name, usage, description, options = T.unsafe(nil)); end + + # Stop parsing of options as soon as an unknown option or a regular + # argument is encountered. All remaining arguments are passed to the command. + # This is useful if you have a command that can receive arbitrary additional + # options, and where those additional options should not be handled by + # Thor. + # + # ==== Example + # + # To better understand how this is useful, let's consider a command that calls + # an external command. A user may want to pass arbitrary options and + # arguments to that command. The command itself also accepts some options, + # which should be handled by Thor. + # + # class_option "verbose", :type => :boolean + # stop_on_unknown_option! :exec + # check_unknown_options! :except => :exec + # + # desc "exec", "Run a shell command" + # def exec(*args) + # puts "diagnostic output" if options[:verbose] + # Kernel.exec(*args) + # end + # + # Here +exec+ can be called with +--verbose+ to get diagnostic output, + # e.g.: + # + # $ thor exec --verbose echo foo + # diagnostic output + # foo + # + # But if +--verbose+ is given after +echo+, it is passed to +echo+ instead: + # + # $ thor exec echo --verbose foo + # --verbose foo + # + # ==== Parameters + # Symbol ...:: A list of commands that should be affected. + # + # source://thor//lib/thor.rb#325 + def stop_on_unknown_option!(*command_names); end + + # @return [Boolean] + # + # source://thor//lib/thor.rb#329 + def stop_on_unknown_option?(command); end + + # source://thor//lib/thor.rb#234 + def subcommand(subcommand, subcommand_class); end + + # source://thor//lib/thor.rb#230 + def subcommand_classes; end + + # source://thor//lib/thor.rb#225 + def subcommands; end + + # source://thor//lib/thor.rb#234 + def subtask(subcommand, subcommand_class); end + + # source://thor//lib/thor.rb#225 + def subtasks; end + + # Prints help information for the given command. + # + # ==== Parameters + # shell<Thor::Shell> + # command_name<String> + # + # source://thor//lib/thor.rb#172 + def task_help(shell, command_name); end + + protected + + # The banner for this class. You can customize it if you are invoking the + # thor class by another ways which is not the Thor::Runner. It receives + # the command that is going to be invoked and a boolean which indicates if + # the namespace should be displayed as arguments. + # + # source://thor//lib/thor.rb#400 + def banner(command, namespace = T.unsafe(nil), subcommand = T.unsafe(nil)); end + + # source://thor//lib/thor.rb#406 + def baseclass; end + + # source://thor//lib/thor.rb#414 + def create_command(meth); end + + # source://thor//lib/thor.rb#414 + def create_task(meth); end + + # help command has the required check disabled by default. + # + # source://thor//lib/thor.rb#354 + def disable_required_check; end + + # The method responsible for dispatching given the args. + # + # @yield [instance] + # + # source://thor//lib/thor.rb#359 + def dispatch(meth, given_args, given_opts, config); end + + # source://thor//lib/thor.rb#410 + def dynamic_command_class; end + + # this is the logic that takes the command name passed in by the user + # and determines whether it is an unambiguous substrings of a command or + # alias name. + # + # source://thor//lib/thor.rb#476 + def find_command_possibilities(meth); end + + # this is the logic that takes the command name passed in by the user + # and determines whether it is an unambiguous substrings of a command or + # alias name. + # + # source://thor//lib/thor.rb#476 + def find_task_possibilities(meth); end + + # source://thor//lib/thor.rb#436 + def initialize_added; end + + # receives a (possibly nil) command name and returns a name that is in + # the commands hash. In addition to normalizing aliases, this logic + # will determine if a shortened command is an unambiguous substring of + # a command or alias. + # + # +normalize_command_name+ also converts names like +animal-prison+ + # into +animal_prison+. + # + # @raise [AmbiguousTaskError] + # + # source://thor//lib/thor.rb#455 + def normalize_command_name(meth); end + + # receives a (possibly nil) command name and returns a name that is in + # the commands hash. In addition to normalizing aliases, this logic + # will determine if a shortened command is an unambiguous substring of + # a command or alias. + # + # +normalize_command_name+ also converts names like +animal-prison+ + # into +animal_prison+. + # + # @raise [AmbiguousTaskError] + # + # source://thor//lib/thor.rb#455 + def normalize_task_name(meth); end + + # Retrieve the command name from given args. + # + # source://thor//lib/thor.rb#442 + def retrieve_command_name(args); end + + # Retrieve the command name from given args. + # + # source://thor//lib/thor.rb#442 + def retrieve_task_name(args); end + + # source://thor//lib/thor.rb#349 + def stop_on_unknown_option; end + + # source://thor//lib/thor.rb#491 + def subcommand_help(cmd); end + + # source://thor//lib/thor.rb#491 + def subtask_help(cmd); end + end +end + +# source://thor//lib/thor/actions/empty_directory.rb#2 +module Thor::Actions + mixes_in_class_methods ::Thor::Actions::ClassMethods + + # Extends initializer to add more configuration options. + # + # ==== Configuration + # behavior<Symbol>:: The actions default behavior. Can be :invoke or :revoke. + # It also accepts :force, :skip and :pretend to set the behavior + # and the respective option. + # + # destination_root<String>:: The root directory needed for some actions. + # + # source://thor//lib/thor/actions.rb#72 + def initialize(args = T.unsafe(nil), options = T.unsafe(nil), config = T.unsafe(nil)); end + + # Wraps an action object and call it accordingly to the thor class behavior. + # + # source://thor//lib/thor/actions.rb#89 + def action(instance); end + + # Create a new file relative to the destination root with the given data, + # which is the return value of a block or a data string. + # + # ==== Parameters + # destination<String>:: the relative path to the destination root. + # data<String|NilClass>:: the data to append to the file. + # config<Hash>:: give :verbose => false to not log the status. + # + # ==== Examples + # + # create_file "lib/fun_party.rb" do + # hostname = ask("What is the virtual hostname I should use?") + # "vhost.name = #{hostname}" + # end + # + # create_file "config/apache.conf", "your apache config" + # + # source://thor//lib/thor/actions/create_file.rb#22 + def add_file(destination, *args, &block); end + + # Create a new file relative to the destination root from the given source. + # + # ==== Parameters + # destination<String>:: the relative path to the destination root. + # source<String|NilClass>:: the relative path to the source root. + # config<Hash>:: give :verbose => false to not log the status. + # :: give :symbolic => false for hard link. + # + # ==== Examples + # + # create_link "config/apache.conf", "/etc/apache.conf" + # + # source://thor//lib/thor/actions/create_link.rb#17 + def add_link(destination, *args); end + + # Append text to a file. Since it depends on insert_into_file, it's reversible. + # + # ==== Parameters + # path<String>:: path of the file to be changed + # data<String>:: the data to append to the file, can be also given as a block. + # config<Hash>:: give :verbose => false to not log the status. + # + # ==== Example + # + # append_to_file 'config/environments/test.rb', 'config.gem "rspec"' + # + # append_to_file 'config/environments/test.rb' do + # 'config.gem "rspec"' + # end + # + # source://thor//lib/thor/actions/file_manipulation.rb#195 + def append_file(path, *args, &block); end + + # Append text to a file. Since it depends on insert_into_file, it's reversible. + # + # ==== Parameters + # path<String>:: path of the file to be changed + # data<String>:: the data to append to the file, can be also given as a block. + # config<Hash>:: give :verbose => false to not log the status. + # + # ==== Example + # + # append_to_file 'config/environments/test.rb', 'config.gem "rspec"' + # + # append_to_file 'config/environments/test.rb' do + # 'config.gem "rspec"' + # end + # + # source://thor//lib/thor/actions/file_manipulation.rb#195 + def append_to_file(path, *args, &block); end + + # Loads an external file and execute it in the instance binding. + # + # ==== Parameters + # path<String>:: The path to the file to execute. Can be a web address or + # a relative path from the source root. + # + # ==== Examples + # + # apply "http://gist.github.com/103208" + # + # apply "recipes/jquery.rb" + # + # source://thor//lib/thor/actions.rb#216 + def apply(path, config = T.unsafe(nil)); end + + # Returns the value of attribute behavior. + # + # source://thor//lib/thor/actions.rb#10 + def behavior; end + + # Sets the attribute behavior + # + # @param value the value to set the attribute behavior to. + # + # source://thor//lib/thor/actions.rb#10 + def behavior=(_arg0); end + + # Changes the mode of the given file or directory. + # + # ==== Parameters + # mode<Integer>:: the file mode + # path<String>:: the name of the file to change mode + # config<Hash>:: give :verbose => false to not log the status. + # + # ==== Example + # + # chmod "script/server", 0755 + # + # source://thor//lib/thor/actions/file_manipulation.rb#148 + def chmod(path, mode, config = T.unsafe(nil)); end + + # Comment all lines matching a given regex. It will leave the space + # which existed before the beginning of the line in tact and will insert + # a single space after the comment hash. + # + # ==== Parameters + # path<String>:: path of the file to be changed + # flag<Regexp|String>:: the regexp or string used to decide which lines to comment + # config<Hash>:: give :verbose => false to not log the status. + # + # ==== Example + # + # comment_lines 'config/initializers/session_store.rb', /cookie_store/ + # + # source://thor//lib/thor/actions/file_manipulation.rb#312 + def comment_lines(path, flag, *args); end + + # ==== Examples + # + # copy_file "README", "doc/README" + # + # copy_file "doc/README" + # + # source://thor//lib/thor/actions/file_manipulation.rb#21 + def copy_file(source, *args, &block); end + + # Create a new file relative to the destination root with the given data, + # which is the return value of a block or a data string. + # + # ==== Parameters + # destination<String>:: the relative path to the destination root. + # data<String|NilClass>:: the data to append to the file. + # config<Hash>:: give :verbose => false to not log the status. + # + # ==== Examples + # + # create_file "lib/fun_party.rb" do + # hostname = ask("What is the virtual hostname I should use?") + # "vhost.name = #{hostname}" + # end + # + # create_file "config/apache.conf", "your apache config" + # + # source://thor//lib/thor/actions/create_file.rb#22 + def create_file(destination, *args, &block); end + + # Create a new file relative to the destination root from the given source. + # + # ==== Parameters + # destination<String>:: the relative path to the destination root. + # source<String|NilClass>:: the relative path to the source root. + # config<Hash>:: give :verbose => false to not log the status. + # :: give :symbolic => false for hard link. + # + # ==== Examples + # + # create_link "config/apache.conf", "/etc/apache.conf" + # + # source://thor//lib/thor/actions/create_link.rb#17 + def create_link(destination, *args); end + + # Returns the root for this thor class (also aliased as destination root). + # + # source://thor//lib/thor/actions.rb#99 + def destination_root; end + + # Sets the root for this thor class. Relatives path are added to the + # directory where the script was invoked and expanded. + # + # source://thor//lib/thor/actions.rb#106 + def destination_root=(root); end + + # Copies recursively the files from source directory to root directory. + # If any of the files finishes with .tt, it's considered to be a template + # and is placed in the destination without the extension .tt. If any + # empty directory is found, it's copied and all .empty_directory files are + # ignored. If any file name is wrapped within % signs, the text within + # the % signs will be executed as a method and replaced with the returned + # value. Let's suppose a doc directory with the following files: + # + # doc/ + # components/.empty_directory + # README + # rdoc.rb.tt + # %app_name%.rb + # + # When invoked as: + # + # directory "doc" + # + # It will create a doc directory in the destination with the following + # files (assuming that the `app_name` method returns the value "blog"): + # + # doc/ + # components/ + # README + # rdoc.rb + # blog.rb + # + # <b>Encoded path note:</b> Since Thor internals use Object#respond_to? to check if it can + # expand %something%, this `something` should be a public method in the class calling + # #directory. If a method is private, Thor stack raises PrivateMethodEncodedError. + # + # ==== Parameters + # source<String>:: the relative path to the source root. + # destination<String>:: the relative path to the destination root. + # config<Hash>:: give :verbose => false to not log the status. + # If :recursive => false, does not look for paths recursively. + # If :mode => :preserve, preserve the file mode from the source. + # If :exclude_pattern => /regexp/, prevents copying files that match that regexp. + # + # ==== Examples + # + # directory "doc" + # directory "doc", "docs", :recursive => false + # + # source://thor//lib/thor/actions/directory.rb#49 + def directory(source, *args, &block); end + + # Creates an empty directory. + # + # ==== Parameters + # destination<String>:: the relative path to the destination root. + # config<Hash>:: give :verbose => false to not log the status. + # + # ==== Examples + # + # empty_directory "doc" + # + # source://thor//lib/thor/actions/empty_directory.rb#13 + def empty_directory(destination, config = T.unsafe(nil)); end + + # Receives a file or directory and search for it in the source paths. + # + # @raise [Error] + # + # source://thor//lib/thor/actions.rb#133 + def find_in_source_paths(file); end + + # Gets the content at the given address and places it at the given relative + # destination. If a block is given instead of destination, the content of + # the url is yielded and used as location. + # + # +get+ relies on open-uri, so passing application user input would provide + # a command injection attack vector. + # + # ==== Parameters + # source<String>:: the address of the given content. + # destination<String>:: the relative path to the destination root. + # config<Hash>:: give :verbose => false to not log the status. + # + # ==== Examples + # + # get "http://gist.github.com/103208", "doc/README" + # + # get "http://gist.github.com/103208" do |content| + # content.split("\n").first + # end + # + # source://thor//lib/thor/actions/file_manipulation.rb#79 + def get(source, *args, &block); end + + # Run a regular expression replacement on a file. + # + # ==== Parameters + # path<String>:: path of the file to be changed + # flag<Regexp|String>:: the regexp or string to be replaced + # replacement<String>:: the replacement, can be also given as a block + # config<Hash>:: give :verbose => false to not log the status, and + # :force => true, to force the replacement regardless of runner behavior. + # + # ==== Example + # + # gsub_file 'app/controllers/application_controller.rb', /#\s*(filter_parameter_logging :password)/, '\1' + # + # gsub_file 'README', /rake/, :green do |match| + # match << " no more. Use thor!" + # end + # + # source://thor//lib/thor/actions/file_manipulation.rb#265 + def gsub_file(path, flag, *args, &block); end + + # Goes to the root and execute the given block. + # + # source://thor//lib/thor/actions.rb#200 + def in_root; end + + # Injects text right after the class definition. Since it depends on + # insert_into_file, it's reversible. + # + # ==== Parameters + # path<String>:: path of the file to be changed + # klass<String|Class>:: the class to be manipulated + # data<String>:: the data to append to the class, can be also given as a block. + # config<Hash>:: give :verbose => false to not log the status. + # + # ==== Examples + # + # inject_into_class "app/controllers/application_controller.rb", "ApplicationController", " filter_parameter :password\n" + # + # inject_into_class "app/controllers/application_controller.rb", "ApplicationController" do + # " filter_parameter :password\n" + # end + # + # source://thor//lib/thor/actions/file_manipulation.rb#219 + def inject_into_class(path, klass, *args, &block); end + + # source://thor//lib/thor/actions/inject_into_file.rb#26 + def inject_into_file(destination, *args, &block); end + + # Injects text right after the module definition. Since it depends on + # insert_into_file, it's reversible. + # + # ==== Parameters + # path<String>:: path of the file to be changed + # module_name<String|Class>:: the module to be manipulated + # data<String>:: the data to append to the class, can be also given as a block. + # config<Hash>:: give :verbose => false to not log the status. + # + # ==== Examples + # + # inject_into_module "app/helpers/application_helper.rb", "ApplicationHelper", " def help; 'help'; end\n" + # + # inject_into_module "app/helpers/application_helper.rb", "ApplicationHelper" do + # " def help; 'help'; end\n" + # end + # + # source://thor//lib/thor/actions/file_manipulation.rb#242 + def inject_into_module(path, module_name, *args, &block); end + + # source://thor//lib/thor/actions/inject_into_file.rb#26 + def insert_into_file(destination, *args, &block); end + + # Do something in the root or on a provided subfolder. If a relative path + # is given it's referenced from the current root. The full path is yielded + # to the block you provide. The path is set back to the previous path when + # the method exits. + # + # Returns the value yielded by the block. + # + # ==== Parameters + # dir<String>:: the directory to move to. + # config<Hash>:: give :verbose => true to log and use padding. + # + # source://thor//lib/thor/actions.rb#170 + def inside(dir = T.unsafe(nil), config = T.unsafe(nil), &block); end + + # Links the file from the relative source to the relative destination. If + # the destination is not given it's assumed to be equal to the source. + # + # ==== Parameters + # source<String>:: the relative path to the source root. + # destination<String>:: the relative path to the destination root. + # config<Hash>:: give :verbose => false to not log the status. + # + # ==== Examples + # + # link_file "README", "doc/README" + # + # link_file "doc/README" + # + # source://thor//lib/thor/actions/file_manipulation.rb#51 + def link_file(source, *args); end + + # Prepend text to a file. Since it depends on insert_into_file, it's reversible. + # + # ==== Parameters + # path<String>:: path of the file to be changed + # data<String>:: the data to prepend to the file, can be also given as a block. + # config<Hash>:: give :verbose => false to not log the status. + # + # ==== Example + # + # prepend_to_file 'config/environments/test.rb', 'config.gem "rspec"' + # + # prepend_to_file 'config/environments/test.rb' do + # 'config.gem "rspec"' + # end + # + # source://thor//lib/thor/actions/file_manipulation.rb#173 + def prepend_file(path, *args, &block); end + + # Prepend text to a file. Since it depends on insert_into_file, it's reversible. + # + # ==== Parameters + # path<String>:: path of the file to be changed + # data<String>:: the data to prepend to the file, can be also given as a block. + # config<Hash>:: give :verbose => false to not log the status. + # + # ==== Example + # + # prepend_to_file 'config/environments/test.rb', 'config.gem "rspec"' + # + # prepend_to_file 'config/environments/test.rb' do + # 'config.gem "rspec"' + # end + # + # source://thor//lib/thor/actions/file_manipulation.rb#173 + def prepend_to_file(path, *args, &block); end + + # Returns the given path relative to the absolute root (ie, root where + # the script started). + # + # source://thor//lib/thor/actions.rb#114 + def relative_to_original_destination_root(path, remove_dot = T.unsafe(nil)); end + + # Removes a file at the given location. + # + # ==== Parameters + # path<String>:: path of the file to be changed + # config<Hash>:: give :verbose => false to not log the status. + # + # ==== Example + # + # remove_file 'README' + # remove_file 'app/controllers/application_controller.rb' + # + # source://thor//lib/thor/actions/file_manipulation.rb#329 + def remove_dir(path, config = T.unsafe(nil)); end + + # Removes a file at the given location. + # + # ==== Parameters + # path<String>:: path of the file to be changed + # config<Hash>:: give :verbose => false to not log the status. + # + # ==== Example + # + # remove_file 'README' + # remove_file 'app/controllers/application_controller.rb' + # + # source://thor//lib/thor/actions/file_manipulation.rb#329 + def remove_file(path, config = T.unsafe(nil)); end + + # Executes a command returning the contents of the command. + # + # ==== Parameters + # command<String>:: the command to be executed. + # config<Hash>:: give :verbose => false to not log the status, :capture => true to hide to output. Specify :with + # to append an executable to command execution. + # + # ==== Example + # + # inside('vendor') do + # run('ln -s ~/edge rails') + # end + # + # source://thor//lib/thor/actions.rb#249 + def run(command, config = T.unsafe(nil)); end + + # Executes a ruby script (taking into account WIN32 platform quirks). + # + # ==== Parameters + # command<String>:: the command to be executed. + # config<Hash>:: give :verbose => false to not log the status. + # + # source://thor//lib/thor/actions.rb#286 + def run_ruby_script(command, config = T.unsafe(nil)); end + + # Holds source paths in instance so they can be manipulated. + # + # source://thor//lib/thor/actions.rb#127 + def source_paths; end + + # Gets an ERB template at the relative source, executes it and makes a copy + # at the relative destination. If the destination is not given it's assumed + # to be equal to the source removing .tt from the filename. + # + # ==== Parameters + # source<String>:: the relative path to the source root. + # destination<String>:: the relative path to the destination root. + # config<Hash>:: give :verbose => false to not log the status. + # + # ==== Examples + # + # template "README", "doc/README" + # + # template "doc/README" + # + # source://thor//lib/thor/actions/file_manipulation.rb#115 + def template(source, *args, &block); end + + # Run a thor command. A hash of options can be given and it's converted to + # switches. + # + # ==== Parameters + # command<String>:: the command to be invoked + # args<Array>:: arguments to the command + # config<Hash>:: give :verbose => false to not log the status, :capture => true to hide to output. + # Other options are given as parameter to Thor. + # + # + # ==== Examples + # + # thor :install, "http://gist.github.com/103208" + # #=> thor install http://gist.github.com/103208 + # + # thor :list, :all => true, :substring => 'rails' + # #=> thor list --all --substring=rails + # + # source://thor//lib/thor/actions.rb#309 + def thor(command, *args); end + + # Uncomment all lines matching a given regex. It will leave the space + # which existed before the comment hash in tact but will remove any spacing + # between the comment hash and the beginning of the line. + # + # ==== Parameters + # path<String>:: path of the file to be changed + # flag<Regexp|String>:: the regexp or string used to decide which lines to uncomment + # config<Hash>:: give :verbose => false to not log the status. + # + # ==== Example + # + # uncomment_lines 'config/initializers/session_store.rb', /active_record/ + # + # source://thor//lib/thor/actions/file_manipulation.rb#293 + def uncomment_lines(path, flag, *args); end + + protected + + # source://thor//lib/thor/actions.rb#330 + def _cleanup_options_and_set(options, key); end + + # Allow current root to be shared between invocations. + # + # source://thor//lib/thor/actions.rb#326 + def _shared_configuration; end + + private + + # source://thor//lib/thor/actions/file_manipulation.rb#350 + def capture(*args); end + + # source://thor//lib/thor/actions/file_manipulation.rb#346 + def concat(string); end + + # Returns the value of attribute output_buffer. + # + # source://thor//lib/thor/actions/file_manipulation.rb#341 + def output_buffer; end + + # Sets the attribute output_buffer + # + # @param value the value to set the attribute output_buffer to. + # + # source://thor//lib/thor/actions/file_manipulation.rb#341 + def output_buffer=(_arg0); end + + # source://thor//lib/thor/actions/file_manipulation.rb#354 + def with_output_buffer(buf = T.unsafe(nil)); end + + class << self + # source://thor//lib/thor/actions.rb#12 + def included(base); end + end +end + +# Thor::Actions#capture depends on what kind of buffer is used in ERB. +# Thus CapturableERB fixes ERB to use String buffer. +# +# source://thor//lib/thor/actions/file_manipulation.rb#366 +class Thor::Actions::CapturableERB < ::ERB + # source://thor//lib/thor/actions/file_manipulation.rb#367 + def set_eoutvar(compiler, eoutvar = T.unsafe(nil)); end +end + +# source://thor//lib/thor/actions.rb#17 +module Thor::Actions::ClassMethods + # Add runtime options that help actions execution. + # + # source://thor//lib/thor/actions.rb#48 + def add_runtime_options!; end + + # Hold source paths for one Thor instance. source_paths_for_search is the + # method responsible to gather source_paths from this current class, + # inherited paths and the source root. + # + # source://thor//lib/thor/actions.rb#22 + def source_paths; end + + # Returns the source paths in the following order: + # + # 1) This class source paths + # 2) Source root + # 3) Parents source paths + # + # source://thor//lib/thor/actions.rb#38 + def source_paths_for_search; end + + # Stores and return the source root for this class + # + # source://thor//lib/thor/actions.rb#27 + def source_root(path = T.unsafe(nil)); end +end + +# CreateFile is a subset of Template, which instead of rendering a file with +# ERB, it gets the content from the user. +# +# source://thor//lib/thor/actions/create_file.rb#32 +class Thor::Actions::CreateFile < ::Thor::Actions::EmptyDirectory + # @return [CreateFile] a new instance of CreateFile + # + # source://thor//lib/thor/actions/create_file.rb#35 + def initialize(base, destination, data, config = T.unsafe(nil)); end + + # source://thor//lib/thor/actions/create_file.rb#33 + def data; end + + # Checks if the content of the file at the destination is identical to the rendered result. + # + # ==== Returns + # Boolean:: true if it is identical, false otherwise. + # + # @return [Boolean] + # + # source://thor//lib/thor/actions/create_file.rb#45 + def identical?; end + + # source://thor//lib/thor/actions/create_file.rb#59 + def invoke!; end + + # Holds the content to be added to the file. + # + # source://thor//lib/thor/actions/create_file.rb#51 + def render; end + + protected + + # Shows the file collision menu to the user and gets the result. + # + # @return [Boolean] + # + # source://thor//lib/thor/actions/create_file.rb#99 + def force_on_collision?; end + + # If force is true, run the action, otherwise check if it's not being + # skipped. If both are false, show the file_collision menu, if the menu + # returns true, force it, otherwise skip. + # + # source://thor//lib/thor/actions/create_file.rb#85 + def force_or_skip_or_conflict(force, skip, &block); end + + # Now on conflict we check if the file is identical or not. + # + # source://thor//lib/thor/actions/create_file.rb#72 + def on_conflict_behavior(&block); end +end + +# CreateLink is a subset of CreateFile, which instead of taking a block of +# data, just takes a source string from the user. +# +# source://thor//lib/thor/actions/create_link.rb#27 +class Thor::Actions::CreateLink < ::Thor::Actions::CreateFile + # source://thor//lib/thor/actions/create_link.rb#28 + def data; end + + # @return [Boolean] + # + # source://thor//lib/thor/actions/create_link.rb#56 + def exists?; end + + # Checks if the content of the file at the destination is identical to the rendered result. + # + # ==== Returns + # Boolean:: true if it is identical, false otherwise. + # + # @return [Boolean] + # + # source://thor//lib/thor/actions/create_link.rb#35 + def identical?; end + + # source://thor//lib/thor/actions/create_link.rb#40 + def invoke!; end +end + +# source://thor//lib/thor/actions/directory.rb#55 +class Thor::Actions::Directory < ::Thor::Actions::EmptyDirectory + # @return [Directory] a new instance of Directory + # + # source://thor//lib/thor/actions/directory.rb#58 + def initialize(base, source, destination = T.unsafe(nil), config = T.unsafe(nil), &block); end + + # source://thor//lib/thor/actions/directory.rb#64 + def invoke!; end + + # source://thor//lib/thor/actions/directory.rb#69 + def revoke!; end + + # Returns the value of attribute source. + # + # source://thor//lib/thor/actions/directory.rb#56 + def source; end + + protected + + # source://thor//lib/thor/actions/directory.rb#75 + def execute!; end + + # source://thor//lib/thor/actions/directory.rb#99 + def file_level_lookup(previous_lookup); end + + # source://thor//lib/thor/actions/directory.rb#103 + def files(lookup); end +end + +# source://thor//lib/thor/actions/empty_directory.rb#23 +class Thor::Actions::EmptyDirectory + # Initializes given the source and destination. + # + # ==== Parameters + # base<Thor::Base>:: A Thor::Base instance + # source<String>:: Relative path to the source of this file + # destination<String>:: Relative path to the destination of this file + # config<Hash>:: give :verbose => false to not log the status. + # + # @return [EmptyDirectory] a new instance of EmptyDirectory + # + # source://thor//lib/thor/actions/empty_directory.rb#34 + def initialize(base, destination, config = T.unsafe(nil)); end + + # source://thor//lib/thor/actions/empty_directory.rb#24 + def base; end + + # source://thor//lib/thor/actions/empty_directory.rb#24 + def config; end + + # source://thor//lib/thor/actions/empty_directory.rb#24 + def destination; end + + # Checks if the destination file already exists. + # + # ==== Returns + # Boolean:: true if the file exists, false otherwise. + # + # @return [Boolean] + # + # source://thor//lib/thor/actions/empty_directory.rb#45 + def exists?; end + + # source://thor//lib/thor/actions/empty_directory.rb#24 + def given_destination; end + + # source://thor//lib/thor/actions/empty_directory.rb#49 + def invoke!; end + + # source://thor//lib/thor/actions/empty_directory.rb#24 + def relative_destination; end + + # source://thor//lib/thor/actions/empty_directory.rb#56 + def revoke!; end + + protected + + # Filenames in the encoded form are converted. If you have a file: + # + # %file_name%.rb + # + # It calls #file_name from the base and replaces %-string with the + # return value (should be String) of #file_name: + # + # user.rb + # + # The method referenced can be either public or private. + # + # source://thor//lib/thor/actions/empty_directory.rb#103 + def convert_encoded_instructions(filename); end + + # Sets the absolute destination value from a relative destination value. + # It also stores the given and relative destination. Let's suppose our + # script is being executed on "dest", it sets the destination root to + # "dest". The destination, given_destination and relative_destination + # are related in the following way: + # + # inside "bar" do + # empty_directory "baz" + # end + # + # destination #=> dest/bar/baz + # relative_destination #=> bar/baz + # given_destination #=> baz + # + # source://thor//lib/thor/actions/empty_directory.rb#85 + def destination=(destination); end + + # Receives a hash of options and just execute the block if some + # conditions are met. + # + # source://thor//lib/thor/actions/empty_directory.rb#113 + def invoke_with_conflict_check(&block); end + + # What to do when the destination file already exists. + # + # source://thor//lib/thor/actions/empty_directory.rb#132 + def on_conflict_behavior; end + + # source://thor//lib/thor/actions/empty_directory.rb#126 + def on_file_clash_behavior; end + + # Shortcut for pretend. + # + # @return [Boolean] + # + # source://thor//lib/thor/actions/empty_directory.rb#67 + def pretend?; end + + # Shortcut to say_status shell method. + # + # source://thor//lib/thor/actions/empty_directory.rb#138 + def say_status(status, color); end +end + +# source://thor//lib/thor/actions/inject_into_file.rb#36 +class Thor::Actions::InjectIntoFile < ::Thor::Actions::EmptyDirectory + # @return [InjectIntoFile] a new instance of InjectIntoFile + # + # source://thor//lib/thor/actions/inject_into_file.rb#39 + def initialize(base, destination, data, config); end + + # Returns the value of attribute behavior. + # + # source://thor//lib/thor/actions/inject_into_file.rb#37 + def behavior; end + + # Returns the value of attribute flag. + # + # source://thor//lib/thor/actions/inject_into_file.rb#37 + def flag; end + + # source://thor//lib/thor/actions/inject_into_file.rb#52 + def invoke!; end + + # Returns the value of attribute replacement. + # + # source://thor//lib/thor/actions/inject_into_file.rb#37 + def replacement; end + + # source://thor//lib/thor/actions/inject_into_file.rb#72 + def revoke!; end + + protected + + # Adds the content to the file. + # + # source://thor//lib/thor/actions/inject_into_file.rb#108 + def replace!(regexp, string, force); end + + # source://thor//lib/thor/actions/inject_into_file.rb#88 + def say_status(behavior, warning: T.unsafe(nil), color: T.unsafe(nil)); end +end + +# Injects the given content into a file. Different from gsub_file, this +# method is reversible. +# +# ==== Parameters +# destination<String>:: Relative path to the destination root +# data<String>:: Data to add to the file. Can be given as a block. +# config<Hash>:: give :verbose => false to not log the status and the flag +# for injection (:after or :before) or :force => true for +# insert two or more times the same content. +# +# ==== Examples +# +# insert_into_file "config/environment.rb", "config.gem :thor", :after => "Rails::Initializer.run do |config|\n" +# +# insert_into_file "config/environment.rb", :after => "Rails::Initializer.run do |config|\n" do +# gems = ask "Which gems would you like to add?" +# gems.split(" ").map{ |gem| " config.gem :#{gem}" }.join("\n") +# end +# +# source://thor//lib/thor/actions/inject_into_file.rb#24 +Thor::Actions::WARNINGS = T.let(T.unsafe(nil), Hash) + +# source://thor//lib/thor/error.rb#68 +class Thor::AmbiguousCommandError < ::Thor::Error; end + +# source://thor//lib/thor/error.rb#70 +Thor::AmbiguousTaskError = Thor::AmbiguousCommandError + +# source://thor//lib/thor/parser/argument.rb#2 +class Thor::Argument + # @raise [ArgumentError] + # @return [Argument] a new instance of Argument + # + # source://thor//lib/thor/parser/argument.rb#8 + def initialize(name, options = T.unsafe(nil)); end + + # Returns the value of attribute banner. + # + # source://thor//lib/thor/parser/argument.rb#5 + def banner; end + + # Returns the value of attribute default. + # + # source://thor//lib/thor/parser/argument.rb#5 + def default; end + + # Returns the value of attribute description. + # + # source://thor//lib/thor/parser/argument.rb#5 + def description; end + + # Returns the value of attribute enum. + # + # source://thor//lib/thor/parser/argument.rb#5 + def enum; end + + # Returns the value of attribute name. + # + # source://thor//lib/thor/parser/argument.rb#5 + def human_name; end + + # Returns the value of attribute name. + # + # source://thor//lib/thor/parser/argument.rb#5 + def name; end + + # Returns the value of attribute required. + # + # source://thor//lib/thor/parser/argument.rb#5 + def required; end + + # @return [Boolean] + # + # source://thor//lib/thor/parser/argument.rb#31 + def required?; end + + # @return [Boolean] + # + # source://thor//lib/thor/parser/argument.rb#35 + def show_default?; end + + # Returns the value of attribute type. + # + # source://thor//lib/thor/parser/argument.rb#5 + def type; end + + # source://thor//lib/thor/parser/argument.rb#27 + def usage; end + + protected + + # source://thor//lib/thor/parser/argument.rb#55 + def default_banner; end + + # @return [Boolean] + # + # source://thor//lib/thor/parser/argument.rb#51 + def valid_type?(type); end + + # @raise [ArgumentError] + # + # source://thor//lib/thor/parser/argument.rb#46 + def validate!; end +end + +# source://thor//lib/thor/parser/argument.rb#3 +Thor::Argument::VALID_TYPES = T.let(T.unsafe(nil), Array) + +# source://thor//lib/thor/parser/arguments.rb#2 +class Thor::Arguments + # Takes an array of Thor::Argument objects. + # + # @return [Arguments] a new instance of Arguments + # + # source://thor//lib/thor/parser/arguments.rb#26 + def initialize(arguments = T.unsafe(nil)); end + + # source://thor//lib/thor/parser/arguments.rb#44 + def parse(args); end + + # source://thor//lib/thor/parser/arguments.rb#57 + def remaining; end + + private + + # Raises an error if @non_assigned_required array is not empty. + # + # @raise [RequiredArgumentMissingError] + # + # source://thor//lib/thor/parser/arguments.rb#170 + def check_requirement!; end + + # @return [Boolean] + # + # source://thor//lib/thor/parser/arguments.rb#88 + def current_is_value?; end + + # @return [Boolean] + # + # source://thor//lib/thor/parser/arguments.rb#68 + def last?; end + + # @return [Boolean] + # + # source://thor//lib/thor/parser/arguments.rb#63 + def no_or_skip?(arg); end + + # Runs through the argument array getting all strings until no string is + # found or a switch is found. + # + # ["a", "b", "c"] + # + # And returns it as an array: + # + # ["a", "b", "c"] + # + # source://thor//lib/thor/parser/arguments.rb#122 + def parse_array(name); end + + # Runs through the argument array getting strings that contains ":" and + # mark it as a hash: + # + # [ "name:string", "age:integer" ] + # + # Becomes: + # + # { "name" => "string", "age" => "integer" } + # + # source://thor//lib/thor/parser/arguments.rb#101 + def parse_hash(name); end + + # Check if the peek is numeric format and return a Float or Integer. + # Check if the peek is included in enum if enum is provided. + # Otherwise raises an error. + # + # source://thor//lib/thor/parser/arguments.rb#133 + def parse_numeric(name); end + + # Parse string: + # for --string-arg, just return the current value in the pile + # for --no-string-arg, nil + # Check if the peek is included in enum if enum is provided. Otherwise raises an error. + # + # source://thor//lib/thor/parser/arguments.rb#154 + def parse_string(name); end + + # source://thor//lib/thor/parser/arguments.rb#72 + def peek; end + + # source://thor//lib/thor/parser/arguments.rb#76 + def shift; end + + # source://thor//lib/thor/parser/arguments.rb#80 + def unshift(arg); end + + class << self + # source://thor//lib/thor/parser/arguments.rb#19 + def parse(*args); end + + # Receives an array of args and returns two arrays, one with arguments + # and one with switches. + # + # source://thor//lib/thor/parser/arguments.rb#8 + def split(args); end + end +end + +# source://thor//lib/thor/parser/arguments.rb#3 +Thor::Arguments::NUMERIC = T.let(T.unsafe(nil), Regexp) + +# source://thor//lib/thor/shell.rb#4 +module Thor::Base + include ::Thor::Invocation + include ::Thor::Shell + + mixes_in_class_methods ::Thor::Base::ClassMethods + mixes_in_class_methods ::Thor::Invocation::ClassMethods + + # It receives arguments in an Array and two hashes, one for options and + # other for configuration. + # + # Notice that it does not check if all required arguments were supplied. + # It should be done by the parser. + # + # ==== Parameters + # args<Array[Object]>:: An array of objects. The objects are applied to their + # respective accessors declared with <tt>argument</tt>. + # + # options<Hash>:: An options hash that will be available as self.options. + # The hash given is converted to a hash with indifferent + # access, magic predicates (options.skip?) and then frozen. + # + # config<Hash>:: Configuration for this Thor class. + # + # source://thor//lib/thor/base.rb#53 + def initialize(args = T.unsafe(nil), local_options = T.unsafe(nil), config = T.unsafe(nil)); end + + # Returns the value of attribute args. + # + # source://thor//lib/thor/base.rb#35 + def args; end + + # Sets the attribute args + # + # @param value the value to set the attribute args to. + # + # source://thor//lib/thor/base.rb#35 + def args=(_arg0); end + + # Returns the value of attribute options. + # + # source://thor//lib/thor/base.rb#35 + def options; end + + # Sets the attribute options + # + # @param value the value to set the attribute options to. + # + # source://thor//lib/thor/base.rb#35 + def options=(_arg0); end + + # Returns the value of attribute parent_options. + # + # source://thor//lib/thor/base.rb#35 + def parent_options; end + + # Sets the attribute parent_options + # + # @param value the value to set the attribute parent_options to. + # + # source://thor//lib/thor/base.rb#35 + def parent_options=(_arg0); end + + class << self + # source://thor//lib/thor/base.rb#100 + def included(base); end + + # Whenever a class inherits from Thor or Thor::Group, we should track the + # class and the file on Thor::Base. This is the method responsible for it. + # + # source://thor//lib/thor/base.rb#128 + def register_klass_file(klass); end + + # Returns the shell used in all Thor classes. If you are in a Unix platform + # it will use a colored log, otherwise it will use a basic one without color. + # + # source://thor//lib/thor/shell.rb#11 + def shell; end + + # Sets the attribute shell + # + # @param value the value to set the attribute shell to. + # + # source://thor//lib/thor/shell.rb#6 + def shell=(_arg0); end + + # Returns the files where the subclasses are kept. + # + # ==== Returns + # Hash[path<String> => Class] + # + # source://thor//lib/thor/base.rb#121 + def subclass_files; end + + # Returns the classes that inherits from Thor or Thor::Group. + # + # ==== Returns + # Array[Class] + # + # source://thor//lib/thor/base.rb#112 + def subclasses; end + end +end + +# source://thor//lib/thor/base.rb#137 +module Thor::Base::ClassMethods + # Returns the commands for this Thor class and all subclasses. + # + # ==== Returns + # Hash:: An ordered hash with commands names as keys and Thor::Command + # objects as values. + # + # source://thor//lib/thor/base.rb#383 + def all_commands; end + + # Returns the commands for this Thor class and all subclasses. + # + # ==== Returns + # Hash:: An ordered hash with commands names as keys and Thor::Command + # objects as values. + # + # source://thor//lib/thor/base.rb#383 + def all_tasks; end + + # If you want to use defaults that don't match the type of an option, + # either specify `check_default_type: false` or call `allow_incompatible_default_type!` + # + # source://thor//lib/thor/base.rb#173 + def allow_incompatible_default_type!; end + + # Adds an argument to the class and creates an attr_accessor for it. + # + # Arguments are different from options in several aspects. The first one + # is how they are parsed from the command line, arguments are retrieved + # from position: + # + # thor command NAME + # + # Instead of: + # + # thor command --name=NAME + # + # Besides, arguments are used inside your code as an accessor (self.argument), + # while options are all kept in a hash (self.options). + # + # Finally, arguments cannot have type :default or :boolean but can be + # optional (supplying :optional => :true or :required => false), although + # you cannot have a required argument after a non-required argument. If you + # try it, an error is raised. + # + # ==== Parameters + # name<Symbol>:: The name of the argument. + # options<Hash>:: Described below. + # + # ==== Options + # :desc - Description for the argument. + # :required - If the argument is required or not. + # :optional - If the argument is optional or not. + # :type - The type of the argument, can be :string, :hash, :array, :numeric. + # :default - Default value for this argument. It cannot be required and have default values. + # :banner - String to show on usage notes. + # + # ==== Errors + # ArgumentError:: Raised if you supply a required argument after a non required one. + # + # source://thor//lib/thor/base.rb#245 + def argument(name, options = T.unsafe(nil)); end + + # Returns this class arguments, looking up in the ancestors chain. + # + # ==== Returns + # Array[Thor::Argument] + # + # source://thor//lib/thor/base.rb#277 + def arguments; end + + # source://thor//lib/thor/base.rb#146 + def attr_accessor(*_arg0); end + + # source://thor//lib/thor/base.rb#138 + def attr_reader(*_arg0); end + + # source://thor//lib/thor/base.rb#142 + def attr_writer(*_arg0); end + + # source://thor//lib/thor/base.rb#177 + def check_default_type; end + + # If you want to raise an error when the default value of an option does not match + # the type call check_default_type! + # This will be the default; for compatibility a deprecation warning is issued if necessary. + # + # source://thor//lib/thor/base.rb#167 + def check_default_type!; end + + # source://thor//lib/thor/base.rb#156 + def check_unknown_options; end + + # If you want to raise an error for unknown options, call check_unknown_options! + # This is disabled by default to allow dynamic invocations. + # + # source://thor//lib/thor/base.rb#152 + def check_unknown_options!; end + + # @return [Boolean] + # + # source://thor//lib/thor/base.rb#160 + def check_unknown_options?(config); end + + # Adds an option to the set of class options + # + # ==== Parameters + # name<Symbol>:: The name of the argument. + # options<Hash>:: Described below. + # + # ==== Options + # :desc:: -- Description for the argument. + # :required:: -- If the argument is required or not. + # :default:: -- Default value for this argument. + # :group:: -- The group for this options. Use by class options to output options in different levels. + # :aliases:: -- Aliases for this option. <b>Note:</b> Thor follows a convention of one-dash-one-letter options. Thus aliases like "-something" wouldn't be parsed; use either "\--something" or "-s" instead. + # :type:: -- The type of the argument, can be :string, :hash, :array, :numeric or :boolean. + # :banner:: -- String to show on usage notes. + # :hide:: -- If you want to hide this option from the help. + # + # source://thor//lib/thor/base.rb#312 + def class_option(name, options = T.unsafe(nil)); end + + # Adds a bunch of options to the set of class options. + # + # class_options :foo => false, :bar => :required, :baz => :string + # + # If you prefer more detailed declaration, check class_option. + # + # ==== Parameters + # Hash[Symbol => Object] + # + # source://thor//lib/thor/base.rb#290 + def class_options(options = T.unsafe(nil)); end + + # Returns the commands for this Thor class. + # + # ==== Returns + # Hash:: An ordered hash with commands names as keys and Thor::Command + # objects as values. + # + # source://thor//lib/thor/base.rb#372 + def commands; end + + # If true, option set will not suspend the execution of the command when + # a required option is not provided. + # + # @return [Boolean] + # + # source://thor//lib/thor/base.rb#191 + def disable_required_check?(command_name); end + + # A flag that makes the process exit with status 1 if any error happens. + # + # @return [Boolean] + # + # source://thor//lib/thor/base.rb#529 + def exit_on_failure?; end + + # Defines the group. This is used when thor list is invoked so you can specify + # that only commands from a pre-defined group will be shown. Defaults to standard. + # + # ==== Parameters + # name<String|Symbol> + # + # source://thor//lib/thor/base.rb#358 + def group(name = T.unsafe(nil)); end + + # @raise [InvocationError] + # + # source://thor//lib/thor/base.rb#519 + def handle_argument_error(command, error, args, arity); end + + # @raise [UndefinedCommandError] + # + # source://thor//lib/thor/base.rb#514 + def handle_no_command_error(command, has_namespace = T.unsafe(nil)); end + + # @raise [UndefinedCommandError] + # + # source://thor//lib/thor/base.rb#514 + def handle_no_task_error(command, has_namespace = T.unsafe(nil)); end + + # Sets the namespace for the Thor or Thor::Group class. By default the + # namespace is retrieved from the class name. If your Thor class is named + # Scripts::MyScript, the help method, for example, will be called as: + # + # thor scripts:my_script -h + # + # If you change the namespace: + # + # namespace :my_scripts + # + # You change how your commands are invoked: + # + # thor my_scripts -h + # + # Finally, if you change your namespace to default: + # + # namespace :default + # + # Your commands can be invoked with a shortcut. Instead of: + # + # thor :my_command + # + # source://thor//lib/thor/base.rb#467 + def namespace(name = T.unsafe(nil)); end + + # All methods defined inside the given block are not added as commands. + # + # So you can do: + # + # class MyScript < Thor + # no_commands do + # def this_is_not_a_command + # end + # end + # end + # + # You can also add the method and remove it from the command list: + # + # class MyScript < Thor + # def this_is_not_a_command + # end + # remove_command :this_is_not_a_command + # end + # + # source://thor//lib/thor/base.rb#431 + def no_commands(&block); end + + # @return [Boolean] + # + # source://thor//lib/thor/base.rb#441 + def no_commands?; end + + # source://thor//lib/thor/base.rb#437 + def no_commands_context; end + + # All methods defined inside the given block are not added as commands. + # + # So you can do: + # + # class MyScript < Thor + # no_commands do + # def this_is_not_a_command + # end + # end + # end + # + # You can also add the method and remove it from the command list: + # + # class MyScript < Thor + # def this_is_not_a_command + # end + # remove_command :this_is_not_a_command + # end + # + # source://thor//lib/thor/base.rb#431 + def no_tasks(&block); end + + # Allows to use private methods from parent in child classes as commands. + # + # ==== Parameters + # names<Array>:: Method names to be used as commands + # + # ==== Examples + # + # public_command :foo + # public_command :foo, :bar, :baz + # + # source://thor//lib/thor/base.rb#507 + def public_command(*names); end + + # Allows to use private methods from parent in child classes as commands. + # + # ==== Parameters + # names<Array>:: Method names to be used as commands + # + # ==== Examples + # + # public_command :foo + # public_command :foo, :bar, :baz + # + # source://thor//lib/thor/base.rb#507 + def public_task(*names); end + + # Removes a previous defined argument. If :undefine is given, undefine + # accessors as well. + # + # ==== Parameters + # names<Array>:: Arguments to be removed + # + # ==== Examples + # + # remove_argument :foo + # remove_argument :foo, :bar, :baz, :undefine => true + # + # source://thor//lib/thor/base.rb#327 + def remove_argument(*names); end + + # Removes a previous defined class option. + # + # ==== Parameters + # names<Array>:: Class options to be removed + # + # ==== Examples + # + # remove_class_option :foo + # remove_class_option :foo, :bar, :baz + # + # source://thor//lib/thor/base.rb#346 + def remove_class_option(*names); end + + # Removes a given command from this Thor class. This is usually done if you + # are inheriting from another class and don't want it to be available + # anymore. + # + # By default it only remove the mapping to the command. But you can supply + # :undefine => true to undefine the method from the class as well. + # + # ==== Parameters + # name<Symbol|String>:: The name of the command to be removed + # options<Hash>:: You can give :undefine => true if you want commands the method + # to be undefined from the class as well. + # + # source://thor//lib/thor/base.rb#401 + def remove_command(*names); end + + # Removes a given command from this Thor class. This is usually done if you + # are inheriting from another class and don't want it to be available + # anymore. + # + # By default it only remove the mapping to the command. But you can supply + # :undefine => true to undefine the method from the class as well. + # + # ==== Parameters + # name<Symbol|String>:: The name of the command to be removed + # options<Hash>:: You can give :undefine => true if you want commands the method + # to be undefined from the class as well. + # + # source://thor//lib/thor/base.rb#401 + def remove_task(*names); end + + # Parses the command and options from the given args, instantiate the class + # and invoke the command. This method is used when the arguments must be parsed + # from an array. If you are inside Ruby and want to use a Thor class, you + # can simply initialize it: + # + # script = MyScript.new(args, options, config) + # script.invoke(:command, first_arg, second_arg, third_arg) + # + # source://thor//lib/thor/base.rb#483 + def start(given_args = T.unsafe(nil), config = T.unsafe(nil)); end + + # If true, option parsing is suspended as soon as an unknown option or a + # regular argument is encountered. All remaining arguments are passed to + # the command as regular arguments. + # + # @return [Boolean] + # + # source://thor//lib/thor/base.rb#185 + def stop_on_unknown_option?(command_name); end + + # source://thor//lib/thor/base.rb#202 + def strict_args_position; end + + # If you want only strict string args (useful when cascading thor classes), + # call strict_args_position! This is disabled by default to allow dynamic + # invocations. + # + # source://thor//lib/thor/base.rb#198 + def strict_args_position!; end + + # @return [Boolean] + # + # source://thor//lib/thor/base.rb#206 + def strict_args_position?(config); end + + # Returns the commands for this Thor class. + # + # ==== Returns + # Hash:: An ordered hash with commands names as keys and Thor::Command + # objects as values. + # + # source://thor//lib/thor/base.rb#372 + def tasks; end + + protected + + # SIGNATURE: Sets the baseclass. This is where the superclass lookup + # finishes. + # + # source://thor//lib/thor/base.rb#678 + def baseclass; end + + # The basename of the program invoking the thor class. + # + # source://thor//lib/thor/base.rb#672 + def basename; end + + # Build an option and adds it to the given scope. + # + # ==== Parameters + # name<Symbol>:: The name of the argument. + # options<Hash>:: Described in both class_option and method_option. + # scope<Hash>:: Options hash that is being built up + # + # source://thor//lib/thor/base.rb#589 + def build_option(name, options, scope); end + + # Receives a hash of options, parse them and add to the scope. This is a + # fast way to set a bunch of options: + # + # build_options :foo => true, :bar => :required, :baz => :string + # + # ==== Parameters + # Hash[Symbol => Object] + # + # source://thor//lib/thor/base.rb#600 + def build_options(options, scope); end + + # Prints the class options per group. If an option does not belong to + # any group, it's printed as Class option. + # + # source://thor//lib/thor/base.rb#539 + def class_options_help(shell, groups = T.unsafe(nil)); end + + # SIGNATURE: Creates a new command if valid_command? is true. This method is + # called when a new method is added to the class. + # + # source://thor//lib/thor/base.rb#683 + def create_command(meth); end + + # SIGNATURE: Creates a new command if valid_command? is true. This method is + # called when a new method is added to the class. + # + # source://thor//lib/thor/base.rb#683 + def create_task(meth); end + + # SIGNATURE: The hook invoked by start. + # + # @raise [NotImplementedError] + # + # source://thor//lib/thor/base.rb#693 + def dispatch(command, given_args, given_opts, config); end + + # Finds a command with the given name. If the command belongs to the current + # class, just return it, otherwise dup it and add the fresh copy to the + # current command hash. + # + # source://thor//lib/thor/base.rb#609 + def find_and_refresh_command(name); end + + # Finds a command with the given name. If the command belongs to the current + # class, just return it, otherwise dup it and add the fresh copy to the + # current command hash. + # + # source://thor//lib/thor/base.rb#609 + def find_and_refresh_task(name); end + + # Retrieves a value from superclass. If it reaches the baseclass, + # returns default. + # + # source://thor//lib/thor/base.rb#650 + def from_superclass(method, default = T.unsafe(nil)); end + + # Every time someone inherits from a Thor class, register the klass + # and file into baseclass. + # + # source://thor//lib/thor/base.rb#622 + def inherited(klass); end + + # SIGNATURE: Defines behavior when the initialize method is added to the + # class. + # + # source://thor//lib/thor/base.rb#689 + def initialize_added; end + + # Raises an error if the word given is a Thor reserved word. + # + # @return [Boolean] + # + # source://thor//lib/thor/base.rb#578 + def is_thor_reserved_word?(word, type); end + + # Fire this callback whenever a method is added. Added methods are + # tracked as commands by invoking the create_command method. + # + # source://thor//lib/thor/base.rb#630 + def method_added(meth); end + + # Receives a set of options and print them. + # + # source://thor//lib/thor/base.rb#557 + def print_options(shell, options, group_name = T.unsafe(nil)); end +end + +# source://thor//lib/thor/command.rb#2 +class Thor::Command < ::Struct + # @return [Command] a new instance of Command + # + # source://thor//lib/thor/command.rb#5 + def initialize(name, description, long_description, usage, options = T.unsafe(nil)); end + + # Returns the formatted usage by injecting given required arguments + # and required options into the given usage. + # + # source://thor//lib/thor/command.rb#41 + def formatted_usage(klass, namespace = T.unsafe(nil), subcommand = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://thor//lib/thor/command.rb#14 + def hidden?; end + + # By default, a command invokes a method in the thor class. You can change this + # implementation to create custom commands. + # + # source://thor//lib/thor/command.rb#20 + def run(instance, args = T.unsafe(nil)); end + + protected + + # @return [Boolean] + # + # source://thor//lib/thor/command.rb#105 + def handle_argument_error?(instance, error, caller); end + + # @return [Boolean] + # + # source://thor//lib/thor/command.rb#112 + def handle_no_method_error?(instance, error, caller); end + + # @return [Boolean] + # + # source://thor//lib/thor/command.rb#95 + def local_method?(instance, name); end + + # @return [Boolean] + # + # source://thor//lib/thor/command.rb#78 + def not_debugging?(instance); end + + # @return [Boolean] + # + # source://thor//lib/thor/command.rb#91 + def private_method?(instance); end + + # Given a target, checks if this class name is a public method. + # + # @return [Boolean] + # + # source://thor//lib/thor/command.rb#87 + def public_method?(instance); end + + # Add usage with required arguments + # + # source://thor//lib/thor/command.rb#68 + def required_arguments_for(klass, usage); end + + # source://thor//lib/thor/command.rb#82 + def required_options; end + + # source://thor//lib/thor/command.rb#100 + def sans_backtrace(backtrace, caller); end + + private + + # source://thor//lib/thor/command.rb#9 + def initialize_copy(other); end +end + +# source://thor//lib/thor/command.rb#3 +Thor::Command::FILE_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#2 +module Thor::CoreExt; end + +# A hash with indifferent access and magic predicates. +# +# hash = Thor::CoreExt::HashWithIndifferentAccess.new 'foo' => 'bar', 'baz' => 'bee', 'force' => true +# +# hash[:foo] #=> 'bar' +# hash['foo'] #=> 'bar' +# hash.foo? #=> true +# +# source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#11 +class Thor::CoreExt::HashWithIndifferentAccess < ::Hash + # @return [HashWithIndifferentAccess] a new instance of HashWithIndifferentAccess + # + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#12 + def initialize(hash = T.unsafe(nil)); end + + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#19 + def [](key); end + + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#23 + def []=(key, value); end + + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#27 + def delete(key); end + + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#31 + def except(*keys); end + + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#37 + def fetch(key, *args); end + + # @return [Boolean] + # + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#41 + def key?(key); end + + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#49 + def merge(other); end + + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#53 + def merge!(other); end + + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#68 + def replace(other_hash); end + + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#60 + def reverse_merge(other); end + + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#64 + def reverse_merge!(other_hash); end + + # Convert to a Hash with String keys. + # + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#73 + def to_hash; end + + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#45 + def values_at(*indices); end + + protected + + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#79 + def convert_key(key); end + + # Magic predicates. For instance: + # + # options.force? # => !!options['force'] + # options.shebang # => "/usr/lib/local/ruby" + # options.test_framework?(:rspec) # => options[:test_framework] == :rspec + # + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#89 + def method_missing(method, *args); end +end + +# source://thor//lib/thor/error.rb#14 +module Thor::Correctable + # source://thor//lib/thor/error.rb#19 + def corrections; end + + # source://thor//lib/thor/error.rb#15 + def to_s; end +end + +# A dynamic command that handles method missing scenarios. +# +# source://thor//lib/thor/command.rb#128 +class Thor::DynamicCommand < ::Thor::Command + # @return [DynamicCommand] a new instance of DynamicCommand + # + # source://thor//lib/thor/command.rb#129 + def initialize(name, options = T.unsafe(nil)); end + + # source://thor//lib/thor/command.rb#133 + def run(instance, args = T.unsafe(nil)); end +end + +# source://thor//lib/thor/command.rb#141 +Thor::DynamicTask = Thor::DynamicCommand + +# Thor::Error is raised when it's caused by wrong usage of thor classes. Those +# errors have their backtrace suppressed and are nicely shown to the user. +# +# Errors that are caused by the developer, like declaring a method which +# overwrites a thor keyword, SHOULD NOT raise a Thor::Error. This way, we +# ensure that developer errors are shown with full backtrace. +# +# source://thor//lib/thor/error.rb#31 +class Thor::Error < ::StandardError; end + +# Thor has a special class called Thor::Group. The main difference to Thor class +# is that it invokes all commands at once. It also include some methods that allows +# invocations to be done at the class method, which are not available to Thor +# commands. +# +# source://thor//lib/thor/group.rb#7 +class Thor::Group + include ::Thor::Base + include ::Thor::Invocation + include ::Thor::Shell + extend ::Thor::Base::ClassMethods + extend ::Thor::Invocation::ClassMethods + + protected + + # Shortcut to invoke with padding and block handling. Use internally by + # invoke and invoke_from_option class methods. + # + # source://thor//lib/thor/group.rb#265 + def _invoke_for_class_method(klass, command = T.unsafe(nil), *args, &block); end + + class << self + # Overwrite class options help to allow invoked generators options to be + # shown recursively when invoking a generator. + # + # source://thor//lib/thor/group.rb#161 + def class_options_help(shell, groups = T.unsafe(nil)); end + + # The description for this Thor::Group. If none is provided, but a source root + # exists, tries to find the USAGE one folder above it, otherwise searches + # in the superclass. + # + # ==== Parameters + # description<String>:: The description for this Thor::Group. + # + # source://thor//lib/thor/group.rb#16 + def desc(description = T.unsafe(nil)); end + + # Get invocations array and merge options from invocations. Those + # options are added to group_options hash. Options that already exists + # in base_options are not added twice. + # + # source://thor//lib/thor/group.rb#172 + def get_options_from_invocations(group_options, base_options); end + + # @raise [error] + # + # source://thor//lib/thor/group.rb#207 + def handle_argument_error(command, error, _args, arity); end + + # Prints help information. + # + # ==== Options + # short:: When true, shows only usage. + # + # source://thor//lib/thor/group.rb#29 + def help(shell); end + + # Stores invocation blocks used on invoke_from_option. + # + # source://thor//lib/thor/group.rb#45 + def invocation_blocks; end + + # Stores invocations for this class merging with superclass values. + # + # source://thor//lib/thor/group.rb#39 + def invocations; end + + # Invoke the given namespace or class given. It adds an instance + # method that will invoke the klass and command. You can give a block to + # configure how it will be invoked. + # + # The namespace/class given will have its options showed on the help + # usage. Check invoke_from_option for more information. + # + # source://thor//lib/thor/group.rb#56 + def invoke(*names, &block); end + + # Invoke a thor class based on the value supplied by the user to the + # given option named "name". A class option must be created before this + # method is invoked for each name given. + # + # ==== Examples + # + # class GemGenerator < Thor::Group + # class_option :test_framework, :type => :string + # invoke_from_option :test_framework + # end + # + # ==== Boolean options + # + # In some cases, you want to invoke a thor class if some option is true or + # false. This is automatically handled by invoke_from_option. Then the + # option name is used to invoke the generator. + # + # ==== Preparing for invocation + # + # In some cases you want to customize how a specified hook is going to be + # invoked. You can do that by overwriting the class method + # prepare_for_invocation. The class method must necessarily return a klass + # and an optional command. + # + # ==== Custom invocations + # + # You can also supply a block to customize how the option is going to be + # invoked. The block receives two parameters, an instance of the current + # class and the klass to be invoked. + # + # source://thor//lib/thor/group.rb#110 + def invoke_from_option(*names, &block); end + + # Returns commands ready to be printed. + # + # source://thor//lib/thor/group.rb#199 + def printable_commands(*_arg0); end + + # Returns commands ready to be printed. + # + # source://thor//lib/thor/group.rb#199 + def printable_tasks(*_arg0); end + + # Remove a previously added invocation. + # + # ==== Examples + # + # remove_invocation :test_framework + # + # source://thor//lib/thor/group.rb#149 + def remove_invocation(*names); end + + protected + + # The banner for this class. You can customize it if you are invoking the + # thor class by another ways which is not the Thor::Runner. + # + # source://thor//lib/thor/group.rb#238 + def banner; end + + # source://thor//lib/thor/group.rb#248 + def baseclass; end + + # source://thor//lib/thor/group.rb#252 + def create_command(meth); end + + # source://thor//lib/thor/group.rb#252 + def create_task(meth); end + + # The method responsible for dispatching given the args. + # + # @yield [instance] + # + # source://thor//lib/thor/group.rb#217 + def dispatch(command, given_args, given_opts, config); end + + # Represents the whole class as a command. + # + # source://thor//lib/thor/group.rb#243 + def self_command; end + + # Represents the whole class as a command. + # + # source://thor//lib/thor/group.rb#243 + def self_task; end + end +end + +# Shortcuts for help. +# +# source://thor//lib/thor/base.rb#17 +Thor::HELP_MAPPINGS = T.let(T.unsafe(nil), Array) + +# A command that is hidden in help messages but still invocable. +# +# source://thor//lib/thor/command.rb#120 +class Thor::HiddenCommand < ::Thor::Command + # @return [Boolean] + # + # source://thor//lib/thor/command.rb#121 + def hidden?; end +end + +# source://thor//lib/thor/command.rb#125 +Thor::HiddenTask = Thor::HiddenCommand + +# source://thor//lib/thor/invocation.rb#2 +module Thor::Invocation + mixes_in_class_methods ::Thor::Invocation::ClassMethods + + # Make initializer aware of invocations and the initialization args. + # + # source://thor//lib/thor/invocation.rb#23 + def initialize(args = T.unsafe(nil), options = T.unsafe(nil), config = T.unsafe(nil), &block); end + + # Make the current command chain accessible with in a Thor-(sub)command + # + # source://thor//lib/thor/invocation.rb#30 + def current_command_chain; end + + # Receives a name and invokes it. The name can be a string (either "command" or + # "namespace:command"), a Thor::Command, a Class or a Thor instance. If the + # command cannot be guessed by name, it can also be supplied as second argument. + # + # You can also supply the arguments, options and configuration values for + # the command to be invoked, if none is given, the same values used to + # initialize the invoker are used to initialize the invoked. + # + # When no name is given, it will invoke the default command of the current class. + # + # ==== Examples + # + # class A < Thor + # def foo + # invoke :bar + # invoke "b:hello", ["Erik"] + # end + # + # def bar + # invoke "b:hello", ["Erik"] + # end + # end + # + # class B < Thor + # def hello(name) + # puts "hello #{name}" + # end + # end + # + # You can notice that the method "foo" above invokes two commands: "bar", + # which belongs to the same class and "hello" which belongs to the class B. + # + # By using an invocation system you ensure that a command is invoked only once. + # In the example above, invoking "foo" will invoke "b:hello" just once, even + # if it's invoked later by "bar" method. + # + # When class A invokes class B, all arguments used on A initialization are + # supplied to B. This allows lazy parse of options. Let's suppose you have + # some rspec commands: + # + # class Rspec < Thor::Group + # class_option :mock_framework, :type => :string, :default => :rr + # + # def invoke_mock_framework + # invoke "rspec:#{options[:mock_framework]}" + # end + # end + # + # As you noticed, it invokes the given mock framework, which might have its + # own options: + # + # class Rspec::RR < Thor::Group + # class_option :style, :type => :string, :default => :mock + # end + # + # Since it's not rspec concern to parse mock framework options, when RR + # is invoked all options are parsed again, so RR can extract only the options + # that it's going to use. + # + # If you want Rspec::RR to be initialized with its own set of options, you + # have to do that explicitly: + # + # invoke "rspec:rr", [], :style => :foo + # + # Besides giving an instance, you can also give a class to invoke: + # + # invoke Rspec::RR, [], :style => :foo + # + # source://thor//lib/thor/invocation.rb#102 + def invoke(name = T.unsafe(nil), *args); end + + # Invoke all commands for the current instance. + # + # source://thor//lib/thor/invocation.rb#133 + def invoke_all; end + + # Invoke the given command if the given args. + # + # source://thor//lib/thor/invocation.rb#122 + def invoke_command(command, *args); end + + # Invoke the given command if the given args. + # + # source://thor//lib/thor/invocation.rb#122 + def invoke_task(command, *args); end + + # Invokes using shell padding. + # + # source://thor//lib/thor/invocation.rb#138 + def invoke_with_padding(*args); end + + protected + + # Initialize klass using values stored in the @_initializer. + # + # source://thor//lib/thor/invocation.rb#166 + def _parse_initialization_options(args, opts, config); end + + # This method simply retrieves the class and command to be invoked. + # If the name is nil or the given name is a command in the current class, + # use the given name and return self as class. Otherwise, call + # prepare_for_invocation in the current class. + # + # source://thor//lib/thor/invocation.rb#153 + def _retrieve_class_and_command(name, sent_command = T.unsafe(nil)); end + + # This method simply retrieves the class and command to be invoked. + # If the name is nil or the given name is a command in the current class, + # use the given name and return self as class. Otherwise, call + # prepare_for_invocation in the current class. + # + # source://thor//lib/thor/invocation.rb#153 + def _retrieve_class_and_task(name, sent_command = T.unsafe(nil)); end + + # Configuration values that are shared between invocations. + # + # source://thor//lib/thor/invocation.rb#145 + def _shared_configuration; end + + class << self + # source://thor//lib/thor/invocation.rb#3 + def included(base); end + end +end + +# source://thor//lib/thor/invocation.rb#8 +module Thor::Invocation::ClassMethods + # This method is responsible for receiving a name and find the proper + # class and command for it. The key is an optional parameter which is + # available only in class methods invocations (i.e. in Thor::Group). + # + # source://thor//lib/thor/invocation.rb#12 + def prepare_for_invocation(key, name); end +end + +# Raised when a command was found, but not invoked properly. +# +# source://thor//lib/thor/error.rb#73 +class Thor::InvocationError < ::Thor::Error; end + +# source://thor//lib/thor/line_editor/basic.rb#2 +module Thor::LineEditor + class << self + # source://thor//lib/thor/line_editor.rb#10 + def best_available; end + + # source://thor//lib/thor/line_editor.rb#6 + def readline(prompt, options = T.unsafe(nil)); end + end +end + +# source://thor//lib/thor/line_editor/basic.rb#3 +class Thor::LineEditor::Basic + # @return [Basic] a new instance of Basic + # + # source://thor//lib/thor/line_editor/basic.rb#10 + def initialize(prompt, options); end + + # Returns the value of attribute options. + # + # source://thor//lib/thor/line_editor/basic.rb#4 + def options; end + + # Returns the value of attribute prompt. + # + # source://thor//lib/thor/line_editor/basic.rb#4 + def prompt; end + + # source://thor//lib/thor/line_editor/basic.rb#15 + def readline; end + + private + + # @return [Boolean] + # + # source://thor//lib/thor/line_editor/basic.rb#32 + def echo?; end + + # source://thor//lib/thor/line_editor/basic.rb#22 + def get_input; end + + class << self + # @return [Boolean] + # + # source://thor//lib/thor/line_editor/basic.rb#6 + def available?; end + end +end + +# source://thor//lib/thor/line_editor/readline.rb#3 +class Thor::LineEditor::Readline < ::Thor::LineEditor::Basic + # source://thor//lib/thor/line_editor/readline.rb#13 + def readline; end + + private + + # @return [Boolean] + # + # source://thor//lib/thor/line_editor/readline.rb#28 + def add_to_history?; end + + # source://thor//lib/thor/line_editor/readline.rb#42 + def completion_options; end + + # source://thor//lib/thor/line_editor/readline.rb#32 + def completion_proc; end + + # @return [Boolean] + # + # source://thor//lib/thor/line_editor/readline.rb#46 + def use_path_completion?; end + + class << self + # @return [Boolean] + # + # source://thor//lib/thor/line_editor/readline.rb#4 + def available?; end + end +end + +# source://thor//lib/thor/line_editor/readline.rb#50 +class Thor::LineEditor::Readline::PathCompletion + # @return [PathCompletion] a new instance of PathCompletion + # + # source://thor//lib/thor/line_editor/readline.rb#54 + def initialize(text); end + + # source://thor//lib/thor/line_editor/readline.rb#58 + def matches; end + + private + + # source://thor//lib/thor/line_editor/readline.rb#68 + def absolute_matches; end + + # source://thor//lib/thor/line_editor/readline.rb#82 + def base_path; end + + # source://thor//lib/thor/line_editor/readline.rb#78 + def glob_pattern; end + + # source://thor//lib/thor/line_editor/readline.rb#64 + def relative_matches; end + + # Returns the value of attribute text. + # + # source://thor//lib/thor/line_editor/readline.rb#51 + def text; end +end + +# source://thor//lib/thor/error.rb#109 +class Thor::MalformattedArgumentError < ::Thor::InvocationError; end + +# source://thor//lib/thor/nested_context.rb#2 +class Thor::NestedContext + # @return [NestedContext] a new instance of NestedContext + # + # source://thor//lib/thor/nested_context.rb#3 + def initialize; end + + # source://thor//lib/thor/nested_context.rb#7 + def enter; end + + # @return [Boolean] + # + # source://thor//lib/thor/nested_context.rb#15 + def entered?; end + + private + + # source://thor//lib/thor/nested_context.rb#25 + def pop; end + + # source://thor//lib/thor/nested_context.rb#21 + def push; end +end + +# source://thor//lib/thor/error.rb#8 +class Thor::NoKwargSpellChecker < ::DidYouMean::SpellChecker + # source://thor//lib/thor/error.rb#9 + def initialize(dictionary); end +end + +# source://thor//lib/thor/parser/option.rb#2 +class Thor::Option < ::Thor::Argument + # @return [Option] a new instance of Option + # + # source://thor//lib/thor/parser/option.rb#7 + def initialize(name, options = T.unsafe(nil)); end + + # Returns the value of attribute aliases. + # + # source://thor//lib/thor/parser/option.rb#3 + def aliases; end + + # source://thor//lib/thor/parser/option.rb#99 + def aliases_for_usage; end + + # source://thor//lib/thor/parser/option.rb#109 + def array?; end + + # source://thor//lib/thor/parser/option.rb#109 + def boolean?; end + + # Returns the value of attribute group. + # + # source://thor//lib/thor/parser/option.rb#3 + def group; end + + # source://thor//lib/thor/parser/option.rb#109 + def hash?; end + + # Returns the value of attribute hide. + # + # source://thor//lib/thor/parser/option.rb#3 + def hide; end + + # source://thor//lib/thor/parser/option.rb#79 + def human_name; end + + # Returns the value of attribute lazy_default. + # + # source://thor//lib/thor/parser/option.rb#3 + def lazy_default; end + + # source://thor//lib/thor/parser/option.rb#109 + def numeric?; end + + # Returns the value of attribute repeatable. + # + # source://thor//lib/thor/parser/option.rb#3 + def repeatable; end + + # source://thor//lib/thor/parser/option.rb#109 + def string?; end + + # source://thor//lib/thor/parser/option.rb#75 + def switch_name; end + + # source://thor//lib/thor/parser/option.rb#83 + def usage(padding = T.unsafe(nil)); end + + protected + + # source://thor//lib/thor/parser/option.rb#159 + def dasherize(str); end + + # @return [Boolean] + # + # source://thor//lib/thor/parser/option.rb#151 + def dasherized?; end + + # source://thor//lib/thor/parser/option.rb#155 + def undasherize(str); end + + # @raise [ArgumentError] + # + # source://thor//lib/thor/parser/option.rb#117 + def validate!; end + + # source://thor//lib/thor/parser/option.rb#122 + def validate_default_type!; end + + class << self + # This parse quick options given as method_options. It makes several + # assumptions, but you can be more specific using the option method. + # + # parse :foo => "bar" + # #=> Option foo with default value bar + # + # parse [:foo, :baz] => "bar" + # #=> Option foo with default value bar and alias :baz + # + # parse :foo => :required + # #=> Required option foo without default value + # + # parse :foo => 2 + # #=> Option foo with default value 2 and type numeric + # + # parse :foo => :numeric + # #=> Option foo without default value and type numeric + # + # parse :foo => true + # #=> Option foo with default value true and type boolean + # + # The valid types are :boolean, :numeric, :hash, :array and :string. If none + # is given a default type is assumed. This default type accepts arguments as + # string (--foo=value) or booleans (just --foo). + # + # By default all options are optional, unless :required is given. + # + # source://thor//lib/thor/parser/option.rb#45 + def parse(key, value); end + end +end + +# source://thor//lib/thor/parser/option.rb#5 +Thor::Option::VALID_TYPES = T.let(T.unsafe(nil), Array) + +# source://thor//lib/thor/parser/options.rb#2 +class Thor::Options < ::Thor::Arguments + # Takes a hash of Thor::Option and a hash with defaults. + # + # If +stop_on_unknown+ is true, #parse will stop as soon as it encounters + # an unknown option or a regular argument. + # + # @return [Options] a new instance of Options + # + # source://thor//lib/thor/parser/options.rb#32 + def initialize(hash_options = T.unsafe(nil), defaults = T.unsafe(nil), stop_on_unknown = T.unsafe(nil), disable_required_check = T.unsafe(nil)); end + + # @raise [UnknownArgumentError] + # + # source://thor//lib/thor/parser/options.rb#141 + def check_unknown!; end + + # source://thor//lib/thor/parser/options.rb#88 + def parse(args); end + + # source://thor//lib/thor/parser/options.rb#64 + def peek; end + + # source://thor//lib/thor/parser/options.rb#60 + def remaining; end + + # source://thor//lib/thor/parser/options.rb#78 + def shift; end + + # source://thor//lib/thor/parser/options.rb#83 + def unshift(arg, is_value: T.unsafe(nil)); end + + protected + + # source://thor//lib/thor/parser/options.rb#151 + def assign_result!(option, result); end + + # Check if the current value in peek is a registered switch. + # + # Two booleans are returned. The first is true if the current value + # starts with a hyphen; the second is true if it is a registered switch. + # + # @return [Boolean] + # + # source://thor//lib/thor/parser/options.rb#165 + def current_is_switch?; end + + # @return [Boolean] + # + # source://thor//lib/thor/parser/options.rb#177 + def current_is_switch_formatted?; end + + # @return [Boolean] + # + # source://thor//lib/thor/parser/options.rb#187 + def current_is_value?; end + + # Check if the given argument is actually a shortcut. + # + # source://thor//lib/thor/parser/options.rb#206 + def normalize_switch(arg); end + + # Parse boolean values which can be given as --foo=true, --foo or --no-foo. + # + # source://thor//lib/thor/parser/options.rb#217 + def parse_boolean(switch); end + + # Parse the value at the peek analyzing if it requires an input or not. + # + # source://thor//lib/thor/parser/options.rb#235 + def parse_peek(switch, option); end + + # @return [Boolean] + # + # source://thor//lib/thor/parser/options.rb#210 + def parsing_options?; end + + # @return [Boolean] + # + # source://thor//lib/thor/parser/options.rb#192 + def switch?(arg); end + + # source://thor//lib/thor/parser/options.rb#196 + def switch_option(arg); end + + class << self + # Receives a hash and makes it switches. + # + # source://thor//lib/thor/parser/options.rb#11 + def to_switches(options); end + end +end + +# source://thor//lib/thor/parser/options.rb#5 +Thor::Options::EQ_RE = T.let(T.unsafe(nil), Regexp) + +# source://thor//lib/thor/parser/options.rb#3 +Thor::Options::LONG_RE = T.let(T.unsafe(nil), Regexp) + +# source://thor//lib/thor/parser/options.rb#8 +Thor::Options::OPTS_END = T.let(T.unsafe(nil), String) + +# source://thor//lib/thor/parser/options.rb#7 +Thor::Options::SHORT_NUM = T.let(T.unsafe(nil), Regexp) + +# source://thor//lib/thor/parser/options.rb#4 +Thor::Options::SHORT_RE = T.let(T.unsafe(nil), Regexp) + +# Allow either -x -v or -xv style for single char args +# +# source://thor//lib/thor/parser/options.rb#6 +Thor::Options::SHORT_SQ_RE = T.let(T.unsafe(nil), Regexp) + +# Adds a compatibility layer to your Thor classes which allows you to use +# rake package tasks. For example, to use rspec rake tasks, one can do: +# +# require 'thor/rake_compat' +# require 'rspec/core/rake_task' +# +# class Default < Thor +# include Thor::RakeCompat +# +# RSpec::Core::RakeTask.new(:spec) do |t| +# t.spec_opts = ['--options', './.rspec'] +# t.spec_files = FileList['spec/**/*_spec.rb'] +# end +# end +# +# source://thor//lib/thor/rake_compat.rb#20 +module Thor::RakeCompat + include ::FileUtils::StreamUtils_ + include ::FileUtils + include ::Rake::FileUtilsExt + include ::Rake::DSL + + class << self + # @private + # + # source://thor//lib/thor/rake_compat.rb#27 + def included(base); end + + # source://thor//lib/thor/rake_compat.rb#23 + def rake_classes; end + end +end + +# source://thor//lib/thor/error.rb#106 +class Thor::RequiredArgumentMissingError < ::Thor::InvocationError; end + +# source://thor//lib/thor/util.rb#4 +module Thor::Sandbox; end + +# source://thor//lib/thor/shell.rb#23 +module Thor::Shell + # Add shell to initialize config values. + # + # ==== Configuration + # shell<Object>:: An instance of the shell to be used. + # + # ==== Examples + # + # class MyScript < Thor + # argument :first, :type => :numeric + # end + # + # MyScript.new [1.0], { :foo => :bar }, :shell => Thor::Shell::Basic.new + # + # source://thor//lib/thor/shell.rb#44 + def initialize(args = T.unsafe(nil), options = T.unsafe(nil), config = T.unsafe(nil)); end + + # source://thor//lib/thor/shell.rb#59 + def ask(*args, &block); end + + # source://thor//lib/thor/shell.rb#59 + def error(*args, &block); end + + # source://thor//lib/thor/shell.rb#59 + def file_collision(*args, &block); end + + # source://thor//lib/thor/shell.rb#59 + def no?(*args, &block); end + + # source://thor//lib/thor/shell.rb#59 + def print_in_columns(*args, &block); end + + # source://thor//lib/thor/shell.rb#59 + def print_table(*args, &block); end + + # source://thor//lib/thor/shell.rb#59 + def print_wrapped(*args, &block); end + + # source://thor//lib/thor/shell.rb#59 + def say(*args, &block); end + + # source://thor//lib/thor/shell.rb#59 + def say_error(*args, &block); end + + # source://thor//lib/thor/shell.rb#59 + def say_status(*args, &block); end + + # source://thor//lib/thor/shell.rb#59 + def set_color(*args, &block); end + + # Holds the shell for the given Thor instance. If no shell is given, + # it gets a default shell from Thor::Base.shell. + # + # source://thor//lib/thor/shell.rb#52 + def shell; end + + # Sets the attribute shell + # + # @param value the value to set the attribute shell to. + # + # source://thor//lib/thor/shell.rb#25 + def shell=(_arg0); end + + # source://thor//lib/thor/shell.rb#59 + def terminal_width(*args, &block); end + + # Yields the given block with padding. + # + # source://thor//lib/thor/shell.rb#66 + def with_padding; end + + # source://thor//lib/thor/shell.rb#59 + def yes?(*args, &block); end + + protected + + # Allow shell to be shared between invocations. + # + # source://thor//lib/thor/shell.rb#77 + def _shared_configuration; end +end + +# source://thor//lib/thor/shell/basic.rb#3 +class Thor::Shell::Basic + # Initialize base, mute and padding to nil. + # + # @return [Basic] a new instance of Basic + # + # source://thor//lib/thor/shell/basic.rb#11 + def initialize; end + + # Asks something to the user and receives a response. + # + # If a default value is specified it will be presented to the user + # and allows them to select that value with an empty response. This + # option is ignored when limited answers are supplied. + # + # If asked to limit the correct responses, you can pass in an + # array of acceptable answers. If one of those is not supplied, + # they will be shown a message stating that one of those answers + # must be given and re-asked the question. + # + # If asking for sensitive information, the :echo option can be set + # to false to mask user input from $stdin. + # + # If the required input is a path, then set the path option to + # true. This will enable tab completion for file paths relative + # to the current working directory on systems that support + # Readline. + # + # ==== Example + # ask("What is your name?") + # + # ask("What is the planet furthest from the sun?", :default => "Pluto") + # + # ask("What is your favorite Neopolitan flavor?", :limited_to => ["strawberry", "chocolate", "vanilla"]) + # + # ask("What is your password?", :echo => false) + # + # ask("Where should the file be saved?", :path => true) + # + # source://thor//lib/thor/shell/basic.rb#78 + def ask(statement, *args); end + + # Returns the value of attribute base. + # + # source://thor//lib/thor/shell/basic.rb#6 + def base; end + + # Sets the attribute base + # + # @param value the value to set the attribute base to. + # + # source://thor//lib/thor/shell/basic.rb#6 + def base=(_arg0); end + + # Called if something goes wrong during the execution. This is used by Thor + # internally and should not be used inside your scripts. If something went + # wrong, you can always raise an exception. If you raise a Thor::Error, it + # will be rescued and wrapped in the method below. + # + # source://thor//lib/thor/shell/basic.rb#342 + def error(statement); end + + # Deals with file collision and returns true if the file should be + # overwritten and false otherwise. If a block is given, it uses the block + # response as the content for the diff. + # + # ==== Parameters + # destination<String>:: the destination file to solve conflicts + # block<Proc>:: an optional block that returns the value to be used in diff and merge + # + # source://thor//lib/thor/shell/basic.rb#285 + def file_collision(destination); end + + # Sets the output padding while executing a block and resets it. + # + # source://thor//lib/thor/shell/basic.rb#41 + def indent(count = T.unsafe(nil)); end + + # Mute everything that's inside given block + # + # source://thor//lib/thor/shell/basic.rb#20 + def mute; end + + # Check if base is muted + # + # @return [Boolean] + # + # source://thor//lib/thor/shell/basic.rb#29 + def mute?; end + + # Make a question the to user and returns true if the user replies "n" or + # "no". + # + # @return [Boolean] + # + # source://thor//lib/thor/shell/basic.rb#154 + def no?(statement, color = T.unsafe(nil)); end + + # Returns the value of attribute padding. + # + # source://thor//lib/thor/shell/basic.rb#7 + def padding; end + + # Sets the output padding, not allowing less than zero values. + # + # source://thor//lib/thor/shell/basic.rb#35 + def padding=(value); end + + # Prints values in columns + # + # ==== Parameters + # Array[String, String, ...] + # + # source://thor//lib/thor/shell/basic.rb#163 + def print_in_columns(array); end + + # Prints a table. + # + # ==== Parameters + # Array[Array[String, String, ...]] + # + # ==== Options + # indent<Integer>:: Indent the first column by indent value. + # colwidth<Integer>:: Force the first column to colwidth spaces wide. + # + # source://thor//lib/thor/shell/basic.rb#185 + def print_table(array, options = T.unsafe(nil)); end + + # Prints a long string, word-wrapping the text to the current width of the + # terminal display. Ideal for printing heredocs. + # + # ==== Parameters + # String + # + # ==== Options + # indent<Integer>:: Indent each line of the printed paragraph by indent value. + # + # source://thor//lib/thor/shell/basic.rb#247 + def print_wrapped(message, options = T.unsafe(nil)); end + + # Say (print) something to the user. If the sentence ends with a whitespace + # or tab character, a new line is not appended (print + flush). Otherwise + # are passed straight to puts (behavior got from Highline). + # + # ==== Example + # say("I know you knew that.") + # + # source://thor//lib/thor/shell/basic.rb#96 + def say(message = T.unsafe(nil), color = T.unsafe(nil), force_new_line = T.unsafe(nil)); end + + # Say (print) an error to the user. If the sentence ends with a whitespace + # or tab character, a new line is not appended (print + flush). Otherwise + # are passed straight to puts (behavior got from Highline). + # + # ==== Example + # say_error("error: something went wrong") + # + # source://thor//lib/thor/shell/basic.rb#113 + def say_error(message = T.unsafe(nil), color = T.unsafe(nil), force_new_line = T.unsafe(nil)); end + + # Say a status with the given color and appends the message. Since this + # method is used frequently by actions, it allows nil or false to be given + # in log_status, avoiding the message from being shown. If a Symbol is + # given in log_status, it's used as the color. + # + # source://thor//lib/thor/shell/basic.rb#128 + def say_status(status, message, log_status = T.unsafe(nil)); end + + # Apply color to the given string with optional bold. Disabled in the + # Thor::Shell::Basic class. + # + # source://thor//lib/thor/shell/basic.rb#349 + def set_color(string, *_arg1); end + + # source://thor//lib/thor/shell/basic.rb#326 + def terminal_width; end + + # Make a question the to user and returns true if the user replies "y" or + # "yes". + # + # @return [Boolean] + # + # source://thor//lib/thor/shell/basic.rb#147 + def yes?(statement, color = T.unsafe(nil)); end + + protected + + # source://thor//lib/thor/shell/basic.rb#486 + def answer_match(possibilities, answer, case_insensitive); end + + # source://thor//lib/thor/shell/basic.rb#443 + def as_unicode; end + + # source://thor//lib/thor/shell/basic.rb#473 + def ask_filtered(statement, color, options); end + + # source://thor//lib/thor/shell/basic.rb#456 + def ask_simply(statement, color, options); end + + # @return [Boolean] + # + # source://thor//lib/thor/shell/basic.rb#360 + def can_display_colors?; end + + # Calculate the dynamic width of the terminal + # + # source://thor//lib/thor/shell/basic.rb#415 + def dynamic_width; end + + # source://thor//lib/thor/shell/basic.rb#419 + def dynamic_width_stty; end + + # source://thor//lib/thor/shell/basic.rb#423 + def dynamic_width_tput; end + + # source://thor//lib/thor/shell/basic.rb#387 + def file_collision_help; end + + # source://thor//lib/thor/shell/basic.rb#507 + def git_merge_tool; end + + # @return [Boolean] + # + # source://thor//lib/thor/shell/basic.rb#377 + def is?(value); end + + # source://thor//lib/thor/shell/basic.rb#364 + def lookup_color(color); end + + # source://thor//lib/thor/shell/basic.rb#494 + def merge(destination, content); end + + # source://thor//lib/thor/shell/basic.rb#503 + def merge_tool; end + + # source://thor//lib/thor/shell/basic.rb#355 + def prepare_message(message, *color); end + + # @return [Boolean] + # + # source://thor//lib/thor/shell/basic.rb#410 + def quiet?; end + + # source://thor//lib/thor/shell/basic.rb#399 + def show_diff(destination, content); end + + # source://thor//lib/thor/shell/basic.rb#373 + def stderr; end + + # source://thor//lib/thor/shell/basic.rb#369 + def stdout; end + + # source://thor//lib/thor/shell/basic.rb#431 + def truncate(string, width); end + + # @return [Boolean] + # + # source://thor//lib/thor/shell/basic.rb#427 + def unix?; end +end + +# source://thor//lib/thor/shell/basic.rb#4 +Thor::Shell::Basic::DEFAULT_TERMINAL_WIDTH = T.let(T.unsafe(nil), Integer) + +# Inherit from Thor::Shell::Basic and add set_color behavior. Check +# Thor::Shell::Basic to see all available methods. +# +# source://thor//lib/thor/shell/color.rb#8 +class Thor::Shell::Color < ::Thor::Shell::Basic + # Set color by using a string or one of the defined constants. If a third + # option is set to true, it also adds bold to the string. This is based + # on Highline implementation and it automatically appends CLEAR to the end + # of the returned String. + # + # Pass foreground, background and bold options to this method as + # symbols. + # + # Example: + # + # set_color "Hi!", :red, :on_white, :bold + # + # The available colors are: + # + # :bold + # :black + # :red + # :green + # :yellow + # :blue + # :magenta + # :cyan + # :white + # :on_black + # :on_red + # :on_green + # :on_yellow + # :on_blue + # :on_magenta + # :on_cyan + # :on_white + # + # source://thor//lib/thor/shell/color.rb#79 + def set_color(string, *colors); end + + protected + + # @return [Boolean] + # + # source://thor//lib/thor/shell/color.rb#107 + def are_colors_disabled?; end + + # @return [Boolean] + # + # source://thor//lib/thor/shell/color.rb#103 + def are_colors_supported?; end + + # @return [Boolean] + # + # source://thor//lib/thor/shell/color.rb#99 + def can_display_colors?; end + + # Check if Diff::LCS is loaded. If it is, use it to create pretty output + # for diff. + # + # @return [Boolean] + # + # source://thor//lib/thor/shell/color.rb#144 + def diff_lcs_loaded?; end + + # source://thor//lib/thor/shell/color.rb#127 + def output_diff_line(diff); end + + # Overwrite show_diff to show diff with colors if Diff::LCS is + # available. + # + # source://thor//lib/thor/shell/color.rb#114 + def show_diff(destination, content); end +end + +# Set the terminal's foreground ANSI color to black. +# +# source://thor//lib/thor/shell/color.rb#15 +Thor::Shell::Color::BLACK = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground ANSI color to blue. +# +# source://thor//lib/thor/shell/color.rb#23 +Thor::Shell::Color::BLUE = T.let(T.unsafe(nil), String) + +# The start of an ANSI bold sequence. +# +# source://thor//lib/thor/shell/color.rb#12 +Thor::Shell::Color::BOLD = T.let(T.unsafe(nil), String) + +# Embed in a String to clear all previous ANSI sequences. +# +# source://thor//lib/thor/shell/color.rb#10 +Thor::Shell::Color::CLEAR = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground ANSI color to cyan. +# +# source://thor//lib/thor/shell/color.rb#27 +Thor::Shell::Color::CYAN = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground ANSI color to green. +# +# source://thor//lib/thor/shell/color.rb#19 +Thor::Shell::Color::GREEN = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground ANSI color to magenta. +# +# source://thor//lib/thor/shell/color.rb#25 +Thor::Shell::Color::MAGENTA = T.let(T.unsafe(nil), String) + +# Set the terminal's background ANSI color to black. +# +# source://thor//lib/thor/shell/color.rb#32 +Thor::Shell::Color::ON_BLACK = T.let(T.unsafe(nil), String) + +# Set the terminal's background ANSI color to blue. +# +# source://thor//lib/thor/shell/color.rb#40 +Thor::Shell::Color::ON_BLUE = T.let(T.unsafe(nil), String) + +# Set the terminal's background ANSI color to cyan. +# +# source://thor//lib/thor/shell/color.rb#44 +Thor::Shell::Color::ON_CYAN = T.let(T.unsafe(nil), String) + +# Set the terminal's background ANSI color to green. +# +# source://thor//lib/thor/shell/color.rb#36 +Thor::Shell::Color::ON_GREEN = T.let(T.unsafe(nil), String) + +# Set the terminal's background ANSI color to magenta. +# +# source://thor//lib/thor/shell/color.rb#42 +Thor::Shell::Color::ON_MAGENTA = T.let(T.unsafe(nil), String) + +# Set the terminal's background ANSI color to red. +# +# source://thor//lib/thor/shell/color.rb#34 +Thor::Shell::Color::ON_RED = T.let(T.unsafe(nil), String) + +# Set the terminal's background ANSI color to white. +# +# source://thor//lib/thor/shell/color.rb#46 +Thor::Shell::Color::ON_WHITE = T.let(T.unsafe(nil), String) + +# Set the terminal's background ANSI color to yellow. +# +# source://thor//lib/thor/shell/color.rb#38 +Thor::Shell::Color::ON_YELLOW = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground ANSI color to red. +# +# source://thor//lib/thor/shell/color.rb#17 +Thor::Shell::Color::RED = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground ANSI color to white. +# +# source://thor//lib/thor/shell/color.rb#29 +Thor::Shell::Color::WHITE = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground ANSI color to yellow. +# +# source://thor//lib/thor/shell/color.rb#21 +Thor::Shell::Color::YELLOW = T.let(T.unsafe(nil), String) + +# Inherit from Thor::Shell::Basic and add set_color behavior. Check +# Thor::Shell::Basic to see all available methods. +# +# source://thor//lib/thor/shell/html.rb#8 +class Thor::Shell::HTML < ::Thor::Shell::Basic + # Ask something to the user and receives a response. + # + # ==== Example + # ask("What is your name?") + # + # TODO: Implement #ask for Thor::Shell::HTML + # + # @raise [NotImplementedError] + # + # source://thor//lib/thor/shell/html.rb#70 + def ask(statement, color = T.unsafe(nil)); end + + # Set color by using a string or one of the defined constants. If a third + # option is set to true, it also adds bold to the string. This is based + # on Highline implementation and it automatically appends CLEAR to the end + # of the returned String. + # + # source://thor//lib/thor/shell/html.rb#51 + def set_color(string, *colors); end + + protected + + # @return [Boolean] + # + # source://thor//lib/thor/shell/html.rb#76 + def can_display_colors?; end + + # Check if Diff::LCS is loaded. If it is, use it to create pretty output + # for diff. + # + # @return [Boolean] + # + # source://thor//lib/thor/shell/html.rb#113 + def diff_lcs_loaded?; end + + # source://thor//lib/thor/shell/html.rb#96 + def output_diff_line(diff); end + + # Overwrite show_diff to show diff with colors if Diff::LCS is + # available. + # + # source://thor//lib/thor/shell/html.rb#83 + def show_diff(destination, content); end +end + +# Set the terminal's foreground HTML color to black. +# +# source://thor//lib/thor/shell/html.rb#13 +Thor::Shell::HTML::BLACK = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground HTML color to blue. +# +# source://thor//lib/thor/shell/html.rb#21 +Thor::Shell::HTML::BLUE = T.let(T.unsafe(nil), String) + +# The start of an HTML bold sequence. +# +# source://thor//lib/thor/shell/html.rb#10 +Thor::Shell::HTML::BOLD = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground HTML color to cyan. +# +# source://thor//lib/thor/shell/html.rb#25 +Thor::Shell::HTML::CYAN = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground HTML color to green. +# +# source://thor//lib/thor/shell/html.rb#17 +Thor::Shell::HTML::GREEN = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground HTML color to magenta. +# +# source://thor//lib/thor/shell/html.rb#23 +Thor::Shell::HTML::MAGENTA = T.let(T.unsafe(nil), String) + +# Set the terminal's background HTML color to black. +# +# source://thor//lib/thor/shell/html.rb#30 +Thor::Shell::HTML::ON_BLACK = T.let(T.unsafe(nil), String) + +# Set the terminal's background HTML color to blue. +# +# source://thor//lib/thor/shell/html.rb#38 +Thor::Shell::HTML::ON_BLUE = T.let(T.unsafe(nil), String) + +# Set the terminal's background HTML color to cyan. +# +# source://thor//lib/thor/shell/html.rb#42 +Thor::Shell::HTML::ON_CYAN = T.let(T.unsafe(nil), String) + +# Set the terminal's background HTML color to green. +# +# source://thor//lib/thor/shell/html.rb#34 +Thor::Shell::HTML::ON_GREEN = T.let(T.unsafe(nil), String) + +# Set the terminal's background HTML color to magenta. +# +# source://thor//lib/thor/shell/html.rb#40 +Thor::Shell::HTML::ON_MAGENTA = T.let(T.unsafe(nil), String) + +# Set the terminal's background HTML color to red. +# +# source://thor//lib/thor/shell/html.rb#32 +Thor::Shell::HTML::ON_RED = T.let(T.unsafe(nil), String) + +# Set the terminal's background HTML color to white. +# +# source://thor//lib/thor/shell/html.rb#44 +Thor::Shell::HTML::ON_WHITE = T.let(T.unsafe(nil), String) + +# Set the terminal's background HTML color to yellow. +# +# source://thor//lib/thor/shell/html.rb#36 +Thor::Shell::HTML::ON_YELLOW = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground HTML color to red. +# +# source://thor//lib/thor/shell/html.rb#15 +Thor::Shell::HTML::RED = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground HTML color to white. +# +# source://thor//lib/thor/shell/html.rb#27 +Thor::Shell::HTML::WHITE = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground HTML color to yellow. +# +# source://thor//lib/thor/shell/html.rb#19 +Thor::Shell::HTML::YELLOW = T.let(T.unsafe(nil), String) + +# source://thor//lib/thor/shell.rb#24 +Thor::Shell::SHELL_DELEGATED_METHODS = T.let(T.unsafe(nil), Array) + +# source://thor//lib/thor/base.rb#23 +Thor::TEMPLATE_EXTNAME = T.let(T.unsafe(nil), String) + +# Thor methods that should not be overwritten by the user. +# +# source://thor//lib/thor/base.rb#20 +Thor::THOR_RESERVED_WORDS = T.let(T.unsafe(nil), Array) + +# source://thor//lib/thor/command.rb#117 +Thor::Task = Thor::Command + +# Raised when a command was not found. +# +# source://thor//lib/thor/error.rb#35 +class Thor::UndefinedCommandError < ::Thor::Error + include ::Thor::Correctable + + # @return [UndefinedCommandError] a new instance of UndefinedCommandError + # + # source://thor//lib/thor/error.rb#54 + def initialize(command, all_commands, namespace); end + + # Returns the value of attribute all_commands. + # + # source://thor//lib/thor/error.rb#52 + def all_commands; end + + # Returns the value of attribute command. + # + # source://thor//lib/thor/error.rb#52 + def command; end +end + +# source://thor//lib/thor/error.rb#36 +class Thor::UndefinedCommandError::SpellChecker + # @return [SpellChecker] a new instance of SpellChecker + # + # source://thor//lib/thor/error.rb#39 + def initialize(error); end + + # source://thor//lib/thor/error.rb#43 + def corrections; end + + # Returns the value of attribute error. + # + # source://thor//lib/thor/error.rb#37 + def error; end + + # source://thor//lib/thor/error.rb#47 + def spell_checker; end +end + +# source://thor//lib/thor/error.rb#66 +Thor::UndefinedTaskError = Thor::UndefinedCommandError + +# source://thor//lib/thor/error.rb#76 +class Thor::UnknownArgumentError < ::Thor::Error + include ::Thor::Correctable + + # @return [UnknownArgumentError] a new instance of UnknownArgumentError + # + # source://thor//lib/thor/error.rb#96 + def initialize(switches, unknown); end + + # Returns the value of attribute switches. + # + # source://thor//lib/thor/error.rb#94 + def switches; end + + # Returns the value of attribute unknown. + # + # source://thor//lib/thor/error.rb#94 + def unknown; end +end + +# source://thor//lib/thor/error.rb#77 +class Thor::UnknownArgumentError::SpellChecker + # @return [SpellChecker] a new instance of SpellChecker + # + # source://thor//lib/thor/error.rb#80 + def initialize(error); end + + # source://thor//lib/thor/error.rb#84 + def corrections; end + + # Returns the value of attribute error. + # + # source://thor//lib/thor/error.rb#78 + def error; end + + # source://thor//lib/thor/error.rb#89 + def spell_checker; end +end + +# This module holds several utilities: +# +# 1) Methods to convert thor namespaces to constants and vice-versa. +# +# Thor::Util.namespace_from_thor_class(Foo::Bar::Baz) #=> "foo:bar:baz" +# +# 2) Loading thor files and sandboxing: +# +# Thor::Util.load_thorfile("~/.thor/foo") +# +# source://thor//lib/thor/util.rb#17 +module Thor::Util + class << self + # Receives a string and convert it to camel case. camel_case returns CamelCase. + # + # ==== Parameters + # String + # + # ==== Returns + # String + # + # source://thor//lib/thor/util.rb#104 + def camel_case(str); end + + # Returns a string that has had any glob characters escaped. + # The glob characters are `* ? { } [ ]`. + # + # ==== Examples + # + # Thor::Util.escape_globs('[apps]') # => '\[apps\]' + # + # ==== Parameters + # String + # + # ==== Returns + # String + # + # source://thor//lib/thor/util.rb#263 + def escape_globs(path); end + + # Returns a string that has had any HTML characters escaped. + # + # ==== Examples + # + # Thor::Util.escape_html('<div>') # => "<div>" + # + # ==== Parameters + # String + # + # ==== Returns + # String + # + # source://thor//lib/thor/util.rb#279 + def escape_html(string); end + + # Receives a namespace and search for it in the Thor::Base subclasses. + # + # ==== Parameters + # namespace<String>:: The namespace to search for. + # + # source://thor//lib/thor/util.rb#24 + def find_by_namespace(namespace); end + + # Receives a namespace and tries to retrieve a Thor or Thor::Group class + # from it. It first searches for a class using the all the given namespace, + # if it's not found, removes the highest entry and searches for the class + # again. If found, returns the highest entry as the class name. + # + # ==== Examples + # + # class Foo::Bar < Thor + # def baz + # end + # end + # + # class Baz::Foo < Thor::Group + # end + # + # Thor::Util.namespace_to_thor_class("foo:bar") #=> Foo::Bar, nil # will invoke default command + # Thor::Util.namespace_to_thor_class("baz:foo") #=> Baz::Foo, nil + # Thor::Util.namespace_to_thor_class("foo:bar:baz") #=> Foo::Bar, "baz" + # + # ==== Parameters + # namespace<String> + # + # source://thor//lib/thor/util.rb#131 + def find_class_and_command_by_namespace(namespace, fallback = T.unsafe(nil)); end + + # Receives a namespace and tries to retrieve a Thor or Thor::Group class + # from it. It first searches for a class using the all the given namespace, + # if it's not found, removes the highest entry and searches for the class + # again. If found, returns the highest entry as the class name. + # + # ==== Examples + # + # class Foo::Bar < Thor + # def baz + # end + # end + # + # class Baz::Foo < Thor::Group + # end + # + # Thor::Util.namespace_to_thor_class("foo:bar") #=> Foo::Bar, nil # will invoke default command + # Thor::Util.namespace_to_thor_class("baz:foo") #=> Baz::Foo, nil + # Thor::Util.namespace_to_thor_class("foo:bar:baz") #=> Foo::Bar, "baz" + # + # ==== Parameters + # namespace<String> + # + # source://thor//lib/thor/util.rb#131 + def find_class_and_task_by_namespace(namespace, fallback = T.unsafe(nil)); end + + # Where to look for Thor files. + # + # source://thor//lib/thor/util.rb#212 + def globs_for(path); end + + # Receives a path and load the thor file in the path. The file is evaluated + # inside the sandbox to avoid namespacing conflicts. + # + # source://thor//lib/thor/util.rb#152 + def load_thorfile(path, content = T.unsafe(nil), debug = T.unsafe(nil)); end + + # Receives a constant and converts it to a Thor namespace. Since Thor + # commands can be added to a sandbox, this method is also responsible for + # removing the sandbox namespace. + # + # This method should not be used in general because it's used to deal with + # older versions of Thor. On current versions, if you need to get the + # namespace from a class, just call namespace on it. + # + # ==== Parameters + # constant<Object>:: The constant to be converted to the thor path. + # + # ==== Returns + # String:: If we receive Foo::Bar::Baz it returns "foo:bar:baz" + # + # source://thor//lib/thor/util.rb#43 + def namespace_from_thor_class(constant); end + + # Given the contents, evaluate it inside the sandbox and returns the + # namespaces defined in the sandbox. + # + # ==== Parameters + # contents<String> + # + # ==== Returns + # Array[Object] + # + # source://thor//lib/thor/util.rb#58 + def namespaces_in_content(contents, file = T.unsafe(nil)); end + + # Return the path to the ruby interpreter taking into account multiple + # installations and windows extensions. + # + # source://thor//lib/thor/util.rb#220 + def ruby_command; end + + # Receives a string and convert it to snake case. SnakeCase returns snake_case. + # + # ==== Parameters + # String + # + # ==== Returns + # String + # + # source://thor//lib/thor/util.rb#90 + def snake_case(str); end + + # Returns the thor classes declared inside the given class. + # + # source://thor//lib/thor/util.rb#74 + def thor_classes_in(klass); end + + # Returns the root where thor files are located, depending on the OS. + # + # source://thor//lib/thor/util.rb#191 + def thor_root; end + + # Returns the files in the thor root. On Windows thor_root will be something + # like this: + # + # C:\Documents and Settings\james\.thor + # + # If we don't #gsub the \ character, Dir.glob will fail. + # + # source://thor//lib/thor/util.rb#202 + def thor_root_glob; end + + # source://thor//lib/thor/util.rb#167 + def user_home; end + end +end diff --git a/sorbet/rbi/gems/timecop@0.9.6.rbi b/sorbet/rbi/gems/timecop@0.9.6.rbi new file mode 100644 index 0000000..9d7ed08 --- /dev/null +++ b/sorbet/rbi/gems/timecop@0.9.6.rbi @@ -0,0 +1,347 @@ +# typed: false + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `timecop` gem. +# Please instead update this file by running `bin/tapioca gem timecop`. + +# source://timecop//lib/timecop/time_extensions.rb#31 +class Date + include ::Comparable + + class << self + # source://timecop//lib/timecop/time_extensions.rb#104 + def closest_wday(wday); end + + # source://timecop//lib/timecop/time_extensions.rb#33 + def mock_date; end + + # source://timecop//lib/timecop/time_extensions.rb#100 + def mocked_time_stack_item; end + + # source://timecop//lib/timecop/time_extensions.rb#78 + def parse(*args); end + + # source://timecop//lib/timecop/time_extensions.rb#78 + def parse_with_mock_date(*args); end + + # source://timecop//lib/timecop/time_extensions.rb#47 + def strptime(str = T.unsafe(nil), fmt = T.unsafe(nil), start = T.unsafe(nil)); end + + # source://timecop//lib/timecop/time_extensions.rb#47 + def strptime_with_mock_date(str = T.unsafe(nil), fmt = T.unsafe(nil), start = T.unsafe(nil)); end + + # source://timecop//lib/timecop/time_extensions.rb#39 + def today; end + + # source://timecop//lib/timecop/time_extensions.rb#39 + def today_with_mock_date; end + end +end + +# source://timecop//lib/timecop/time_extensions.rb#113 +class DateTime < ::Date + class << self + # source://timecop//lib/timecop/time_extensions.rb#115 + def mock_time; end + + # source://timecop//lib/timecop/time_extensions.rb#150 + def mocked_time_stack_item; end + + # source://timecop//lib/timecop/time_extensions.rb#119 + def now; end + + # source://timecop//lib/timecop/time_extensions.rb#119 + def now_with_mock_time; end + + # source://timecop//lib/timecop/time_extensions.rb#127 + def parse(*args); end + + # source://timecop//lib/timecop/time_extensions.rb#127 + def parse_with_mock_date(*args); end + end +end + +# source://timecop//lib/timecop/time_extensions.rb#4 +class Time + include ::Comparable + + class << self + # source://timecop//lib/timecop/time_extensions.rb#6 + def mock_time; end + + # source://timecop//lib/timecop/time_extensions.rb#21 + def new(*args, **_arg1); end + + # source://timecop//lib/timecop/time_extensions.rb#21 + def new_with_mock_time(*args, **_arg1); end + + # source://timecop//lib/timecop/time_extensions.rb#13 + def now; end + + # source://timecop//lib/timecop/time_extensions.rb#13 + def now_with_mock_time; end + end +end + +# Timecop +# * Wrapper class for manipulating the extensions to the Time, Date, and DateTime objects +# * Allows us to "freeze" time in our Ruby applications. +# * Optionally allows time travel to simulate a running clock, such time is not technically frozen. +# +# This is very useful when your app's functionality is dependent on time (e.g. +# anything that might expire). This will allow us to alter the return value of +# Date.today, Time.now, and DateTime.now, such that our application code _never_ has to change. +# +# source://timecop//lib/timecop/time_stack_item.rb#1 +class Timecop + include ::Singleton + extend ::Singleton::SingletonClassMethods + + # @return [Timecop] a new instance of Timecop + # + # source://timecop//lib/timecop/timecop.rb#174 + def initialize; end + + # source://timecop//lib/timecop/timecop.rb#141 + def baseline; end + + # source://timecop//lib/timecop/timecop.rb#136 + def baseline=(b); end + + # source://timecop//lib/timecop/timecop.rb#209 + def return(&block); end + + # source://timecop//lib/timecop/timecop.rb#224 + def return_to_baseline; end + + # source://timecop//lib/timecop/timecop.rb#149 + def set_baseline(b); end + + # source://timecop//lib/timecop/timecop.rb#166 + def set_stack(s); end + + # source://timecop//lib/timecop/timecop.rb#157 + def stack; end + + # source://timecop//lib/timecop/timecop.rb#185 + def thread_safe; end + + # source://timecop//lib/timecop/timecop.rb#180 + def thread_safe=(t); end + + # @raise [SafeModeException] + # + # source://timecop//lib/timecop/timecop.rb#189 + def travel(mock_type, *args, &block); end + + # source://timecop//lib/timecop/timecop.rb#219 + def unmock!; end + + class << self + # source://timecop//lib/timecop/timecop.rb#78 + def baseline; end + + # source://timecop//lib/timecop/timecop.rb#82 + def baseline=(baseline); end + + # Allows you to run a block of code and "fake" a time throughout the execution of that block. + # This is particularly useful for writing test methods where the passage of time is critical to the business + # logic being tested. For example: + # + # joe = User.find(1) + # joe.purchase_home() + # assert !joe.mortgage_due? + # Timecop.freeze(2008, 10, 5) do + # assert joe.mortgage_due? + # end + # + # freeze and travel will respond to several different arguments: + # 1. Timecop.freeze(time_inst) + # 2. Timecop.freeze(datetime_inst) + # 3. Timecop.freeze(date_inst) + # 4. Timecop.freeze(offset_in_seconds) + # 5. Timecop.freeze(year, month, day, hour=0, minute=0, second=0) + # 6. Timecop.freeze() # Defaults to Time.now + # + # When a block is also passed, Time.now, DateTime.now and Date.today are all reset to their + # previous values after the block has finished executing. This allows us to nest multiple + # calls to Timecop.travel and have each block maintain it's concept of "now." + # + # * Note: Timecop.freeze will actually freeze time. This can cause unanticipated problems if + # benchmark or other timing calls are executed, which implicitly expect Time to actually move + # forward. + # + # * Rails Users: Be especially careful when setting this in your development environment in a + # rails project. Generators will load your environment, including the migration generator, + # which will lead to files being generated with the timestamp set by the Timecop.freeze call + # in your dev environment + # + # Returns the value of the block if one is given, or the mocked time. + # + # source://timecop//lib/timecop/timecop.rb#51 + def freeze(*args, &block); end + + # Returns whether or not Timecop is currently frozen/travelled + # + # @return [Boolean] + # + # source://timecop//lib/timecop/timecop.rb#125 + def frozen?; end + + # Reverts back to system's Time.now, Date.today and DateTime.now (if it exists) permamently when + # no block argument is given, or temporarily reverts back to the system's time temporarily for + # the given block. + # + # source://timecop//lib/timecop/timecop.rb#89 + def return(&block); end + + # source://timecop//lib/timecop/timecop.rb#99 + def return_to_baseline; end + + # source://timecop//lib/timecop/timecop.rb#108 + def safe_mode=(safe); end + + # @return [Boolean] + # + # source://timecop//lib/timecop/timecop.rb#112 + def safe_mode?; end + + # Allows you to run a block of code and "scale" a time throughout the execution of that block. + # The first argument is a scaling factor, for example: + # Timecop.scale(2) do + # ... time will 'go' twice as fast here + # end + # See Timecop#freeze for exact usage of the other arguments + # + # Returns the value of the block if one is given, or the mocked time. + # + # source://timecop//lib/timecop/timecop.rb#74 + def scale(*args, &block); end + + # source://timecop//lib/timecop/timecop.rb#120 + def thread_safe; end + + # source://timecop//lib/timecop/timecop.rb#116 + def thread_safe=(t); end + + # source://timecop//lib/timecop/timecop.rb#104 + def top_stack_item; end + + # Allows you to run a block of code and "fake" a time throughout the execution of that block. + # See Timecop#freeze for a sample of how to use (same exact usage syntax) + # + # * Note: Timecop.travel will not freeze time (as opposed to Timecop.freeze). This is a particularly + # good candidate for use in environment files in rails projects. + # + # Returns the value of the block if one is given, or the mocked time. + # + # source://timecop//lib/timecop/timecop.rb#62 + def travel(*args, &block); end + + # Reverts back to system's Time.now, Date.today and DateTime.now (if it exists) permamently when + # no block argument is given, or temporarily reverts back to the system's time temporarily for + # the given block. + # + # source://timecop//lib/timecop/timecop.rb#89 + def unfreeze(&block); end + + private + + def allocate; end + + # source://singleton/0.1.1/singleton.rb#123 + def instance; end + + def new(*_arg0); end + + # source://timecop//lib/timecop/timecop.rb#130 + def send_travel(mock_type, *args, &block); end + end +end + +# source://timecop//lib/timecop/timecop.rb#232 +class Timecop::SafeModeException < ::StandardError + # @return [SafeModeException] a new instance of SafeModeException + # + # source://timecop//lib/timecop/timecop.rb#233 + def initialize; end +end + +# A data class for carrying around "time movement" objects. Makes it easy to keep track of the time +# movements on a simple stack. +# +# source://timecop//lib/timecop/time_stack_item.rb#4 +class Timecop::TimeStackItem + # @return [TimeStackItem] a new instance of TimeStackItem + # + # source://timecop//lib/timecop/time_stack_item.rb#7 + def initialize(mock_type, *args); end + + # source://timecop//lib/timecop/time_stack_item.rb#77 + def date(date_klass = T.unsafe(nil)); end + + # source://timecop//lib/timecop/time_stack_item.rb#81 + def datetime(datetime_klass = T.unsafe(nil)); end + + # source://timecop//lib/timecop/time_stack_item.rb#25 + def day; end + + # source://timecop//lib/timecop/time_stack_item.rb#29 + def hour; end + + # source://timecop//lib/timecop/time_stack_item.rb#33 + def min; end + + # source://timecop//lib/timecop/time_stack_item.rb#5 + def mock_type; end + + # source://timecop//lib/timecop/time_stack_item.rb#21 + def month; end + + # source://timecop//lib/timecop/time_stack_item.rb#73 + def scaled_time; end + + # source://timecop//lib/timecop/time_stack_item.rb#53 + def scaling_factor; end + + # source://timecop//lib/timecop/time_stack_item.rb#37 + def sec; end + + # source://timecop//lib/timecop/time_stack_item.rb#57 + def time(time_klass = T.unsafe(nil)); end + + # source://timecop//lib/timecop/time_stack_item.rb#45 + def travel_offset; end + + # source://timecop//lib/timecop/time_stack_item.rb#49 + def travel_offset_days; end + + # source://timecop//lib/timecop/time_stack_item.rb#41 + def utc_offset; end + + # source://timecop//lib/timecop/time_stack_item.rb#17 + def year; end + + private + + # source://timecop//lib/timecop/time_stack_item.rb#128 + def compute_travel_offset; end + + # source://timecop//lib/timecop/time_stack_item.rb#100 + def parse_time(*args); end + + # source://timecop//lib/timecop/time_stack_item.rb#92 + def rational_to_utc_offset(rational); end + + # source://timecop//lib/timecop/time_stack_item.rb#136 + def time_klass; end + + # source://timecop//lib/timecop/time_stack_item.rb#132 + def times_are_equal_within_epsilon(t1, t2, epsilon_in_seconds); end + + # source://timecop//lib/timecop/time_stack_item.rb#96 + def utc_offset_to_rational(utc_offset); end +end + +# source://timecop//lib/timecop/version.rb#2 +Timecop::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/unicode-display_width@2.4.2.rbi b/sorbet/rbi/gems/unicode-display_width@2.4.2.rbi new file mode 100644 index 0000000..ccdfd06 --- /dev/null +++ b/sorbet/rbi/gems/unicode-display_width@2.4.2.rbi @@ -0,0 +1,65 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `unicode-display_width` gem. +# Please instead update this file by running `bin/tapioca gem unicode-display_width`. + +# source://unicode-display_width//lib/unicode/display_width/constants.rb#3 +module Unicode; end + +# source://unicode-display_width//lib/unicode/display_width/constants.rb#4 +class Unicode::DisplayWidth + # @return [DisplayWidth] a new instance of DisplayWidth + # + # source://unicode-display_width//lib/unicode/display_width.rb#104 + def initialize(ambiguous: T.unsafe(nil), overwrite: T.unsafe(nil), emoji: T.unsafe(nil)); end + + # source://unicode-display_width//lib/unicode/display_width.rb#110 + def get_config(**kwargs); end + + # source://unicode-display_width//lib/unicode/display_width.rb#118 + def of(string, **kwargs); end + + class << self + # source://unicode-display_width//lib/unicode/display_width/index.rb#14 + def decompress_index(index, level); end + + # source://unicode-display_width//lib/unicode/display_width.rb#86 + def emoji_extra_width_of(string, ambiguous = T.unsafe(nil), overwrite = T.unsafe(nil), _ = T.unsafe(nil)); end + + # source://unicode-display_width//lib/unicode/display_width.rb#12 + def of(string, ambiguous = T.unsafe(nil), overwrite = T.unsafe(nil), options = T.unsafe(nil)); end + + # Same as .width_no_overwrite - but with applying overwrites for each char + # + # source://unicode-display_width//lib/unicode/display_width.rb#57 + def width_all_features(string, ambiguous, overwrite, options); end + + # source://unicode-display_width//lib/unicode/display_width.rb#30 + def width_no_overwrite(string, ambiguous, options = T.unsafe(nil)); end + end +end + +# source://unicode-display_width//lib/unicode/display_width.rb#9 +Unicode::DisplayWidth::ASCII_NON_ZERO_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://unicode-display_width//lib/unicode/display_width/constants.rb#7 +Unicode::DisplayWidth::DATA_DIRECTORY = T.let(T.unsafe(nil), String) + +# source://unicode-display_width//lib/unicode/display_width.rb#10 +Unicode::DisplayWidth::FIRST_4096 = T.let(T.unsafe(nil), Array) + +# source://unicode-display_width//lib/unicode/display_width/index.rb#11 +Unicode::DisplayWidth::INDEX = T.let(T.unsafe(nil), Array) + +# source://unicode-display_width//lib/unicode/display_width/constants.rb#8 +Unicode::DisplayWidth::INDEX_FILENAME = T.let(T.unsafe(nil), String) + +# source://unicode-display_width//lib/unicode/display_width.rb#8 +Unicode::DisplayWidth::INITIAL_DEPTH = T.let(T.unsafe(nil), Integer) + +# source://unicode-display_width//lib/unicode/display_width/constants.rb#6 +Unicode::DisplayWidth::UNICODE_VERSION = T.let(T.unsafe(nil), String) + +# source://unicode-display_width//lib/unicode/display_width/constants.rb#5 +Unicode::DisplayWidth::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/unparser@0.6.8.rbi b/sorbet/rbi/gems/unparser@0.6.8.rbi new file mode 100644 index 0000000..a885094 --- /dev/null +++ b/sorbet/rbi/gems/unparser@0.6.8.rbi @@ -0,0 +1,8 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `unparser` gem. +# Please instead update this file by running `bin/tapioca gem unparser`. + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi b/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi new file mode 100644 index 0000000..48f02af --- /dev/null +++ b/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi @@ -0,0 +1,428 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `yard-sorbet` gem. +# Please instead update this file by running `bin/tapioca gem yard-sorbet`. + +class YARD::Handlers::Ruby::ClassHandler < ::YARD::Handlers::Ruby::Base + include ::YARDSorbet::Handlers::StructClassHandler +end + +# Types are documentation +# +# source://yard-sorbet//lib/yard-sorbet/version.rb#5 +module YARDSorbet; end + +# Extract & re-add directives to a docstring +# +# source://yard-sorbet//lib/yard-sorbet/directives.rb#6 +module YARDSorbet::Directives + class << self + # source://yard-sorbet//lib/yard-sorbet/directives.rb#21 + sig { params(docstring: ::String, directives: T::Array[::String]).void } + def add_directives(docstring, directives); end + + # source://yard-sorbet//lib/yard-sorbet/directives.rb#10 + sig { params(docstring: T.nilable(::String)).returns([::YARD::Docstring, T::Array[::String]]) } + def extract_directives(docstring); end + end +end + +# Custom YARD Handlers +# +# @see https://rubydoc.info/gems/yard/YARD/Handlers/Base YARD Base Handler documentation +# +# source://yard-sorbet//lib/yard-sorbet/handlers.rb#7 +module YARDSorbet::Handlers; end + +# Apllies an `@abstract` tag to `abstract!`/`interface!` modules (if not alerady present). +# +# source://yard-sorbet//lib/yard-sorbet/handlers/abstract_dsl_handler.rb#7 +class YARDSorbet::Handlers::AbstractDSLHandler < ::YARD::Handlers::Ruby::Base + # source://yard-sorbet//lib/yard-sorbet/handlers/abstract_dsl_handler.rb#21 + sig { void } + def process; end +end + +# Extra text for class namespaces +# +# source://yard-sorbet//lib/yard-sorbet/handlers/abstract_dsl_handler.rb#18 +YARDSorbet::Handlers::AbstractDSLHandler::CLASS_TAG_TEXT = T.let(T.unsafe(nil), String) + +# The text accompanying the `@abstract` tag. +# +# @see https://github.com/lsegal/yard/blob/main/templates/default/docstring/html/abstract.erb The `@abstract` tag template +# +# source://yard-sorbet//lib/yard-sorbet/handlers/abstract_dsl_handler.rb#16 +YARDSorbet::Handlers::AbstractDSLHandler::TAG_TEXT = T.let(T.unsafe(nil), String) + +# Handle `enums` calls, registering enum values as constants +# +# source://yard-sorbet//lib/yard-sorbet/handlers/enums_handler.rb#7 +class YARDSorbet::Handlers::EnumsHandler < ::YARD::Handlers::Ruby::Base + # source://yard-sorbet//lib/yard-sorbet/handlers/enums_handler.rb#14 + sig { void } + def process; end + + private + + # source://yard-sorbet//lib/yard-sorbet/handlers/enums_handler.rb#29 + sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Boolean) } + def const_assign_node?(node); end +end + +# Extends any modules included via `mixes_in_class_methods` +# +# @see https://sorbet.org/docs/abstract#interfaces-and-the-included-hook Sorbet `mixes_in_class_methods` documentation +# +# source://yard-sorbet//lib/yard-sorbet/handlers/include_handler.rb#9 +class YARDSorbet::Handlers::IncludeHandler < ::YARD::Handlers::Ruby::Base + # source://yard-sorbet//lib/yard-sorbet/handlers/include_handler.rb#16 + sig { void } + def process; end + + private + + # source://yard-sorbet//lib/yard-sorbet/handlers/include_handler.rb#28 + sig { returns(::YARD::CodeObjects::NamespaceObject) } + def included_in; end +end + +# Tracks modules that invoke `mixes_in_class_methods` for use in {IncludeHandler} +# +# @see https://sorbet.org/docs/abstract#interfaces-and-the-included-hook Sorbet `mixes_in_class_methods` documentation +# +# source://yard-sorbet//lib/yard-sorbet/handlers/mixes_in_class_methods_handler.rb#9 +class YARDSorbet::Handlers::MixesInClassMethodsHandler < ::YARD::Handlers::Ruby::Base + # source://yard-sorbet//lib/yard-sorbet/handlers/mixes_in_class_methods_handler.rb#23 + sig { void } + def process; end + + class << self + # source://yard-sorbet//lib/yard-sorbet/handlers/mixes_in_class_methods_handler.rb#18 + sig { params(code_obj: ::String).returns(T.nilable(T::Array[::String])) } + def mixed_in_class_methods(code_obj); end + end +end + +# A YARD Handler for Sorbet type declarations +# +# source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#7 +class YARDSorbet::Handlers::SigHandler < ::YARD::Handlers::Ruby::Base + # Swap the method definition docstring and the sig docstring. + # Parse relevant parts of the `sig` and include them as well. + # + # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#24 + sig { void } + def process; end + + private + + # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#73 + sig { params(method_objects: T::Array[::YARD::CodeObjects::MethodObject]).void } + def document_attr_methods(method_objects); end + + # An attr* sig can be merged into a previous attr* docstring if it is the only parameter passed to the attr* + # declaration. This is to avoid needing to rewrite the source code to separate merged and unmerged attr* + # declarations. + # + # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#60 + sig { params(attr_node: ::YARD::Parser::Ruby::MethodCallNode).returns(T::Boolean) } + def merged_into_attr?(attr_node); end + + # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#78 + sig do + params( + attach_to: T.any(::YARD::CodeObjects::MethodObject, ::YARD::Parser::Ruby::MethodCallNode, ::YARD::Parser::Ruby::MethodDefinitionNode), + docstring: T.nilable(::String), + include_params: T::Boolean + ).void + end + def parse_node(attach_to, docstring, include_params: T.unsafe(nil)); end + + # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#99 + sig { params(node: ::YARD::Parser::Ruby::AstNode, docstring: ::YARD::Docstring).void } + def parse_params(node, docstring); end + + # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#109 + sig { params(node: ::YARD::Parser::Ruby::AstNode, docstring: ::YARD::Docstring).void } + def parse_return(node, docstring); end + + # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#87 + sig { params(docstring: ::YARD::Docstring, include_params: T::Boolean).void } + def parse_sig(docstring, include_params: T.unsafe(nil)); end + + # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#50 + sig { params(attr_node: ::YARD::Parser::Ruby::MethodCallNode).void } + def process_attr(attr_node); end + + # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#36 + sig { params(def_node: ::YARD::Parser::Ruby::MethodDefinitionNode).void } + def process_def(def_node); end +end + +# YARD types that can have docstrings attached to them +# +# source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#14 +YARDSorbet::Handlers::SigHandler::Documentable = T.type_alias { T.any(::YARD::CodeObjects::MethodObject, ::YARD::Parser::Ruby::MethodCallNode, ::YARD::Parser::Ruby::MethodDefinitionNode) } + +# Class-level handler that folds all `const` and `prop` declarations into the constructor documentation +# this needs to be injected as a module otherwise the default Class handler will overwrite documentation +# +# @note this module is included in `YARD::Handlers::Ruby::ClassHandler` +# +# source://yard-sorbet//lib/yard-sorbet/handlers/struct_class_handler.rb#10 +module YARDSorbet::Handlers::StructClassHandler + # source://yard-sorbet//lib/yard-sorbet/handlers/struct_class_handler.rb#14 + sig { void } + def process; end + + private + + # source://yard-sorbet//lib/yard-sorbet/handlers/struct_class_handler.rb#50 + sig do + params( + object: ::YARD::CodeObjects::MethodObject, + props: T::Array[::YARDSorbet::TStructProp], + docstring: ::YARD::Docstring, + directives: T::Array[::String] + ).void + end + def decorate_t_struct_init(object, props, docstring, directives); end + + # Create a virtual `initialize` method with all the `prop`/`const` arguments + # + # source://yard-sorbet//lib/yard-sorbet/handlers/struct_class_handler.rb#30 + sig { params(props: T::Array[::YARDSorbet::TStructProp], class_ns: ::YARD::CodeObjects::ClassObject).void } + def process_t_struct_props(props, class_ns); end + + # source://yard-sorbet//lib/yard-sorbet/handlers/struct_class_handler.rb#60 + sig { params(props: T::Array[::YARDSorbet::TStructProp]).returns(T::Array[[::String, T.nilable(::String)]]) } + def to_object_parameters(props); end +end + +# Handles all `const`/`prop` calls, creating accessor methods, and compiles them for later usage at the class level +# in creating a constructor +# +# source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#8 +class YARDSorbet::Handlers::StructPropHandler < ::YARD::Handlers::Ruby::Base + # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#15 + sig { void } + def process; end + + private + + # Add the source and docstring to the method object + # + # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#28 + sig { params(object: ::YARD::CodeObjects::MethodObject, prop: ::YARDSorbet::TStructProp).void } + def decorate_object(object, prop); end + + # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#38 + sig { returns(T::Boolean) } + def immutable?; end + + # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#44 + sig { params(kwd: ::String).returns(T.nilable(::String)) } + def kw_arg(kwd); end + + # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#49 + sig { params(name: ::String).returns(::YARDSorbet::TStructProp) } + def make_prop(name); end + + # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#60 + sig { returns(T::Array[::YARD::Parser::Ruby::AstNode]) } + def params; end + + # Register the field explicitly as an attribute. + # + # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#66 + sig { params(object: ::YARD::CodeObjects::MethodObject, name: ::String).void } + def register_attrs(object, name); end + + # Store the prop for use in the constructor definition + # + # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#74 + sig { params(prop: ::YARDSorbet::TStructProp).void } + def update_state(prop); end +end + +# Helper methods for working with `YARD` AST Nodes +# +# source://yard-sorbet//lib/yard-sorbet/node_utils.rb#6 +module YARDSorbet::NodeUtils + class << self + # Traverse AST nodes in breadth-first order + # + # @note This will skip over some node types. + # @yield [YARD::Parser::Ruby::AstNode] + # + # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#21 + sig do + params( + node: ::YARD::Parser::Ruby::AstNode, + _blk: T.proc.params(n: ::YARD::Parser::Ruby::AstNode).void + ).void + end + def bfs_traverse(node, &_blk); end + + # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#32 + sig { params(node: ::YARD::Parser::Ruby::AstNode).void } + def delete_node(node); end + + # Gets the node that a sorbet `sig` can be attached do, bypassing visisbility modifiers and the like + # + # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#38 + sig do + params( + node: ::YARD::Parser::Ruby::AstNode + ).returns(T.any(::YARD::Parser::Ruby::MethodCallNode, ::YARD::Parser::Ruby::MethodDefinitionNode)) + end + def get_method_node(node); end + + # Find and return the adjacent node (ascending) + # + # @raise [IndexError] if the node does not have an adjacent sibling (ascending) + # + # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#45 + sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(::YARD::Parser::Ruby::AstNode) } + def sibling_node(node); end + + # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#52 + sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Boolean) } + def sigable_node?(node); end + + # @see https://github.com/lsegal/yard/blob/main/lib/yard/handlers/ruby/attribute_handler.rb YARD::Handlers::Ruby::AttributeHandler.validated_attribute_names + # + # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#63 + sig { params(attr_node: ::YARD::Parser::Ruby::MethodCallNode).returns(T::Array[::String]) } + def validated_attribute_names(attr_node); end + end +end + +# Command node types that can have type signatures +# +# source://yard-sorbet//lib/yard-sorbet/node_utils.rb#10 +YARDSorbet::NodeUtils::ATTRIBUTE_METHODS = T.let(T.unsafe(nil), Array) + +# Skip these method contents during BFS node traversal, they can have their own nested types via `T.Proc` +# +# source://yard-sorbet//lib/yard-sorbet/node_utils.rb#12 +YARDSorbet::NodeUtils::SKIP_METHOD_CONTENTS = T.let(T.unsafe(nil), Array) + +# Node types that can have type signatures +# +# source://yard-sorbet//lib/yard-sorbet/node_utils.rb#14 +YARDSorbet::NodeUtils::SigableNode = T.type_alias { T.any(::YARD::Parser::Ruby::MethodCallNode, ::YARD::Parser::Ruby::MethodDefinitionNode) } + +# Translate `sig` type syntax to `YARD` type syntax. +# +# source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#6 +module YARDSorbet::SigToYARD + class << self + # @see https://yardoc.org/types.html + # + # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#23 + sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Array[::String]) } + def convert(node); end + + private + + # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#61 + sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(::String) } + def build_generic_type(node); end + + # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#70 + sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Array[::String]) } + def convert_aref(node); end + + # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#82 + sig { params(node: ::YARD::Parser::Ruby::AstNode).returns([::String]) } + def convert_array(node); end + + # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#90 + sig { params(node: ::YARD::Parser::Ruby::AstNode).returns([::String]) } + def convert_collection(node); end + + # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#97 + sig { params(node: ::YARD::Parser::Ruby::AstNode).returns([::String]) } + def convert_hash(node); end + + # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#105 + sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Array[::String]) } + def convert_list(node); end + + # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#31 + sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Array[::String]) } + def convert_node(node); end + + # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#43 + sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Array[::String]) } + def convert_node_type(node); end + + # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#110 + sig { params(node: ::YARD::Parser::Ruby::MethodCallNode).returns(T::Array[::String]) } + def convert_t_method(node); end + + # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#121 + sig { params(node: ::YARD::Parser::Ruby::AstNode).returns([::String]) } + def convert_unknown(node); end + end +end + +# Used to store the details of a `T::Struct` `prop` definition +# +# source://yard-sorbet//lib/yard-sorbet/t_struct_prop.rb#6 +class YARDSorbet::TStructProp < ::T::Struct + const :default, T.nilable(::String) + const :doc, ::String + const :prop_name, ::String + const :source, ::String + const :types, T::Array[::String] + + class << self + # source://sorbet-runtime/0.5.10914/lib/types/struct.rb#13 + def inherited(s); end + end +end + +# Helper methods for working with `YARD` tags +# +# source://yard-sorbet//lib/yard-sorbet/tag_utils.rb#6 +module YARDSorbet::TagUtils + class << self + # source://yard-sorbet//lib/yard-sorbet/tag_utils.rb#16 + sig do + params( + docstring: ::YARD::Docstring, + tag_name: ::String, + name: T.nilable(::String) + ).returns(T.nilable(::YARD::Tags::Tag)) + end + def find_tag(docstring, tag_name, name); end + + # Create or update a `YARD` tag with type information + # + # source://yard-sorbet//lib/yard-sorbet/tag_utils.rb#30 + sig do + params( + docstring: ::YARD::Docstring, + tag_name: ::String, + types: T.nilable(T::Array[::String]), + name: T.nilable(::String), + text: ::String + ).void + end + def upsert_tag(docstring, tag_name, types = T.unsafe(nil), name = T.unsafe(nil), text = T.unsafe(nil)); end + end +end + +# The `void` return type, as a constant to reduce array allocations +# +# source://yard-sorbet//lib/yard-sorbet/tag_utils.rb#10 +YARDSorbet::TagUtils::VOID_RETURN_TYPE = T.let(T.unsafe(nil), Array) + +# {https://rubygems.org/gems/yard-sorbet Version history} +# +# source://yard-sorbet//lib/yard-sorbet/version.rb#7 +YARDSorbet::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/yard@0.9.34.rbi b/sorbet/rbi/gems/yard@0.9.34.rbi new file mode 100644 index 0000000..3951091 --- /dev/null +++ b/sorbet/rbi/gems/yard@0.9.34.rbi @@ -0,0 +1,18219 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `yard` gem. +# Please instead update this file by running `bin/tapioca gem yard`. + +# source://yard//lib/yard.rb#61 +::RUBY18 = T.let(T.unsafe(nil), FalseClass) + +# source://yard//lib/yard.rb#62 +::RUBY19 = T.let(T.unsafe(nil), TrueClass) + +# source://yard//lib/yard/core_ext/array.rb#2 +class Array + include ::Enumerable + + # Places values before or after another object (by value) in + # an array. This is used in tandem with the before and after + # methods of the {Insertion} class. + # + # @example Places an item before another + # [1, 2, 3].place(4).before(3) # => [1, 2, 4, 3] + # @example Places an item after another + # [:a, :b, :c].place(:x).after(:a) # => [:a, :x, :b, :c] + # @param values [Array] value to insert + # @return [Insertion] an insertion object to + # @see Insertion#before + # @see Insertion#after + # + # source://yard//lib/yard/core_ext/array.rb#15 + def place(*values); end +end + +# source://yard//lib/yard/core_ext/file.rb#4 +class File < ::IO + class << self + # Cleans a path by removing extraneous '..', '.' and '/' characters + # + # @example Clean a path + # File.cleanpath('a/b//./c/../e') # => "a/b/e" + # @param path [String] the path to clean + # @param rel_root [Boolean] allows relative path above root value + # @return [String] the sanitized path + # + # source://yard//lib/yard/core_ext/file.rb#37 + def cleanpath(path, rel_root = T.unsafe(nil)); end + + # Forces opening a file (for writing) by first creating the file's directory + # + # @param file [String] the filename to open + # @since 0.5.2 + # + # source://yard//lib/yard/core_ext/file.rb#57 + def open!(file, *args, &block); end + + # Reads a file with binary encoding + # + # @return [String] the ascii-8bit encoded data + # @since 0.5.3 + # + # source://yard//lib/yard/core_ext/file.rb#66 + def read_binary(file); end + + # Turns a path +to+ into a relative path from starting + # point +from+. The argument +from+ is assumed to be + # a filename. To treat it as a directory, make sure it + # ends in +File::SEPARATOR+ ('/' on UNIX filesystems). + # + # @param from [String] the starting filename + # (or directory with +from_isdir+ set to +true+). + # @param to [String] the final path that should be made relative. + # @return [String] the relative path from +from+ to +to+. + # + # source://yard//lib/yard/core_ext/file.rb#19 + def relative_path(from, to); end + end +end + +# source://yard//lib/yard/core_ext/file.rb#5 +File::RELATIVE_PARENTDIR = T.let(T.unsafe(nil), String) + +# source://yard//lib/yard/core_ext/file.rb#6 +File::RELATIVE_SAMEDIR = T.let(T.unsafe(nil), String) + +# :stopdoc: +# +# source://yard//lib/yard/rubygems/backports/gem.rb#2 +module Gem + class << self + # Returns the Gem::SourceIndex of specifications that are in the Gem.path + # + # source://yard//lib/yard/rubygems/backports/gem.rb#6 + def source_index; end + end +end + +# Cache is an alias for SourceIndex to allow older YAMLized source index +# objects to load properly. +# +# source://yard//lib/yard/rubygems/backports/source_index.rb#363 +Gem::Cache = Gem::SourceIndex + +# The SourceIndex object indexes all the gems available from a +# particular source (e.g. a list of gem directories, or a remote +# source). A SourceIndex maps a gem full name to a gem +# specification. +# +# NOTE:: The class used to be named Cache, but that became +# confusing when cached source fetchers where introduced. The +# constant Gem::Cache is an alias for this class to allow old +# YAMLized source index objects to load properly. +# +# source://yard//lib/yard/rubygems/backports/source_index.rb#21 +class Gem::SourceIndex + include ::Enumerable + + # Constructs a source index instance from the provided specifications, which + # is a Hash of gem full names and Gem::Specifications. + # -- + # TODO merge @gems and @prerelease_gems and provide a separate method + # #prerelease_gems + # + # @return [SourceIndex] a new instance of SourceIndex + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#102 + def initialize(specifications = T.unsafe(nil)); end + + # source://yard//lib/yard/rubygems/backports/source_index.rb#348 + def ==(other); end + + # Add a gem specification to the source index. + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#193 + def add_spec(gem_spec, name = T.unsafe(nil)); end + + # Add gem specifications to the source index. + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#202 + def add_specs(*gem_specs); end + + # TODO: remove method + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#109 + def all_gems; end + + # source://yard//lib/yard/rubygems/backports/source_index.rb#352 + def dump; end + + # Iterate over the specifications in the source index. + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#218 + def each(&block); end + + # Find a gem by an exact match on the short name. + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#256 + def find_name(gem_name, requirement = T.unsafe(nil)); end + + # The signature for the given gem specification. + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#242 + def gem_signature(gem_full_name); end + + # source://yard//lib/yard/rubygems/backports/source_index.rb#34 + def gems; end + + # The signature for the source index. Changes in the signature indicate a + # change in the index. + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#233 + def index_signature; end + + # Returns an Array specifications for the latest released versions + # of each gem in this index. + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#143 + def latest_specs(include_prerelease = T.unsafe(nil)); end + + # source://yard//lib/yard/rubygems/backports/source_index.rb#248 + def length; end + + # Reconstruct the source index from the specifications in +spec_dirs+. + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#124 + def load_gems_in(*spec_dirs); end + + # Returns an Array of Gem::Specifications that are not up to date. + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#330 + def outdated; end + + # source://yard//lib/yard/rubygems/backports/source_index.rb#113 + def prerelease_gems; end + + # An array including only the prerelease gemspecs + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#179 + def prerelease_specs; end + + # Replaces the gems in the source index from specifications in the + # directories this source index was created from. Raises an exception if + # this source index wasn't created from a directory (via from_gems_in or + # from_installed_gems, or having spec_dirs set). + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#322 + def refresh!; end + + # source://yard//lib/yard/rubygems/backports/source_index.rb#117 + def released_gems; end + + # An array including only the released gemspecs + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#186 + def released_specs; end + + # Remove a gem specification named +full_name+. + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#211 + def remove_spec(full_name); end + + # Search for a gem by Gem::Dependency +gem_pattern+. If +only_platform+ + # is true, only gems matching Gem::Platform.local will be returned. An + # Array of matching Gem::Specification objects is returned. + # + # For backwards compatibility, a String or Regexp pattern may be passed as + # +gem_pattern+, and a Gem::Requirement for +platform_only+. This + # behavior is deprecated and will be removed. + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#270 + def search(gem_pattern, platform_only = T.unsafe(nil)); end + + # source://yard//lib/yard/rubygems/backports/source_index.rb#248 + def size; end + + # Directories to use to refresh this SourceIndex when calling refresh! + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#39 + def spec_dirs; end + + # Directories to use to refresh this SourceIndex when calling refresh! + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#39 + def spec_dirs=(_arg0); end + + # The gem specification given a full gem spec name. + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#225 + def specification(full_name); end + + class << self + # Creates a new SourceIndex from the ruby format gem specifications in + # +spec_dirs+. + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#80 + def from_gems_in(*spec_dirs); end + + # Factory method to construct a source index instance for a given + # path. + # + # deprecated:: + # If supplied, from_installed_gems will act just like + # +from_gems_in+. This argument is deprecated and is provided + # just for backwards compatibility, and should not generally + # be used. + # + # return:: + # SourceIndex instance + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#61 + def from_installed_gems(*deprecated); end + + # Returns a list of directories from Gem.path that contain specifications. + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#72 + def installed_spec_directories; end + + # Loads a ruby-format specification from +file_name+ and returns the + # loaded spec. + # + # source://yard//lib/yard/rubygems/backports/source_index.rb#90 + def load_specification(file_name); end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#17 +class IRB::SLex + # @return [SLex] a new instance of SLex + # + # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#25 + def initialize; end + + # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#60 + def create(token, preproc = T.unsafe(nil), postproc = T.unsafe(nil)); end + + # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#29 + def def_rule(token, preproc = T.unsafe(nil), postproc = T.unsafe(nil), &block); end + + # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#36 + def def_rules(*tokens, &block); end + + # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#77 + def inspect; end + + # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#64 + def match(token); end + + # need a check? + # + # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#51 + def postproc(token); end + + # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#45 + def preproc(token, proc); end + + # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#56 + def search(token); end +end + +# source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#18 +IRB::SLex::DOUT = T.let(T.unsafe(nil), IRB::Notifier::CompositeNotifier) + +# source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#20 +IRB::SLex::D_DEBUG = T.let(T.unsafe(nil), IRB::Notifier::LeveledNotifier) + +# source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#21 +IRB::SLex::D_DETAIL = T.let(T.unsafe(nil), IRB::Notifier::LeveledNotifier) + +# source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#19 +IRB::SLex::D_WARN = T.let(T.unsafe(nil), IRB::Notifier::LeveledNotifier) + +# ---------------------------------------------------------------------- +# +# class Node - +# +# ---------------------------------------------------------------------- +# +# source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#86 +class IRB::SLex::Node + # if postproc is nil, this node is an abstract node. + # if postproc is non-nil, this node is a real node. + # + # @return [Node] a new instance of Node + # + # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#89 + def initialize(preproc = T.unsafe(nil), postproc = T.unsafe(nil)); end + + # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#113 + def create_subnode(chrs, preproc = T.unsafe(nil), postproc = T.unsafe(nil)); end + + # chrs: String + # character array + # io must have getc()/ungetc(); and ungetc() must be + # able to be called arbitrary number of times. + # + # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#161 + def match(chrs, op = T.unsafe(nil)); end + + # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#198 + def match_io(io, op = T.unsafe(nil)); end + + # Returns the value of attribute postproc. + # + # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#96 + def postproc; end + + # Sets the attribute postproc + # + # @param value the value to set the attribute postproc to. + # + # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#96 + def postproc=(_arg0); end + + # Returns the value of attribute preproc. + # + # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#95 + def preproc; end + + # Sets the attribute preproc + # + # @param value the value to set the attribute preproc to. + # + # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#95 + def preproc=(_arg0); end + + # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#98 + def search(chrs, opt = T.unsafe(nil)); end +end + +# The Insertion class inserts a value before or after another +# value in a list. +# +# @example +# Insertion.new([1, 2, 3], 4).before(3) # => [1, 2, 4, 3] +# +# source://yard//lib/yard/core_ext/insertion.rb#7 +class Insertion + # Creates an insertion object on a list with a value to be + # inserted. To finalize the insertion, call {#before} or + # {#after} on the object. + # + # @param list [Array] the list to perform the insertion on + # @param value [Object] the value to insert + # @return [Insertion] a new instance of Insertion + # + # source://yard//lib/yard/core_ext/insertion.rb#14 + def initialize(list, value); end + + # Inserts the value after +val+. + # + # @example If subsections are ignored + # Insertion.new([1, [2], 3], :X).after(1) # => [1, [2], :X, 3] + # @param val [Object] the object the value will be inserted after + # @param recursive [Boolean] look inside sublists + # + # source://yard//lib/yard/core_ext/insertion.rb#30 + def after(val, recursive = T.unsafe(nil)); end + + # Alias for {#after} with +recursive+ set to true + # + # @since 0.6.0 + # + # source://yard//lib/yard/core_ext/insertion.rb#38 + def after_any(val); end + + # Inserts the value before +val+ + # + # @param val [Object] the object the value will be inserted before + # @param recursive [Boolean] look inside sublists + # + # source://yard//lib/yard/core_ext/insertion.rb#22 + def before(val, recursive = T.unsafe(nil)); end + + # Alias for {#before} with +recursive+ set to true + # + # @since 0.6.0 + # + # source://yard//lib/yard/core_ext/insertion.rb#34 + def before_any(val); end + + private + + # This method performs the actual insertion + # + # @param val [Object] the value to insert + # @param rel [Fixnum] the relative index (0 or 1) of where the object + # should be placed + # @param recursive [Boolean] look inside sublists + # @param list [Array] the list to place objects into + # + # source://yard//lib/yard/core_ext/insertion.rb#49 + def insertion(val, rel, recursive = T.unsafe(nil), list = T.unsafe(nil)); end +end + +# source://yard//lib/yard/core_ext/module.rb#2 +class Module + # Returns the class name of a full module namespace path + # + # @example + # module A::B::C; class_name end # => "C" + # @return [String] the last part of a module path + # + # source://yard//lib/yard/core_ext/module.rb#8 + def class_name; end +end + +class Object < ::BasicObject + include ::Kernel + include ::PP::ObjectMixin + + private + + # source://yard//lib/yard/globals.rb#8 + def P(namespace, name = T.unsafe(nil), type = T.unsafe(nil)); end + + # source://yard//lib/yard/globals.rb#20 + def log; end +end + +# Keep track of Ruby version for compatibility code +# +# @deprecated Use {YARD.ruby18?} or {YARD.ruby19?} instead. +# +# source://yard//lib/yard.rb#61 +RUBY18 = T.let(T.unsafe(nil), FalseClass) + +# source://yard//lib/yard.rb#62 +RUBY19 = T.let(T.unsafe(nil), TrueClass) + +# source://yard//lib/yard/core_ext/string.rb#2 +class String + include ::Comparable + + # Splits text into tokens the way a shell would, handling quoted + # text as a single token. Use '\"' and "\'" to escape quotes and + # '\\' to escape a backslash. + # + # @return [Array] an array representing the tokens + # + # source://yard//lib/yard/core_ext/string.rb#8 + def shell_split; end +end + +# A subclass of Hash where all keys are converted into Symbols, and +# optionally, all String values are converted into Symbols. +# +# source://yard//lib/yard/core_ext/symbol_hash.rb#4 +class SymbolHash < ::Hash + # Creates a new SymbolHash object + # + # @param symbolize_value [Boolean] converts any String values into Symbols + # if this is set to +true+. + # @return [SymbolHash] a new instance of SymbolHash + # + # source://yard//lib/yard/core_ext/symbol_hash.rb#9 + def initialize(symbolize_value = T.unsafe(nil)); end + + # Accessed a symbolized key + # + # @param key [#to_sym] the key to access + # @return [Object] the value associated with the key + # + # source://yard//lib/yard/core_ext/symbol_hash.rb#49 + def [](key); end + + # Assigns a value to a symbolized key + # + # @param key [#to_sym] the key + # @param value [Object] the value to be assigned. If this is a String and + # values are set to be symbolized, it will be converted into a Symbol. + # + # source://yard//lib/yard/core_ext/symbol_hash.rb#42 + def []=(key, value); end + + # Deleted a key and value associated with it + # + # @param key [#to_sym] the key to delete + # @return [void] + # + # source://yard//lib/yard/core_ext/symbol_hash.rb#54 + def delete(key); end + + # Tests if a symbolized key exists + # + # @param key [#to_sym] the key to test + # @return [Boolean] whether the key exists + # + # source://yard//lib/yard/core_ext/symbol_hash.rb#59 + def has_key?(key); end + + # Tests if a symbolized key exists + # + # @param key [#to_sym] the key to test + # @return [Boolean] whether the key exists + # + # source://yard//lib/yard/core_ext/symbol_hash.rb#59 + def key?(key); end + + # Merges the contents of another hash into a new SymbolHash object + # + # @param hash [Hash] the hash of objects to copy + # @return [SymbolHash] a new SymbolHash containing the merged data + # + # source://yard//lib/yard/core_ext/symbol_hash.rb#74 + def merge(hash); end + + # Updates the object with the contents of another Hash object. + # This method modifies the original SymbolHash object + # + # @param hash [Hash] the hash object to copy the values from + # @return [SymbolHash] self + # + # source://yard//lib/yard/core_ext/symbol_hash.rb#67 + def merge!(hash); end + + # Updates the object with the contents of another Hash object. + # This method modifies the original SymbolHash object + # + # @param hash [Hash] the hash object to copy the values from + # @return [SymbolHash] self + # + # source://yard//lib/yard/core_ext/symbol_hash.rb#67 + def update(hash); end + + class << self + # @overload [] + # @overload [] + # + # source://yard//lib/yard/core_ext/symbol_hash.rb#28 + def [](*hsh); end + end +end + +# Gem::YARDoc provides methods to generate YARDoc and yri data for installed gems +# upon gem installation. +# +# This file is automatically required by RubyGems 1.9 and newer. +# +# source://yard//lib/yard.rb#2 +module YARD + class << self + # Loads gems that match the name 'yard-*' (recommended) or 'yard_*' except + # those listed in +~/.yard/ignored_plugins+. This is called immediately + # after YARD is loaded to allow plugin support. + # + # @deprecated Use {Config.load_plugins} + # @return [Boolean] true if all plugins loaded successfully, false otherwise. + # + # source://yard//lib/yard.rb#31 + def load_plugins; end + + # An alias to {Parser::SourceParser}'s parsing method + # + # @example Parse a glob of files + # YARD.parse('lib/**/*.rb') + # @see Parser::SourceParser.parse + # + # source://yard//lib/yard.rb#20 + def parse(*args); end + + # An alias to {Parser::SourceParser}'s parsing method + # + # @example Parse a string of input + # YARD.parse_string('class Foo; end') + # @see Parser::SourceParser.parse_string + # + # source://yard//lib/yard.rb#27 + def parse_string(*args); end + + # @return [Boolean] whether YARD is being run in Ruby 1.8 mode + # + # source://yard//lib/yard.rb#44 + def ruby18?; end + + # @return [Boolean] whether YARD is being run in Ruby 1.9 mode + # + # source://yard//lib/yard.rb#47 + def ruby19?; end + + # @return [Boolean] whether YARD is being run in Ruby 2.0 + # + # source://yard//lib/yard.rb#50 + def ruby2?; end + + # @return [Boolean] whether YARD is being run in Ruby 3.1 + # + # source://yard//lib/yard.rb#56 + def ruby31?; end + + # @return [Boolean] whether YARD is being run in Ruby 3.0 + # + # source://yard//lib/yard.rb#53 + def ruby3?; end + + # @return [Boolean] whether YARD is being run inside of Windows + # + # source://yard//lib/yard.rb#34 + def windows?; end + end +end + +# Namespace for command-line interface components +# +# source://yard//lib/yard/autoload.rb#6 +module YARD::CLI; end + +# Abstract base class for CLI utilities. Provides some helper methods for +# the option parser +# +# @abstract +# @since 0.6.0 +# +# source://yard//lib/yard/cli/command.rb#11 +class YARD::CLI::Command + # @since 0.6.0 + # + # source://yard//lib/yard/cli/command.rb#16 + def description; end + + protected + + # Adds a set of common options to the tail of the OptionParser + # + # @param opts [OptionParser] the option parser object + # @return [void] + # @since 0.6.0 + # + # source://yard//lib/yard/cli/command.rb#24 + def common_options(opts); end + + # Loads a Ruby script. If <tt>Config.options[:safe_mode]</tt> is enabled, + # this method will do nothing. + # + # @param file [String] the path to the script to load + # @since 0.6.2 + # + # source://yard//lib/yard/cli/command.rb#68 + def load_script(file); end + + # Parses the option and gracefully handles invalid switches + # + # @param opts [OptionParser] the option parser object + # @param args [Array<String>] the arguments passed from input. This + # array will be modified. + # @return [void] + # @since 0.6.0 + # + # source://yard//lib/yard/cli/command.rb#55 + def parse_options(opts, args); end + + # Callback when an unrecognize option is parsed + # + # @param err [OptionParser::ParseError] the exception raised by the + # option parser + # @since 0.6.0 + # + # source://yard//lib/yard/cli/command.rb#80 + def unrecognized_option(err); end + + class << self + # Helper method to run the utility on an instance. + # + # @see #run + # @since 0.6.0 + # + # source://yard//lib/yard/cli/command.rb#14 + def run(*args); end + end +end + +# This class parses a command name out of the +yard+ CLI command and calls +# that command in the form: +# +# $ yard command_name [options] +# +# If no command or arguments are specified, or if the arguments immediately +# begin with a +--opt+ (not +--help+), the {default_command} will be used +# (which itself defaults to +:doc+). +# +# == Adding a Command +# +# To add a custom command via plugin, create a mapping in {commands} from +# the Symbolic command name to the {Command} class that implements the +# command. To implement a command, see the documentation for the {Command} +# class. +# +# @see Command +# @see commands +# @see default_command +# +# source://yard//lib/yard/cli/command_parser.rb#23 +class YARD::CLI::CommandParser + # @return [CommandParser] a new instance of CommandParser + # + # source://yard//lib/yard/cli/command_parser.rb#56 + def initialize; end + + # Runs the {Command} object matching the command name of the first + # argument. + # + # @return [void] + # + # source://yard//lib/yard/cli/command_parser.rb#63 + def run(*args); end + + private + + # source://yard//lib/yard/cli/command_parser.rb#80 + def commands; end + + # source://yard//lib/yard/cli/command_parser.rb#82 + def list_commands; end + + class << self + # @return [Hash{Symbol => Command}] the mapping of command names to + # command classes to parse the user command. + # + # source://yard//lib/yard/cli/command_parser.rb#27 + def commands; end + + # @return [Hash{Symbol => Command}] the mapping of command names to + # command classes to parse the user command. + # + # source://yard//lib/yard/cli/command_parser.rb#27 + def commands=(_arg0); end + + # @return [Symbol] the default command name to use when no options + # are specified or + # + # source://yard//lib/yard/cli/command_parser.rb#31 + def default_command; end + + # @return [Symbol] the default command name to use when no options + # are specified or + # + # source://yard//lib/yard/cli/command_parser.rb#31 + def default_command=(_arg0); end + + # Convenience method to create a new CommandParser and call {#run} + # + # @return [void] + # + # source://yard//lib/yard/cli/command_parser.rb#54 + def run(*args); end + end +end + +# CLI command to view or edit configuration options +# +# @since 0.6.2 +# +# source://yard//lib/yard/cli/config.rb#6 +class YARD::CLI::Config < ::YARD::CLI::Command + # @return [Config] a new instance of Config + # @since 0.6.2 + # + # source://yard//lib/yard/cli/config.rb#26 + def initialize; end + + # @return [Boolean] whether to append values to existing key + # @since 0.6.2 + # + # source://yard//lib/yard/cli/config.rb#20 + def append; end + + # @return [Boolean] whether to append values to existing key + # @since 0.6.2 + # + # source://yard//lib/yard/cli/config.rb#20 + def append=(_arg0); end + + # @return [Boolean] whether the value being set should be inside a list + # @since 0.6.2 + # + # source://yard//lib/yard/cli/config.rb#17 + def as_list; end + + # @return [Boolean] whether the value being set should be inside a list + # @since 0.6.2 + # + # source://yard//lib/yard/cli/config.rb#17 + def as_list=(_arg0); end + + # @since 0.6.2 + # + # source://yard//lib/yard/cli/config.rb#36 + def description; end + + # @return [String, nil] command to use when configuring ~/.gemrc file. + # If the string is nil, configuration should not occur. + # @since 0.6.2 + # + # source://yard//lib/yard/cli/config.rb#24 + def gem_install_cmd; end + + # @return [String, nil] command to use when configuring ~/.gemrc file. + # If the string is nil, configuration should not occur. + # @since 0.6.2 + # + # source://yard//lib/yard/cli/config.rb#24 + def gem_install_cmd=(_arg0); end + + # @return [Symbol, nil] the key to view/edit, if any + # @since 0.6.2 + # + # source://yard//lib/yard/cli/config.rb#8 + def key; end + + # @return [Symbol, nil] the key to view/edit, if any + # @since 0.6.2 + # + # source://yard//lib/yard/cli/config.rb#8 + def key=(_arg0); end + + # @return [Boolean] whether to reset the {#key} + # @since 0.6.2 + # + # source://yard//lib/yard/cli/config.rb#14 + def reset; end + + # @return [Boolean] whether to reset the {#key} + # @since 0.6.2 + # + # source://yard//lib/yard/cli/config.rb#14 + def reset=(_arg0); end + + # @since 0.6.2 + # + # source://yard//lib/yard/cli/config.rb#40 + def run(*args); end + + # @return [Array, nil] the list of values to set (or single value), if modifying + # @since 0.6.2 + # + # source://yard//lib/yard/cli/config.rb#11 + def values; end + + # @return [Array, nil] the list of values to set (or single value), if modifying + # @since 0.6.2 + # + # source://yard//lib/yard/cli/config.rb#11 + def values=(_arg0); end + + private + + # @since 0.6.2 + # + # source://yard//lib/yard/cli/config.rb#57 + def configure_gemrc; end + + # @since 0.6.2 + # + # source://yard//lib/yard/cli/config.rb#111 + def encode_value(value); end + + # @since 0.6.2 + # + # source://yard//lib/yard/cli/config.rb#103 + def encode_values; end + + # @since 0.6.2 + # + # source://yard//lib/yard/cli/config.rb#97 + def list_configuration; end + + # @since 0.6.2 + # + # source://yard//lib/yard/cli/config.rb#78 + def modify_item; end + + # @since 0.6.2 + # + # source://yard//lib/yard/cli/config.rb#120 + def optparse(*args); end + + # @since 0.6.2 + # + # source://yard//lib/yard/cli/config.rb#92 + def view_item; end +end + +# CLI command to return the objects that were added/removed from 2 versions +# of a project (library, gem, working copy). +# +# @since 0.6.0 +# +# source://yard//lib/yard/cli/diff.rb#11 +class YARD::CLI::Diff < ::YARD::CLI::Command + # @return [Diff] a new instance of Diff + # @since 0.6.0 + # + # source://yard//lib/yard/cli/diff.rb#12 + def initialize; end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/diff.rb#24 + def description; end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/diff.rb#28 + def run(*args); end + + private + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/diff.rb#83 + def added_objects(registry1, registry2); end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/diff.rb#78 + def all_objects; end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/diff.rb#233 + def cleanup(gemfile); end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/diff.rb#175 + def expand_and_parse(gemfile, io); end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/diff.rb#187 + def expand_gem(gemfile, io); end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/diff.rb#181 + def generate_yardoc(dir); end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/diff.rb#118 + def load_gem_data(gemfile); end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/diff.rb#102 + def load_git_commit(commit); end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/diff.rb#87 + def modified_objects(registry1, registry2); end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/diff.rb#239 + def optparse(*args); end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/diff.rb#98 + def removed_objects(registry1, registry2); end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/diff.rb#225 + def require_rubygems; end +end + +# Display one object +# +# @since 0.8.6 +# +# source://yard//lib/yard/cli/display.rb#6 +class YARD::CLI::Display < ::YARD::CLI::Yardoc + # @return [Display] a new instance of Display + # @since 0.8.6 + # + # source://yard//lib/yard/cli/display.rb#9 + def initialize(*args); end + + # @since 0.8.6 + # + # source://yard//lib/yard/cli/display.rb#7 + def description; end + + # @return [String] the output data for all formatted objects + # @since 0.8.6 + # + # source://yard//lib/yard/cli/display.rb#27 + def format_objects; end + + # @since 0.8.6 + # + # source://yard//lib/yard/cli/display.rb#61 + def output_options(opts); end + + # Parses commandline options. + # + # @param args [Array<String>] each tokenized argument + # @since 0.8.6 + # + # source://yard//lib/yard/cli/display.rb#46 + def parse_arguments(*args); end + + # Runs the commandline utility, parsing arguments and displaying an object + # from the {Registry}. + # + # @param args [Array<String>] the list of arguments. + # @return [void] + # @since 0.8.6 + # + # source://yard//lib/yard/cli/display.rb#21 + def run(*args); end + + # @since 0.8.6 + # + # source://yard//lib/yard/cli/display.rb#33 + def wrap_layout(contents); end +end + +# @since 0.6.0 +# +# source://yard//lib/yard/cli/gems.rb#5 +class YARD::CLI::Gems < ::YARD::CLI::Command + # @return [Gems] a new instance of Gems + # @since 0.6.0 + # + # source://yard//lib/yard/cli/gems.rb#6 + def initialize; end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/gems.rb#11 + def description; end + + # Runs the commandline utility, parsing arguments and generating + # YARD indexes for gems. + # + # @param args [Array<String>] the list of arguments + # @return [void] + # @since 0.6.0 + # + # source://yard//lib/yard/cli/gems.rb#18 + def run(*args); end + + private + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/gems.rb#47 + def add_gems(gems); end + + # Builds .yardoc files for all non-existing gems + # + # @since 0.6.0 + # + # source://yard//lib/yard/cli/gems.rb#27 + def build_gems; end + + # Parses options + # + # @since 0.6.0 + # + # source://yard//lib/yard/cli/gems.rb#61 + def optparse(*args); end +end + +# A command-line utility to generate Graphviz graphs from +# a set of objects +# +# @see Graph#run +# @since 0.6.0 +# +# source://yard//lib/yard/cli/graph.rb#24 +class YARD::CLI::Graph < ::YARD::CLI::YardoptsCommand + # Creates a new instance of the command-line utility + # + # @return [Graph] a new instance of Graph + # @since 0.6.0 + # + # source://yard//lib/yard/cli/graph.rb#34 + def initialize; end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/graph.rb#42 + def description; end + + # The set of objects to include in the graph. + # + # @since 0.6.0 + # + # source://yard//lib/yard/cli/graph.rb#31 + def objects; end + + # The options parsed out of the commandline. + # Default options are: + # :format => :dot + # + # @since 0.6.0 + # + # source://yard//lib/yard/cli/graph.rb#28 + def options; end + + # Runs the command-line utility. + # + # @example + # grapher = Graph.new + # grapher.run('--private') + # @param args [Array<String>] each tokenized argument + # @since 0.6.0 + # + # source://yard//lib/yard/cli/graph.rb#52 + def run(*args); end + + private + + # Parses commandline options. + # + # @param args [Array<String>] each tokenized argument + # @since 0.6.0 + # + # source://yard//lib/yard/cli/graph.rb#69 + def optparse(*args); end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/graph.rb#65 + def unrecognized_option(err); end +end + +# Options to pass to the {Graph} CLI. +# +# source://yard//lib/yard/cli/graph.rb#5 +class YARD::CLI::GraphOptions < ::YARD::Templates::TemplateOptions + # @return [String] any contents to pass to the digraph + # + # source://yard//lib/yard/cli/graph.rb#16 + def contents; end + + # @return [String] any contents to pass to the digraph + # + # source://yard//lib/yard/cli/graph.rb#16 + def contents=(_arg0); end + + # @return [Boolean] whether to show the object dependencies + # + # source://yard//lib/yard/cli/graph.rb#13 + def dependencies; end + + # @return [Boolean] whether to show the object dependencies + # + # source://yard//lib/yard/cli/graph.rb#13 + def dependencies=(_arg0); end + + # @return [:dot] the default output format + # + # source://yard//lib/yard/options.rb#82 + def format; end + + # source://yard//lib/yard/options.rb#82 + def format=(_arg0); end + + # @return [Boolean] whether to list the full class diagram + # + # source://yard//lib/yard/cli/graph.rb#10 + def full; end + + # @return [Boolean] whether to list the full class diagram + # + # source://yard//lib/yard/cli/graph.rb#10 + def full=(_arg0); end +end + +# Handles help for commands +# +# @since 0.6.0 +# +# source://yard//lib/yard/cli/help.rb#6 +class YARD::CLI::Help < ::YARD::CLI::Command + # @since 0.6.0 + # + # source://yard//lib/yard/cli/help.rb#7 + def description; end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/help.rb#9 + def run(*args); end +end + +# CLI command to support internationalization (a.k.a. i18n). +# I18n feature is based on gettext technology. +# This command generates .pot file from docstring and extra +# documentation. +# +# @since 0.8.0 +# @todo Support msgminit and msgmerge features? +# +# source://yard//lib/yard/cli/i18n.rb#13 +class YARD::CLI::I18n < ::YARD::CLI::Yardoc + # @return [I18n] a new instance of I18n + # @since 0.8.0 + # + # source://yard//lib/yard/cli/i18n.rb#14 + def initialize; end + + # @since 0.8.0 + # + # source://yard//lib/yard/cli/i18n.rb#19 + def description; end + + # @since 0.8.0 + # + # source://yard//lib/yard/cli/i18n.rb#23 + def run(*args); end + + private + + # @since 0.8.0 + # + # source://yard//lib/yard/cli/i18n.rb#44 + def general_options(opts); end + + # @since 0.8.0 + # + # source://yard//lib/yard/cli/i18n.rb#61 + def generate_pot(relative_base_path); end +end + +# Lists all constant and method names in the codebase. Uses {Yardoc} --list. +# +# source://yard//lib/yard/cli/list.rb#5 +class YARD::CLI::List < ::YARD::CLI::Command + # source://yard//lib/yard/cli/list.rb#6 + def description; end + + # Runs the commandline utility, parsing arguments and displaying a + # list of objects + # + # @param args [Array<String>] the list of arguments. + # @return [void] + # + # source://yard//lib/yard/cli/list.rb#13 + def run(*args); end +end + +# Lists all markup types +# +# @since 0.8.6 +# +# source://yard//lib/yard/cli/markup_types.rb#6 +class YARD::CLI::MarkupTypes < ::YARD::CLI::Command + # @since 0.8.6 + # + # source://yard//lib/yard/cli/markup_types.rb#7 + def description; end + + # Runs the commandline utility, parsing arguments and displaying a + # list of markup types + # + # @param args [Array<String>] the list of arguments. + # @return [void] + # @since 0.8.6 + # + # source://yard//lib/yard/cli/markup_types.rb#14 + def run(*args); end +end + +# A local documentation server +# +# @since 0.6.0 +# +# source://yard//lib/yard/cli/server.rb#7 +class YARD::CLI::Server < ::YARD::CLI::Command + # Creates a new instance of the Server command line utility + # + # @return [Server] a new instance of Server + # @since 0.6.0 + # + # source://yard//lib/yard/cli/server.rb#29 + def initialize; end + + # @return [YARD::Server::Adapter] the adapter to use for loading the web server + # @since 0.6.0 + # + # source://yard//lib/yard/cli/server.rb#18 + def adapter; end + + # @return [YARD::Server::Adapter] the adapter to use for loading the web server + # @since 0.6.0 + # + # source://yard//lib/yard/cli/server.rb#18 + def adapter=(_arg0); end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/server.rb#41 + def description; end + + # @return [Hash] a list of library names and yardoc files to serve + # @since 0.6.0 + # + # source://yard//lib/yard/cli/server.rb#15 + def libraries; end + + # @return [Hash] a list of library names and yardoc files to serve + # @since 0.6.0 + # + # source://yard//lib/yard/cli/server.rb#15 + def libraries=(_arg0); end + + # @return [Hash] a list of options to pass to the doc server + # @since 0.6.0 + # + # source://yard//lib/yard/cli/server.rb#9 + def options; end + + # @return [Hash] a list of options to pass to the doc server + # @since 0.6.0 + # + # source://yard//lib/yard/cli/server.rb#9 + def options=(_arg0); end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/server.rb#45 + def run(*args); end + + # @return [Array<String>] a list of scripts to load + # @since 0.6.2 + # + # source://yard//lib/yard/cli/server.rb#22 + def scripts; end + + # @return [Array<String>] a list of scripts to load + # @since 0.6.2 + # + # source://yard//lib/yard/cli/server.rb#22 + def scripts=(_arg0); end + + # @return [Hash] a list of options to pass to the web server + # @since 0.6.0 + # + # source://yard//lib/yard/cli/server.rb#12 + def server_options; end + + # @return [Hash] a list of options to pass to the web server + # @since 0.6.0 + # + # source://yard//lib/yard/cli/server.rb#12 + def server_options=(_arg0); end + + # @return [Array<String>] a list of template paths to register + # @since 0.6.2 + # + # source://yard//lib/yard/cli/server.rb#26 + def template_paths; end + + # @return [Array<String>] a list of template paths to register + # @since 0.6.2 + # + # source://yard//lib/yard/cli/server.rb#26 + def template_paths=(_arg0); end + + private + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/server.rb#131 + def add_gems; end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/server.rb#140 + def add_gems_from_gemfile(gemfile = T.unsafe(nil)); end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/server.rb#76 + def add_libraries(args); end + + # @param library [String] The library name. + # @param dir [String, nil] The argument provided on the CLI after the + # library name. Is supposed to point to either a project directory + # with a Yard options file, or a yardoc db. + # @return [LibraryVersion, nil] + # @since 0.6.0 + # + # source://yard//lib/yard/cli/server.rb#115 + def create_library_version_if_yardopts_exist(library, dir); end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/server.rb#249 + def extract_db_from_options_file(options_file); end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/server.rb#239 + def generate_doc_for_first_time(libver); end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/server.rb#56 + def load_scripts; end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/server.rb#60 + def load_template_paths; end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/server.rb#156 + def optparse(*args); end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/server.rb#66 + def select_adapter; end +end + +# @since 0.6.0 +# +# source://yard//lib/yard/cli/stats.rb#5 +class YARD::CLI::Stats < ::YARD::CLI::Yardoc + include ::YARD::Templates::Helpers::BaseHelper + + # @param parse [Boolean] whether to parse and load registry (see {#parse}) + # @return [Stats] a new instance of Stats + # @since 0.6.0 + # + # source://yard//lib/yard/cli/stats.rb#18 + def initialize(parse = T.unsafe(nil)); end + + # @return [Array<CodeObjects::Base>] all the parsed objects in the registry, + # removing any objects that are not visible (private, protected) depending + # on the arguments passed to the command. + # @since 0.6.0 + # + # source://yard//lib/yard/cli/stats.rb#108 + def all_objects; end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/stats.rb#25 + def description; end + + # Prints a statistic to standard out. This method is optimized for + # getting Integer values, though it allows any data to be printed. + # + # @param name [String] the statistic name + # @param data [Integer, String] the numeric (or any) data representing + # the statistic. If +data+ is an Integer, it should represent the + # total objects of a type. + # @param undoc [Integer, nil] number of undocumented objects for the type + # @return [void] + # @since 0.6.0 + # + # source://yard//lib/yard/cli/stats.rb#162 + def output(name, data, undoc = T.unsafe(nil)); end + + # @return [Boolean] whether to parse and load registry + # @since 0.6.0 + # + # source://yard//lib/yard/cli/stats.rb#15 + def parse; end + + # @return [Boolean] whether to parse and load registry + # @since 0.6.0 + # + # source://yard//lib/yard/cli/stats.rb#15 + def parse=(_arg0); end + + # Prints statistics for different object types + # + # To add statistics for a specific type, add a method +#stats_for_TYPE+ + # to this class that calls {#output}. + # + # @since 0.6.0 + # + # source://yard//lib/yard/cli/stats.rb#54 + def print_statistics; end + + # Prints list of undocumented objects + # + # @since 0.6.0 + # + # source://yard//lib/yard/cli/stats.rb#79 + def print_undocumented_objects; end + + # Runs the commandline utility, parsing arguments and generating + # output if set. + # + # @param args [Array<String>] the list of arguments + # @return [void] + # @since 0.6.0 + # + # source://yard//lib/yard/cli/stats.rb#34 + def run(*args); end + + # Statistics for attributes + # + # @since 0.6.0 + # + # source://yard//lib/yard/cli/stats.rb#135 + def stats_for_attributes; end + + # Statistics for classes + # + # @since 0.6.0 + # + # source://yard//lib/yard/cli/stats.rb#125 + def stats_for_classes; end + + # Statistics for constants + # + # @since 0.6.0 + # + # source://yard//lib/yard/cli/stats.rb#130 + def stats_for_constants; end + + # Statistics for files + # + # @since 0.6.0 + # + # source://yard//lib/yard/cli/stats.rb#113 + def stats_for_files; end + + # Statistics for methods + # + # @since 0.6.0 + # + # source://yard//lib/yard/cli/stats.rb#144 + def stats_for_methods; end + + # Statistics for modules + # + # @since 0.6.0 + # + # source://yard//lib/yard/cli/stats.rb#120 + def stats_for_modules; end + + private + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/stats.rb#199 + def general_options(opts); end + + # Parses commandline options. + # + # @param args [Array<String>] each tokenized argument + # @since 0.6.0 + # + # source://yard//lib/yard/cli/stats.rb#185 + def optparse(*args); end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/stats.rb#176 + def type_statistics(type); end +end + +# Maintains the order in which +stats_for_+ statistics methods should be +# printed. +# +# @see #print_statistics +# @since 0.6.0 +# +# source://yard//lib/yard/cli/stats.rb#12 +YARD::CLI::Stats::STATS_ORDER = T.let(T.unsafe(nil), Array) + +# A tool to view documentation in the console like `ri` +# +# source://yard//lib/yard/cli/yri.rb#7 +class YARD::CLI::YRI < ::YARD::CLI::Command + # @return [YRI] a new instance of YRI + # + # source://yard//lib/yard/cli/yri.rb#31 + def initialize; end + + # source://yard//lib/yard/cli/yri.rb#41 + def description; end + + # Runs the command-line utility. + # + # @example + # YRI.new.run('String#reverse') + # @param args [Array<String>] each tokenized argument + # + # source://yard//lib/yard/cli/yri.rb#50 + def run(*args); end + + protected + + # Caches the .yardoc file where an object can be found in the {CACHE_FILE} + # + # @return [void] + # + # source://yard//lib/yard/cli/yri.rb#85 + def cache_object(name, path); end + + # Locates an object by name starting in the cached paths and then + # searching through any search paths. + # + # @param name [String] the full name of the object + # @return [CodeObjects::Base] an object if found + # @return [nil] if no object is found + # + # source://yard//lib/yard/cli/yri.rb#113 + def find_object(name); end + + # @param object [CodeObjects::Base] the object to print. + # @return [String] the formatted output for an object. + # + # source://yard//lib/yard/cli/yri.rb#98 + def print_object(object); end + + # Prints the command usage + # + # @return [void] + # @since 0.5.6 + # + # source://yard//lib/yard/cli/yri.rb#78 + def print_usage; end + + private + + # Adds paths in {SEARCH_PATHS_FILE} + # + # @since 0.5.1 + # + # source://yard//lib/yard/cli/yri.rb#181 + def add_default_paths; end + + # Adds all RubyGems yardoc files to search paths + # + # @return [void] + # + # source://yard//lib/yard/cli/yri.rb#161 + def add_gem_paths; end + + # Loads {CACHE_FILE} + # + # @return [void] + # + # source://yard//lib/yard/cli/yri.rb#151 + def load_cache; end + + # Parses commandline options. + # + # @param args [Array<String>] each tokenized argument + # + # source://yard//lib/yard/cli/yri.rb#190 + def optparse(*args); end + + # Tries to load the object with name. If successful, caches the object + # with the cache_path + # + # @param name [String] the object path + # @param cache_path [String] the location of the yardoc + # db containing the object to cache for future lookups. + # No caching is done if this is nil. + # @return [void] + # + # source://yard//lib/yard/cli/yri.rb#143 + def try_load_object(name, cache_path); end + + class << self + # Helper method to run the utility on an instance. + # + # @see #run + # + # source://yard//lib/yard/cli/yri.rb#29 + def run(*args); end + end +end + +# The location in {YARD::CONFIG_DIR} where the YRI cache file is loaded +# from. +# +# source://yard//lib/yard/cli/yri.rb#10 +YARD::CLI::YRI::CACHE_FILE = T.let(T.unsafe(nil), String) + +# Default search paths that should be loaded dynamically into YRI. These paths +# take precedence over all other paths ({SEARCH_PATHS_FILE} and RubyGems +# paths). To add a path, call: +# +# DEFAULT_SEARCH_PATHS.push("/path/to/.yardoc") +# +# @return [Array<String>] a list of extra search paths +# @since 0.6.0 +# +# source://yard//lib/yard/cli/yri.rb#25 +YARD::CLI::YRI::DEFAULT_SEARCH_PATHS = T.let(T.unsafe(nil), Array) + +# A file containing all paths, delimited by newlines, to search for +# yardoc databases. +# +# @since 0.5.1 +# +# source://yard//lib/yard/cli/yri.rb#15 +YARD::CLI::YRI::SEARCH_PATHS_FILE = T.let(T.unsafe(nil), String) + +# source://yard//lib/yard/cli/yardoc.rb#145 +class YARD::CLI::Yardoc < ::YARD::CLI::YardoptsCommand + # Creates a new instance of the commandline utility + # + # @return [Yardoc] a new instance of Yardoc + # @since 0.2.1 + # + # source://yard//lib/yard/cli/yardoc.rb#207 + def initialize; end + + # The list of all objects to process. Override this method to change + # which objects YARD should generate documentation for. + # + # @deprecated To hide methods use the +@private+ tag instead. + # @return [Array<CodeObjects::Base>] a list of code objects to process + # @since 0.2.1 + # + # source://yard//lib/yard/cli/yardoc.rb#330 + def all_objects; end + + # Keep track of which APIs are to be shown + # + # @return [Array<String>] a list of APIs + # @since 0.8.1 + # + # source://yard//lib/yard/cli/yardoc.rb#180 + def apis; end + + # Keep track of which APIs are to be shown + # + # @return [Array<String>] a list of APIs + # @since 0.8.1 + # + # source://yard//lib/yard/cli/yardoc.rb#180 + def apis=(_arg0); end + + # @return [Array<String>] a list of assets to copy after generation + # @since 0.6.0 + # + # source://yard//lib/yard/cli/yardoc.rb#197 + def assets; end + + # @return [Array<String>] a list of assets to copy after generation + # @since 0.6.0 + # + # source://yard//lib/yard/cli/yardoc.rb#197 + def assets=(_arg0); end + + # @since 0.2.1 + # + # source://yard//lib/yard/cli/yardoc.rb#234 + def description; end + + # @return [Array<String>] list of excluded paths (regexp matches) + # @since 0.5.3 + # + # source://yard//lib/yard/cli/yardoc.rb#155 + def excluded; end + + # @return [Array<String>] list of excluded paths (regexp matches) + # @since 0.5.3 + # + # source://yard//lib/yard/cli/yardoc.rb#155 + def excluded=(_arg0); end + + # @return [Boolean] whether yard exits with error status code if a warning occurs + # @since 0.2.1 + # + # source://yard//lib/yard/cli/yardoc.rb#204 + def fail_on_warning; end + + # @return [Boolean] whether yard exits with error status code if a warning occurs + # @since 0.2.1 + # + # source://yard//lib/yard/cli/yardoc.rb#204 + def fail_on_warning=(_arg0); end + + # @return [Array<String>] list of Ruby source files to process + # @since 0.2.1 + # + # source://yard//lib/yard/cli/yardoc.rb#151 + def files; end + + # @return [Array<String>] list of Ruby source files to process + # @since 0.2.1 + # + # source://yard//lib/yard/cli/yardoc.rb#151 + def files=(_arg0); end + + # @return [Boolean] whether to generate output + # @since 0.2.1 + # + # source://yard//lib/yard/cli/yardoc.rb#166 + def generate; end + + # @return [Boolean] whether to generate output + # @since 0.2.1 + # + # source://yard//lib/yard/cli/yardoc.rb#166 + def generate=(_arg0); end + + # @return [Boolean] whether markup option was specified + # @since 0.7.0 + # + # source://yard//lib/yard/cli/yardoc.rb#201 + def has_markup; end + + # @return [Boolean] whether markup option was specified + # @since 0.7.0 + # + # source://yard//lib/yard/cli/yardoc.rb#201 + def has_markup=(_arg0); end + + # Keep track of which APIs are to be hidden + # + # @return [Array<String>] a list of APIs to be hidden + # @since 0.8.7 + # + # source://yard//lib/yard/cli/yardoc.rb#185 + def hidden_apis; end + + # Keep track of which APIs are to be hidden + # + # @return [Array<String>] a list of APIs to be hidden + # @since 0.8.7 + # + # source://yard//lib/yard/cli/yardoc.rb#185 + def hidden_apis=(_arg0); end + + # @return [Array<Symbol>] a list of tags to hide from templates + # @since 0.6.0 + # + # source://yard//lib/yard/cli/yardoc.rb#189 + def hidden_tags; end + + # @return [Array<Symbol>] a list of tags to hide from templates + # @since 0.6.0 + # + # source://yard//lib/yard/cli/yardoc.rb#189 + def hidden_tags=(_arg0); end + + # @return [Boolean] whether to print a list of objects + # @since 0.5.5 + # + # source://yard//lib/yard/cli/yardoc.rb#170 + def list; end + + # @return [Boolean] whether to print a list of objects + # @since 0.5.5 + # + # source://yard//lib/yard/cli/yardoc.rb#170 + def list=(_arg0); end + + # @return [Hash] the hash of options passed to the template. + # @see Templates::Engine#render + # @since 0.2.1 + # + # source://yard//lib/yard/cli/yardoc.rb#148 + def options; end + + # Parses commandline arguments + # + # @param args [Array<String>] the list of arguments + # @return [Boolean] whether or not arguments are valid + # @since 0.5.6 + # + # source://yard//lib/yard/cli/yardoc.rb#291 + def parse_arguments(*args); end + + # Runs the commandline utility, parsing arguments and generating + # output if set. + # + # @param args [Array<String>] the list of arguments. If the list only + # contains a single nil value, skip calling of {#parse_arguments} + # @return [void] + # @since 0.2.1 + # + # source://yard//lib/yard/cli/yardoc.rb#244 + def run(*args); end + + # @return [Boolean] whether objects should be serialized to .yardoc db + # @since 0.2.1 + # + # source://yard//lib/yard/cli/yardoc.rb#163 + def save_yardoc; end + + # @return [Boolean] whether objects should be serialized to .yardoc db + # @since 0.2.1 + # + # source://yard//lib/yard/cli/yardoc.rb#163 + def save_yardoc=(_arg0); end + + # @return [Boolean] whether to print statistics after parsing + # @since 0.6.0 + # + # source://yard//lib/yard/cli/yardoc.rb#193 + def statistics; end + + # @return [Boolean] whether to print statistics after parsing + # @since 0.6.0 + # + # source://yard//lib/yard/cli/yardoc.rb#193 + def statistics=(_arg0); end + + # @return [Boolean] whether to use the existing yardoc db if the + # .yardoc already exists. Also makes use of file checksums to + # parse only changed files. + # @since 0.2.1 + # + # source://yard//lib/yard/cli/yardoc.rb#160 + def use_cache; end + + # @return [Boolean] whether to use the existing yardoc db if the + # .yardoc already exists. Also makes use of file checksums to + # parse only changed files. + # @since 0.2.1 + # + # source://yard//lib/yard/cli/yardoc.rb#160 + def use_cache=(_arg0); end + + # Keep track of which visibilities are to be shown + # + # @return [Array<Symbol>] a list of visibilities + # @since 0.5.6 + # + # source://yard//lib/yard/cli/yardoc.rb#175 + def visibilities; end + + # Keep track of which visibilities are to be shown + # + # @return [Array<Symbol>] a list of visibilities + # @since 0.5.6 + # + # source://yard//lib/yard/cli/yardoc.rb#175 + def visibilities=(_arg0); end + + private + + # Adds verifier rule for APIs + # + # @return [void] + # @since 0.8.1 + # + # source://yard//lib/yard/cli/yardoc.rb#474 + def add_api_verifier; end + + # Adds a set of extra documentation files to be processed + # + # @param files [Array<String>] the set of documentation files + # @since 0.2.1 + # + # source://yard//lib/yard/cli/yardoc.rb#413 + def add_extra_files(*files); end + + # @since 0.6.0 + # + # source://yard//lib/yard/cli/yardoc.rb#507 + def add_tag(tag_data, factory_method = T.unsafe(nil)); end + + # Adds verifier rule for visibilities + # + # @return [void] + # @since 0.5.6 + # + # source://yard//lib/yard/cli/yardoc.rb#466 + def add_visibility_verifier; end + + # Applies the specified locale to collected objects + # + # @return [void] + # @since 0.8.3 + # + # source://yard//lib/yard/cli/yardoc.rb#494 + def apply_locale; end + + # Copies any assets to the output directory + # + # @return [void] + # @since 0.6.0 + # + # source://yard//lib/yard/cli/yardoc.rb#389 + def copy_assets; end + + # @param file [String] the filename to validate + # @param check_exists [Boolean] whether the file should exist on disk + # @return [Boolean] whether the file is allowed to be used + # @since 0.2.1 + # + # source://yard//lib/yard/cli/yardoc.rb#425 + def extra_file_valid?(file, check_exists = T.unsafe(nil)); end + + # Adds general options + # + # @since 0.2.1 + # + # source://yard//lib/yard/cli/yardoc.rb#541 + def general_options(opts); end + + # Parses commandline options. + # + # @param args [Array<String>] each tokenized argument + # @since 0.2.1 + # + # source://yard//lib/yard/cli/yardoc.rb#516 + def optparse(*args); end + + # Adds output options + # + # @since 0.2.1 + # + # source://yard//lib/yard/cli/yardoc.rb#586 + def output_options(opts); end + + # Parses the file arguments into Ruby files and extra files, which are + # separated by a '-' element. + # + # @example Parses a set of Ruby source files + # parse_files %w(file1 file2 file3) + # @example Parses a set of Ruby files with a separator and extra files + # parse_files %w(file1 file2 - extrafile1 extrafile2) + # @param files [Array<String>] the list of files to parse + # @return [void] + # @since 0.2.1 + # + # source://yard//lib/yard/cli/yardoc.rb#446 + def parse_files(*files); end + + # Prints a list of all objects + # + # @return [void] + # @since 0.5.5 + # + # source://yard//lib/yard/cli/yardoc.rb#403 + def print_list; end + + # Generates output for objects + # + # @param checksums [Hash, nil] if supplied, a list of checksums for files. + # @return [void] + # @since 0.5.1 + # + # source://yard//lib/yard/cli/yardoc.rb#340 + def run_generate(checksums); end + + # Runs a list of objects against the {Verifier} object passed into the + # template and returns the subset of verified objects. + # + # @param list [Array<CodeObjects::Base>] a list of code objects + # @return [Array<CodeObjects::Base>] a list of code objects that match + # the verifier. If no verifier is supplied, all objects are returned. + # + # source://yard//lib/yard/cli/yardoc.rb#502 + def run_verifier(list); end + + # Adds tag options + # + # @since 0.6.0 + # + # source://yard//lib/yard/cli/yardoc.rb#753 + def tag_options(opts); end + + # Verifies that the markup options are valid before parsing any code. + # Failing early is better than failing late. + # + # @return [Boolean] whether the markup provider was successfully loaded. + # @since 0.2.1 + # + # source://yard//lib/yard/cli/yardoc.rb#364 + def verify_markup_options; end +end + +# Default options used in +yard doc+ command. +# +# source://yard//lib/yard/cli/yardoc.rb#8 +class YARD::CLI::YardocOptions < ::YARD::Templates::TemplateOptions + # @return [CodeObjects::ExtraFileObject] the file object being rendered. + # The +object+ key is not used so that a file may be rendered in the context + # of an object's namespace (for generating links). + # + # source://yard//lib/yard/cli/yardoc.rb#48 + def file; end + + # @return [CodeObjects::ExtraFileObject] the file object being rendered. + # The +object+ key is not used so that a file may be rendered in the context + # of an object's namespace (for generating links). + # + # source://yard//lib/yard/cli/yardoc.rb#48 + def file=(_arg0); end + + # @return [Array<CodeObjects::ExtraFileObject>] the list of extra files rendered along with objects + # + # source://yard//lib/yard/options.rb#82 + def files; end + + # source://yard//lib/yard/options.rb#82 + def files=(_arg0); end + + # @return [Symbol] the default output format (:html). + # + # source://yard//lib/yard/options.rb#82 + def format; end + + # source://yard//lib/yard/options.rb#82 + def format=(_arg0); end + + # @return [Numeric] An index value for rendering sequentially related templates + # + # source://yard//lib/yard/cli/yardoc.rb#39 + def index; end + + # @return [Numeric] An index value for rendering sequentially related templates + # + # source://yard//lib/yard/cli/yardoc.rb#39 + def index=(_arg0); end + + # @return [CodeObjects::Base] an extra item to send to a template that is not + # the main rendered object + # + # source://yard//lib/yard/cli/yardoc.rb#43 + def item; end + + # @return [CodeObjects::Base] an extra item to send to a template that is not + # the main rendered object + # + # source://yard//lib/yard/cli/yardoc.rb#43 + def item=(_arg0); end + + # @return [String] the current locale + # + # source://yard//lib/yard/cli/yardoc.rb#51 + def locale; end + + # @return [String] the current locale + # + # source://yard//lib/yard/cli/yardoc.rb#51 + def locale=(_arg0); end + + # @return [Array<CodeObjects::Base>] the list of code objects to render + # the templates with. + # + # source://yard//lib/yard/cli/yardoc.rb#36 + def objects; end + + # @return [Array<CodeObjects::Base>] the list of code objects to render + # the templates with. + # + # source://yard//lib/yard/cli/yardoc.rb#36 + def objects=(_arg0); end + + # @return [Boolean] whether the data should be rendered in a single page, + # if the template supports it. + # + # source://yard//lib/yard/options.rb#82 + def onefile; end + + # source://yard//lib/yard/options.rb#82 + def onefile=(_arg0); end + + # @return [CodeObjects::ExtraFileObject] the README file object rendered + # along with objects + # + # source://yard//lib/yard/cli/yardoc.rb#32 + def readme; end + + # @return [CodeObjects::ExtraFileObject] the README file object rendered + # along with objects + # + # source://yard//lib/yard/cli/yardoc.rb#32 + def readme=(_arg0); end + + # @return [Serializers::Base] the default serializer for generating output + # to disk. + # + # source://yard//lib/yard/options.rb#82 + def serializer; end + + # source://yard//lib/yard/options.rb#82 + def serializer=(_arg0); end + + # @return [String] the default title appended to each generated page + # + # source://yard//lib/yard/options.rb#82 + def title; end + + # source://yard//lib/yard/options.rb#82 + def title=(_arg0); end + + # @return [Verifier] the default verifier object to filter queries + # + # source://yard//lib/yard/options.rb#82 + def verifier; end + + # source://yard//lib/yard/options.rb#82 + def verifier=(_arg0); end +end + +# Abstract base class for command that reads .yardopts file +# +# @abstract +# @since 0.8.3 +# +# source://yard//lib/yard/cli/yardopts_command.rb#10 +class YARD::CLI::YardoptsCommand < ::YARD::CLI::Command + # Creates a new command that reads .yardopts + # + # @return [YardoptsCommand] a new instance of YardoptsCommand + # @since 0.8.3 + # + # source://yard//lib/yard/cli/yardopts_command.rb#25 + def initialize; end + + # The options file name (defaults to {DEFAULT_YARDOPTS_FILE}) + # + # @return [String] the filename to load extra options from + # @since 0.8.3 + # + # source://yard//lib/yard/cli/yardopts_command.rb#22 + def options_file; end + + # The options file name (defaults to {DEFAULT_YARDOPTS_FILE}) + # + # @return [String] the filename to load extra options from + # @since 0.8.3 + # + # source://yard//lib/yard/cli/yardopts_command.rb#22 + def options_file=(_arg0); end + + # Parses commandline arguments + # + # @param args [Array<String>] the list of arguments + # @return [Boolean] whether or not arguments are valid + # @since 0.5.6 + # + # source://yard//lib/yard/cli/yardopts_command.rb#36 + def parse_arguments(*args); end + + # @return [Boolean] whether to parse options from .document + # @since 0.8.3 + # + # source://yard//lib/yard/cli/yardopts_command.rb#18 + def use_document_file; end + + # @return [Boolean] whether to parse options from .document + # @since 0.8.3 + # + # source://yard//lib/yard/cli/yardopts_command.rb#18 + def use_document_file=(_arg0); end + + # @return [Boolean] whether to parse options from .yardopts + # @since 0.8.3 + # + # source://yard//lib/yard/cli/yardopts_command.rb#15 + def use_yardopts_file; end + + # @return [Boolean] whether to parse options from .yardopts + # @since 0.8.3 + # + # source://yard//lib/yard/cli/yardopts_command.rb#15 + def use_yardopts_file=(_arg0); end + + protected + + # Adds --[no-]yardopts / --[no-]document + # + # @since 0.8.3 + # + # source://yard//lib/yard/cli/yardopts_command.rb#48 + def yardopts_options(opts); end + + private + + # @since 0.8.3 + # + # source://yard//lib/yard/cli/yardopts_command.rb#92 + def parse_rdoc_document_file(file = T.unsafe(nil)); end + + # @since 0.8.3 + # + # source://yard//lib/yard/cli/yardopts_command.rb#96 + def parse_yardopts(file = T.unsafe(nil)); end + + # Parses out the yardopts/document options + # + # @since 0.8.3 + # + # source://yard//lib/yard/cli/yardopts_command.rb#78 + def parse_yardopts_options(*args); end + + # Reads a .document file in the directory to get source file globs + # + # @return [Array<String>] an array of files parsed from .document + # @since 0.8.3 + # + # source://yard//lib/yard/cli/yardopts_command.rb#102 + def support_rdoc_document_file!(file = T.unsafe(nil)); end + + # Parses the .yardopts file for default yard options + # + # @return [Array<String>] an array of options parsed from .yardopts + # @since 0.8.3 + # + # source://yard//lib/yard/cli/yardopts_command.rb#70 + def yardopts(file = T.unsafe(nil)); end +end + +# The configuration filename to load extra options from +# +# @since 0.8.3 +# +# source://yard//lib/yard/cli/yardopts_command.rb#12 +YARD::CLI::YardoptsCommand::DEFAULT_YARDOPTS_FILE = T.let(T.unsafe(nil), String) + +# @deprecated Use {Config::CONFIG_DIR} +# +# source://yard//lib/yard.rb#13 +YARD::CONFIG_DIR = T.let(T.unsafe(nil), String) + +# A "code object" is defined as any entity in the Ruby language. +# Classes, modules, methods, class variables and constants are the +# major objects, but DSL languages can create their own by inheriting +# from {CodeObjects::Base}. +# +# source://yard//lib/yard/autoload.rb#29 +module YARD::CodeObjects + extend ::YARD::CodeObjects::NamespaceMapper +end + +# All builtin Ruby classes and modules. +# +# source://yard//lib/yard/code_objects/base.rb#91 +YARD::CodeObjects::BUILTIN_ALL = T.let(T.unsafe(nil), Array) + +# All builtin Ruby classes for inheritance tree. +# +# @note MatchingData is a 1.8.x legacy class +# +# source://yard//lib/yard/code_objects/base.rb#78 +YARD::CodeObjects::BUILTIN_CLASSES = T.let(T.unsafe(nil), Array) + +# All builtin Ruby exception classes for inheritance tree. +# +# source://yard//lib/yard/code_objects/base.rb#67 +YARD::CodeObjects::BUILTIN_EXCEPTIONS = T.let(T.unsafe(nil), Array) + +# Hash of {BUILTIN_EXCEPTIONS} as keys and true as value (for O(1) lookups) +# +# source://yard//lib/yard/code_objects/base.rb#94 +YARD::CodeObjects::BUILTIN_EXCEPTIONS_HASH = T.let(T.unsafe(nil), Hash) + +# All builtin Ruby modules for mixin handling. +# +# source://yard//lib/yard/code_objects/base.rb#87 +YARD::CodeObjects::BUILTIN_MODULES = T.let(T.unsafe(nil), Array) + +# +Base+ is the superclass of all code objects recognized by YARD. A code +# object is any entity in the Ruby language (class, method, module). A +# DSL might subclass +Base+ to create a new custom object representing +# a new entity type. +# +# == Registry Integration +# Any created object associated with a namespace is immediately registered +# with the registry. This allows the Registry to act as an identity map +# to ensure that no object is represented by more than one Ruby object +# in memory. A unique {#path} is essential for this identity map to work +# correctly. +# +# == Custom Attributes +# Code objects allow arbitrary custom attributes to be set using the +# {#[]=} assignment method. +# +# == Namespaces +# There is a special type of object called a "namespace". These are subclasses +# of the {NamespaceObject} and represent Ruby entities that can have +# objects defined within them. Classically these are modules and classes, +# though a DSL might create a custom {NamespaceObject} to describe a +# specific set of objects. +# +# == Separators +# Custom classes with different separator tokens should define their own +# separators using the {NamespaceMapper.register_separator} method. The +# standard Ruby separators have already been defined ('::', '#', '.', etc). +# +# @abstract This class should not be used directly. Instead, create a +# subclass that implements {#path}, {#sep} or {#type}. You might also +# need to register custom separators if {#sep} uses alternate separator +# tokens. +# @see Registry +# @see #path +# @see #[]= +# @see NamespaceObject +# @see NamespaceMapper.register_separator +# +# source://yard//lib/yard/code_objects/base.rb#133 +class YARD::CodeObjects::Base + # Creates a new code object + # + # @example Create a method in the root namespace + # CodeObjects::Base.new(:root, '#method') # => #<yardoc method #method> + # @example Create class Z inside namespace X::Y + # CodeObjects::Base.new(P("X::Y"), :Z) # or + # CodeObjects::Base.new(Registry.root, "X::Y") + # @param namespace [NamespaceObject] the namespace the object belongs in, + # {Registry.root} or :root should be provided if it is associated with + # the top level namespace. + # @param name [Symbol, String] the name (or complex path) of the object. + # @return [Base] the newly created object + # @yield [self] a block to perform any extra initialization on the object + # @yieldparam self [Base] the newly initialized code object + # + # source://yard//lib/yard/code_objects/base.rb#238 + def initialize(namespace, name, *_arg2); end + + # Tests if another object is equal to this, including a proxy + # + # @param other [Base, Proxy] if other is a {Proxy}, tests if + # the paths are equal + # @return [Boolean] whether or not the objects are considered the same + # + # source://yard//lib/yard/code_objects/base.rb#322 + def ==(other); end + + # Accesses a custom attribute on the object + # + # @param key [#to_s] the name of the custom attribute + # @return [Object, nil] the custom attribute or nil if not found. + # @see #[]= + # + # source://yard//lib/yard/code_objects/base.rb#342 + def [](key); end + + # Sets a custom attribute on the object + # + # @param key [#to_s] the name of the custom attribute + # @param value [Object] the value to associate + # @return [void] + # @see #[] + # + # source://yard//lib/yard/code_objects/base.rb#355 + def []=(key, value); end + + # Associates a file with a code object, optionally adding the line where it was defined. + # By convention, '<stdin>' should be used to associate code that comes form standard input. + # + # @param file [String] the filename ('<stdin>' for standard input) + # @param line [Fixnum, nil] the line number where the object lies in the file + # @param has_comments [Boolean] whether or not the definition has comments associated. This + # will allow {#file} to return the definition where the comments were made instead + # of any empty definitions that might have been parsed before (module namespaces for instance). + # @raise [ArgumentError] + # + # source://yard//lib/yard/code_objects/base.rb#290 + def add_file(file, line = T.unsafe(nil), has_comments = T.unsafe(nil)); end + + # Add tags to the {#docstring} + # + # @see Docstring#add_tag + # @since 0.8.4 + # + # source://yard//lib/yard/code_objects/base.rb#560 + def add_tag(*tags); end + + # The non-localized documentation string associated with the object + # + # @return [Docstring] the documentation string + # @since 0.8.4 + # + # source://yard//lib/yard/code_objects/base.rb#166 + def base_docstring; end + + # Copies all data in this object to another code object, except for + # uniquely identifying information (path, namespace, name, scope). + # + # @param other [Base] the object to copy data to + # @return [Base] the other object + # @since 0.8.0 + # + # source://yard//lib/yard/code_objects/base.rb#263 + def copy_to(other); end + + # The documentation string associated with the object + # + # @param locale [String, I18n::Locale] (I18n::Locale.default) + # the locale of the documentation string. + # @return [Docstring] the documentation string + # + # source://yard//lib/yard/code_objects/base.rb#404 + def docstring(locale = T.unsafe(nil)); end + + # Attaches a docstring to a code object by parsing the comments attached to the statement + # and filling the {#tags} and {#docstring} methods with the parsed information. + # + # @param comments [String, Array<String>, Docstring] the comments attached to the code object to be parsed + # into a docstring and meta tags. + # + # source://yard//lib/yard/code_objects/base.rb#426 + def docstring=(comments); end + + # Marks whether or not the method is conditionally defined at runtime + # + # @return [Boolean] true if the method is conditionally defined at runtime + # + # source://yard//lib/yard/code_objects/base.rb#170 + def dynamic; end + + # Marks whether or not the method is conditionally defined at runtime + # + # @return [Boolean] true if the method is conditionally defined at runtime + # + # source://yard//lib/yard/code_objects/base.rb#170 + def dynamic=(_arg0); end + + # Is the object defined conditionally at runtime? + # + # @return [Boolean] + # @see #dynamic + # + # source://yard//lib/yard/code_objects/base.rb#178 + def dynamic?; end + + # Tests if another object is equal to this, including a proxy + # + # @param other [Base, Proxy] if other is a {Proxy}, tests if + # the paths are equal + # @return [Boolean] whether or not the objects are considered the same + # + # source://yard//lib/yard/code_objects/base.rb#322 + def eql?(other); end + + # Tests if another object is equal to this, including a proxy + # + # @param other [Base, Proxy] if other is a {Proxy}, tests if + # the paths are equal + # @return [Boolean] whether or not the objects are considered the same + # + # source://yard//lib/yard/code_objects/base.rb#322 + def equal?(other); end + + # Returns the filename the object was first parsed at, taking + # definitions with docstrings first. + # + # @return [String] a filename + # + # source://yard//lib/yard/code_objects/base.rb#306 + def file; end + + # The files the object was defined in. To add a file, use {#add_file}. + # + # @return [Array<Array(String, Integer)>] a list of files + # @see #add_file + # + # source://yard//lib/yard/code_objects/base.rb#137 + def files; end + + # Renders the object using the {Templates::Engine templating system}. + # + # @example Formats a class in plaintext + # puts P('MyClass').format + # @example Formats a method in html with rdoc markup + # puts P('MyClass#meth').format(:format => :html, :markup => :rdoc) + # @option options + # @option options + # @option options + # @option options + # @param options [Hash] a set of options to pass to the template + # @return [String] the rendered template + # @see Templates::Engine#render + # + # source://yard//lib/yard/code_objects/base.rb#504 + def format(options = T.unsafe(nil)); end + + # @return [String] the group this object is associated with + # @since 0.6.0 + # + # source://yard//lib/yard/code_objects/base.rb#174 + def group; end + + # @return [String] the group this object is associated with + # @since 0.6.0 + # + # source://yard//lib/yard/code_objects/base.rb#174 + def group=(_arg0); end + + # Tests if the {#docstring} has a tag + # + # @return [Boolean] + # @see Docstring#has_tag? + # + # source://yard//lib/yard/code_objects/base.rb#555 + def has_tag?(name); end + + # @return [Integer] the object's hash value (for equality checking) + # + # source://yard//lib/yard/code_objects/base.rb#333 + def hash; end + + # Inspects the object, returning the type and path + # + # @return [String] a string describing the object + # + # source://yard//lib/yard/code_objects/base.rb#512 + def inspect; end + + # Returns the line the object was first parsed at (or nil) + # + # @return [Fixnum] the line where the object was first defined. + # @return [nil] if there is no line associated with the object + # + # source://yard//lib/yard/code_objects/base.rb#314 + def line; end + + # @overload dynamic_attr_name + # @overload dynamic_attr_name= + # + # source://yard//lib/yard/code_objects/base.rb#372 + def method_missing(meth, *args, &block); end + + # The name of the object + # + # @param prefix [Boolean] whether to show a prefix. Implement + # this in a subclass to define how the prefix is showed. + # @return [Symbol] if prefix is false, the symbolized name + # @return [String] if prefix is true, prefix + the name as a String. + # This must be implemented by the subclass. + # + # source://yard//lib/yard/code_objects/base.rb#278 + def name(prefix = T.unsafe(nil)); end + + # The namespace the object is defined in. If the object is in the + # top level namespace, this is {Registry.root} + # + # @return [NamespaceObject] the namespace object + # + # source://yard//lib/yard/code_objects/base.rb#142 + def namespace; end + + # Sets the namespace the object is defined in. + # + # @param obj [NamespaceObject, :root, nil] the new namespace (:root + # for {Registry.root}). If obj is nil, the object is unregistered + # from the Registry. + # + # source://yard//lib/yard/code_objects/base.rb#521 + def namespace=(obj); end + + # The namespace the object is defined in. If the object is in the + # top level namespace, this is {Registry.root} + # + # @return [NamespaceObject] the namespace object + # + # source://yard//lib/yard/code_objects/base.rb#142 + def parent; end + + # Sets the namespace the object is defined in. + # + # @param obj [NamespaceObject, :root, nil] the new namespace (:root + # for {Registry.root}). If obj is nil, the object is unregistered + # from the Registry. + # + # source://yard//lib/yard/code_objects/base.rb#521 + def parent=(obj); end + + # Represents the unique path of the object. The default implementation + # joins the path of {#namespace} with {#name} via the value of {#sep}. + # Custom code objects should ensure that the path is unique to the code + # object by either overriding {#sep} or this method. + # + # @example The path of an instance method + # MethodObject.new(P("A::B"), :c).path # => "A::B#c" + # @return [String] the unique path of the object + # @see #sep + # + # source://yard//lib/yard/code_objects/base.rb#452 + def path; end + + # @param other [Base, String] another code object (or object path) + # @return [String] the shortest relative path from this object to +other+ + # @since 0.5.3 + # + # source://yard//lib/yard/code_objects/base.rb#474 + def relative_path(other); end + + # @return [Boolean] whether or not this object is a RootObject + # + # source://yard//lib/yard/code_objects/base.rb#566 + def root?; end + + # Override this method with a custom component separator. For instance, + # {MethodObject} implements sep as '#' or '.' (depending on if the + # method is instance or class respectively). {#path} depends on this + # value to generate the full path in the form: namespace.path + sep + name + # + # @return [String] the component that separates the namespace path + # and the name (default is {NSEP}) + # + # source://yard//lib/yard/code_objects/base.rb#575 + def sep; end + + # The one line signature representing an object. For a method, this will + # be of the form "def meth(arguments...)". This is usually the first + # source line. + # + # @return [String] a line of source + # + # source://yard//lib/yard/code_objects/base.rb#159 + def signature; end + + # The one line signature representing an object. For a method, this will + # be of the form "def meth(arguments...)". This is usually the first + # source line. + # + # @return [String] a line of source + # + # source://yard//lib/yard/code_objects/base.rb#159 + def signature=(_arg0); end + + # The source code associated with the object + # + # @return [String, nil] source, if present, or nil + # + # source://yard//lib/yard/code_objects/base.rb#146 + def source; end + + # Attaches source code to a code object with an optional file location + # + # @param statement [#source, String] the +Parser::Statement+ holding the source code or the raw source + # as a +String+ for the definition of the code object only (not the block) + # + # source://yard//lib/yard/code_objects/base.rb#387 + def source=(statement); end + + # Language of the source code associated with the object. Defaults to + # +:ruby+. + # + # @return [Symbol] the language type + # + # source://yard//lib/yard/code_objects/base.rb#152 + def source_type; end + + # Language of the source code associated with the object. Defaults to + # +:ruby+. + # + # @return [Symbol] the language type + # + # source://yard//lib/yard/code_objects/base.rb#152 + def source_type=(_arg0); end + + # Gets a tag from the {#docstring} + # + # @see Docstring#tag + # + # source://yard//lib/yard/code_objects/base.rb#547 + def tag(name); end + + # Gets a list of tags from the {#docstring} + # + # @see Docstring#tags + # + # source://yard//lib/yard/code_objects/base.rb#551 + def tags(name = T.unsafe(nil)); end + + # @note Override this method if your object has a special title that does + # not match the {#path} attribute value. This title will be used + # when linking or displaying the object. + # @return [String] the display title for an object + # @see 0.8.4 + # + # source://yard//lib/yard/code_objects/base.rb#467 + def title; end + + # @return [nil] this object does not turn into an array + # + # source://yard//lib/yard/code_objects/base.rb#336 + def to_ary; end + + # Represents the unique path of the object. The default implementation + # joins the path of {#namespace} with {#name} via the value of {#sep}. + # Custom code objects should ensure that the path is unique to the code + # object by either overriding {#sep} or this method. + # + # @example The path of an instance method + # MethodObject.new(P("A::B"), :c).path # => "A::B#c" + # @return [String] the unique path of the object + # @see #sep + # + # source://yard//lib/yard/code_objects/base.rb#452 + def to_s; end + + # Default type is the lowercase class name without the "Object" suffix. + # Override this method to provide a custom object type + # + # @return [Symbol] the type of code object this represents + # + # source://yard//lib/yard/code_objects/base.rb#436 + def type; end + + # @return [Symbol] the visibility of an object (:public, :private, :protected) + # + # source://yard//lib/yard/code_objects/base.rb#181 + def visibility; end + + # @return [Symbol] the visibility of an object (:public, :private, :protected) + # + # source://yard//lib/yard/code_objects/base.rb#183 + def visibility=(v); end + + protected + + # Override this method if your code object subclass does not allow + # copying of certain attributes. + # + # @return [Array<String>] the list of instance variable names (without + # "@" prefix) that should be copied when {#copy_to} is called + # @see #copy_to + # @since 0.8.0 + # + # source://yard//lib/yard/code_objects/base.rb#586 + def copyable_attributes; end + + private + + # Formats source code by removing leading indentation + # + # @param source [String] the source code to format + # @return [String] formatted source + # + # source://yard//lib/yard/code_objects/base.rb#598 + def format_source(source); end + + # source://yard//lib/yard/code_objects/base.rb#605 + def translate_docstring(locale); end + + class << self + # Compares the class with subclasses + # + # @param other [Object] the other object to compare classes with + # @return [Boolean] true if other is a subclass of self + # + # source://yard//lib/yard/code_objects/base.rb#219 + def ===(other); end + + # Allocates a new code object + # + # @raise [ArgumentError] + # @return [Base] + # @see #initialize + # @yield [obj] + # + # source://yard//lib/yard/code_objects/base.rb#189 + def new(namespace, name, *args, &block); end + end +end + +# Regular expression to match constant name +# +# source://yard//lib/yard/code_objects/base.rb#52 +YARD::CodeObjects::CONSTANTMATCH = T.let(T.unsafe(nil), Regexp) + +# Regular expression to match the beginning of a constant +# +# source://yard//lib/yard/code_objects/base.rb#55 +YARD::CodeObjects::CONSTANTSTART = T.let(T.unsafe(nil), Regexp) + +# Class method separator +# +# source://yard//lib/yard/code_objects/base.rb#46 +YARD::CodeObjects::CSEP = T.let(T.unsafe(nil), String) + +# Regex-quoted class method separator +# +# source://yard//lib/yard/code_objects/base.rb#49 +YARD::CodeObjects::CSEPQ = T.let(T.unsafe(nil), String) + +# A ClassObject represents a Ruby class in source code. It is a {ModuleObject} +# with extra inheritance semantics through the superclass. +# +# source://yard//lib/yard/code_objects/class_object.rb#7 +class YARD::CodeObjects::ClassObject < ::YARD::CodeObjects::NamespaceObject + # Creates a new class object in +namespace+ with +name+ + # + # @return [ClassObject] a new instance of ClassObject + # @see Base.new + # + # source://yard//lib/yard/code_objects/class_object.rb#15 + def initialize(namespace, name, *args, &block); end + + # Returns the list of constants matching the options hash. + # + # @option opts + # @option opts + # @param opts [Hash] the options hash to match + # @return [Array<ConstantObject>] the list of constant that matched + # + # source://yard//lib/yard/code_objects/class_object.rb#101 + def constants(opts = T.unsafe(nil)); end + + # Returns the inheritance tree of the object including self. + # + # @param include_mods [Boolean] whether or not to include mixins in the + # inheritance tree. + # @return [Array<NamespaceObject>] the list of code objects that make up + # the inheritance tree. + # + # source://yard//lib/yard/code_objects/class_object.rb#45 + def inheritance_tree(include_mods = T.unsafe(nil)); end + + # Returns only the constants that were inherited. + # + # @return [Array<ConstantObject>] the list of inherited constant objects + # + # source://yard//lib/yard/code_objects/class_object.rb#109 + def inherited_constants; end + + # Returns only the methods that were inherited. + # + # @return [Array<MethodObject>] the list of inherited method objects + # + # source://yard//lib/yard/code_objects/class_object.rb#79 + def inherited_meths(opts = T.unsafe(nil)); end + + # Whether or not the class is a Ruby Exception + # + # @return [Boolean] whether the object represents a Ruby exception + # + # source://yard//lib/yard/code_objects/class_object.rb#35 + def is_exception?; end + + # Returns the list of methods matching the options hash. Returns + # all methods if hash is empty. + # + # @option opts + # @option opts + # @param opts [Hash] the options hash to match + # @return [Array<MethodObject>] the list of methods that matched + # + # source://yard//lib/yard/code_objects/class_object.rb#66 + def meths(opts = T.unsafe(nil)); end + + # The {ClassObject} that this class object inherits from in Ruby source. + # + # @return [ClassObject] a class object that is the superclass of this one + # + # source://yard//lib/yard/code_objects/class_object.rb#10 + def superclass; end + + # Sets the superclass of the object + # + # @param object [Base, Proxy, String, Symbol, nil] the superclass value + # @return [void] + # + # source://yard//lib/yard/code_objects/class_object.rb#125 + def superclass=(object); end +end + +# Represents a class variable inside a namespace. The path is expressed +# in the form "A::B::@@classvariable" +# +# source://yard//lib/yard/code_objects/class_variable_object.rb#7 +class YARD::CodeObjects::ClassVariableObject < ::YARD::CodeObjects::Base + # @return [String] the class variable's value + # + # source://yard//lib/yard/code_objects/class_variable_object.rb#9 + def value; end + + # @return [String] the class variable's value + # + # source://yard//lib/yard/code_objects/class_variable_object.rb#9 + def value=(_arg0); end +end + +# A list of code objects. This array acts like a set (no unique items) +# but also disallows any {Proxy} objects from being added. +# +# source://yard//lib/yard/code_objects/base.rb#6 +class YARD::CodeObjects::CodeObjectList < ::Array + # Creates a new object list associated with a namespace + # + # @param owner [NamespaceObject] the namespace the list should be associated with + # @return [CodeObjectList] + # + # source://yard//lib/yard/code_objects/base.rb#11 + def initialize(owner = T.unsafe(nil)); end + + # Adds a new value to the list + # + # @param value [Base] a code object to add + # @return [CodeObjectList] self + # + # source://yard//lib/yard/code_objects/base.rb#19 + def <<(value); end + + # Adds a new value to the list + # + # @param value [Base] a code object to add + # @return [CodeObjectList] self + # + # source://yard//lib/yard/code_objects/base.rb#19 + def push(value); end +end + +# A +ConstantObject+ represents a Ruby constant (not a module or class). +# To access the constant's (source code) value, use {#value}. +# +# source://yard//lib/yard/code_objects/constant_object.rb#7 +class YARD::CodeObjects::ConstantObject < ::YARD::CodeObjects::Base + # The source code representing the constant's value + # + # @return [String] the value the constant is set to + # + # source://yard//lib/yard/code_objects/constant_object.rb#10 + def value; end + + # source://yard//lib/yard/code_objects/constant_object.rb#12 + def value=(value); end +end + +# Represents an instance method of a module that was mixed into the class +# scope of another namespace. +# +# @see MethodObject +# +# source://yard//lib/yard/code_objects/extended_method_object.rb#7 +class YARD::CodeObjects::ExtendedMethodObject + # Sets up a delegate for {MethodObject} obj. + # + # @param obj [MethodObject] the instance method to treat as a mixed in + # class method on another namespace. + # @return [ExtendedMethodObject] a new instance of ExtendedMethodObject + # + # source://yard//lib/yard/code_objects/extended_method_object.rb#17 + def initialize(obj); end + + # Sends all methods to the {MethodObject} assigned in {#initialize} + # + # @see #initialize + # @see MethodObject + # + # source://yard//lib/yard/code_objects/extended_method_object.rb#22 + def method_missing(sym, *args, &block); end + + # @return [Symbol] always +:class+ + # + # source://yard//lib/yard/code_objects/extended_method_object.rb#11 + def scope; end +end + +# An ExtraFileObject represents an extra documentation file (README or other +# file). It is not strictly a CodeObject (does not inherit from `Base`) although +# it implements `path`, `name` and `type`, and therefore should be structurally +# compatible with most CodeObject interfaces. +# +# source://yard//lib/yard/code_objects/extra_file_object.rb#7 +class YARD::CodeObjects::ExtraFileObject + # Creates a new extra file object. + # + # @param filename [String] the location on disk of the file + # @param contents [String] the file contents. If not set, the contents + # will be read from disk using the +filename+. + # @return [ExtraFileObject] a new instance of ExtraFileObject + # + # source://yard//lib/yard/code_objects/extra_file_object.rb#18 + def initialize(filename, contents = T.unsafe(nil)); end + + # source://yard//lib/yard/code_objects/extra_file_object.rb#64 + def ==(other); end + + # source://yard//lib/yard/code_objects/extra_file_object.rb#30 + def attributes; end + + # Sets the attribute attributes + # + # @param value the value to set the attribute attributes to. + # + # source://yard//lib/yard/code_objects/extra_file_object.rb#9 + def attributes=(_arg0); end + + # source://yard//lib/yard/code_objects/extra_file_object.rb#39 + def contents; end + + # source://yard//lib/yard/code_objects/extra_file_object.rb#44 + def contents=(contents); end + + # source://yard//lib/yard/code_objects/extra_file_object.rb#64 + def eql?(other); end + + # source://yard//lib/yard/code_objects/extra_file_object.rb#64 + def equal?(other); end + + # Returns the value of attribute filename. + # + # source://yard//lib/yard/code_objects/extra_file_object.rb#8 + def filename; end + + # Sets the attribute filename + # + # @param value the value to set the attribute filename to. + # + # source://yard//lib/yard/code_objects/extra_file_object.rb#8 + def filename=(_arg0); end + + # source://yard//lib/yard/code_objects/extra_file_object.rb#70 + def hash; end + + # source://yard//lib/yard/code_objects/extra_file_object.rb#57 + def inspect; end + + # @since 0.8.3 + # + # source://yard//lib/yard/code_objects/extra_file_object.rb#12 + def locale; end + + # @param locale [String] the locale name to be translated. + # @return [void] + # @since 0.8.3 + # + # source://yard//lib/yard/code_objects/extra_file_object.rb#52 + def locale=(locale); end + + # Returns the value of attribute name. + # + # source://yard//lib/yard/code_objects/extra_file_object.rb#10 + def name; end + + # Sets the attribute name + # + # @param value the value to set the attribute name to. + # + # source://yard//lib/yard/code_objects/extra_file_object.rb#10 + def name=(_arg0); end + + # Returns the value of attribute name. + # + # source://yard//lib/yard/code_objects/extra_file_object.rb#10 + def path; end + + # source://yard//lib/yard/code_objects/extra_file_object.rb#35 + def title; end + + # source://yard//lib/yard/code_objects/extra_file_object.rb#57 + def to_s; end + + # source://yard//lib/yard/code_objects/extra_file_object.rb#62 + def type; end + + private + + # source://yard//lib/yard/code_objects/extra_file_object.rb#74 + def ensure_parsed; end + + # @param data [String] the file contents + # + # source://yard//lib/yard/code_objects/extra_file_object.rb#81 + def parse_contents(data); end + + # source://yard//lib/yard/code_objects/extra_file_object.rb#129 + def translate(data); end +end + +# Instance method separator +# +# source://yard//lib/yard/code_objects/base.rb#40 +YARD::CodeObjects::ISEP = T.let(T.unsafe(nil), String) + +# Regex-quoted instance method separator +# +# source://yard//lib/yard/code_objects/base.rb#43 +YARD::CodeObjects::ISEPQ = T.let(T.unsafe(nil), String) + +# Regular expression to match a fully qualified method def (self.foo, Class.foo). +# +# source://yard//lib/yard/code_objects/base.rb#64 +YARD::CodeObjects::METHODMATCH = T.let(T.unsafe(nil), Regexp) + +# Regular expression to match a method name +# +# source://yard//lib/yard/code_objects/base.rb#61 +YARD::CodeObjects::METHODNAMEMATCH = T.let(T.unsafe(nil), Regexp) + +# A MacroObject represents a docstring defined through +@!macro NAME+ and can be +# reused by specifying the tag +@!macro NAME+. You can also provide the +# +attached+ type flag to the macro definition to have it attached to the +# specific DSL method so it will be implicitly reused. +# +# Macros are fully described in the {file:docs/Tags.md#macro Tags Overview} +# document. +# +# @example Creating a basic named macro +# # @!macro prop +# # @!method $1(${3-}) +# # @return [$2] the value of the $0 +# property :foo, String, :a, :b +# +# # @!macro prop +# property :bar, Numeric, :value +# @example Creating a macro that is attached to the method call +# # @!macro [attach] prop2 +# # @!method $1(value) +# property :foo +# +# # Extra data added to docstring +# property :bar +# +# source://yard//lib/yard/code_objects/macro_object.rb#30 +class YARD::CodeObjects::MacroObject < ::YARD::CodeObjects::Base + # @return [Boolean] whether this macro is attached to a method + # + # source://yard//lib/yard/code_objects/macro_object.rb#149 + def attached?; end + + # Expands the macro using + # + # @example Expanding a Macro + # macro.expand(%w(property foo bar), 'property :foo, :bar', '') #=> + # "...macro data interpolating this line of code..." + # @param call_params [Array<String>] a list of tokens that are passed + # to the method call + # @param full_source [String] the full method call (not including the block) + # @param block_source [String] the source passed in the block of the method + # call, if there is a block. + # @see expand + # + # source://yard//lib/yard/code_objects/macro_object.rb#167 + def expand(call_params = T.unsafe(nil), full_source = T.unsafe(nil), block_source = T.unsafe(nil)); end + + # @return [String] the macro data stored on the object + # + # source://yard//lib/yard/code_objects/macro_object.rb#142 + def macro_data; end + + # @return [String] the macro data stored on the object + # + # source://yard//lib/yard/code_objects/macro_object.rb#142 + def macro_data=(_arg0); end + + # @return [CodeObjects::Base] the method object that this macro is + # attached to. + # + # source://yard//lib/yard/code_objects/macro_object.rb#146 + def method_object; end + + # @return [CodeObjects::Base] the method object that this macro is + # attached to. + # + # source://yard//lib/yard/code_objects/macro_object.rb#146 + def method_object=(_arg0); end + + # Overrides {Base#path} so the macro path is ".macro.MACRONAME" + # + # source://yard//lib/yard/code_objects/macro_object.rb#152 + def path; end + + # Overrides the separator to be '.' + # + # source://yard//lib/yard/code_objects/macro_object.rb#155 + def sep; end + + class << self + # Applies a macro on a docstring by creating any macro data inside of + # the docstring first. Equivalent to calling {find_or_create} and {apply_macro} + # on the new macro object. + # + # @param docstring [Docstring] the docstring to create a macro out of + # @param call_params [Array<String>] the method name and parameters + # to the method call. These arguments will fill $0-N + # @param full_source [String] the full source line (excluding block) + # interpolated as $* + # @param block_source [String] Currently unused. Will support + # interpolating the block data as a variable. + # @return [String] the expanded macro data + # @see find_or_create + # + # source://yard//lib/yard/code_objects/macro_object.rb#120 + def apply(docstring, call_params = T.unsafe(nil), full_source = T.unsafe(nil), block_source = T.unsafe(nil), _method_object = T.unsafe(nil)); end + + # Applies a macro to a docstring, interpolating the macro's data on the + # docstring and appending any extra local docstring data that was in + # the original +docstring+ object. + # + # @param macro [MacroObject] the macro object + # @param call_params [Array<String>] the method name and parameters + # to the method call. These arguments will fill $0-N + # @param full_source [String] the full source line (excluding block) + # interpolated as $* + # @param block_source [String] Currently unused. Will support + # interpolating the block data as a variable. + # @return [String] the expanded macro data + # + # source://yard//lib/yard/code_objects/macro_object.rb#136 + def apply_macro(macro, docstring, call_params = T.unsafe(nil), full_source = T.unsafe(nil), block_source = T.unsafe(nil)); end + + # Creates a new macro and fills in the relevant properties. + # + # @param macro_name [String] the name of the macro, must be unique. + # @param data [String] the data the macro should expand when re-used + # @param method_object [CodeObjects::Base] an object to attach this + # macro to. If supplied, {#attached?} will be true + # @return [MacroObject] the newly created object + # + # source://yard//lib/yard/code_objects/macro_object.rb#40 + def create(macro_name, data, method_object = T.unsafe(nil)); end + + # Parses a given docstring and determines if the macro is "new" or + # not. If the macro has $variable names or if it has a @!macro tag + # with the [new] or [attached] flag, it is considered new. + # + # If a new macro is found, the macro is created and registered. Otherwise + # the macro name is searched and returned. If a macro is not found, + # nil is returned. + # + # @param macro_name [#to_s] the name of the macro + # @param method_object [CodeObjects::Base] an optional method to attach + # the macro to. Only used if the macro is being created, otherwise + # this argument is ignored. + # @return [MacroObject] the newly created or existing macro, depending + # on whether the @!macro tag was a new tag or not. + # @return [nil] if the +data+ has no macro tag or if the macro is + # not new and no macro by the macro name is found. + # + # source://yard//lib/yard/code_objects/macro_object.rb#71 + def create_docstring(macro_name, data, method_object = T.unsafe(nil)); end + + # Expands +macro_data+ using the interpolation parameters. + # + # Interpolation rules: + # * $0, $1, $2, ... = the Nth parameter in +call_params+ + # * $* = the full statement source (excluding block) + # * Also supports $!{N-M} ranges, as well as negative indexes on N or M + # * Use \$ to escape the variable name in a macro. + # + # @param macro_data [String] the macro data to expand (taken from {#macro_data}) + # + # source://yard//lib/yard/code_objects/macro_object.rb#93 + def expand(macro_data, call_params = T.unsafe(nil), full_source = T.unsafe(nil), block_source = T.unsafe(nil)); end + + # Finds a macro using +macro_name+ + # + # @param macro_name [#to_s] the name of the macro + # @return [MacroObject] if a macro is found + # @return [nil] if there is no registered macro by that name + # + # source://yard//lib/yard/code_objects/macro_object.rb#51 + def find(macro_name); end + + # Parses a given docstring and determines if the macro is "new" or + # not. If the macro has $variable names or if it has a @!macro tag + # with the [new] or [attached] flag, it is considered new. + # + # If a new macro is found, the macro is created and registered. Otherwise + # the macro name is searched and returned. If a macro is not found, + # nil is returned. + # + # @param macro_name [#to_s] the name of the macro + # @param method_object [CodeObjects::Base] an optional method to attach + # the macro to. Only used if the macro is being created, otherwise + # this argument is ignored. + # @return [MacroObject] the newly created or existing macro, depending + # on whether the @!macro tag was a new tag or not. + # @return [nil] if the +data+ has no macro tag or if the macro is + # not new and no macro by the macro name is found. + # + # source://yard//lib/yard/code_objects/macro_object.rb#71 + def find_or_create(macro_name, data, method_object = T.unsafe(nil)); end + end +end + +# source://yard//lib/yard/code_objects/macro_object.rb#31 +YARD::CodeObjects::MacroObject::MACRO_MATCH = T.let(T.unsafe(nil), Regexp) + +# Represents a Ruby method in source +# +# source://yard//lib/yard/code_objects/method_object.rb#7 +class YARD::CodeObjects::MethodObject < ::YARD::CodeObjects::Base + # Creates a new method object in +namespace+ with +name+ and an instance + # or class +scope+ + # + # If scope is +:module+, this object is instantiated as a public + # method in +:class+ scope, but also creates a new (empty) method + # as a private +:instance+ method on the same class or module. + # + # @param namespace [NamespaceObject] the namespace + # @param name [String, Symbol] the method name + # @param scope [Symbol] +:instance+, +:class+, or +:module+ + # @return [MethodObject] a new instance of MethodObject + # + # source://yard//lib/yard/code_objects/method_object.rb#37 + def initialize(namespace, name, scope = T.unsafe(nil), &block); end + + # Returns all alias names of the object + # + # @return [Array<MethodObject>] the alias names + # + # source://yard//lib/yard/code_objects/method_object.rb#149 + def aliases; end + + # Returns the read/writer info for the attribute if it is one + # + # @return [SymbolHash] if there is information about the attribute + # @return [nil] if the method is not an attribute + # @since 0.5.3 + # + # source://yard//lib/yard/code_objects/method_object.rb#93 + def attr_info; end + + # @return [Boolean] whether or not the method is the #initialize constructor method + # + # source://yard//lib/yard/code_objects/method_object.rb#78 + def constructor?; end + + # Whether the object is explicitly defined in source or whether it was + # inferred by a handler. For instance, attribute methods are generally + # inferred and therefore not explicitly defined in source. + # + # @return [Boolean] whether the object is explicitly defined in source. + # + # source://yard//lib/yard/code_objects/method_object.rb#18 + def explicit; end + + # Whether the object is explicitly defined in source or whether it was + # inferred by a handler. For instance, attribute methods are generally + # inferred and therefore not explicitly defined in source. + # + # @return [Boolean] whether the object is explicitly defined in source. + # + # source://yard//lib/yard/code_objects/method_object.rb#18 + def explicit=(_arg0); end + + # Tests if the object is defined as an alias of another method + # + # @return [Boolean] whether the object is an alias + # + # source://yard//lib/yard/code_objects/method_object.rb#126 + def is_alias?; end + + # Tests if the object is defined as an attribute in the namespace + # + # @return [Boolean] whether the object is an attribute + # + # source://yard//lib/yard/code_objects/method_object.rb#114 + def is_attribute?; end + + # Tests boolean {#explicit} value. + # + # @return [Boolean] whether the method is explicitly defined in source + # + # source://yard//lib/yard/code_objects/method_object.rb#134 + def is_explicit?; end + + # @return [Boolean] whether or not this method was created as a module + # function + # @since 0.8.0 + # + # source://yard//lib/yard/code_objects/method_object.rb#85 + def module_function?; end + + # Returns the name of the object. + # + # @example The name of an instance method (with prefix) + # an_instance_method.name(true) # => "#mymethod" + # @example The name of a class method (with prefix) + # a_class_method.name(true) # => "mymethod" + # @param prefix [Boolean] whether or not to show the prefix + # @return [String] returns {#sep} + +name+ for an instance method if + # prefix is true + # @return [Symbol] the name without {#sep} if prefix is set to false + # + # source://yard//lib/yard/code_objects/method_object.rb#175 + def name(prefix = T.unsafe(nil)); end + + # @return [MethodObject] the object that this method overrides + # @return [nil] if it does not override a method + # @since 0.6.0 + # + # source://yard//lib/yard/code_objects/method_object.rb#141 + def overridden_method; end + + # Returns the list of parameters parsed out of the method signature + # with their default values. + # + # @return [Array<Array(String, String)>] a list of parameter names followed + # by their default values (or nil) + # + # source://yard//lib/yard/code_objects/method_object.rb#25 + def parameters; end + + # Returns the list of parameters parsed out of the method signature + # with their default values. + # + # @return [Array<Array(String, String)>] a list of parameter names followed + # by their default values (or nil) + # + # source://yard//lib/yard/code_objects/method_object.rb#25 + def parameters=(_arg0); end + + # Override path handling for instance methods in the root namespace + # (they should still have a separator as a prefix). + # + # @return [String] the path of a method + # + # source://yard//lib/yard/code_objects/method_object.rb#161 + def path; end + + # @return [Boolean] whether the method is a reader attribute + # @since 0.5.3 + # + # source://yard//lib/yard/code_objects/method_object.rb#107 + def reader?; end + + # The scope of the method (+:class+ or +:instance+) + # + # @return [Symbol] the scope + # + # source://yard//lib/yard/code_objects/method_object.rb#11 + def scope; end + + # Changes the scope of an object from :instance or :class + # + # @param v [Symbol] the new scope + # + # source://yard//lib/yard/code_objects/method_object.rb#58 + def scope=(v); end + + # Override separator to differentiate between class and instance + # methods. + # + # @return [String] "#" for an instance method, "." for class + # + # source://yard//lib/yard/code_objects/method_object.rb#182 + def sep; end + + # @return [Boolean] whether the method is a writer attribute + # @since 0.5.3 + # + # source://yard//lib/yard/code_objects/method_object.rb#100 + def writer?; end + + protected + + # source://yard//lib/yard/code_objects/method_object.rb#192 + def copyable_attributes; end +end + +# Represents a Ruby module. +# +# source://yard//lib/yard/code_objects/module_object.rb#6 +class YARD::CodeObjects::ModuleObject < ::YARD::CodeObjects::NamespaceObject + # Returns the inheritance tree of mixins. + # + # @param include_mods [Boolean] if true, will include mixed in + # modules (which is likely what is wanted). + # @return [Array<NamespaceObject>] a list of namespace objects + # + # source://yard//lib/yard/code_objects/module_object.rb#12 + def inheritance_tree(include_mods = T.unsafe(nil)); end +end + +# Regular expression to match namespaces (const A or complex path A::B) +# +# source://yard//lib/yard/code_objects/base.rb#58 +YARD::CodeObjects::NAMESPACEMATCH = T.let(T.unsafe(nil), Regexp) + +# Namespace separator +# +# source://yard//lib/yard/code_objects/base.rb#34 +YARD::CodeObjects::NSEP = T.let(T.unsafe(nil), String) + +# Regex-quoted namespace separator +# +# source://yard//lib/yard/code_objects/base.rb#37 +YARD::CodeObjects::NSEPQ = T.let(T.unsafe(nil), String) + +# This module controls registration and accessing of namespace separators +# for {Registry} lookup. +# +# @since 0.9.1 +# +# source://yard//lib/yard/code_objects/namespace_mapper.rb#8 +module YARD::CodeObjects::NamespaceMapper + # Clears the map of separators. + # + # @return [void] + # @since 0.9.1 + # + # source://yard//lib/yard/code_objects/namespace_mapper.rb#55 + def clear_separators; end + + # Gets or sets the default separator value to use when no + # separator for the namespace can be determined. + # + # @example + # default_separator "::" + # @param value [String, nil] the default separator, or nil to return the + # value + # @since 0.9.1 + # + # source://yard//lib/yard/code_objects/namespace_mapper.rb#68 + def default_separator(value = T.unsafe(nil)); end + + # Registers a separator with an optional set of valid types that + # must follow the separator lexically. + # + # Calls all callbacks defined by {NamespaceMapper.on_invalidate} after + # the separator is registered. + # + # @example Registering separators for a method object + # # Anything after a "#" denotes a method object + # register_separator "#", :method + # # Anything after a "." denotes a method object + # register_separator ".", :method + # @param sep [String] the separator string for the namespace + # @param valid_types [Array<Symbol>] a list of object types that + # must follow the separator. If the list is empty, any type can + # follow the separator. + # @see .on_invalidate + # @since 0.9.1 + # + # source://yard//lib/yard/code_objects/namespace_mapper.rb#27 + def register_separator(sep, *valid_types); end + + # @return [Array<String>] all of the registered separators + # @since 0.9.1 + # + # source://yard//lib/yard/code_objects/namespace_mapper.rb#80 + def separators; end + + # @param type [String] the type to return separators for + # @return [Array<Symbol>] a list of separators registered to a type + # @since 0.9.1 + # + # source://yard//lib/yard/code_objects/namespace_mapper.rb#97 + def separators_for_type(type); end + + # @return [Regexp] the regexp match of all separators + # @since 0.9.1 + # + # source://yard//lib/yard/code_objects/namespace_mapper.rb#85 + def separators_match; end + + # @param sep [String] the separator to return types for + # @return [Array<Symbol>] a list of types registered to a separator + # @since 0.9.1 + # + # source://yard//lib/yard/code_objects/namespace_mapper.rb#91 + def types_for_separator(sep); end + + # Unregisters a separator by a type. + # + # @param type [Symbol] the type to unregister + # @see #register_separator + # @since 0.9.1 + # + # source://yard//lib/yard/code_objects/namespace_mapper.rb#43 + def unregister_separator_by_type(type); end + + class << self + # @return [String] the default separator when no separator can begin + # determined. + # @since 0.9.1 + # + # source://yard//lib/yard/code_objects/namespace_mapper.rb#137 + def default_separator; end + + # @return [String] the default separator when no separator can begin + # determined. + # @since 0.9.1 + # + # source://yard//lib/yard/code_objects/namespace_mapper.rb#137 + def default_separator=(_arg0); end + + # Invalidates all separators + # + # @return [void] + # @since 0.9.1 + # + # source://yard//lib/yard/code_objects/namespace_mapper.rb#125 + def invalidate; end + + # @return [Hash] a mapping of types to separators + # @since 0.9.1 + # + # source://yard//lib/yard/code_objects/namespace_mapper.rb#114 + def map; end + + # @return [Regexp] the full list of separators as a regexp match + # @since 0.9.1 + # + # source://yard//lib/yard/code_objects/namespace_mapper.rb#131 + def map_match; end + + # Adds a callback that triggers when a new separator is registered or + # the cache is cleared by invalidation. + # + # @since 0.9.1 + # + # source://yard//lib/yard/code_objects/namespace_mapper.rb#107 + def on_invalidate(&block); end + + # @return [Hash] a reverse mapping of separators to types + # @since 0.9.1 + # + # source://yard//lib/yard/code_objects/namespace_mapper.rb#119 + def rev_map; end + end +end + +# A "namespace" is any object that can store other objects within itself. +# The two main Ruby objects that can act as namespaces are modules +# ({ModuleObject}) and classes ({ClassObject}). +# +# source://yard//lib/yard/code_objects/namespace_object.rb#9 +class YARD::CodeObjects::NamespaceObject < ::YARD::CodeObjects::Base + # Creates a new namespace object inside +namespace+ with +name+. + # + # @return [NamespaceObject] a new instance of NamespaceObject + # @see Base#initialize + # + # source://yard//lib/yard/code_objects/namespace_object.rb#56 + def initialize(namespace, name, *args, &block); end + + # A hash containing two keys, :class and :instance, each containing + # a hash of objects and their alias names. + # + # @return [Hash] a list of methods + # + # source://yard//lib/yard/code_objects/namespace_object.rb#44 + def aliases; end + + # A hash containing two keys, class and instance, each containing + # the attribute name with a { :read, :write } hash for the read and + # write objects respectively. + # + # @example The attributes of an object + # >> Registry.at('YARD::Docstring').attributes + # => { + # :class => { }, + # :instance => { + # :ref_tags => { + # :read => #<yardoc method YARD::Docstring#ref_tags>, + # :write => nil + # }, + # :object => { + # :read => #<yardoc method YARD::Docstring#object>, + # :write => #<yardoc method YARD::Docstring#object=> + # }, + # ... + # } + # } + # @return [Hash] a list of methods + # + # source://yard//lib/yard/code_objects/namespace_object.rb#39 + def attributes; end + + # Looks for a child that matches the attributes specified by +opts+. + # + # @example Finds a child by name and scope + # namespace.child(:name => :to_s, :scope => :instance) + # # => #<yardoc method MyClass#to_s> + # @return [Base, nil] the first matched child object, or nil + # + # source://yard//lib/yard/code_objects/namespace_object.rb#86 + def child(opts = T.unsafe(nil)); end + + # The list of objects defined in this namespace + # + # @return [Array<Base>] a list of objects + # + # source://yard//lib/yard/code_objects/namespace_object.rb#16 + def children; end + + # Only the class attributes + # + # @return [Hash] a list of method names and their read/write objects + # @see #attributes + # + # source://yard//lib/yard/code_objects/namespace_object.rb#69 + def class_attributes; end + + # Class mixins + # + # @return [Array<ModuleObject>] a list of mixins + # + # source://yard//lib/yard/code_objects/namespace_object.rb#48 + def class_mixins; end + + # Returns all constants in the namespace + # + # @option opts + # @param opts [Hash] a customizable set of options + # @return [Array<ConstantObject>] a list of constant objects + # + # source://yard//lib/yard/code_objects/namespace_object.rb#164 + def constants(opts = T.unsafe(nil)); end + + # Returns class variables defined in this namespace. + # + # @return [Array<ClassVariableObject>] a list of class variable objects + # + # source://yard//lib/yard/code_objects/namespace_object.rb#186 + def cvars; end + + # @return [Array<String>] a list of ordered group names inside the namespace + # @since 0.6.0 + # + # source://yard//lib/yard/code_objects/namespace_object.rb#12 + def groups; end + + # @return [Array<String>] a list of ordered group names inside the namespace + # @since 0.6.0 + # + # source://yard//lib/yard/code_objects/namespace_object.rb#12 + def groups=(_arg0); end + + # Returns constants included from any mixins + # + # @return [Array<ConstantObject>] a list of constant objects + # + # source://yard//lib/yard/code_objects/namespace_object.rb#172 + def included_constants; end + + # Returns methods included from any mixins that match the attributes + # specified by +opts+. If no options are specified, returns all included + # methods. + # + # @option opts + # @option opts + # @option opts + # @param opts [Hash] a customizable set of options + # @see #meths + # + # source://yard//lib/yard/code_objects/namespace_object.rb#144 + def included_meths(opts = T.unsafe(nil)); end + + # Only the instance attributes + # + # @return [Hash] a list of method names and their read/write objects + # @see #attributes + # + # source://yard//lib/yard/code_objects/namespace_object.rb#76 + def instance_attributes; end + + # Instance mixins + # + # @return [Array<ModuleObject>] a list of mixins + # + # source://yard//lib/yard/code_objects/namespace_object.rb#52 + def instance_mixins; end + + # Returns all methods that match the attributes specified by +opts+. If + # no options are provided, returns all methods. + # + # @example Finds all private and protected class methods + # namespace.meths(:visibility => [:private, :protected], :scope => :class) + # # => [#<yardoc method MyClass.privmeth>, #<yardoc method MyClass.protmeth>] + # @option opts + # @option opts + # @option opts + # @param opts [Hash] a customizable set of options + # @return [Array<MethodObject>] a list of method objects + # + # source://yard//lib/yard/code_objects/namespace_object.rb#113 + def meths(opts = T.unsafe(nil)); end + + # Returns for specific scopes. If no scopes are provided, returns all mixins. + # + # @param scopes [Array<Symbol>] a list of scopes (:class, :instance) to + # return mixins for. If this is empty, all scopes will be returned. + # @return [Array<ModuleObject>] a list of mixins + # + # source://yard//lib/yard/code_objects/namespace_object.rb#194 + def mixins(*scopes); end +end + +# @private +# +# source://yard//lib/yard/code_objects/proxy.rb#8 +YARD::CodeObjects::PROXY_MATCH = T.let(T.unsafe(nil), Regexp) + +# The Proxy class is a way to lazily resolve code objects in +# cases where the object may not yet exist. A proxy simply stores +# an unresolved path until a method is called on the object, at which +# point it does a lookup using {Registry.resolve}. If the object is +# not found, a warning is raised and {ProxyMethodError} might be raised. +# +# @example Creates a Proxy to the String class from a module +# # When the String class is parsed this method will +# # begin to act like the String ClassObject. +# Proxy.new(mymoduleobj, "String") +# @see Registry.resolve +# @see ProxyMethodError +# +# source://yard//lib/yard/code_objects/proxy.rb#24 +class YARD::CodeObjects::Proxy + # Creates a new Proxy + # + # @raise [ArgumentError] if namespace is not a NamespaceObject + # @return [Proxy] self + # + # source://yard//lib/yard/code_objects/proxy.rb#34 + def initialize(namespace, name, type = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://yard//lib/yard/code_objects/proxy.rb#118 + def <=>(other); end + + # @return [Boolean] + # + # source://yard//lib/yard/code_objects/proxy.rb#127 + def ==(other); end + + # @return [Boolean] + # + # source://yard//lib/yard/code_objects/proxy.rb#113 + def ===(other); end + + # Returns the class name of the object the proxy is mimicking, if + # resolved. Otherwise returns +Proxy+. + # + # @return [Class] the resolved object's class or +Proxy+ + # + # source://yard//lib/yard/code_objects/proxy.rb#142 + def class; end + + # @return [Boolean] + # + # source://yard//lib/yard/code_objects/proxy.rb#127 + def equal?(other); end + + # @return [Integer] the object's hash value (for equality checking) + # + # source://yard//lib/yard/code_objects/proxy.rb#137 + def hash; end + + # Returns a text representation of the Proxy + # + # @return [String] the object's #inspect method or P(OBJECTPATH) + # + # source://yard//lib/yard/code_objects/proxy.rb#91 + def inspect; end + + # @return [Boolean] + # + # source://yard//lib/yard/code_objects/proxy.rb#161 + def instance_of?(klass); end + + # @return [Boolean] + # + # source://yard//lib/yard/code_objects/proxy.rb#108 + def is_a?(klass); end + + # @return [Boolean] + # + # source://yard//lib/yard/code_objects/proxy.rb#166 + def kind_of?(klass); end + + # Dispatches the method to the resolved object. + # + # @raise [ProxyMethodError] if the proxy cannot find the real object + # + # source://yard//lib/yard/code_objects/proxy.rb#178 + def method_missing(meth, *args, &block); end + + # The name of the object + # + # @param prefix [Boolean] whether to show a prefix. Implement + # this in a subclass to define how the prefix is showed. + # @return [Symbol] if prefix is false, the symbolized name + # @return [String] if prefix is true, prefix + the name as a String. + # This must be implemented by the subclass. + # + # source://yard//lib/yard/code_objects/proxy.rb#85 + def name(prefix = T.unsafe(nil)); end + + # Returns the value of attribute namespace. + # + # source://yard//lib/yard/code_objects/proxy.rb#27 + def namespace; end + + # Returns the value of attribute namespace. + # + # source://yard//lib/yard/code_objects/proxy.rb#27 + def parent; end + + # If the proxy resolves to an object, returns its path, otherwise + # guesses at the correct path using the original namespace and name. + # + # @return [String] the assumed path of the proxy (or the real path + # of the resolved object) + # + # source://yard//lib/yard/code_objects/proxy.rb#100 + def path; end + + # @return [Boolean] + # + # source://yard//lib/yard/code_objects/proxy.rb#171 + def respond_to?(meth, include_private = T.unsafe(nil)); end + + # This class is never a root object + # + # @return [Boolean] + # + # source://yard//lib/yard/code_objects/proxy.rb#200 + def root?; end + + # If the proxy resolves to an object, returns its path, otherwise + # guesses at the correct path using the original namespace and name. + # + # @return [String] the assumed path of the proxy (or the real path + # of the resolved object) + # + # source://yard//lib/yard/code_objects/proxy.rb#100 + def title; end + + # If the proxy resolves to an object, returns its path, otherwise + # guesses at the correct path using the original namespace and name. + # + # @return [String] the assumed path of the proxy (or the real path + # of the resolved object) + # + # source://yard//lib/yard/code_objects/proxy.rb#100 + def to_s; end + + # If the proxy resolves to an object, returns its path, otherwise + # guesses at the correct path using the original namespace and name. + # + # @return [String] the assumed path of the proxy (or the real path + # of the resolved object) + # + # source://yard//lib/yard/code_objects/proxy.rb#100 + def to_str; end + + # Returns the type of the proxy. If it cannot be resolved at the + # time of the call, it will either return the inferred proxy type + # (see {#type=}) or +:proxy+ + # + # @return [Symbol] the Proxy's type + # @see #type= + # + # source://yard//lib/yard/code_objects/proxy.rb#151 + def type; end + + # Allows a parser to infer the type of the proxy by its path. + # + # @param type [#to_sym] the proxy's inferred type + # @return [void] + # + # source://yard//lib/yard/code_objects/proxy.rb#158 + def type=(type); end + + private + + # source://yard//lib/yard/code_objects/proxy.rb#228 + def proxy_path; end + + # @note this method fixes a bug in 1.9.2: http://gist.github.com/437136 + # + # source://yard//lib/yard/code_objects/proxy.rb#205 + def to_ary; end + + # Attempts to find the object that this unresolved object + # references by checking if any objects by this name are + # registered all the way up the namespace tree. + # + # @return [Base, nil] the registered code object or nil + # + # source://yard//lib/yard/code_objects/proxy.rb#212 + def to_obj; end + + class << self + # source://yard//lib/yard/code_objects/proxy.rb#25 + def ===(other); end + end +end + +# A special type of +NoMethodError+ when raised from a {Proxy} +# +# source://yard//lib/yard/code_objects/proxy.rb#5 +class YARD::CodeObjects::ProxyMethodError < ::NoMethodError; end + +# Represents the root namespace object (the invisible Ruby module that +# holds all top level modules, class and other objects). +# +# source://yard//lib/yard/code_objects/root_object.rb#6 +class YARD::CodeObjects::RootObject < ::YARD::CodeObjects::ModuleObject + # @return [Boolean] + # + # source://yard//lib/yard/code_objects/root_object.rb#12 + def equal?(other); end + + # source://yard//lib/yard/code_objects/root_object.rb#16 + def hash; end + + # source://yard//lib/yard/code_objects/root_object.rb#8 + def inspect; end + + # source://yard//lib/yard/code_objects/root_object.rb#7 + def path; end + + # @return [Boolean] + # + # source://yard//lib/yard/code_objects/root_object.rb#9 + def root?; end + + # source://yard//lib/yard/code_objects/root_object.rb#10 + def title; end +end + +# This class maintains all system-wide configuration for YARD and handles +# the loading of plugins. To access options call {options}, and to load +# a plugin use {load_plugin}. All other public methods are used by YARD +# during load time. +# +# == User Configuration Files +# +# Persistent user configuration files can be stored in the file +# +~/.yard/config+, which is read when YARD first loads. The file should +# be formatted as YAML, and should contain a map of keys and values. +# +# Although you can specify any key-value mapping in the configuration file, +# YARD defines special keys specified in {DEFAULT_CONFIG_OPTIONS}. +# +# An example of a configuration file is listed below: +# +# !!!yaml +# load_plugins: true # Auto-load plugins when YARD starts +# ignored_plugins: +# - yard-broken +# - broken2 # yard- prefix not necessary +# autoload_plugins: +# - yard-rspec +# +# == Automatic Loading of Plugins +# +# YARD 0.6.2 will no longer automatically load all plugins by default. This +# option can be reset by setting 'load_plugins' to true in the configuration +# file. In addition, you can specify a set of specific plugins to load on +# load through the 'autoload_plugins' list setting. This setting is +# independent of the 'load_plugins' value and will always be processed. +# +# == Ignored Plugins File +# +# YARD 0.5 and below used a +~/.yard/ignored_plugins+ file to specify +# plugins to be ignored at load time. Ignored plugins in 0.6.2 and above +# should now be specified in the main configuration file, though YARD +# will support the +ignored_plugins+ file until 0.7.x. +# +# == Safe Mode +# +# YARD supports running in safe-mode. By doing this, it will avoid executing +# any user code such as require files or queries. Plugins will still be +# loaded with safe mode on, because plugins are properly namespaced with +# a 'yard-' prefix, must be installed as a gem, and therefore cannot be +# touched by the user. To specify safe mode, use the +safe_mode+ key. +# +# == Plugin Specific Configuration +# +# Additional settings can be defined within the configuration file +# specifically to provide configuration for a plugin. A plugin that utilizes +# the YARD configuration is strongly encouraged to utilize namespacing of +# their configuration content. +# +# !!!yaml +# load_plugins: true # Auto-load plugins when YARD starts +# ignored_plugins: +# - yard-broken +# - broken2 # yard- prefix not necessary +# autoload_plugins: +# - yard-rspec +# # Plugin Specific Configuration +# yard-sample-plugin: +# show-results-inline: true +# +# As the configuration is available system wide, it can be +# accessed within the plugin code. +# +# +# if YARD::Config.options['yard-sample-plugin'] and +# YARD::Config.options['yard-sample-plugin']['show-results-inline'] +# # ... perform the action that places the results inline ... +# else +# # ... do the default behavior of not showing the results inline ... +# end +# +# When accessing the configuration, be aware that this file is user managed +# so configuration keys and values may not be present. Make no assumptions and +# instead ensure that you check for the existence of keys before proceeding to +# retrieve values. +# +# @see options +# @since 0.6.2 +# +# source://yard//lib/yard/config.rb#86 +class YARD::Config + class << self + # Legacy support for {IGNORED_PLUGINS} + # + # @since 0.6.2 + # + # source://yard//lib/yard/config.rb#221 + def add_ignored_plugins_file; end + + # @return [Array<String>] arguments from commandline and yardopts file + # @since 0.6.2 + # + # source://yard//lib/yard/config.rb#268 + def arguments; end + + # Loads settings from {CONFIG_FILE}. This method is called by YARD at + # load time and should not be called by the user. + # + # @return [void] + # @since 0.6.2 + # + # source://yard//lib/yard/config.rb#119 + def load; end + + # Load plugins set in :autoload_plugins + # + # @since 0.6.2 + # + # source://yard//lib/yard/config.rb#189 + def load_autoload_plugins; end + + # Load plugins from {arguments} + # + # @since 0.6.2 + # + # source://yard//lib/yard/config.rb#194 + def load_commandline_plugins; end + + # Check for command-line safe_mode switch in {arguments} + # + # @since 0.6.2 + # + # source://yard//lib/yard/config.rb#204 + def load_commandline_safemode; end + + # Load gem plugins if :load_plugins is true + # + # @since 0.6.2 + # + # source://yard//lib/yard/config.rb#169 + def load_gem_plugins; end + + # Loads an individual plugin by name. It is not necessary to include the + # +yard-+ plugin prefix here. + # + # @param name [String] the name of the plugin (with or without +yard-+ prefix) + # @return [Boolean] whether the plugin was successfully loaded + # @since 0.6.2 + # + # source://yard//lib/yard/config.rb#157 + def load_plugin(name); end + + # Print a warning if the plugin failed to load + # + # @return [false] + # @since 0.6.2 + # + # source://yard//lib/yard/config.rb#214 + def load_plugin_failed(name, exception); end + + # Loads gems that match the name 'yard-*' (recommended) or 'yard_*' except + # those listed in +~/.yard/ignored_plugins+. This is called immediately + # after YARD is loaded to allow plugin support. + # + # @return [Boolean] true if all plugins loaded successfully, false otherwise. + # @since 0.6.2 + # + # source://yard//lib/yard/config.rb#146 + def load_plugins; end + + # The system-wide configuration options for YARD + # + # @return [SymbolHash] a map a key-value pair settings. + # @see DEFAULT_CONFIG_OPTIONS + # @since 0.6.2 + # + # source://yard//lib/yard/config.rb#91 + def options; end + + # The system-wide configuration options for YARD + # + # @return [SymbolHash] a map a key-value pair settings. + # @see DEFAULT_CONFIG_OPTIONS + # @since 0.6.2 + # + # source://yard//lib/yard/config.rb#91 + def options=(_arg0); end + + # Loads the YAML configuration file into memory + # + # @return [Hash] the contents of the YAML file from disk + # @see CONFIG_FILE + # @since 0.6.2 + # + # source://yard//lib/yard/config.rb#236 + def read_config_file; end + + # Saves settings to {CONFIG_FILE}. + # + # @return [void] + # @since 0.6.2 + # + # source://yard//lib/yard/config.rb#135 + def save; end + + # Sanitizes and normalizes a plugin name to include the 'yard-' prefix. + # + # @param name [String] the plugin name + # @return [String] the sanitized and normalized plugin name. + # @since 0.6.2 + # + # source://yard//lib/yard/config.rb#252 + def translate_plugin_name(name); end + + # Translates plugin names to add yard- prefix. + # + # @since 0.6.2 + # + # source://yard//lib/yard/config.rb#228 + def translate_plugin_names; end + + # Temporarily loads .yardopts file into @yardopts + # + # @since 0.6.2 + # + # source://yard//lib/yard/config.rb#259 + def with_yardopts; end + end +end + +# The location where YARD stores user-specific settings +# +# @since 0.6.2 +# +# source://yard//lib/yard/config.rb#95 +YARD::Config::CONFIG_DIR = T.let(T.unsafe(nil), String) + +# The main configuration YAML file. +# +# @since 0.6.2 +# +# source://yard//lib/yard/config.rb#98 +YARD::Config::CONFIG_FILE = T.let(T.unsafe(nil), String) + +# Default configuration options +# +# @since 0.6.2 +# +# source://yard//lib/yard/config.rb#105 +YARD::Config::DEFAULT_CONFIG_OPTIONS = T.let(T.unsafe(nil), Hash) + +# File listing all ignored plugins +# +# @deprecated Set `ignored_plugins` in the {CONFIG_FILE} instead. +# @since 0.6.2 +# +# source://yard//lib/yard/config.rb#102 +YARD::Config::IGNORED_PLUGINS = T.let(T.unsafe(nil), String) + +# The prefix used for YARD plugins. Name your gem with this prefix +# to allow it to be used as a plugin. +# +# @since 0.6.2 +# +# source://yard//lib/yard/config.rb#114 +YARD::Config::YARD_PLUGIN_PREFIX = T.let(T.unsafe(nil), Regexp) + +# A documentation string, or "docstring" for short, encapsulates the +# comments and metadata, or "tags", of an object. Meta-data is expressed +# in the form +@tag VALUE+, where VALUE can span over multiple lines as +# long as they are indented. The following +@example+ tag shows how tags +# can be indented: +# +# # @example My example +# # a = "hello world" +# # a.reverse +# # @version 1.0 +# +# Tags can be nested in a documentation string, though the {Tags::Tag} +# itself is responsible for parsing the inner tags. +# +# source://yard//lib/yard/docstring.rb#16 +class YARD::Docstring < ::String + # Creates a new docstring with the raw contents attached to an optional + # object. Parsing will be done by the {DocstringParser} class. + # + # @example + # Docstring.new("hello world\n@return Object return", someobj) + # @note To properly parse directives with proper parser context within + # handlers, you should not use this method to create a Docstring. + # Instead, use the {parser}, which takes a handler object that + # can pass parser state onto directives. If a Docstring is created + # with this method, directives do not have access to any parser + # state, and may not function as expected. + # @param content [String] the raw comments to be parsed into a docstring + # and associated meta-data. + # @param object [CodeObjects::Base] an object to associate the docstring + # with. + # @return [Docstring] a new instance of Docstring + # + # source://yard//lib/yard/docstring.rb#103 + def initialize(content = T.unsafe(nil), object = T.unsafe(nil)); end + + # Adds another {Docstring}, copying over tags. + # + # @param other [Docstring, String] the other docstring (or string) to + # add. + # @return [Docstring] a new docstring with both docstrings combines + # + # source://yard//lib/yard/docstring.rb#116 + def +(other); end + + # Adds a tag or reftag object to the tag list. If you want to parse + # tag data based on the {Tags::DefaultFactory} tag factory, use + # {DocstringParser} instead. + # + # @param tags [Tags::Tag, Tags::RefTag] list of tag objects to add + # @return [void] + # + # source://yard//lib/yard/docstring.rb#242 + def add_tag(*tags); end + + # @return [String] the raw documentation (including raw tag text) + # + # source://yard//lib/yard/docstring.rb#53 + def all; end + + # Replaces the docstring with new raw content. Called by {#all=}. + # + # @param content [String] the raw comments to be parsed + # + # source://yard//lib/yard/docstring.rb#132 + def all=(content, parse = T.unsafe(nil)); end + + # Returns true if the docstring has no content that is visible to a template. + # + # @param only_visible_tags [Boolean] whether only {Tags::Library.visible_tags} + # should be checked, or if all tags should be considered. + # @return [Boolean] whether or not the docstring has content + # + # source://yard//lib/yard/docstring.rb#310 + def blank?(only_visible_tags = T.unsafe(nil)); end + + # Deletes all tags where the block returns true + # + # @return [void] + # @since 0.7.0 + # @yieldparam tag [Tags::Tag] the tag that is being tested + # @yieldreturn [Boolean] true if the tag should be deleted + # + # source://yard//lib/yard/docstring.rb#300 + def delete_tag_if(&block); end + + # Delete all tags with +name+ + # + # @param name [String] the tag name + # @return [void] + # @since 0.7.0 + # + # source://yard//lib/yard/docstring.rb#291 + def delete_tags(name); end + + # Deep-copies a docstring + # + # @note This method creates a new docstring with new tag lists, but does + # not create new individual tags. Modifying the tag objects will still + # affect the original tags. + # @return [Docstring] a new copied docstring + # @since 0.7.0 + # + # source://yard//lib/yard/docstring.rb#153 + def dup; end + + # Returns true if at least one tag by the name +name+ was declared + # + # @param name [String] the tag name to search for + # @return [Boolean] whether or not the tag +name+ was declared + # + # source://yard//lib/yard/docstring.rb#283 + def has_tag?(name); end + + # @return [Boolean] whether the docstring was started with "##" + # + # source://yard//lib/yard/docstring.rb#56 + def hash_flag; end + + # source://yard//lib/yard/docstring.rb#57 + def hash_flag=(v); end + + # @return [Fixnum] the first line of the {#line_range} + # @return [nil] if there is no associated {#line_range} + # + # source://yard//lib/yard/docstring.rb#167 + def line; end + + # @return [Range] line range in the {#object}'s file where the docstring was parsed from + # + # source://yard//lib/yard/docstring.rb#50 + def line_range; end + + # @return [Range] line range in the {#object}'s file where the docstring was parsed from + # + # source://yard//lib/yard/docstring.rb#50 + def line_range=(_arg0); end + + # @return [CodeObjects::Base] the object that owns the docstring. + # + # source://yard//lib/yard/docstring.rb#47 + def object; end + + # @return [CodeObjects::Base] the object that owns the docstring. + # + # source://yard//lib/yard/docstring.rb#47 + def object=(_arg0); end + + # @return [Array<Tags::RefTag>] the list of reference tags + # + # source://yard//lib/yard/docstring.rb#44 + def ref_tags; end + + # Replaces the docstring with new raw content. Called by {#all=}. + # + # @param content [String] the raw comments to be parsed + # + # source://yard//lib/yard/docstring.rb#132 + def replace(content, parse = T.unsafe(nil)); end + + # Resolves unresolved other docstring reference if there is + # unresolved reference. Does nothing if there is no unresolved + # reference. + # + # Normally, you don't need to call this method + # explicitly. Resolving unresolved reference is done implicitly. + # + # @return [void] + # + # source://yard//lib/yard/docstring.rb#328 + def resolve_reference; end + + # Gets the first line of a docstring to the period or the first paragraph. + # + # @return [String] The first line or paragraph of the docstring; always ends with a period. + # + # source://yard//lib/yard/docstring.rb#173 + def summary; end + + # Convenience method to return the first tag + # object in the list of tag objects of that name + # + # @example + # doc = Docstring.new("@return zero when nil") + # doc.tag(:return).text # => "zero when nil" + # @param name [#to_s] the tag name to return data for + # @return [Tags::Tag] the first tag in the list of {#tags} + # + # source://yard//lib/yard/docstring.rb#265 + def tag(name); end + + # Returns a list of tags specified by +name+ or all tags if +name+ is not specified. + # + # @param name [#to_s] the tag name to return data for, or nil for all tags + # @return [Array<Tags::Tag>] the list of tags by the specified tag name + # + # source://yard//lib/yard/docstring.rb#273 + def tags(name = T.unsafe(nil)); end + + # Reformats and returns a raw representation of the tag data using the + # current tag and docstring data, not the original text. + # + # @return [String] the updated raw formatted docstring data + # @since 0.7.0 + # @todo Add Tags::Tag#to_raw and refactor + # + # source://yard//lib/yard/docstring.rb#207 + def to_raw; end + + # source://yard//lib/yard/docstring.rb#125 + def to_s; end + + private + + # Maps valid reference tags + # + # @return [Array<Tags::RefTag>] the list of valid reference tags + # + # source://yard//lib/yard/docstring.rb#344 + def convert_ref_tags; end + + # Parses out comments split by newlines into a new code object + # + # @param comments [String] the newline delimited array of comments. If the comments + # are passed as a String, they will be split by newlines. + # @return [String] the non-metadata portion of the comments to + # be used as a docstring + # + # source://yard//lib/yard/docstring.rb#369 + def parse_comments(comments); end + + # A stable sort_by method. + # + # @param list [Enumerable] the list to sort. + # @return [Array] a stable sorted list. + # + # source://yard//lib/yard/docstring.rb#382 + def stable_sort_by(list); end + + class << self + # @note Plugin developers should make sure to reset this value + # after parsing finishes. This can be done via the + # {Parser::SourceParser.after_parse_list} callback. This will + # ensure that YARD can properly parse multiple projects in + # the same process. + # @return [Class<DocstringParser>] the parser class used to parse + # text and optional meta-data from docstrings. Defaults to + # {DocstringParser}. + # @see DocstringParser + # @see Parser::SourceParser.after_parse_list + # + # source://yard//lib/yard/docstring.rb#28 + def default_parser; end + + # @note Plugin developers should make sure to reset this value + # after parsing finishes. This can be done via the + # {Parser::SourceParser.after_parse_list} callback. This will + # ensure that YARD can properly parse multiple projects in + # the same process. + # @return [Class<DocstringParser>] the parser class used to parse + # text and optional meta-data from docstrings. Defaults to + # {DocstringParser}. + # @see DocstringParser + # @see Parser::SourceParser.after_parse_list + # + # source://yard//lib/yard/docstring.rb#28 + def default_parser=(_arg0); end + + # Creates a new docstring without performing any parsing through + # a {DocstringParser}. This method is called by +DocstringParser+ + # when creating the new docstring object. + # + # @param text [String] the textual portion of the docstring + # @param tags [Array<Tags::Tag>] the list of tag objects in the docstring + # @param object [CodeObjects::Base, nil] the object associated with the + # docstring. May be nil. + # @param raw_data [String] the complete docstring, including all + # original formatting and any unparsed tags/directives. + # @param ref_object [CodeObjects::Base, nil] a reference object used for + # the base set of documentation / tag information. + # + # source://yard//lib/yard/docstring.rb#77 + def new!(text, tags = T.unsafe(nil), object = T.unsafe(nil), raw_data = T.unsafe(nil), ref_object = T.unsafe(nil)); end + + # Creates a parser object using the current {default_parser}. + # Equivalent to: + # Docstring.default_parser.new(*args) + # + # @param args arguments are passed to the {DocstringParser} + # class. See {DocstringParser#initialize} for details on + # arguments. + # @return [DocstringParser] the parser object used to parse a + # docstring. + # + # source://yard//lib/yard/docstring.rb#38 + def parser(*args); end + end +end + +# Matches a tag at the start of a comment line +# +# @deprecated Use {DocstringParser::META_MATCH} +# +# source://yard//lib/yard/docstring.rb#61 +YARD::Docstring::META_MATCH = T.let(T.unsafe(nil), Regexp) + +# Parses text and creates a {Docstring} object to represent documentation +# for a {CodeObjects::Base}. To create a new docstring, you should initialize +# the parser and call {#parse} followed by {#to_docstring}. +# +# == Subclassing Notes +# +# The DocstringParser can be subclassed and substituted during parsing by +# setting the {Docstring.default_parser} attribute with the name of the +# subclass. This allows developers to change the way docstrings are +# parsed, allowing for completely different docstring syntaxes. +# +# @example Creating a Docstring with a DocstringParser +# DocstringParser.new.parse("text here").to_docstring +# @example Creating a Custom DocstringParser +# # Parses docstrings backwards! +# class ReverseDocstringParser +# def parse_content(content) +# super(content.reverse) +# end +# end +# +# # Set the parser as default when parsing +# YARD::Docstring.default_parser = ReverseDocstringParser +# @see #parse_content +# @since 0.8.0 +# +# source://yard//lib/yard/docstring_parser.rb#30 +class YARD::DocstringParser + # Creates a new parser to parse docstring data + # + # @param library [Tags::Library] a tag library for recognizing + # tags. + # @return [DocstringParser] a new instance of DocstringParser + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#81 + def initialize(library = T.unsafe(nil)); end + + # Creates a new directive using the registered {#library} + # + # @return [Tags::Directive] the directive object that is created + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#232 + def create_directive(tag_name, tag_buf); end + + # Creates a {Tags::RefTag} + # + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#226 + def create_ref_tag(tag_name, name, object_name); end + + # Creates a tag from the {Tags::DefaultFactory tag factory}. + # + # To add an already created tag object, append it to {#tags}. + # + # @param tag_name [String] the tag name + # @param tag_buf [String] the text attached to the tag with newlines removed. + # @return [Tags::Tag, Tags::RefTag] a tag + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#209 + def create_tag(tag_name, tag_buf = T.unsafe(nil)); end + + # @return [Array<Tags::Directive>] a list of directives identified + # by the parser. This list will not be passed on to the + # Docstring object. + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#45 + def directives; end + + # @return [Array<Tags::Directive>] a list of directives identified + # by the parser. This list will not be passed on to the + # Docstring object. + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#45 + def directives=(_arg0); end + + # @return [Handlers::Base, nil] the handler parsing this + # docstring. May be nil if this docstring parser is not + # initialized through + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#66 + def handler; end + + # @return [Handlers::Base, nil] the handler parsing this + # docstring. May be nil if this docstring parser is not + # initialized through + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#66 + def handler=(_arg0); end + + # @return [Tags::Library] the tag library being used to + # identify registered tags in the docstring. + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#70 + def library; end + + # @return [Tags::Library] the tag library being used to + # identify registered tags in the docstring. + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#70 + def library=(_arg0); end + + # @return [CodeObjects::Base, nil] the object associated with + # the docstring being parsed. May be nil if the docstring is + # not attached to any object. + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#56 + def object; end + + # @return [CodeObjects::Base, nil] the object associated with + # the docstring being parsed. May be nil if the docstring is + # not attached to any object. + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#56 + def object=(_arg0); end + + # Parses all content and returns itself. + # + # @param content [String] the docstring text to parse + # @param object [CodeObjects::Base] the object that the docstring + # is attached to. Will be passed to directives to act on + # this object. + # @param handler [Handlers::Base, nil] the handler object that is + # parsing this object. May be nil if this parser is not being + # called from a {Parser::SourceParser} context. + # @return [self] the parser object. To get the docstring, + # call {#to_docstring}. + # @see #to_docstring + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#113 + def parse(content, object = T.unsafe(nil), handler = T.unsafe(nil)); end + + # Parses a given block of text. + # + # @note Subclasses can override this method to perform custom + # parsing of content data. + # @param content [String] the content to parse + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#129 + def parse_content(content); end + + # Call post processing callbacks on parser. + # This is called implicitly by parser. Use this when + # manually configuring a {Docstring} object. + # + # @return [void] + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#196 + def post_process; end + + # @return [String] the complete input string to the parser. + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#36 + def raw_text; end + + # @return [String] the complete input string to the parser. + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#36 + def raw_text=(_arg0); end + + # @return [CodeObjects::Base, nil] the object referenced by + # the docstring being parsed. May be nil if the docstring doesn't + # refer to any object. + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#61 + def reference; end + + # @return [CodeObjects::Base, nil] the object referenced by + # the docstring being parsed. May be nil if the docstring doesn't + # refer to any object. + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#61 + def reference=(_arg0); end + + # @return [OpenStruct] any arbitrary state to be passed between + # tags during parsing. Mainly used by directives to coordinate + # behaviour (so that directives can be aware of other directives + # used in a docstring). + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#51 + def state; end + + # @return [OpenStruct] any arbitrary state to be passed between + # tags during parsing. Mainly used by directives to coordinate + # behaviour (so that directives can be aware of other directives + # used in a docstring). + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#51 + def state=(_arg0); end + + # Backward compatibility to detect old tags that should be specified + # as directives in 0.8 and onward. + # + # @return [Boolean] + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#252 + def tag_is_directive?(tag_name); end + + # @return [Array<Tags::Tag>] the list of meta-data tags identified + # by the parser + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#40 + def tags; end + + # @return [Array<Tags::Tag>] the list of meta-data tags identified + # by the parser + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#40 + def tags=(_arg0); end + + # @return [String] the parsed text portion of the docstring, + # with tags removed. + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#33 + def text; end + + # @return [String] the parsed text portion of the docstring, + # with tags removed. + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#33 + def text=(_arg0); end + + # @return [Docstring] translates parsed text into + # a Docstring object. + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#95 + def to_docstring; end + + private + + # Calls all {after_parse} callbacks + # + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#324 + def call_after_parse_callbacks; end + + # Calls the {Tags::Directive#after_parse} callback on all the + # created directives. + # + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#319 + def call_directives_after_parse; end + + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#305 + def detect_reference(content); end + + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#301 + def namespace; end + + class << self + # Creates a callback that is called after a docstring is successfully + # parsed. Use this method to perform sanity checks on a docstring's + # tag data, or add any extra tags automatically to a docstring. + # + # @return [void] + # @since 0.8.0 + # @yield [parser] a block to be called after a docstring is parsed + # @yieldparam parser [DocstringParser] the docstring parser object + # with all directives and tags created. + # @yieldreturn [void] + # + # source://yard//lib/yard/docstring_parser.rb#266 + def after_parse(&block); end + + # @return [Array<Proc>] the {after_parse} callback proc objects + # @since 0.8.0 + # + # source://yard//lib/yard/docstring_parser.rb#271 + def after_parse_callbacks; end + end +end + +# The regular expression to match the tag syntax +# +# @since 0.8.0 +# +# source://yard//lib/yard/docstring_parser.rb#73 +YARD::DocstringParser::META_MATCH = T.let(T.unsafe(nil), Regexp) + +# source://yard//lib/yard/gem_index.rb#6 +module YARD::GemIndex + private + + # source://yard//lib/yard/gem_index.rb#25 + def all; end + + # source://yard//lib/yard/gem_index.rb#17 + def each(&block); end + + # source://yard//lib/yard/gem_index.rb#9 + def find_all_by_name(*args); end + + class << self + # source://yard//lib/yard/gem_index.rb#25 + def all; end + + # source://yard//lib/yard/gem_index.rb#17 + def each(&block); end + + # source://yard//lib/yard/gem_index.rb#9 + def find_all_by_name(*args); end + end +end + +# Handlers are called during the data processing part of YARD's +# parsing phase. This allows YARD as well as any custom extension to +# analyze source and generate {CodeObjects} to be stored for later use. +# +# source://yard//lib/yard/autoload.rb#66 +module YARD::Handlers; end + +# Handlers are pluggable semantic parsers for YARD's code generation +# phase. They allow developers to control what information gets +# generated by YARD, giving them the ability to, for instance, document +# any Ruby DSLs that a customized framework may use. A good example +# of this would be the ability to document and generate meta data for +# the 'describe' declaration of the RSpec testing framework by simply +# adding a handler for such a keyword. Similarly, any Ruby API that +# takes advantage of class level declarations could add these to the +# documentation in a very explicit format by treating them as first- +# class objects in any outputted documentation. +# +# == Overview of a Typical Handler Scenario +# +# Generally, a handler class will declare a set of statements which +# it will handle using the {handles} class declaration. It will then +# implement the {#process} method to do the work. The processing would +# usually involve the manipulation of the {#namespace}, {#owner} +# {CodeObjects::Base code objects} or the creation of new ones, in +# which case they should be registered by {#register}, a method that +# sets some basic attributes for the new objects. +# +# Handlers are usually simple and take up to a page of code to process +# and register a new object or add new attributes to the current +namespace+. +# +# == Setting up a Handler for Use +# +# A Handler is automatically registered when it is subclassed from the +# base class. The only other thing that needs to be done is to specify +# which statement the handler will process. This is done with the +handles+ +# declaration, taking either a {Parser::Ruby::Legacy::RubyToken}, {String} or `Regexp`. +# Here is a simple example which processes module statements. +# +# class MyModuleHandler < YARD::Handlers::Base +# handles TkMODULE +# +# def process +# # do something +# end +# end +# +# == Processing Handler Data +# +# The goal of a specific handler is really up to the developer, and as +# such there is no real guideline on how to process the data. However, +# it is important to know where the data is coming from to be able to use +# it. +# +# === +statement+ Attribute +# +# The +statement+ attribute pertains to the {Parser::Ruby::Legacy::Statement} object +# containing a set of tokens parsed in by the parser. This is the main set +# of data to be analyzed and processed. The comments attached to the statement +# can be accessed by the {Parser::Ruby::Legacy::Statement#comments} method, but generally +# the data to be processed will live in the +tokens+ attribute. This list +# can be converted to a +String+ using +#to_s+ to parse the data with +# regular expressions (or other text processing mechanisms), if needed. +# +# === +namespace+ Attribute +# +# The +namespace+ attribute is a {CodeObjects::NamespaceObject namespace object} +# which represents the current namespace that the parser is in. For instance: +# +# module SomeModule +# class MyClass +# def mymethod; end +# end +# end +# +# If a handler was to parse the 'class MyClass' statement, it would +# be necessary to know that it belonged inside the SomeModule module. +# This is the value that +namespace+ would return when processing such +# a statement. If the class was then entered and another handler was +# called on the method, the +namespace+ would be set to the 'MyClass' +# code object. +# +# === +owner+ Attribute +# +# The +owner+ attribute is similar to the +namespace+ attribute in that +# it also follows the scope of the code during parsing. However, a namespace +# object is loosely defined as a module or class and YARD has the ability +# to parse beyond module and class blocks (inside methods, for instance), +# so the +owner+ attribute would not be limited to modules and classes. +# +# To put this into context, the example from above will be used. If a method +# handler was added to the mix and decided to parse inside the method body, +# the +owner+ would be set to the method object but the namespace would remain +# set to the class. This would allow the developer to process any method +# definitions set inside a method (def x; def y; 2 end end) by adding them +# to the correct namespace (the class, not the method). +# +# In summary, the distinction between +namespace+ and +owner+ can be thought +# of as the difference between first-class Ruby objects (namespaces) and +# second-class Ruby objects (methods). +# +# === +visibility+ and +scope+ Attributes +# +# Mainly needed for parsing methods, the +visibility+ and +scope+ attributes +# refer to the public/protected/private and class/instance values (respectively) +# of the current parsing position. +# +# == Parsing Blocks in Statements +# +# In addition to parsing a statement and creating new objects, some +# handlers may wish to continue parsing the code inside the statement's +# block (if there is one). In this context, a block means the inside +# of any statement, be it class definition, module definition, if +# statement or classic 'Ruby block'. +# +# For example, a class statement would be "class MyClass" and the block +# would be a list of statements including the method definitions inside +# the class. For a class handler, the programmer would execute the +# {#parse_block} method to continue parsing code inside the block, with +# the +namespace+ now pointing to the class object the handler created. +# +# YARD has the ability to continue into any block: class, module, method, +# even if statements. For this reason, the block parsing method must be +# invoked explicitly out of efficiency sake. +# +# @abstract Subclass this class to provide a handler for YARD to use +# during the processing phase. +# @see CodeObjects::Base +# @see CodeObjects::NamespaceObject +# @see handles +# @see #namespace +# @see #owner +# @see #register +# @see #parse_block +# +# source://yard//lib/yard/handlers/base.rb#149 +class YARD::Handlers::Base + include ::YARD::CodeObjects + include ::YARD::Parser + + # @return [Base] a new instance of Base + # + # source://yard//lib/yard/handlers/base.rb#276 + def initialize(source_parser, stmt); end + + # Aborts a handler by raising {Handlers::HandlerAborted}. + # An exception will only be logged in debugging mode for + # this kind of handler exit. + # + # @raise [Handlers::HandlerAborted] + # @since 0.8.4 + # + # source://yard//lib/yard/handlers/base.rb#355 + def abort!; end + + # @abstract Implement this method to return the parameters in a method call + # statement. It should return an empty list if the statement is not a + # method call. + # @raise [NotImplementedError] + # @return [Array<String>] a list of argument names + # + # source://yard//lib/yard/handlers/base.rb#581 + def call_params; end + + # @abstract Implement this method to return the method being called in + # a method call. It should return nil if the statement is not a method + # call. + # @raise [NotImplementedError] + # @return [String] the method name being called + # @return [nil] if the statement is not a method call + # + # source://yard//lib/yard/handlers/base.rb#590 + def caller_method; end + + # Ensures that a specific +object+ has been parsed and loaded into the + # registry. This is necessary when adding data to a namespace, for instance, + # since the namespace may not have been processed yet (it can be located + # in a file that has not been handled). + # + # Calling this method defers the handler until all other files have been + # processed. If the object gets resolved, the rest of the handler continues, + # otherwise an exception is raised. + # + # @example Adding a mixin to the String class programmatically + # ensure_loaded! P('String') + # # "String" is now guaranteed to be loaded + # P('String').mixins << P('MyMixin') + # @param object [Proxy, CodeObjects::Base] the object to resolve. + # @param max_retries [Integer] the number of times to defer the handler + # before raising a +NamespaceMissingError+. + # @raise [NamespaceMissingError] if the object is not resolved within + # +max_retries+ attempts, this exception is raised and the handler + # finishes processing. + # + # source://yard//lib/yard/handlers/base.rb#561 + def ensure_loaded!(object, max_retries = T.unsafe(nil)); end + + # Returns the value of attribute extra_state. + # + # source://yard//lib/yard/handlers/base.rb#348 + def extra_state; end + + # Returns the value of attribute globals. + # + # source://yard//lib/yard/handlers/base.rb#347 + def globals; end + + # Returns the value of attribute namespace. + # + # source://yard//lib/yard/handlers/base.rb#341 + def namespace; end + + # Sets the attribute namespace + # + # @param value the value to set the attribute namespace to. + # + # source://yard//lib/yard/handlers/base.rb#342 + def namespace=(v); end + + # Returns the value of attribute owner. + # + # source://yard//lib/yard/handlers/base.rb#339 + def owner; end + + # Sets the attribute owner + # + # @param value the value to set the attribute owner to. + # + # source://yard//lib/yard/handlers/base.rb#340 + def owner=(v); end + + # Parses the semantic "block" contained in the statement node. + # + # @abstract Subclasses should call {Processor#process parser.process} + # @raise [NotImplementedError] + # + # source://yard//lib/yard/handlers/base.rb#304 + def parse_block(*_arg0); end + + # @return [Processor] the processor object that manages all global state + # during handling. + # + # source://yard//lib/yard/handlers/base.rb#310 + def parser; end + + # The main handler method called by the parser on a statement + # that matches the {handles} declaration. + # + # Subclasses should override this method to provide the handling + # functionality for the class. + # + # @raise [NotImplementedError] + # @return [Array<CodeObjects::Base>, CodeObjects::Base, Object] If this method returns a code object (or a list of them), + # they are passed to the +#register+ method which adds basic + # attributes. It is not necessary to return any objects and in + # some cases you may want to explicitly avoid the returning of + # any objects for post-processing by the register method. + # @see handles + # @see #register + # + # source://yard//lib/yard/handlers/base.rb#297 + def process; end + + # Executes a given block with specific state values for {#owner}, + # {#namespace} and {#scope}. + # + # @option opts + # @option opts + # @option opts + # @param opts [Hash] a customizable set of options + # @yield a block to execute with the given state values. + # + # source://yard//lib/yard/handlers/base.rb#370 + def push_state(opts = T.unsafe(nil)); end + + # Do some post processing on a list of code objects. + # Adds basic attributes to the list of objects like + # the filename, line number, {CodeObjects::Base#dynamic}, + # source code and {CodeObjects::Base#docstring}, + # but only if they don't exist. + # + # @param objects [Array<CodeObjects::Base>] the list of objects to post-process. + # @return [CodeObjects::Base, Array<CodeObjects::Base>] returns whatever is passed in, for chainability. + # + # source://yard//lib/yard/handlers/base.rb#407 + def register(*objects); end + + # Registers any docstring found for the object and expands macros + # + # @param object [CodeObjects::Base] the object to register + # @return [void] + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/base.rb#450 + def register_docstring(object, docstring = T.unsafe(nil), stmt = T.unsafe(nil)); end + + # Registers the object as dynamic if the object is defined inside + # a method or block (owner != namespace) + # + # @param object [CodeObjects::Base] the object to register + # @return [void] + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/base.rb#537 + def register_dynamic(object); end + + # Ensures that the object's namespace is loaded before attaching it + # to the namespace. + # + # @param object [CodeObjects::Base] the object to register + # @return [void] + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/base.rb#429 + def register_ensure_loaded(object); end + + # Registers the file/line of the declaration with the object + # + # @param object [CodeObjects::Base] the object to register + # @return [void] + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/base.rb#441 + def register_file_info(object, file = T.unsafe(nil), line = T.unsafe(nil), comments = T.unsafe(nil)); end + + # Registers the object as being inside a specific group + # + # @param object [CodeObjects::Base] the object to register + # @return [void] + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/base.rb#473 + def register_group(object, group = T.unsafe(nil)); end + + # Registers the same method information on the module function, if + # the object was defined as a module function. + # + # @param object [CodeObjects::Base] the possible module function object + # to copy data for + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/base.rb#523 + def register_module_function(object); end + + # @param object [CodeObjects::Base] the object to register + # @return [void] + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/base.rb#499 + def register_source(object, source = T.unsafe(nil), type = T.unsafe(nil)); end + + # Registers any transitive tags from the namespace on the object + # + # @param object [CodeObjects::Base, nil] the object to register + # @return [void] + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/base.rb#487 + def register_transitive_tags(object); end + + # Registers visibility on a method object. If the object does not + # respond to setting visibility, nothing is done. + # + # @param object [#visibility=] the object to register + # @param visibility [Symbol] the visibility to set on the object + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/base.rb#511 + def register_visibility(object, visibility = T.unsafe(nil)); end + + # Returns the value of attribute scope. + # + # source://yard//lib/yard/handlers/base.rb#345 + def scope; end + + # Sets the attribute scope + # + # @param value the value to set the attribute scope to. + # + # source://yard//lib/yard/handlers/base.rb#346 + def scope=(v); end + + # @return [Object] the statement object currently being processed. Usually + # refers to one semantic language statement, though the strict definition + # depends on the parser used. + # + # source://yard//lib/yard/handlers/base.rb#315 + def statement; end + + # Returns the value of attribute visibility. + # + # source://yard//lib/yard/handlers/base.rb#343 + def visibility; end + + # Sets the attribute visibility + # + # @param value the value to set the attribute visibility to. + # + # source://yard//lib/yard/handlers/base.rb#344 + def visibility=(v); end + + class << self + # Clear all registered subclasses. Testing purposes only + # + # @return [void] + # + # source://yard//lib/yard/handlers/base.rb#159 + def clear_subclasses; end + + # @return [Array] a list of matchers for the handler object. + # @see handles? + # + # source://yard//lib/yard/handlers/base.rb#211 + def handlers; end + + # Declares the statement type which will be processed + # by this handler. + # + # A match need not be unique to a handler. Multiple + # handlers can process the same statement. However, + # in this case, care should be taken to make sure that + # {#parse_block} would only be executed by one of + # the handlers, otherwise the same code will be parsed + # multiple times and slow YARD down. + # + # @param matches [Parser::Ruby::Legacy::RubyToken, Symbol, String, Regexp] statements that match the declaration will be + # processed by this handler. A {String} match is + # equivalent to a +/\Astring/+ regular expression + # (match from the beginning of the line), and all + # token matches match only the first token of the + # statement. + # + # source://yard//lib/yard/handlers/base.rb#192 + def handles(*matches); end + + # This class is implemented by {Ruby::Base} and {Ruby::Legacy::Base}. + # To implement a base handler class for another language, implement + # this method to return true if the handler should process the given + # statement object. Use {handlers} to enumerate the matchers declared + # for the handler class. + # + # @param statement a statement object or node (depends on language type) + # @raise [NotImplementedError] + # @return [Boolean] whether or not this handler object should process + # the given statement + # + # source://yard//lib/yard/handlers/base.rb#205 + def handles?(statement); end + + # Declares that a handler should only be called when inside a filename + # by its basename or a regex match for the full path. + # + # @param filename [String, Regexp] a matching filename or regex + # @return [void] + # @since 0.6.2 + # + # source://yard//lib/yard/handlers/base.rb#235 + def in_file(filename); end + + # @private + # + # source://yard//lib/yard/handlers/base.rb#169 + def inherited(subclass); end + + # @return [Boolean] whether the filename matches the declared file + # match for a handler. If no file match is specified, returns true. + # @since 0.6.2 + # + # source://yard//lib/yard/handlers/base.rb#242 + def matches_file?(filename); end + + # Declares that the handler should only be called when inside a + # {CodeObjects::NamespaceObject}, not a method body. + # + # @return [void] + # + # source://yard//lib/yard/handlers/base.rb#219 + def namespace_only; end + + # @return [Boolean] whether the handler should only be processed inside + # a namespace. + # + # source://yard//lib/yard/handlers/base.rb#225 + def namespace_only?; end + + # Generates a +process+ method, equivalent to +def process; ... end+. + # Blocks defined with this syntax will be wrapped inside an anonymous + # module so that the handler class can be extended with mixins that + # override the +process+ method without alias chaining. + # + # @return [void] + # @see #process + # @since 0.5.4 + # + # source://yard//lib/yard/handlers/base.rb#269 + def process(&block); end + + # Returns all registered handler subclasses. + # + # @return [Array<Base>] a list of handlers + # + # source://yard//lib/yard/handlers/base.rb#165 + def subclasses; end + end +end + +# CRuby Handlers +# +# @since 0.8.0 +# +# source://yard//lib/yard/autoload.rb#74 +module YARD::Handlers::C; end + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/alias_handler.rb#2 +class YARD::Handlers::C::AliasHandler < ::YARD::Handlers::C::Base; end + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/alias_handler.rb#3 +YARD::Handlers::C::AliasHandler::MATCH = T.let(T.unsafe(nil), Regexp) + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/attribute_handler.rb#2 +class YARD::Handlers::C::AttributeHandler < ::YARD::Handlers::C::Base; end + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/attribute_handler.rb#3 +YARD::Handlers::C::AttributeHandler::MATCH = T.let(T.unsafe(nil), Regexp) + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/base.rb#5 +class YARD::Handlers::C::Base < ::YARD::Handlers::Base + include ::YARD::Parser::C + include ::YARD::Handlers::Common::MethodHandler + include ::YARD::Handlers::C::HandlerMethods + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/base.rb#77 + def ensure_variable_defined!(var, max_retries = T.unsafe(nil)); end + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/base.rb#64 + def namespace_for_variable(var); end + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/base.rb#94 + def namespaces; end + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/base.rb#60 + def override_comments; end + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/base.rb#104 + def parse_block(opts = T.unsafe(nil)); end + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/base.rb#113 + def process_file(file, object); end + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/base.rb#98 + def processed_files; end + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/base.rb#38 + def register_docstring(object, docstring = T.unsafe(nil), stmt = T.unsafe(nil)); end + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/base.rb#42 + def register_file_info(object, file = T.unsafe(nil), line = T.unsafe(nil), comments = T.unsafe(nil)); end + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/base.rb#46 + def register_source(object, source = T.unsafe(nil), type = T.unsafe(nil)); end + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/base.rb#50 + def register_visibility(object, visibility = T.unsafe(nil)); end + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/base.rb#56 + def symbols; end + + private + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/base.rb#158 + def remove_var_prefix(var); end + + class << self + # @return [Boolean] whether the handler handles this statement + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/base.rb#10 + def handles?(statement, processor); end + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/base.rb#28 + def statement_class(type = T.unsafe(nil)); end + end +end + +# Generated by update_error_map.rb (Copy+past results) +# +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/base.rb#131 +YARD::Handlers::C::Base::ERROR_CLASS_NAMES = T.let(T.unsafe(nil), Hash) + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/class_handler.rb#2 +class YARD::Handlers::C::ClassHandler < ::YARD::Handlers::C::Base; end + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/class_handler.rb#3 +YARD::Handlers::C::ClassHandler::MATCH1 = T.let(T.unsafe(nil), Regexp) + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/class_handler.rb#9 +YARD::Handlers::C::ClassHandler::MATCH2 = T.let(T.unsafe(nil), Regexp) + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/constant_handler.rb#2 +class YARD::Handlers::C::ConstantHandler < ::YARD::Handlers::C::Base; end + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/constant_handler.rb#3 +YARD::Handlers::C::ConstantHandler::MATCH = T.let(T.unsafe(nil), Regexp) + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/handler_methods.rb#5 +module YARD::Handlers::C::HandlerMethods + include ::YARD::Parser::C + include ::YARD::CodeObjects + include ::YARD::Handlers::Common::MethodHandler + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/handler_methods.rb#86 + def handle_alias(var_name, new_name, old_name); end + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/handler_methods.rb#75 + def handle_attribute(var_name, name, read, write); end + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/handler_methods.rb#10 + def handle_class(var_name, class_name, parent, in_module = T.unsafe(nil)); end + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/handler_methods.rb#109 + def handle_constants(type, var_name, const_name, value); end + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/handler_methods.rb#46 + def handle_method(scope, var_name, name, func_name, _source_file = T.unsafe(nil)); end + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/handler_methods.rb#33 + def handle_module(var_name, module_name, in_module = T.unsafe(nil)); end + + private + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/handler_methods.rb#123 + def find_constant_docstring(object); end + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/handler_methods.rb#154 + def find_method_body(object, symbol); end + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/handler_methods.rb#196 + def record_parameters(object, symbol, src); end +end + +# Handles the Init_Libname() method +# +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/init_handler.rb#3 +class YARD::Handlers::C::InitHandler < ::YARD::Handlers::C::Base; end + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/init_handler.rb#4 +YARD::Handlers::C::InitHandler::MATCH = T.let(T.unsafe(nil), Regexp) + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/method_handler.rb#2 +class YARD::Handlers::C::MethodHandler < ::YARD::Handlers::C::Base; end + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/method_handler.rb#3 +YARD::Handlers::C::MethodHandler::MATCH1 = T.let(T.unsafe(nil), Regexp) + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/method_handler.rb#14 +YARD::Handlers::C::MethodHandler::MATCH2 = T.let(T.unsafe(nil), Regexp) + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/method_handler.rb#18 +YARD::Handlers::C::MethodHandler::MATCH3 = T.let(T.unsafe(nil), Regexp) + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/mixin_handler.rb#2 +class YARD::Handlers::C::MixinHandler < ::YARD::Handlers::C::Base; end + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/mixin_handler.rb#3 +YARD::Handlers::C::MixinHandler::MATCH = T.let(T.unsafe(nil), Regexp) + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/module_handler.rb#2 +class YARD::Handlers::C::ModuleHandler < ::YARD::Handlers::C::Base; end + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/module_handler.rb#3 +YARD::Handlers::C::ModuleHandler::MATCH1 = T.let(T.unsafe(nil), Regexp) + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/module_handler.rb#4 +YARD::Handlers::C::ModuleHandler::MATCH2 = T.let(T.unsafe(nil), Regexp) + +# Parses comments +# +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/override_comment_handler.rb#3 +class YARD::Handlers::C::OverrideCommentHandler < ::YARD::Handlers::C::Base + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/override_comment_handler.rb#24 + def register_docstring(object, docstring = T.unsafe(nil), stmt = T.unsafe(nil)); end + + # @since 0.8.0 + # + # source://yard//lib/yard/handlers/c/override_comment_handler.rb#28 + def register_file_info(object, file = T.unsafe(nil), line = T.unsafe(nil), comments = T.unsafe(nil)); end +end + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/path_handler.rb#2 +class YARD::Handlers::C::PathHandler < ::YARD::Handlers::C::Base; end + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/path_handler.rb#3 +YARD::Handlers::C::PathHandler::MATCH = T.let(T.unsafe(nil), Regexp) + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/struct_handler.rb#2 +class YARD::Handlers::C::StructHandler < ::YARD::Handlers::C::Base; end + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/struct_handler.rb#3 +YARD::Handlers::C::StructHandler::MATCH = T.let(T.unsafe(nil), Regexp) + +# Keeps track of function bodies for symbol lookup during Ruby method declarations +# +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/symbol_handler.rb#3 +class YARD::Handlers::C::SymbolHandler < ::YARD::Handlers::C::Base; end + +# @since 0.8.0 +# +# source://yard//lib/yard/handlers/c/symbol_handler.rb#4 +YARD::Handlers::C::SymbolHandler::MATCH = T.let(T.unsafe(nil), Regexp) + +# Shared logic between C and Ruby handlers. +# +# source://yard//lib/yard/autoload.rb#68 +module YARD::Handlers::Common; end + +# Shared functionality between Ruby and C method handlers. +# +# source://yard//lib/yard/handlers/common/method_handler.rb#6 +module YARD::Handlers::Common::MethodHandler + # @param obj [MethodObject] + # + # source://yard//lib/yard/handlers/common/method_handler.rb#8 + def add_predicate_return_tag(obj); end +end + +# Raise this error when a handler should exit before completing. +# The exception will be silenced, allowing the next handler(s) in the +# queue to be executed. +# +# @since 0.8.4 +# +# source://yard//lib/yard/handlers/base.rb#8 +class YARD::Handlers::HandlerAborted < ::RuntimeError; end + +# Raised during processing phase when a handler needs to perform +# an operation on an object's namespace but the namespace could +# not be resolved. +# +# source://yard//lib/yard/handlers/base.rb#13 +class YARD::Handlers::NamespaceMissingError < ::YARD::Parser::UndocumentableError + # @return [NamespaceMissingError] a new instance of NamespaceMissingError + # + # source://yard//lib/yard/handlers/base.rb#18 + def initialize(object); end + + # The object the error occurred on + # + # @return [CodeObjects::Base] a code object + # + # source://yard//lib/yard/handlers/base.rb#16 + def object; end + + # The object the error occurred on + # + # @return [CodeObjects::Base] a code object + # + # source://yard//lib/yard/handlers/base.rb#16 + def object=(_arg0); end +end + +# Iterates over all statements in a file and delegates them to the +# {Handlers::Base} objects that are registered to handle the statement. +# +# This class is passed to each handler and keeps overall processing state. +# For example, if the {#visibility} is set in a handler, all following +# statements will have access to this state. This allows "public", +# "protected" and "private" statements to be handled in classes and modules. +# In addition, the {#namespace} can be set during parsing to control +# where objects are being created from. You can also access extra stateful +# properties that any handler can set during the duration of the post +# processing of a file from {#extra_state}. If you need to access state +# across different files, look at {#globals}. +# +# @see Handlers::Base +# +# source://yard//lib/yard/handlers/processor.rb#20 +class YARD::Handlers::Processor + # Creates a new Processor for a +file+. + # + # @param parser [Parser::SourceParser] the parser used to initialize the processor + # @return [Processor] a new instance of Processor + # + # source://yard//lib/yard/handlers/processor.rb#92 + def initialize(parser); end + + # Share state across different handlers inside of a file. + # This attribute is similar to {#visibility}, {#scope}, {#namespace} + # and {#owner}, in that they all maintain state across all handlers + # for the entire source file. Use this attribute to store any data + # your handler might need to save during the parsing of a file. If + # you need to save state across files, see {#globals}. + # + # @return [OpenStruct] an open structure that can store arbitrary data + # @see #globals + # + # source://yard//lib/yard/handlers/processor.rb#88 + def extra_state; end + + # Share state across different handlers inside of a file. + # This attribute is similar to {#visibility}, {#scope}, {#namespace} + # and {#owner}, in that they all maintain state across all handlers + # for the entire source file. Use this attribute to store any data + # your handler might need to save during the parsing of a file. If + # you need to save state across files, see {#globals}. + # + # @return [OpenStruct] an open structure that can store arbitrary data + # @see #globals + # + # source://yard//lib/yard/handlers/processor.rb#88 + def extra_state=(_arg0); end + + # @return [String] the filename + # + # source://yard//lib/yard/handlers/processor.rb#41 + def file; end + + # @return [String] the filename + # + # source://yard//lib/yard/handlers/processor.rb#41 + def file=(_arg0); end + + # Searches for all handlers in {Base.subclasses} that match the +statement+ + # + # @param statement the statement object to match. + # @return [Array<Base>] a list of handlers to process the statement with. + # + # source://yard//lib/yard/handlers/processor.rb#151 + def find_handlers(statement); end + + # Handlers can share state for the entire post processing stage through + # this attribute. Note that post processing stage spans multiple files. + # To share state only within a single file, use {#extra_state} + # + # @example Sharing state among two handlers + # class Handler1 < YARD::Handlers::Ruby::Base + # handles :class + # process { globals.foo = :bar } + # end + # + # class Handler2 < YARD::Handlers::Ruby::Base + # handles :method + # process { puts globals.foo } + # end + # @return [OpenStruct] global shared state for post-processing stage + # @see #extra_state + # + # source://yard//lib/yard/handlers/processor.rb#77 + def globals; end + + # Handlers can share state for the entire post processing stage through + # this attribute. Note that post processing stage spans multiple files. + # To share state only within a single file, use {#extra_state} + # + # @example Sharing state among two handlers + # class Handler1 < YARD::Handlers::Ruby::Base + # handles :class + # process { globals.foo = :bar } + # end + # + # class Handler2 < YARD::Handlers::Ruby::Base + # handles :method + # process { puts globals.foo } + # end + # @return [OpenStruct] global shared state for post-processing stage + # @see #extra_state + # + # source://yard//lib/yard/handlers/processor.rb#77 + def globals=(_arg0); end + + # @return [CodeObjects::NamespaceObject] the current namespace + # + # source://yard//lib/yard/handlers/processor.rb#44 + def namespace; end + + # @return [CodeObjects::NamespaceObject] the current namespace + # + # source://yard//lib/yard/handlers/processor.rb#44 + def namespace=(_arg0); end + + # @return [CodeObjects::Base, nil] unlike the namespace, the owner + # is a non-namespace object that should be stored between statements. + # For instance, when parsing a method body, the {CodeObjects::MethodObject} + # is set as the owner, in case any extra method information is processed. + # + # source://yard//lib/yard/handlers/processor.rb#56 + def owner; end + + # @return [CodeObjects::Base, nil] unlike the namespace, the owner + # is a non-namespace object that should be stored between statements. + # For instance, when parsing a method body, the {CodeObjects::MethodObject} + # is set as the owner, in case any extra method information is processed. + # + # source://yard//lib/yard/handlers/processor.rb#56 + def owner=(_arg0); end + + # Continue parsing the remainder of the files in the +globals.ordered_parser+ + # object. After the remainder of files are parsed, processing will continue + # on the current file. + # + # @return [void] + # @see Parser::OrderedParser + # + # source://yard//lib/yard/handlers/processor.rb#140 + def parse_remaining_files; end + + # @return [Symbol] the parser type (:ruby, :ruby18, :c) + # + # source://yard//lib/yard/handlers/processor.rb#59 + def parser_type; end + + # @return [Symbol] the parser type (:ruby, :ruby18, :c) + # + # source://yard//lib/yard/handlers/processor.rb#59 + def parser_type=(_arg0); end + + # Processes a list of statements by finding handlers to process each + # one. + # + # @param statements [Array] a list of statements + # @return [void] + # + # source://yard//lib/yard/handlers/processor.rb#110 + def process(statements); end + + # @return [Symbol] the current scope (class, instance) + # + # source://yard//lib/yard/handlers/processor.rb#50 + def scope; end + + # @return [Symbol] the current scope (class, instance) + # + # source://yard//lib/yard/handlers/processor.rb#50 + def scope=(_arg0); end + + # @return [Symbol] the current visibility (public, private, protected) + # + # source://yard//lib/yard/handlers/processor.rb#47 + def visibility; end + + # @return [Symbol] the current visibility (public, private, protected) + # + # source://yard//lib/yard/handlers/processor.rb#47 + def visibility=(_arg0); end + + private + + # Returns the handler base class + # + # @return [Base] the base class + # + # source://yard//lib/yard/handlers/processor.rb#172 + def handler_base_class; end + + # The module holding the handlers to be loaded + # + # @return [Module] the module containing the handlers depending on + # {#parser_type}. + # + # source://yard//lib/yard/handlers/processor.rb#180 + def handler_base_namespace; end + + # @return [Boolean] + # + # source://yard//lib/yard/handlers/processor.rb#161 + def handles?(handler, statement); end + + # Loads handlers from {#handler_base_namespace}. This ensures that + # Ruby1.9 handlers are never loaded into 1.8; also lowers the amount + # of modules that are loaded + # + # @return [void] + # + # source://yard//lib/yard/handlers/processor.rb#188 + def load_handlers; end + + class << self + # @private + # @return [Hash] a list of registered parser type extensions + # @since 0.6.0 + # + # source://yard//lib/yard/handlers/processor.rb#33 + def namespace_for_handler; end + + # Registers a new namespace for handlers of the given type. + # + # @since 0.6.0 + # + # source://yard//lib/yard/handlers/processor.rb#24 + def register_handler_namespace(type, ns); end + end +end + +# All Ruby handlers +# +# source://yard//lib/yard/autoload.rb#92 +module YARD::Handlers::Ruby; end + +# Handles alias and alias_method calls +# +# source://yard//lib/yard/handlers/ruby/alias_handler.rb#3 +class YARD::Handlers::Ruby::AliasHandler < ::YARD::Handlers::Ruby::Base; end + +# Handles +attr_*+ statements in modules/classes +# +# source://yard//lib/yard/handlers/ruby/attribute_handler.rb#3 +class YARD::Handlers::Ruby::AttributeHandler < ::YARD::Handlers::Ruby::Base + protected + + # Strips out any non-essential arguments from the attr statement. + # + # @param params [Array<Parser::Ruby::AstNode>] a list of the parameters + # in the attr call. + # @raise [Parser::UndocumentableError] if the arguments are not valid. + # @return [Array<String>] the validated attribute names + # + # source://yard//lib/yard/handlers/ruby/attribute_handler.rb#75 + def validated_attribute_names(params); end +end + +# This is the base handler class for the new-style (1.9) Ruby parser. +# All handlers that subclass this base class will be used when the +# new-style parser is used. For implementing legacy handlers, see +# {Legacy::Base}. +# +# @abstract See {Handlers::Base} for subclassing information. +# @see Handlers::Base +# @see Legacy::Base +# +# source://yard//lib/yard/handlers/ruby/base.rb#65 +class YARD::Handlers::Ruby::Base < ::YARD::Handlers::Base + include ::YARD::Parser::Ruby + extend ::YARD::Parser::Ruby + + # source://yard//lib/yard/handlers/ruby/base.rb#144 + def call_params; end + + # source://yard//lib/yard/handlers/ruby/base.rb#155 + def caller_method; end + + # source://yard//lib/yard/handlers/ruby/base.rb#135 + def parse_block(inner_node, opts = T.unsafe(nil)); end + + class << self + # @return [Boolean] whether or not an {AstNode} object should be + # handled by this handler + # + # source://yard//lib/yard/handlers/ruby/base.rb#113 + def handles?(node); end + + # Matcher for handling a node with a specific meta-type. An {AstNode} + # has a {AstNode#type} to define its type but can also be associated + # with a set of types. For instance, +:if+ and +:unless+ are both + # of the meta-type +:condition+. + # + # A meta-type is any method on the {AstNode} class ending in "?", + # though you should not include the "?" suffix in your declaration. + # Some examples are: "condition", "call", "literal", "kw", "token", + # "ref". + # + # @example Handling any conditional statement (if, unless) + # handles meta_type(:condition) + # @param type [Symbol] the meta-type to match. A meta-type can be + # any method name + "?" that {AstNode} responds to. + # @return [void] + # + # source://yard//lib/yard/handlers/ruby/base.rb#105 + def meta_type(type); end + + # Matcher for handling any type of method call. Method calls can + # be expressed by many {AstNode} types depending on the syntax + # with which it is called, so YARD allows you to use this matcher + # to simplify matching a method call. + # + # @example Match the "describe" method call + # handles method_call(:describe) + # + # # The following will be matched: + # # describe(...) + # # object.describe(...) + # # describe "argument" do ... end + # @param name [#to_s] matches the method call of this name + # @return [void] + # + # source://yard//lib/yard/handlers/ruby/base.rb#86 + def method_call(name = T.unsafe(nil)); end + end +end + +# Matches if/unless conditions inside classes and attempts to process only +# one branch (by evaluating the condition if possible). +# +# @example A simple class conditional +# class Foo +# if 0 +# # This method is ignored +# def xyz; end +# end +# end +# +# source://yard//lib/yard/handlers/ruby/class_condition_handler.rb#12 +class YARD::Handlers::Ruby::ClassConditionHandler < ::YARD::Handlers::Ruby::Base + protected + + # Parses the condition part of the if/unless statement + # + # @return [true, false, nil] true if the condition can be definitely + # parsed to true, false if not, and nil if the condition cannot be + # parsed with certainty (it's dynamic) + # + # source://yard//lib/yard/handlers/ruby/class_condition_handler.rb#36 + def parse_condition; end + + # source://yard//lib/yard/handlers/ruby/class_condition_handler.rb#87 + def parse_else_block; end + + # source://yard//lib/yard/handlers/ruby/class_condition_handler.rb#83 + def parse_then_block; end +end + +# Handles class declarations +# +# source://yard//lib/yard/handlers/ruby/class_handler.rb#3 +class YARD::Handlers::Ruby::ClassHandler < ::YARD::Handlers::Ruby::Base + include ::YARD::Handlers::Ruby::StructHandlerMethods + + private + + # source://yard//lib/yard/handlers/ruby/class_handler.rb#73 + def create_struct_superclass(superclass, superclass_def); end + + # Extract the parameters from the Struct.new AST node, returning them as a list + # of strings + # + # @param superclass [MethodCallNode] the AST node for the Struct.new call + # @return [Array<String>] the member names to generate methods for + # + # source://yard//lib/yard/handlers/ruby/class_handler.rb#67 + def extract_parameters(superclass); end + + # source://yard//lib/yard/handlers/ruby/class_handler.rb#92 + def parse_struct_superclass(klass, superclass); end + + # source://yard//lib/yard/handlers/ruby/class_handler.rb#98 + def parse_superclass(superclass); end + + # source://yard//lib/yard/handlers/ruby/class_handler.rb#82 + def struct_superclass_name(superclass); end +end + +# Handles a class variable (@@variable) +# +# source://yard//lib/yard/handlers/ruby/class_variable_handler.rb#3 +class YARD::Handlers::Ruby::ClassVariableHandler < ::YARD::Handlers::Ruby::Base; end + +# Handles any lone comment statement in a Ruby file +# +# source://yard//lib/yard/handlers/ruby/comment_handler.rb#3 +class YARD::Handlers::Ruby::CommentHandler < ::YARD::Handlers::Ruby::Base; end + +# Handles any constant assignment +# +# source://yard//lib/yard/handlers/ruby/constant_handler.rb#3 +class YARD::Handlers::Ruby::ConstantHandler < ::YARD::Handlers::Ruby::Base + include ::YARD::Handlers::Ruby::StructHandlerMethods + + private + + # Extract the parameters from the Struct.new AST node, returning them as a list + # of strings + # + # @param superclass [MethodCallNode] the AST node for the Struct.new call + # @return [Array<String>] the member names to generate methods for + # + # source://yard//lib/yard/handlers/ruby/constant_handler.rb#49 + def extract_parameters(superclass); end + + # source://yard//lib/yard/handlers/ruby/constant_handler.rb#21 + def process_constant(statement); end + + # source://yard//lib/yard/handlers/ruby/constant_handler.rb#33 + def process_structclass(statement); end +end + +# Handles automatic detection of dsl-style methods +# +# source://yard//lib/yard/handlers/ruby/dsl_handler.rb#6 +class YARD::Handlers::Ruby::DSLHandler < ::YARD::Handlers::Ruby::Base + include ::YARD::Handlers::Ruby::DSLHandlerMethods +end + +# source://yard//lib/yard/handlers/ruby/dsl_handler_methods.rb#5 +module YARD::Handlers::Ruby::DSLHandlerMethods + include ::YARD::CodeObjects + include ::YARD::Parser + + # source://yard//lib/yard/handlers/ruby/dsl_handler_methods.rb#14 + def handle_comments; end + + # source://yard//lib/yard/handlers/ruby/dsl_handler_methods.rb#48 + def register_docstring(object, docstring = T.unsafe(nil), stmt = T.unsafe(nil)); end + + private + + # source://yard//lib/yard/handlers/ruby/dsl_handler_methods.rb#72 + def find_attached_macro; end + + # @return [Boolean] + # + # source://yard//lib/yard/handlers/ruby/dsl_handler_methods.rb#54 + def implicit_docstring?; end + + # @return [Boolean] whether caller method matches a macro or + # its alias names. + # + # source://yard//lib/yard/handlers/ruby/dsl_handler_methods.rb#85 + def macro_name_matches(macro); end + + # source://yard//lib/yard/handlers/ruby/dsl_handler_methods.rb#59 + def method_name; end + + # source://yard//lib/yard/handlers/ruby/dsl_handler_methods.rb#68 + def method_signature; end +end + +# source://yard//lib/yard/handlers/ruby/dsl_handler_methods.rb#9 +YARD::Handlers::Ruby::DSLHandlerMethods::IGNORE_METHODS = T.let(T.unsafe(nil), Hash) + +# Helper methods to assist with processing decorators. +# +# source://yard//lib/yard/handlers/ruby/decorator_handler_methods.rb#3 +module YARD::Handlers::Ruby::DecoratorHandlerMethods + # @overload process_decorator + # + # source://yard//lib/yard/handlers/ruby/decorator_handler_methods.rb#43 + def process_decorator(*nodes, &block); end + + private + + # @yield [method, node, name.to_sym] + # + # source://yard//lib/yard/handlers/ruby/decorator_handler_methods.rb#78 + def process_decorator_parameter(node, opts = T.unsafe(nil), &block); end +end + +# Handles 'raise' calls inside methods +# +# source://yard//lib/yard/handlers/ruby/exception_handler.rb#3 +class YARD::Handlers::Ruby::ExceptionHandler < ::YARD::Handlers::Ruby::Base; end + +# Handles 'extend' call to include modules into the class scope of another +# +# @see MixinHandler +# +# source://yard//lib/yard/handlers/ruby/extend_handler.rb#4 +class YARD::Handlers::Ruby::ExtendHandler < ::YARD::Handlers::Ruby::MixinHandler + # source://yard//lib/yard/handlers/ruby/extend_handler.rb#8 + def scope; end + + private + + # source://yard//lib/yard/handlers/ruby/extend_handler.rb#12 + def process_mixin(mixin); end +end + +# To implement a custom handler matcher, subclass this class and implement +# {#matches?} to return whether a node matches the handler. +# +# @example A Custom Handler Matcher Extension +# # Implements a handler that checks for a specific string +# # in the node's source. +# class MyExtension < HandlesExtension +# def matches?(node) node.source.include?(name) end +# end +# +# # This handler will handle any node where the source includes 'foo' +# class MyHandler < Handlers::Ruby::Base +# handles MyExtension.new('foo') +# end +# +# source://yard//lib/yard/handlers/ruby/base.rb#19 +class YARD::Handlers::Ruby::HandlesExtension + # Creates a new extension with a specific matcher value +name+ + # + # @param name [Object] the matcher value to check against {#matches?} + # @return [HandlesExtension] a new instance of HandlesExtension + # + # source://yard//lib/yard/handlers/ruby/base.rb#22 + def initialize(name); end + + # Tests if the node matches the handler + # + # @param node [Parser::Ruby::AstNode] a Ruby node + # @raise [NotImplementedError] + # @return [Boolean] whether the +node+ matches the handler + # + # source://yard//lib/yard/handlers/ruby/base.rb#27 + def matches?(node); end + + protected + + # @return [String] the extension matcher value + # + # source://yard//lib/yard/handlers/ruby/base.rb#34 + def name; end +end + +# Handlers for old Ruby 1.8 parser +# +# source://yard//lib/yard/autoload.rb#93 +module YARD::Handlers::Ruby::Legacy; end + +# Handles alias and alias_method calls +# +# source://yard//lib/yard/handlers/ruby/legacy/alias_handler.rb#3 +class YARD::Handlers::Ruby::Legacy::AliasHandler < ::YARD::Handlers::Ruby::Legacy::Base; end + +# Handles +attr_*+ statements in modules/classes +# +# source://yard//lib/yard/handlers/ruby/legacy/attribute_handler.rb#3 +class YARD::Handlers::Ruby::Legacy::AttributeHandler < ::YARD::Handlers::Ruby::Legacy::Base; end + +# This is the base handler for the legacy parser. To implement a legacy +# handler, subclass this class. +# +# @abstract See {Handlers::Base} for subclassing information. +# +# source://yard//lib/yard/handlers/ruby/legacy/base.rb#9 +class YARD::Handlers::Ruby::Legacy::Base < ::YARD::Handlers::Base + include ::YARD::Parser::Ruby::Legacy::RubyToken + + # source://yard//lib/yard/handlers/ruby/legacy/base.rb#44 + def call_params; end + + # source://yard//lib/yard/handlers/ruby/legacy/base.rb#53 + def caller_method; end + + # Parses a statement's block with a set of state values. If the + # statement has no block, nothing happens. A description of state + # values can be found at {Handlers::Base#push_state} + # + # @option opts + # @option opts + # @option opts + # @param opts [Hash] State options + # @see Handlers::Base#push_state #push_state + # + # source://yard//lib/yard/handlers/ruby/legacy/base.rb#35 + def parse_block(opts = T.unsafe(nil)); end + + private + + # Extracts method information for macro expansion only + # + # @return [Array<String,Array<Array<String>>>] the method name followed by method + # arguments (name and optional value) + # @todo This is a duplicate implementation of {MethodHandler}. Refactor. + # + # source://yard//lib/yard/handlers/ruby/legacy/base.rb#68 + def extract_method_details; end + + # The string value of a token. For example, the return value for the symbol :sym + # would be :sym. The return value for a string +"foo #{ bar}"+ would be the literal + # +"foo #{ bar}"+ without any interpolation. The return value of the identifier + # 'test' would be the same value: 'test'. Here is a list of common types and + # their return values: + # + # @example + # tokval(TokenList.new('"foo"').first) => "foo" + # tokval(TokenList.new(':foo').first) => :foo + # tokval(TokenList.new('CONSTANT').first, RubyToken::TkId) => "CONSTANT" + # tokval(TokenList.new('identifier').first, RubyToken::TkId) => "identifier" + # tokval(TokenList.new('3.25').first) => 3.25 + # tokval(TokenList.new('/xyz/i').first) => /xyz/i + # @param token [Token] The token of the class + # @param accepted_types [Array<Class<Token>>, Symbol] The allowed token types that this token can be. Defaults to [{TkVal}]. + # A list of types would be, for example, [+TkSTRING+, +TkSYMBOL+], to return + # the token's value if it is either of those types. If +TkVal+ is accepted, + # +TkNode+ is also accepted. + # + # Certain symbol keys are allowed to specify multiple types in one fell swoop. + # These symbols are: + # :string => +TkSTRING+, +TkDSTRING+, +TkDXSTRING+ and +TkXSTRING+ + # :attr => +TkSYMBOL+ and +TkSTRING+ + # :identifier => +TkIDENTIFIER, +TkFID+ and +TkGVAR+. + # :number => +TkFLOAT+, +TkINTEGER+ + # @return [Object] if the token is one of the accepted types, in its real value form. + # It should be noted that identifiers and constants are kept in String form. + # @return [nil] if the token is not any of the specified accepted types + # + # source://yard//lib/yard/handlers/ruby/legacy/base.rb#112 + def tokval(token, *accepted_types); end + + # Returns a list of symbols or string values from a statement. + # The list must be a valid comma delimited list, and values + # will only be returned to the end of the list only. + # + # Example: + # attr_accessor :a, 'b', :c, :d => ['a', 'b', 'c', 'd'] + # attr_accessor 'a', UNACCEPTED_TYPE, 'c' => ['a', 'c'] + # + # The tokval list of a {Parser::Ruby::Legacy::TokenList} of the above + # code would be the {#tokval} value of :a, 'b', + # :c and :d. + # + # It should also be noted that this function stops immediately at + # any ruby keyword encountered: + # "attr_accessor :a, :b, :c if x == 5" => ['a', 'b', 'c'] + # + # @param tokenlist [TokenList] The list of tokens to process. + # @param accepted_types [Array<Class<Token>>] passed to {#tokval} + # @return [Array<String>] the list of tokvalues in the list. + # @return [Array<EMPTY>] if there are no symbols or Strings in the list + # @see #tokval + # + # source://yard//lib/yard/handlers/ruby/legacy/base.rb#178 + def tokval_list(tokenlist, *accepted_types); end + + class << self + # @return [Boolean] whether or not a {Parser::Ruby::Legacy::Statement} object should be handled + # by this handler. + # + # source://yard//lib/yard/handlers/ruby/legacy/base.rb#15 + def handles?(stmt); end + end +end + +# Matches if/unless conditions inside classes and attempts to process only +# one branch (by evaluating the condition if possible). +# +# @example A simple class conditional +# class Foo +# if 0 +# # This method is ignored +# def xyz; end +# end +# end +# @since 0.5.4 +# +# source://yard//lib/yard/handlers/ruby/legacy/class_condition_handler.rb#4 +class YARD::Handlers::Ruby::Legacy::ClassConditionHandler < ::YARD::Handlers::Ruby::Legacy::Base + protected + + # Parses the condition part of the if/unless statement + # + # @return [true, false, nil] true if the condition can be definitely + # parsed to true, false if not, and nil if the condition cannot be + # parsed with certainty (it's dynamic) + # @since 0.5.5 + # + # source://yard//lib/yard/handlers/ruby/legacy/class_condition_handler.rb#29 + def parse_condition; end + + # @since 0.5.5 + # + # source://yard//lib/yard/handlers/ruby/legacy/class_condition_handler.rb#73 + def parse_else_block; end + + # @since 0.5.5 + # + # source://yard//lib/yard/handlers/ruby/legacy/class_condition_handler.rb#68 + def parse_then_block; end +end + +# Handles class declarations +# +# source://yard//lib/yard/handlers/ruby/legacy/class_handler.rb#3 +class YARD::Handlers::Ruby::Legacy::ClassHandler < ::YARD::Handlers::Ruby::Legacy::Base + include ::YARD::Handlers::Ruby::StructHandlerMethods + + private + + # source://yard//lib/yard/handlers/ruby/legacy/class_handler.rb#74 + def create_struct_superclass(superclass, superclass_def); end + + # Extracts the parameter list from the Struct.new declaration and returns it + # formatted as a list of member names. Expects the user will have used symbols + # to define the struct member names + # + # @param superstring [String] the string declaring the superclass + # @return [Array<String>] a list of member names + # + # source://yard//lib/yard/handlers/ruby/legacy/class_handler.rb#69 + def extract_parameters(superstring); end + + # source://yard//lib/yard/handlers/ruby/legacy/class_handler.rb#95 + def parse_struct_subclass(klass, superclass_def); end + + # source://yard//lib/yard/handlers/ruby/legacy/class_handler.rb#102 + def parse_superclass(superclass); end + + # source://yard//lib/yard/handlers/ruby/legacy/class_handler.rb#83 + def struct_superclass_name(superclass); end +end + +# Handles a class variable (@@variable) +# +# source://yard//lib/yard/handlers/ruby/legacy/class_variable_handler.rb#3 +class YARD::Handlers::Ruby::Legacy::ClassVariableHandler < ::YARD::Handlers::Ruby::Legacy::Base; end + +# source://yard//lib/yard/handlers/ruby/legacy/class_variable_handler.rb#4 +YARD::Handlers::Ruby::Legacy::ClassVariableHandler::HANDLER_MATCH = T.let(T.unsafe(nil), Regexp) + +# Handles any lone comment statement in a Ruby file +# +# source://yard//lib/yard/handlers/ruby/legacy/comment_handler.rb#3 +class YARD::Handlers::Ruby::Legacy::CommentHandler < ::YARD::Handlers::Ruby::Legacy::Base; end + +# Handles any constant assignment +# +# source://yard//lib/yard/handlers/ruby/legacy/constant_handler.rb#3 +class YARD::Handlers::Ruby::Legacy::ConstantHandler < ::YARD::Handlers::Ruby::Legacy::Base + include ::YARD::Handlers::Ruby::StructHandlerMethods + + private + + # source://yard//lib/yard/handlers/ruby/legacy/constant_handler.rb#25 + def extract_parameters(parameters); end + + # source://yard//lib/yard/handlers/ruby/legacy/constant_handler.rb#20 + def process_structclass(classname, parameters); end +end + +# source://yard//lib/yard/handlers/ruby/legacy/constant_handler.rb#5 +YARD::Handlers::Ruby::Legacy::ConstantHandler::HANDLER_MATCH = T.let(T.unsafe(nil), Regexp) + +# Handles automatic detection of dsl-style methods +# +# source://yard//lib/yard/handlers/ruby/legacy/dsl_handler.rb#7 +class YARD::Handlers::Ruby::Legacy::DSLHandler < ::YARD::Handlers::Ruby::Legacy::Base + include ::YARD::Handlers::Ruby::DSLHandlerMethods +end + +# Handles 'raise' calls inside methods +# +# source://yard//lib/yard/handlers/ruby/legacy/exception_handler.rb#3 +class YARD::Handlers::Ruby::Legacy::ExceptionHandler < ::YARD::Handlers::Ruby::Legacy::Base; end + +# Handles 'extend' call to include modules into the class scope of another +# +# @see MixinHandler +# +# source://yard//lib/yard/handlers/ruby/legacy/extend_handler.rb#3 +class YARD::Handlers::Ruby::Legacy::ExtendHandler < ::YARD::Handlers::Ruby::Legacy::MixinHandler + # source://yard//lib/yard/handlers/ruby/legacy/extend_handler.rb#7 + def scope; end + + private + + # source://yard//lib/yard/handlers/ruby/legacy/extend_handler.rb#11 + def process_mixin(mixin); end +end + +# Handles a method definition +# +# source://yard//lib/yard/handlers/ruby/legacy/method_handler.rb#3 +class YARD::Handlers::Ruby::Legacy::MethodHandler < ::YARD::Handlers::Ruby::Legacy::Base; end + +# Handles the 'include' statement to mixin a module in the instance scope +# +# source://yard//lib/yard/handlers/ruby/legacy/mixin_handler.rb#3 +class YARD::Handlers::Ruby::Legacy::MixinHandler < ::YARD::Handlers::Ruby::Legacy::Base + private + + # @raise [YARD::Parser::UndocumentableError] + # + # source://yard//lib/yard/handlers/ruby/legacy/mixin_handler.rb#26 + def process_mixin(mixin); end +end + +# Handles module_function calls to turn methods into public class methods. +# Also creates a private instance copy of the method. +# +# source://yard//lib/yard/handlers/ruby/legacy/module_function_handler.rb#3 +class YARD::Handlers::Ruby::Legacy::ModuleFunctionHandler < ::YARD::Handlers::Ruby::Legacy::Base; end + +# Handles the declaration of a module +# +# source://yard//lib/yard/handlers/ruby/legacy/module_handler.rb#3 +class YARD::Handlers::Ruby::Legacy::ModuleHandler < ::YARD::Handlers::Ruby::Legacy::Base; end + +# Sets visibility of a class method to private. +# +# source://yard//lib/yard/handlers/ruby/legacy/private_class_method_handler.rb#3 +class YARD::Handlers::Ruby::Legacy::PrivateClassMethodHandler < ::YARD::Handlers::Ruby::Legacy::Base + private + + # source://yard//lib/yard/handlers/ruby/legacy/private_class_method_handler.rb#15 + def privatize_class_method(name); end +end + +# Sets visibility of a constant (class, module, const) +# +# source://yard//lib/yard/handlers/ruby/legacy/private_constant_handler.rb#3 +class YARD::Handlers::Ruby::Legacy::PrivateConstantHandler < ::YARD::Handlers::Ruby::Legacy::Base + private + + # source://yard//lib/yard/handlers/ruby/legacy/private_constant_handler.rb#15 + def privatize_constant(name); end +end + +# Handles 'private', 'protected', and 'public' calls. +# +# source://yard//lib/yard/handlers/ruby/legacy/visibility_handler.rb#3 +class YARD::Handlers::Ruby::Legacy::VisibilityHandler < ::YARD::Handlers::Ruby::Legacy::Base; end + +# Handles 'yield' calls +# +# source://yard//lib/yard/handlers/ruby/legacy/yield_handler.rb#3 +class YARD::Handlers::Ruby::Legacy::YieldHandler < ::YARD::Handlers::Ruby::Legacy::Base; end + +# source://yard//lib/yard/handlers/ruby/base.rb#37 +class YARD::Handlers::Ruby::MethodCallWrapper < ::YARD::Handlers::Ruby::HandlesExtension + # @return [Boolean] + # + # source://yard//lib/yard/handlers/ruby/base.rb#38 + def matches?(node); end +end + +# Handles a conditional inside a method +# +# source://yard//lib/yard/handlers/ruby/method_condition_handler.rb#3 +class YARD::Handlers::Ruby::MethodConditionHandler < ::YARD::Handlers::Ruby::Base; end + +# Handles a method definition +# +# source://yard//lib/yard/handlers/ruby/method_handler.rb#3 +class YARD::Handlers::Ruby::MethodHandler < ::YARD::Handlers::Ruby::Base + include ::YARD::Handlers::Common::MethodHandler + + # source://yard//lib/yard/handlers/ruby/method_handler.rb#69 + def format_args; end +end + +# Handles the 'include' statement to mixin a module in the instance scope +# +# source://yard//lib/yard/handlers/ruby/mixin_handler.rb#3 +class YARD::Handlers::Ruby::MixinHandler < ::YARD::Handlers::Ruby::Base + protected + + # @raise [YARD::Parser::UndocumentableError] + # + # source://yard//lib/yard/handlers/ruby/mixin_handler.rb#25 + def process_mixin(mixin); end + + # source://yard//lib/yard/handlers/ruby/mixin_handler.rb#50 + def recipient(mixin); end +end + +# Handles module_function calls to turn methods into public class methods. +# Also creates a private instance copy of the method. +# +# source://yard//lib/yard/handlers/ruby/module_function_handler.rb#4 +class YARD::Handlers::Ruby::ModuleFunctionHandler < ::YARD::Handlers::Ruby::Base + include ::YARD::Handlers::Ruby::DecoratorHandlerMethods + + # source://yard//lib/yard/handlers/ruby/module_function_handler.rb#34 + def make_module_function(instance_method, namespace); end +end + +# Handles the declaration of a module +# +# source://yard//lib/yard/handlers/ruby/module_handler.rb#3 +class YARD::Handlers::Ruby::ModuleHandler < ::YARD::Handlers::Ruby::Base; end + +# Sets visibility of a class method to private. +# +# source://yard//lib/yard/handlers/ruby/private_class_method_handler.rb#3 +class YARD::Handlers::Ruby::PrivateClassMethodHandler < ::YARD::Handlers::Ruby::Base + include ::YARD::Handlers::Ruby::DecoratorHandlerMethods +end + +# Sets visibility of a constant (class, module, const) +# +# source://yard//lib/yard/handlers/ruby/private_constant_handler.rb#6 +class YARD::Handlers::Ruby::PrivateConstantHandler < ::YARD::Handlers::Ruby::Base + private + + # source://yard//lib/yard/handlers/ruby/private_constant_handler.rb#28 + def privatize_constant(node); end +end + +# Sets visibility of a class method to public. +# +# source://yard//lib/yard/handlers/ruby/public_class_method_handler.rb#3 +class YARD::Handlers::Ruby::PublicClassMethodHandler < ::YARD::Handlers::Ruby::Base + include ::YARD::Handlers::Ruby::DecoratorHandlerMethods +end + +# Helper methods to parse @attr_* tags on a class. +# +# @deprecated The use of +@attr+ tags are deprecated since 0.8.0 in favour of +# the +@!attribute+ directive. This module should not be relied on. +# @since 0.5.6 +# +# source://yard//lib/yard/handlers/ruby/struct_handler_methods.rb#7 +module YARD::Handlers::Ruby::StructHandlerMethods + include ::YARD::CodeObjects + + # Creates the auto-generated docstring for the getter method of a struct's + # member. This is used so the generated documentation will look just like that + # of an attribute defined using attr_accessor. + # + # @param klass [ClassObject] the class whose members we're working with + # @param member [String] the name of the member we're generating documentation for + # @return [String] a docstring to be attached to the getter method for this member + # @since 0.5.6 + # + # source://yard//lib/yard/handlers/ruby/struct_handler_methods.rb#62 + def add_reader_tags(klass, new_method, member); end + + # Creates the auto-generated docstring for the setter method of a struct's + # member. This is used so the generated documentation will look just like that + # of an attribute defined using attr_accessor. + # + # @param klass [ClassObject] the class whose members we're working with + # @param member [String] the name of the member we're generating documentation for + # @return [String] a docstring to be attached to the setter method for this member + # @since 0.5.6 + # + # source://yard//lib/yard/handlers/ruby/struct_handler_methods.rb#77 + def add_writer_tags(klass, new_method, member); end + + # Creates the given member methods and attaches them to the given ClassObject. + # + # @param klass [ClassObject] the class to generate attributes for + # @param members [Array<String>] a list of member names + # @since 0.5.6 + # + # source://yard//lib/yard/handlers/ruby/struct_handler_methods.rb#134 + def create_attributes(klass, members); end + + # Creates and registers a class object with the given name and superclass name. + # Returns it for further use. + # + # @param classname [String] the name of the class + # @param superclass [String] the name of the superclass + # @return [ClassObject] the class object for further processing/method attaching + # @since 0.5.6 + # + # source://yard//lib/yard/handlers/ruby/struct_handler_methods.rb#92 + def create_class(classname, superclass); end + + # Determines whether to create an attribute method based on the class's + # tags. + # + # @param klass [ClassObject] the class whose tags we're searching + # @param member [String] the name of the struct member we need + # @param type [Symbol] (:read) reader method, or writer method? + # @return [Boolean] should the attribute be created? + # @since 0.5.6 + # + # source://yard//lib/yard/handlers/ruby/struct_handler_methods.rb#38 + def create_member_method?(klass, member, type = T.unsafe(nil)); end + + # Creates the getter (reader) method and attaches it to the class as an attribute. + # Also sets up the docstring to prettify the documentation output. + # + # @param klass [ClassObject] the class to attach the method to + # @param member [String] the name of the member we're generating a method for + # @since 0.5.6 + # + # source://yard//lib/yard/handlers/ruby/struct_handler_methods.rb#121 + def create_reader(klass, member); end + + # Creates the setter (writer) method and attaches it to the class as an attribute. + # Also sets up the docstring to prettify the documentation output. + # + # @param klass [ClassObject] the class to attach the method to + # @param member [String] the name of the member we're generating a method for + # @since 0.5.6 + # + # source://yard//lib/yard/handlers/ruby/struct_handler_methods.rb#104 + def create_writer(klass, member); end + + # Extracts the user's defined @member tag for a given class and its member. Returns + # nil if the user did not define a @member tag for this struct entry. + # + # @param klass [ClassObject] the class whose tags we're searching + # @param member [String] the name of the struct member we need + # @param type [Symbol] reader method, or writer method? + # @return [Tags::Tag, nil] the tag matching the request, or nil if not found + # @since 0.5.6 + # + # source://yard//lib/yard/handlers/ruby/struct_handler_methods.rb#17 + def member_tag_for_member(klass, member, type = T.unsafe(nil)); end + + # Retrieves all members defined in @attr* tags + # + # @param klass [ClassObject] the class with the attributes + # @return [Array<String>] the list of members defined as attributes on the class + # @since 0.5.6 + # + # source://yard//lib/yard/handlers/ruby/struct_handler_methods.rb#26 + def members_from_tags(klass); end + + # Gets the return type for the member in a nicely formatted string. Used + # to be injected into auto-generated docstrings. + # + # @param member_tag [Tags::Tag] the tag object to check for types + # @return [String] the user-declared type of the struct member, or [Object] if + # the user did not define a type for this member. + # @since 0.5.6 + # + # source://yard//lib/yard/handlers/ruby/struct_handler_methods.rb#51 + def return_type_from_tag(member_tag); end +end + +# source://yard//lib/yard/handlers/ruby/base.rb#53 +class YARD::Handlers::Ruby::TestNodeWrapper < ::YARD::Handlers::Ruby::HandlesExtension + # @return [Boolean] + # + # source://yard//lib/yard/handlers/ruby/base.rb#54 + def matches?(node); end +end + +# Handles 'private', 'protected', and 'public' calls. +# +# source://yard//lib/yard/handlers/ruby/visibility_handler.rb#3 +class YARD::Handlers::Ruby::VisibilityHandler < ::YARD::Handlers::Ruby::Base + include ::YARD::Handlers::Ruby::DecoratorHandlerMethods +end + +# Handles 'yield' calls +# +# source://yard//lib/yard/handlers/ruby/yield_handler.rb#3 +class YARD::Handlers::Ruby::YieldHandler < ::YARD::Handlers::Ruby::Base; end + +# Namespace for internationalization (i18n) +# +# @since 0.8.0 +# +# source://yard//lib/yard/autoload.rb#151 +module YARD::I18n; end + +# +Locale+ is a unit of translation. It has {#name} and a set of +# messages. +# +# @since 0.8.2 +# +# source://yard//lib/yard/i18n/locale.rb#8 +class YARD::I18n::Locale + # Creates a locale for +name+ locale. + # + # @param name [String] the locale name. + # @return [Locale] a new instance of Locale + # @since 0.8.2 + # + # source://yard//lib/yard/i18n/locale.rb#34 + def initialize(name); end + + # Loads translation messages from +locale_directory+/{#name}.po. + # + # @param locale_directory [String] the directory path that has + # {#name}.po. + # @return [Boolean] +true+ if PO file exists, +false+ otherwise. + # @since 0.8.2 + # + # source://yard//lib/yard/i18n/locale.rb#44 + def load(locale_directory); end + + # @return [String] the name of the locale. It used IETF language + # tag format +[language[_territory][.codeset][@modifier]]+. + # @see http://tools.ietf.org/rfc/bcp/bcp47.txt BCP 47 - Tags for Identifying Languages + # @since 0.8.2 + # + # source://yard//lib/yard/i18n/locale.rb#29 + def name; end + + # @param message [String] the translation target message. + # @return [String] translated message. If translation isn't + # registered, the +message+ is returned. + # @since 0.8.2 + # + # source://yard//lib/yard/i18n/locale.rb#62 + def translate(message); end + + class << self + # @return [String, nil] the default locale name. + # @since 0.8.4 + # + # source://yard//lib/yard/i18n/locale.rb#15 + def default; end + + # @return [String, nil] the default locale name. + # @since 0.8.4 + # + # source://yard//lib/yard/i18n/locale.rb#20 + def default=(locale); end + end +end + +# +Message+ is a translation target message. It has message ID as +# {#id} and some properties {#locations} and {#comments}. +# +# @since 0.8.1 +# +# source://yard//lib/yard/i18n/message.rb#10 +class YARD::I18n::Message + # Creates a translate target message for message ID +id+. + # + # @param id [String] the message ID of the translate target message. + # @return [Message] a new instance of Message + # @since 0.8.1 + # + # source://yard//lib/yard/i18n/message.rb#24 + def initialize(id); end + + # @param other [Message] the +Message+ to be compared. + # @return [Boolean] checks whether this message is equal to another. + # @since 0.8.1 + # + # source://yard//lib/yard/i18n/message.rb#49 + def ==(other); end + + # Adds a comment for the message. + # + # @param comment [String] the comment for the message to be added. + # @return [void] + # @since 0.8.1 + # + # source://yard//lib/yard/i18n/message.rb#43 + def add_comment(comment); end + + # Adds location information for the message. + # + # @param path [String] the path where the message appears. + # @param line [Integer] the line number where the message appears. + # @return [void] + # @since 0.8.1 + # + # source://yard//lib/yard/i18n/message.rb#35 + def add_location(path, line); end + + # @return [Set] the set of comments for the messages. + # @since 0.8.1 + # + # source://yard//lib/yard/i18n/message.rb#19 + def comments; end + + # @return [String] the message ID of the translation target message. + # @since 0.8.1 + # + # source://yard//lib/yard/i18n/message.rb#12 + def id; end + + # path and line number where the message is appeared. + # + # @return [Set] the set of locations. Location is an array of + # @since 0.8.1 + # + # source://yard//lib/yard/i18n/message.rb#16 + def locations; end +end + +# Acts as a container for {Message} objects. +# +# @since 0.8.1 +# +# source://yard//lib/yard/i18n/messages.rb#7 +class YARD::I18n::Messages + include ::Enumerable + + # Creates a new container. + # + # @return [Messages] a new instance of Messages + # @since 0.8.1 + # + # source://yard//lib/yard/i18n/messages.rb#11 + def initialize; end + + # Checks if this messages list is equal to another messages list. + # + # @param other [Messages] the container to compare. + # @return [Boolean] whether +self+ and +other+ is equivalence or not. + # @since 0.8.1 + # + # source://yard//lib/yard/i18n/messages.rb#45 + def ==(other); end + + # @param id [String] the message ID to perform a lookup on. + # @return [Message, nil] a registered message for the given +id+, + # or nil if no message for the ID is found. + # @since 0.8.1 + # + # source://yard//lib/yard/i18n/messages.rb#27 + def [](id); end + + # Enumerates each {Message} in the container. + # + # @return [void] + # @since 0.8.1 + # @yieldparam message [Message] the next message object in + # the enumeration. + # + # source://yard//lib/yard/i18n/messages.rb#20 + def each(&block); end + + # Registers a {Message}, the message ID of which is +id+. If + # corresponding +Message+ is already registered, the previously + # registered object is returned. + # + # @param id [String] the ID of the message to be registered. + # @return [Message] the registered +Message+. + # @since 0.8.1 + # + # source://yard//lib/yard/i18n/messages.rb#37 + def register(id); end + + protected + + # @return [Hash{String=>Message}] the set of message objects + # @since 0.8.1 + # + # source://yard//lib/yard/i18n/messages.rb#53 + def messages; end +end + +# The +PotGenerator+ generates POT format string from +# {CodeObjects::Base} and {CodeObjects::ExtraFileObject}. +# +# == POT and PO +# +# POT is an acronym for "Portable Object Template". POT is a +# template file to create PO file. The extension for POT is +# ".pot". PO file is an acronym for "Portable Object". PO file has +# many parts of message ID (msgid) that is translation target +# message and message string (msgstr) that is translated message +# of message ID. If you want to translate "Hello" in English into +# "Bonjour" in French, "Hello" is the msgid ID and "Bonjour" is +# msgstr. The extension for PO is ".po". +# +# == How to extract msgids +# +# The +PotGenerator+ has two parse methods: +# +# * {#parse_objects} for {CodeObjects::Base} +# * {#parse_files} for {CodeObjects::ExtraFileObject} +# +# {#parse_objects} extracts msgids from docstring and tags of +# {CodeObjects::Base} objects. The docstring of +# {CodeObjects::Base} object is parsed and a paragraph is +# extracted as a msgid. Tag name and tag text are extracted as +# msgids from a tag. +# +# {#parse_files} extracts msgids from +# {CodeObjects::ExtraFileObject} objects. The file content of +# {CodeObjects::ExtraFileObject} object is parsed and a paragraph +# is extracted as a msgid. +# +# == Usage +# +# To create a .pot file by +PotGenerator+, instantiate a +# +PotGenerator+ with a relative working directory path from a +# directory path that has created .pot file, parse +# {CodeObjects::Base} objects and {CodeObjects::ExtraFileObject} +# objects, generate a POT and write the generated POT to a .pot +# file. The relative working directory path is ".." when the +# working directory path is "." and the POT is wrote into +# "po/yard.pot". +# +# @example Generate a .pot file +# po_file_path = "po/yard.pot" +# po_file_directory_pathname = Pathname.new(po_file_path).directory) +# working_directory_pathname = Pathname.new(".") +# relative_base_path = working_directory_pathname.relative_path_from(po_file_directory_pathname).to_s +# # relative_base_path -> ".." +# generator = YARD::I18n::PotGenerator.new(relative_base_path) +# generator.parse_objects(objects) +# generator.parse_files(files) +# pot = generator.generate +# po_file_directory_pathname.mkpath +# File.open(po_file_path, "w") do |pot_file| +# pot_file.print(pot) +# end +# @see http://www.gnu.org/software/gettext/manual/html_node/PO-Files.html GNU gettext manual about details of PO file +# @since 0.8.0 +# +# source://yard//lib/yard/i18n/pot_generator.rb#65 +class YARD::I18n::PotGenerator + # Creates a POT generator that uses +relative_base_path+ to + # generate locations for a msgid. +relative_base_path+ is + # prepended to all locations. + # + # @param relative_base_path [String] a relative working + # directory path from a directory path that has created .pot + # file. + # @return [PotGenerator] a new instance of PotGenerator + # @since 0.8.0 + # + # source://yard//lib/yard/i18n/pot_generator.rb#79 + def initialize(relative_base_path); end + + # Generates POT from +@messages+. + # + # One PO file entry is generated from a +Message+ in + # +@messages+. + # + # Locations of the +Message+ are used to generate the reference + # line that is started with "#: ". +relative_base_path+ passed + # when the generator is created is prepended to each path in location. + # + # Comments of the +Message+ are used to generate the + # translator-comment line that is started with "# ". + # + # @return [String] POT format string + # @since 0.8.0 + # + # source://yard//lib/yard/i18n/pot_generator.rb#122 + def generate; end + + # Extracted messages. + # + # @return [Messages] + # @since 0.8.1 + # + # source://yard//lib/yard/i18n/pot_generator.rb#70 + def messages; end + + # Parses {CodeObjects::ExtraFileObject} objects and stores + # extracted msgids into {#messages}. + # + # @param files [Array<CodeObjects::ExtraFileObject>] a list + # of {CodeObjects::ExtraFileObject} objects to be parsed. + # @return [void] + # @since 0.8.0 + # + # source://yard//lib/yard/i18n/pot_generator.rb#103 + def parse_files(files); end + + # Parses {CodeObjects::Base} objects and stores extracted msgids + # into {#messages} + # + # @param objects [Array<CodeObjects::Base>] a list of + # {CodeObjects::Base} to be parsed. + # @return [void] + # @since 0.8.0 + # + # source://yard//lib/yard/i18n/pot_generator.rb#91 + def parse_objects(objects); end + + private + + # @since 0.8.0 + # + # source://yard//lib/yard/i18n/pot_generator.rb#160 + def current_time; end + + # @since 0.8.0 + # + # source://yard//lib/yard/i18n/pot_generator.rb#183 + def escape_message_id(message_id); end + + # @since 0.8.0 + # + # source://yard//lib/yard/i18n/pot_generator.rb#194 + def extract_documents(object); end + + # @since 0.8.0 + # + # source://yard//lib/yard/i18n/pot_generator.rb#268 + def extract_paragraphs(file); end + + # @since 0.8.0 + # + # source://yard//lib/yard/i18n/pot_generator.rb#235 + def extract_tag_documents(tag); end + + # @since 0.8.0 + # + # source://yard//lib/yard/i18n/pot_generator.rb#242 + def extract_tag_name(tag); end + + # @since 0.8.0 + # + # source://yard//lib/yard/i18n/pot_generator.rb#255 + def extract_tag_text(tag); end + + # @since 0.8.0 + # + # source://yard//lib/yard/i18n/pot_generator.rb#168 + def generate_message(pot, message); end + + # @since 0.8.0 + # + # source://yard//lib/yard/i18n/pot_generator.rb#164 + def generate_pot_creation_date_value; end + + # @since 0.8.0 + # + # source://yard//lib/yard/i18n/pot_generator.rb#136 + def header; end + + # @since 0.8.0 + # + # source://yard//lib/yard/i18n/pot_generator.rb#190 + def register_message(id); end +end + +# Provides some convenient features for translating a text. +# +# @since 0.8.0 +# +# source://yard//lib/yard/i18n/text.rb#5 +class YARD::I18n::Text + # Creates a text object that has translation related features for + # the input text. + # + # @option options + # @param input [#each_line] a text to be translated. + # @param options [Hash] a customizable set of options + # @return [Text] a new instance of Text + # @since 0.8.0 + # + # source://yard//lib/yard/i18n/text.rb#12 + def initialize(input, options = T.unsafe(nil)); end + + # Extracts translation target messages from +@input+. + # + # @return [void] + # @since 0.8.0 + # @yield [:attribute, name, value, line_no] the block that + # receives extracted an attribute in header. It may called many + # times. + # @yield [:paragraph, text, start_line_no] the block that + # receives extracted a paragraph in body. Paragraph is a text + # block separated by one or more empty lines. Empty line is a + # line that contains only zero or more whitespaces. It may + # called many times. + # @yieldparam text [String] the text of extracted paragraph. + # @yieldparam start_line_no [Integer] the start line number of + # extracted paragraph. + # @yieldparam name [String] the name of extracted attribute. + # @yieldparam value [String] the value of extracted attribute. + # @yieldparam line_no [Integer] the defined line number of extracted + # attribute. + # + # source://yard//lib/yard/i18n/text.rb#35 + def extract_messages; end + + # Translates into +locale+. + # + # @param locale [Locale] the translation target locale. + # @return [String] translated text. + # @since 0.8.0 + # + # source://yard//lib/yard/i18n/text.rb#52 + def translate(locale); end + + private + + # @since 0.8.0 + # @yield [part] + # + # source://yard//lib/yard/i18n/text.rb#134 + def emit_attribute_event(match_data, line_no); end + + # @since 0.8.0 + # @yield [part] + # + # source://yard//lib/yard/i18n/text.rb#147 + def emit_empty_line_event(line, line_no); end + + # @since 0.8.0 + # @yield [part] + # + # source://yard//lib/yard/i18n/text.rb#125 + def emit_markup_event(line, line_no); end + + # @since 0.8.0 + # + # source://yard//lib/yard/i18n/text.rb#156 + def emit_paragraph_event(paragraph, paragraph_start_line, line_no, &block); end + + # @since 0.8.0 + # + # source://yard//lib/yard/i18n/text.rb#76 + def parse(&block); end +end + +# Handles console logging for info, warnings and errors. +# Uses the stdlib Logger class in Ruby for all the backend logic. +# +# source://yard//lib/yard/logging.rb#9 +class YARD::Logger < ::Logger + # Creates a new logger + # + # @return [Logger] a new instance of Logger + # + # source://yard//lib/yard/logging.rb#43 + def initialize(pipe, *args); end + + # Displays an unformatted line to the logger output stream. + # + # @param msg [String] the message to display + # @return [void] + # @since 0.8.2 + # + # source://yard//lib/yard/logging.rb#143 + def <<(msg = T.unsafe(nil)); end + + # Prints the backtrace +exc+ to the logger as error data. + # + # @param exc [Array<String>] the backtrace list + # @param level_meth [Symbol] the level to log backtrace at + # @return [void] + # + # source://yard//lib/yard/logging.rb#154 + def backtrace(exc, level_meth = T.unsafe(nil)); end + + # Captures the duration of a block of code for benchmark analysis. Also + # calls {#progress} on the message to display it to the user. + # + # @param msg [String] the message to display + # @param nontty_log [Symbol, nil] the level to log as if the output + # stream is not a TTY. Use +nil+ for no alternate logging. + # @return [void] + # @todo Implement capture storage for reporting of benchmarks + # @yield a block of arbitrary code to benchmark + # + # source://yard//lib/yard/logging.rb#80 + def capture(msg, nontty_log = T.unsafe(nil)); end + + # Clears the progress indicator in the TTY display. + # + # @return [void] + # @since 0.8.2 + # + # source://yard//lib/yard/logging.rb#121 + def clear_progress; end + + # Changes the debug level to DEBUG if $DEBUG is set + # and writes a debugging message. + # + # source://yard//lib/yard/logging.rb#59 + def debug(*args); end + + # Sets the logger level for the duration of the block + # + # @example + # log.enter_level(Logger::ERROR) do + # YARD.parse_string "def x; end" + # end + # @param new_level [Fixnum] the logger level for the duration of the block. + # values can be found in Ruby's Logger class. + # @yield the block with the logger temporarily set to +new_level+ + # + # source://yard//lib/yard/logging.rb#179 + def enter_level(new_level = T.unsafe(nil)); end + + # @return [IO] the IO object being logged to + # @since 0.8.2 + # + # source://yard//lib/yard/logging.rb#17 + def io; end + + # source://yard//lib/yard/logging.rb#18 + def io=(pipe); end + + # Displays an unformatted line to the logger output stream. + # + # @param msg [String] the message to display + # @return [void] + # @since 0.8.2 + # + # source://yard//lib/yard/logging.rb#143 + def print(msg = T.unsafe(nil)); end + + # Displays a progress indicator for a given message. This progress report + # is only displayed on TTY displays, otherwise the message is passed to + # the +nontty_log+ level. + # + # @param msg [String] the message to log + # @param nontty_log [Symbol, nil] the level to log as if the output + # stream is not a TTY. Use +nil+ for no alternate logging. + # @return [void] + # @since 0.8.2 + # + # source://yard//lib/yard/logging.rb#96 + def progress(msg, nontty_log = T.unsafe(nil)); end + + # Displays an unformatted line to the logger output stream, adding + # a newline. + # + # @param msg [String] the message to display + # @return [void] + # @since 0.8.2 + # + # source://yard//lib/yard/logging.rb#132 + def puts(msg = T.unsafe(nil)); end + + # @return [Boolean] whether backtraces should be shown (by default + # this is on). + # + # source://yard//lib/yard/logging.rb#22 + def show_backtraces; end + + # Sets the attribute show_backtraces + # + # @param value the value to set the attribute show_backtraces to. + # + # source://yard//lib/yard/logging.rb#23 + def show_backtraces=(_arg0); end + + # @return [Boolean] whether progress indicators should be shown when + # logging CLIs (by default this is off). + # + # source://yard//lib/yard/logging.rb#27 + def show_progress; end + + # Sets the attribute show_progress + # + # @param value the value to set the attribute show_progress to. + # + # source://yard//lib/yard/logging.rb#34 + def show_progress=(_arg0); end + + # Remembers when a warning occurs and writes a warning message. + # + # source://yard//lib/yard/logging.rb#65 + def warn(*args); end + + # Warns that the Ruby environment does not support continuations. Applies + # to JRuby, Rubinius and MacRuby. This warning will only display once + # per Ruby process. + # + # @deprecated Continuations are no longer needed by YARD 0.8.0+. + # @return [void] + # + # source://yard//lib/yard/logging.rb#167 + def warn_no_continuations; end + + # Returns the value of attribute warned. + # + # source://yard//lib/yard/logging.rb#69 + def warned; end + + # Sets the attribute warned + # + # @param value the value to set the attribute warned to. + # + # source://yard//lib/yard/logging.rb#69 + def warned=(_arg0); end + + private + + # Override this internal Logger method to clear line + # + # source://yard//lib/yard/logging.rb#190 + def add(*args); end + + # source://yard//lib/yard/logging.rb#195 + def clear_line; end + + # Log format (from Logger implementation). Used by Logger internally + # + # source://yard//lib/yard/logging.rb#201 + def format_log(sev, _time, _prog, msg); end + + # source://logger/1.5.3/logger.rb#682 + def print_no_newline(msg); end + + class << self + # The logger instance + # + # @return [Logger] the logger instance + # + # source://yard//lib/yard/logging.rb#38 + def instance(pipe = T.unsafe(nil)); end + end +end + +# The list of characters displayed beside the progress bar to indicate +# "movement". +# +# @since 0.8.2 +# +# source://yard//lib/yard/logging.rb#13 +YARD::Logger::PROGRESS_INDICATORS = T.let(T.unsafe(nil), Array) + +# Generalized options class for passing around large amounts of options between objects. +# +# The options class exists for better visibility and documentability of options being +# passed through to other objects. Because YARD has parser and template architectures +# that are heavily reliant on options, it is necessary to make these option keys easily +# visible and understood by developers. Since the options class is more than just a +# basic Hash, the subclass can provide aliasing and convenience methods to simplify +# option property access, and, if needed, support backward-compatibility for deprecated +# key names. +# +# == Hash and OpenStruct-like Access +# +# Although the options class allows for Hash-like access (<tt>opts[:key]</tt>), the recommended +# mechanism for accessing an option key will be via standard method calls on attributes +# +# The options class can also act as an open ended key value storage structure (like a +# Hash or OpenStruct), and allows for setting and getting of unregistered option keys. +# This methodology is not recommended, however, and is only supported for backward +# compatibility inside YARD. Whenever possible, developers should define all keys used +# by an options class. +# +# == Declaring Default Values +# +# Note that the options class can contain default value definitions for certain options, +# but to initialize these defaults, {#reset_defaults} must be called manually after +# initialization; the options object is always created empty until defaults are applied. +# +# @abstract Subclasses should define (and document) custom attributes that are expected +# to be made available as option keys. +# @example Defining an Options class with custom option keys +# class TemplateOptions < YARD::Options +# # @return [Symbol] the output format to generate templates in +# attr_accessor :format +# +# # @return [Symbol] the template to use when generating output +# attr_accessor :template +# end +# @example Initializing default option values +# class TemplateOptions < YARD::Options +# def reset_defaults +# super +# self.format = :html +# self.template = :default +# self.highlight = true +# # ... +# end +# end +# @example Using +default_attr+ to create default attributes +# class TemplateOptions < YARD::Options +# default_attr :format, :html +# default_attr :template, :default +# default_attr :highlight, true +# end +# @example Deprecating an option while still supporting it +# class TemplateOptions < YARD::Options +# # @return [Boolean] if syntax highlighting should be performed on code blocks. +# # Defaults to true. +# attr_accessor :highlight +# +# # @deprecated Use {#highlight} instead. +# # @return [Boolean] if no syntax highlighting should be performs on code blocks. +# # Defaults to false. +# attr_accessor :no_highlight +# def no_highlight=(value) @highlight = !value end +# def no_highlight; !highlight end +# end +# +# source://yard//lib/yard/options.rb#69 +class YARD::Options + # @return [Boolean] whether another Options object equals the + # keys and values of this options object + # + # source://yard//lib/yard/options.rb#157 + def ==(other); end + + # Delegates calls with Hash syntax to actual method with key name + # + # @example Calling on an option key with Hash syntax + # options[:format] # equivalent to: options.format + # @param key [Symbol, String] the option name to access + # @return the value of the option named +key+ + # + # source://yard//lib/yard/options.rb#91 + def [](key); end + + # Delegates setter calls with Hash syntax to the attribute setter with the key name + # + # @example Setting an option with Hash syntax + # options[:format] = :html # equivalent to: options.format = :html + # @param key [Symbol, String] the option to set + # @param value [Object] the value to set for the option + # @return [Object] the value being set + # + # source://yard//lib/yard/options.rb#100 + def []=(key, value); end + + # Deletes an option value for +key+ + # + # @param key [Symbol, String] the key to delete a value for + # @return [Object] the value that was deleted + # + # source://yard//lib/yard/options.rb#207 + def delete(key); end + + # Yields over every option key and value + # + # @return [void] + # @yield [key, value] every option key and value + # @yieldparam key [Symbol] the option key + # @yieldparam value [Object] the option value + # + # source://yard//lib/yard/options.rb#143 + def each; end + + # Inspects the object + # + # source://yard//lib/yard/options.rb#151 + def inspect; end + + # Creates a new options object and sets options hash or object value + # onto that object. + # + # @param opts [Options, Hash] + # @return [Options] the newly created options object + # @see #update + # + # source://yard//lib/yard/options.rb#123 + def merge(opts); end + + # Handles setting and accessing of unregistered keys similar + # to an OpenStruct object. + # + # @note It is not recommended to set and access unregistered keys on + # an Options object. Instead, register the attribute before using it. + # + # source://yard//lib/yard/options.rb#170 + def method_missing(meth, *args, &block); end + + # Resets all values to their defaults. + # + # @abstract Subclasses should override this method to perform custom + # value initialization if not using {default_attr}. Be sure to call + # +super+ so that default initialization can take place. + # @return [void] + # + # source://yard//lib/yard/options.rb#188 + def reset_defaults; end + + # @return [Hash] Converts options object to an options hash. All keys + # will be symbolized. + # + # source://yard//lib/yard/options.rb#129 + def to_hash; end + + # Updates values from an options hash or options object on this object. + # All keys passed should be key names defined by attributes on the class. + # + # @example Updating a set of options on an Options object + # opts.update(:template => :guide, :type => :fulldoc) + # @param opts [Hash, Options] + # @return [self] + # + # source://yard//lib/yard/options.rb#109 + def update(opts); end + + class << self + # Defines an attribute named +key+ and sets a default value for it + # + # @example Defining a default option key + # default_attr :name, 'Default Name' + # default_attr :time, lambda { Time.now } + # @param key [Symbol] the option key name + # @param default [Object, Proc] the default object value. If the default + # value is a proc, it is executed upon initialization. + # + # source://yard//lib/yard/options.rb#80 + def default_attr(key, default); end + end +end + +# The parser namespace holds all parsing engines used by YARD. +# Currently only Ruby and C (Ruby) parsers are implemented. +# +# source://yard//lib/yard/autoload.rb#161 +module YARD::Parser; end + +# Represents the abstract base parser class that parses source code in +# a specific way. A parser should implement {#parse}, {#tokenize} and +# {#enumerator}. +# +# == Registering a Custom Parser +# To register a parser, see {SourceParser.register_parser_type} +# +# @abstract +# @see #parse +# @see #tokenize +# @see #enumerator +# @since 0.5.6 +# +# source://yard//lib/yard/parser/base.rb#16 +class YARD::Parser::Base + # This default constructor does nothing. The subclass is responsible for + # storing the source contents and filename if they are required. + # + # @param source [String] the source contents + # @param filename [String] the name of the file if from disk + # @raise [NotImplementedError] + # @return [Base] a new instance of Base + # @since 0.5.6 + # + # source://yard//lib/yard/parser/base.rb#26 + def initialize(source, filename); end + + # This method should be implemented to return a list of semantic tokens + # representing the source code to be post-processed. Otherwise the method + # should return nil. + # + # @abstract + # @return [Array] a list of semantic tokens representing the source code + # to be post-processed + # @return [nil] if no post-processing should be done + # @since 0.5.6 + # + # source://yard//lib/yard/parser/base.rb#52 + def enumerator; end + + # This method should be implemented to parse the source and return itself. + # + # @abstract + # @raise [NotImplementedError] + # @return [Base] this method should return itself + # @since 0.5.6 + # + # source://yard//lib/yard/parser/base.rb#33 + def parse; end + + # This method should be implemented to tokenize given source + # + # @abstract + # @raise [NotImplementedError] + # @return [Array] a list/tree of lexical tokens + # @since 0.5.6 + # + # source://yard//lib/yard/parser/base.rb#40 + def tokenize; end + + class << self + # Convenience method to create a new parser and {#parse} + # + # @since 0.5.6 + # + # source://yard//lib/yard/parser/base.rb#18 + def parse(source, filename = T.unsafe(nil)); end + end +end + +# CRuby Parsing components +# +# source://yard//lib/yard/autoload.rb#162 +module YARD::Parser::C; end + +# source://yard//lib/yard/parser/c/statement.rb#41 +class YARD::Parser::C::BodyStatement < ::YARD::Parser::C::Statement + # Returns the value of attribute comments. + # + # source://yard//lib/yard/parser/c/statement.rb#42 + def comments; end + + # Sets the attribute comments + # + # @param value the value to set the attribute comments to. + # + # source://yard//lib/yard/parser/c/statement.rb#42 + def comments=(_arg0); end +end + +# source://yard//lib/yard/parser/c/c_parser.rb#5 +class YARD::Parser::C::CParser < ::YARD::Parser::Base + # @return [CParser] a new instance of CParser + # + # source://yard//lib/yard/parser/c/c_parser.rb#6 + def initialize(source, file = T.unsafe(nil)); end + + # source://yard//lib/yard/parser/c/c_parser.rb#24 + def enumerator; end + + # source://yard//lib/yard/parser/c/c_parser.rb#19 + def parse; end + + # @raise [NotImplementedError] + # + # source://yard//lib/yard/parser/c/c_parser.rb#28 + def tokenize; end + + private + + # source://yard//lib/yard/parser/c/c_parser.rb#213 + def advance(num = T.unsafe(nil)); end + + # source://yard//lib/yard/parser/c/c_parser.rb#216 + def advance_loop; end + + # source://yard//lib/yard/parser/c/c_parser.rb#195 + def attach_comment(statement); end + + # source://yard//lib/yard/parser/c/c_parser.rb#214 + def back(num = T.unsafe(nil)); end + + # source://yard//lib/yard/parser/c/c_parser.rb#225 + def char(num = T.unsafe(nil)); end + + # source://yard//lib/yard/parser/c/c_parser.rb#96 + def consume_body_statements; end + + # source://yard//lib/yard/parser/c/c_parser.rb#136 + def consume_comment(add_comment = T.unsafe(nil)); end + + # source://yard//lib/yard/parser/c/c_parser.rb#59 + def consume_directive; end + + # source://yard//lib/yard/parser/c/c_parser.rb#47 + def consume_quote(type = T.unsafe(nil)); end + + # source://yard//lib/yard/parser/c/c_parser.rb#73 + def consume_toplevel_statement; end + + # source://yard//lib/yard/parser/c/c_parser.rb#169 + def consume_until(end_char, bracket_level = T.unsafe(nil), brace_level = T.unsafe(nil), add_comment = T.unsafe(nil)); end + + # source://yard//lib/yard/parser/c/c_parser.rb#132 + def consume_whitespace; end + + # source://yard//lib/yard/parser/c/c_parser.rb#227 + def nextchar(num = T.unsafe(nil)); end + + # source://yard//lib/yard/parser/c/c_parser.rb#220 + def nextline; end + + # source://yard//lib/yard/parser/c/c_parser.rb#34 + def parse_toplevel; end + + # source://yard//lib/yard/parser/c/c_parser.rb#226 + def prevchar(num = T.unsafe(nil)); end + + # source://yard//lib/yard/parser/c/c_parser.rb#118 + def strip_non_statement_data; end + + # source://yard//lib/yard/parser/c/c_parser.rb#229 + def struct; end +end + +# source://yard//lib/yard/parser/c/statement.rb#51 +class YARD::Parser::C::Comment < ::YARD::Parser::C::Statement + include ::YARD::Parser::C::CommentParser + + # @return [Comment] a new instance of Comment + # + # source://yard//lib/yard/parser/c/statement.rb#58 + def initialize(source, file = T.unsafe(nil), line = T.unsafe(nil)); end + + # source://yard//lib/yard/parser/c/statement.rb#62 + def comments; end + + # Returns the value of attribute overrides. + # + # source://yard//lib/yard/parser/c/statement.rb#55 + def overrides; end + + # Sets the attribute overrides + # + # @param value the value to set the attribute overrides to. + # + # source://yard//lib/yard/parser/c/statement.rb#55 + def overrides=(_arg0); end + + # Returns the value of attribute statement. + # + # source://yard//lib/yard/parser/c/statement.rb#56 + def statement; end + + # Sets the attribute statement + # + # @param value the value to set the attribute statement to. + # + # source://yard//lib/yard/parser/c/statement.rb#56 + def statement=(_arg0); end + + # Returns the value of attribute type. + # + # source://yard//lib/yard/parser/c/statement.rb#54 + def type; end + + # Sets the attribute type + # + # @param value the value to set the attribute type to. + # + # source://yard//lib/yard/parser/c/statement.rb#54 + def type=(_arg0); end +end + +# source://yard//lib/yard/parser/c/comment_parser.rb#5 +module YARD::Parser::C::CommentParser + protected + + # source://yard//lib/yard/parser/c/comment_parser.rb#8 + def parse_comments(comments); end + + private + + # source://yard//lib/yard/parser/c/comment_parser.rb#42 + def parse_callseq(comments); end + + # source://yard//lib/yard/parser/c/comment_parser.rb#30 + def parse_overrides(comments); end + + # source://yard//lib/yard/parser/c/comment_parser.rb#87 + def parse_types(types); end + + # source://yard//lib/yard/parser/c/comment_parser.rb#126 + def remove_private_comments(comment); end +end + +# source://yard//lib/yard/parser/c/statement.rb#5 +class YARD::Parser::C::Statement + # @return [Statement] a new instance of Statement + # + # source://yard//lib/yard/parser/c/statement.rb#16 + def initialize(source, file = T.unsafe(nil), line = T.unsafe(nil)); end + + # Returns the value of attribute comments_hash_flag. + # + # source://yard//lib/yard/parser/c/statement.rb#14 + def comments_hash_flag; end + + # Sets the attribute comments_hash_flag + # + # @param value the value to set the attribute comments_hash_flag to. + # + # source://yard//lib/yard/parser/c/statement.rb#14 + def comments_hash_flag=(_arg0); end + + # source://yard//lib/yard/parser/c/statement.rb#26 + def comments_range; end + + # Returns the value of attribute file. + # + # source://yard//lib/yard/parser/c/statement.rb#8 + def file; end + + # Sets the attribute file + # + # @param value the value to set the attribute file to. + # + # source://yard//lib/yard/parser/c/statement.rb#8 + def file=(_arg0); end + + # source://yard//lib/yard/parser/c/statement.rb#30 + def first_line; end + + # @deprecated Groups are now defined by directives + # @see Tags::GroupDirective + # + # source://yard//lib/yard/parser/c/statement.rb#12 + def group; end + + # @deprecated Groups are now defined by directives + # @see Tags::GroupDirective + # + # source://yard//lib/yard/parser/c/statement.rb#12 + def group=(_arg0); end + + # Returns the value of attribute line. + # + # source://yard//lib/yard/parser/c/statement.rb#7 + def line; end + + # Sets the attribute line + # + # @param value the value to set the attribute line to. + # + # source://yard//lib/yard/parser/c/statement.rb#7 + def line=(_arg0); end + + # source://yard//lib/yard/parser/c/statement.rb#22 + def line_range; end + + # source://yard//lib/yard/parser/c/statement.rb#36 + def show; end + + # source://yard//lib/yard/parser/c/statement.rb#30 + def signature; end + + # Returns the value of attribute source. + # + # source://yard//lib/yard/parser/c/statement.rb#6 + def source; end + + # Sets the attribute source + # + # @param value the value to set the attribute source to. + # + # source://yard//lib/yard/parser/c/statement.rb#6 + def source=(_arg0); end +end + +# source://yard//lib/yard/parser/c/statement.rb#45 +class YARD::Parser::C::ToplevelStatement < ::YARD::Parser::C::Statement + # Returns the value of attribute block. + # + # source://yard//lib/yard/parser/c/statement.rb#46 + def block; end + + # Sets the attribute block + # + # @param value the value to set the attribute block to. + # + # source://yard//lib/yard/parser/c/statement.rb#46 + def block=(_arg0); end + + # Returns the value of attribute comments. + # + # source://yard//lib/yard/parser/c/statement.rb#48 + def comments; end + + # Sets the attribute comments + # + # @param value the value to set the attribute comments to. + # + # source://yard//lib/yard/parser/c/statement.rb#48 + def comments=(_arg0); end + + # Returns the value of attribute declaration. + # + # source://yard//lib/yard/parser/c/statement.rb#47 + def declaration; end + + # Sets the attribute declaration + # + # @param value the value to set the attribute declaration to. + # + # source://yard//lib/yard/parser/c/statement.rb#47 + def declaration=(_arg0); end +end + +# Responsible for parsing a list of files in order. The +# {#parse} method of this class can be called from the +# {SourceParser#globals} globals state list to re-enter +# parsing for the remainder of files in the list recursively. +# +# @see Processor#parse_remaining_files +# +# source://yard//lib/yard/parser/source_parser.rb#21 +class YARD::Parser::OrderedParser + # Creates a new OrderedParser with the global state and a list + # of files to parse. + # + # @note OrderedParser sets itself as the +ordered_parser+ key on + # global_state for later use in {Handlers::Processor}. + # @param global_state [OpenStruct] a structure containing all global + # state during parsing + # @param files [Array<String>] the list of files to parse + # @return [OrderedParser] a new instance of OrderedParser + # + # source://yard//lib/yard/parser/source_parser.rb#33 + def initialize(global_state, files); end + + # @return [Array<String>] the list of remaining files to parse + # + # source://yard//lib/yard/parser/source_parser.rb#23 + def files; end + + # @return [Array<String>] the list of remaining files to parse + # + # source://yard//lib/yard/parser/source_parser.rb#23 + def files=(_arg0); end + + # Parses the remainder of the {#files} list. + # + # @see Processor#parse_remaining_files + # + # source://yard//lib/yard/parser/source_parser.rb#42 + def parse; end +end + +# Raised when the parser sees a Ruby syntax error +# +# source://yard//lib/yard/parser/source_parser.rb#13 +class YARD::Parser::ParserSyntaxError < ::YARD::Parser::UndocumentableError; end + +# Ruby parsing components. +# +# source://yard//lib/yard/autoload.rb#171 +module YARD::Parser::Ruby + # Builds and s-expression by creating {AstNode} objects with + # the type provided by the first argument. + # + # @example An implicit list of keywords + # ast = s(s(:kw, "if"), s(:kw, "else")) + # ast.type # => :list + # @example A method call + # s(:command, s(:var_ref, "mymethod")) + # @overload s + # @overload s + # @see AstNode#initialize + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#25 + def s(*args); end +end + +# An AST node is characterized by a type and a list of children. It +# is most easily represented by the s-expression {#s} such as: +# # AST for "if true; 5 end": +# s(s(:if, s(:var_ref, s(:kw, "true")), s(s(:int, "5")), nil)) +# +# The node type is not considered part of the list, only its children. +# So +ast[0]+ does not refer to the type, but rather the first child +# (or object). Items that are not +AstNode+ objects can be part of the +# list, like Strings or Symbols representing names. To return only +# the AstNode children of the node, use {#children}. +# +# source://yard//lib/yard/parser/ruby/ast_node.rb#41 +class YARD::Parser::Ruby::AstNode < ::Array + # Creates a new AST node + # + # @option opts + # @option opts + # @option opts + # @option opts + # @option opts + # @param type [Symbol] the type of node being created + # @param arr [Array<AstNode>] the child nodes + # @param opts [Hash] any extra line options + # @return [AstNode] a new instance of AstNode + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#153 + def initialize(type, arr, opts = T.unsafe(nil)); end + + # @private + # @return [Boolean] whether the node is equal to another by checking + # the list and type + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#167 + def ==(other); end + + # @return [Boolean] whether the node has a block + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#261 + def block?; end + + # @return [Boolean] whether the node is a method call + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#241 + def call?; end + + # @return [Array<AstNode>] the {AstNode} children inside the node + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#199 + def children; end + + # Returns the value of attribute docstring. + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#43 + def comments; end + + # Returns the value of attribute docstring_hash_flag. + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#42 + def comments_hash_flag; end + + # Returns the value of attribute docstring_range. + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#43 + def comments_range; end + + # @return [Boolean] whether the node is a if/elsif/else condition + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#251 + def condition?; end + + # @return [Boolean] whether the node is a method definition + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#246 + def def?; end + + # Returns the value of attribute docstring. + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#43 + def docstring; end + + # Sets the attribute docstring + # + # @param value the value to set the attribute docstring to. + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#43 + def docstring=(_arg0); end + + # Returns the value of attribute docstring_hash_flag. + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#42 + def docstring_hash_flag; end + + # Sets the attribute docstring_hash_flag + # + # @param value the value to set the attribute docstring_hash_flag to. + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#42 + def docstring_hash_flag=(_arg0); end + + # Returns the value of attribute docstring_range. + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#43 + def docstring_range; end + + # Sets the attribute docstring_range + # + # @param value the value to set the attribute docstring_range to. + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#43 + def docstring_range=(_arg0); end + + # @return [String] the filename the node was parsed from + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#76 + def file; end + + # Sets the attribute file + # + # @param value the value to set the attribute file to. + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#49 + def file=(_arg0); end + + # @return [String] the first line of source represented by the node. + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#278 + def first_line; end + + # @return [String] the full source that the node was parsed from + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#82 + def full_source; end + + # Sets the attribute full_source + # + # @param value the value to set the attribute full_source to. + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#49 + def full_source=(_arg0); end + + # @deprecated Groups are now defined by directives + # @see Tags::GroupDirective + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#47 + def group; end + + # @deprecated Groups are now defined by directives + # @see Tags::GroupDirective + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#47 + def group=(_arg0); end + + # @return [Boolean] whether the node has a {#line_range} set + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#268 + def has_line?; end + + # @return [String] inspects the object + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#323 + def inspect; end + + # Searches through the node and all descendants and returns the + # first node with a type matching any of +node_types+, otherwise + # returns the original node (self). + # + # @example Returns the first method definition in a block of code + # ast = YARD.parse_string("if true; def x; end end").ast + # ast.jump(:def) + # # => s(:def, s(:ident, "x"), s(:params, nil, nil, nil, nil, + # # nil), s(s(:void_stmt, ))) + # @example Returns first 'def' or 'class' statement + # ast = YARD.parse_string("class X; def y; end end") + # ast.jump(:def, :class).first + # # => + # @example If the node types are not present in the AST + # ast = YARD.parse("def x; end") + # ast.jump(:def) + # @param node_types [Array<Symbol>] a set of node types to match + # @return [AstNode] the matching node, if one was found + # @return [self] if no node was found + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#193 + def jump(*node_types); end + + # @return [Boolean] whether the node is a keyword + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#236 + def kw?; end + + # @return [Fixnum] the starting line number of the node + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#273 + def line; end + + # @return [Range] the line range in {#full_source} represented + # by the node + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#70 + def line_range; end + + # Sets the attribute line_range + # + # @param value the value to set the attribute line_range to. + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#49 + def line_range=(_arg0); end + + # @return [Boolean] whether the node is a literal value + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#231 + def literal?; end + + # @return [Boolean] whether the node is a loop + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#256 + def loop?; end + + # @return [AstNode, nil] the node's parent or nil if it is a root node. + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#59 + def parent; end + + # @return [AstNode, nil] the node's parent or nil if it is a root node. + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#59 + def parent=(_arg0); end + + # @return [nil] pretty prints the node + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#290 + def pretty_print(q); end + + # @return [Boolean] whether the node is a reference (variable, + # constant name) + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#226 + def ref?; end + + # @return [String] the first line of source the node represents + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#285 + def show; end + + # @return [String] the parse of {#full_source} that the node represents + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#89 + def source; end + + # Sets the attribute source + # + # @param value the value to set the attribute source to. + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#43 + def source=(_arg0); end + + # @return [Range] the character range in {#full_source} represented + # by the node + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#63 + def source_range; end + + # Sets the attribute source_range + # + # @param value the value to set the attribute source_range to. + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#49 + def source_range=(_arg0); end + + # Returns the value of attribute source. + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#43 + def to_s; end + + # @return [Boolean] whether the node is a token + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#220 + def token?; end + + # Traverses the object and yields each node (including descendants) in order. + # + # @return [void] + # @yield each descendant node in order + # @yieldparam self, [AstNode] or a child/descendant node + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#208 + def traverse; end + + # @return [Symbol] the node's unique symbolic type + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#56 + def type; end + + # @return [Symbol] the node's unique symbolic type + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#56 + def type=(_arg0); end + + # Resets node state in tree + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#331 + def unfreeze; end + + private + + # Resets line information + # + # @return [void] + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#341 + def reset_line_info; end + + class << self + # Finds the node subclass that should be instantiated for a specific + # node type + # + # @param type [Symbol] the node type to find a subclass for + # @return [Class] a subclass of AstNode to instantiate the node with. + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#111 + def node_class_for(type); end + end +end + +# List of all known keywords +# +# @return [Hash] +# +# source://yard//lib/yard/parser/ruby/ast_node.rb#96 +YARD::Parser::Ruby::AstNode::KEYWORDS = T.let(T.unsafe(nil), Hash) + +# source://yard//lib/yard/parser/ruby/ast_node.rb#530 +class YARD::Parser::Ruby::ClassNode < ::YARD::Parser::Ruby::KeywordNode + # source://yard//lib/yard/parser/ruby/ast_node.rb#533 + def block; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#531 + def class_name; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#532 + def superclass; end +end + +# Represents a lone comment block in source +# +# source://yard//lib/yard/parser/ruby/ast_node.rb#548 +class YARD::Parser::Ruby::CommentNode < ::YARD::Parser::Ruby::AstNode + # source://yard//lib/yard/parser/ruby/ast_node.rb#549 + def comments; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#549 + def docstring; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#550 + def docstring=(value); end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#554 + def first_line; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#553 + def source; end +end + +# source://yard//lib/yard/parser/ruby/ast_node.rb#515 +class YARD::Parser::Ruby::ConditionalNode < ::YARD::Parser::Ruby::KeywordNode + # source://yard//lib/yard/parser/ruby/ast_node.rb#517 + def condition; end + + # @return [Boolean] + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#516 + def condition?; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#520 + def else_block; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#518 + def then_block; end + + private + + # @return [Boolean] + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#527 + def cmod?; end +end + +# source://yard//lib/yard/parser/ruby/ast_node.rb#376 +class YARD::Parser::Ruby::KeywordNode < ::YARD::Parser::Ruby::AstNode + # @return [Boolean] + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#377 + def kw?; end +end + +# Handles Ruby parsing in Ruby 1.8. +# +# source://yard//lib/yard/autoload.rb#172 +module YARD::Parser::Ruby::Legacy; end + +# Lexical analyzer for Ruby source +# +# @private +# +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#314 +class YARD::Parser::Ruby::Legacy::RubyLex + include ::YARD::Parser::Ruby::Legacy::RubyToken + include ::IRB + + # @return [RubyLex] a new instance of RubyLex + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#437 + def initialize(content); end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#472 + def char_no; end + + # Returns the value of attribute continue. + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#430 + def continue; end + + # Returns the value of attribute exception_on_syntax_error. + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#463 + def exception_on_syntax_error; end + + # Sets the attribute exception_on_syntax_error + # + # @param value the value to set the attribute exception_on_syntax_error to. + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#463 + def exception_on_syntax_error=(_arg0); end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#476 + def get_read; end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#480 + def getc; end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#484 + def getc_of_rests; end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#488 + def gets; end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1257 + def identify_comment; end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#945 + def identify_gvar; end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1062 + def identify_here_document; end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#980 + def identify_identifier; end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1130 + def identify_number(start); end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1111 + def identify_quotation(initial_char); end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1192 + def identify_string(ltype, quoted = T.unsafe(nil), opener = T.unsafe(nil), initial_char = T.unsafe(nil)); end + + # Returns the value of attribute indent. + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#465 + def indent; end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#510 + def lex; end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#586 + def lex_init; end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#759 + def lex_int2; end + + # Returns the value of attribute lex_state. + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#431 + def lex_state; end + + # io functions + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#468 + def line_no; end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#506 + def peek(i = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#502 + def peek_equal?(str); end + + # Returns the value of attribute read_auto_clean_up. + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#462 + def read_auto_clean_up; end + + # Sets the attribute read_auto_clean_up + # + # @param value the value to set the attribute read_auto_clean_up to. + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#462 + def read_auto_clean_up=(_arg0); end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1280 + def read_escape; end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1242 + def skip_inner_expression; end + + # Returns the value of attribute skip_space. + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#461 + def skip_space; end + + # Sets the attribute skip_space + # + # @param value the value to set the attribute skip_space to. + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#461 + def skip_space=(_arg0); end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#526 + def token; end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#498 + def ungetc(c = T.unsafe(nil)); end + + class << self + # @return [Boolean] + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#433 + def debug?; end + end +end + +# , "when" +# +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#552 +YARD::Parser::Ruby::Legacy::RubyLex::ACCEPTS_COLON = T.let(T.unsafe(nil), Array) + +# Read an input stream character by character. We allow for unlimited +# ungetting of characters just read. +# +# We simplify the implementation greatly by reading the entire input +# into a buffer initially, and then simply traversing it using +# pointers. +# +# We also have to allow for the <i>here document diversion</i>. This +# little gem comes about when the lexer encounters a here +# document. At this point we effectively need to split the input +# stream into two parts: one to read the body of the here document, +# the other to read the rest of the input line where the here +# document was initially encountered. For example, we might have +# +# do_something(<<-A, <<-B) +# stuff +# for +# A +# stuff +# for +# B +# +# When the lexer encounters the <<A, it reads until the end of the +# line, and keeps it around for later. It then reads the body of the +# here document. Once complete, it needs to read the rest of the +# original line, but then skip the here document body. +# +# @private +# +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#343 +class YARD::Parser::Ruby::Legacy::RubyLex::BufferedReader + # @return [BufferedReader] a new instance of BufferedReader + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#346 + def initialize(content); end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#365 + def column; end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#419 + def divert_read_from(reserve); end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#400 + def get_read; end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#369 + def getc; end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#388 + def getc_already_read; end + + # Returns the value of attribute line_num. + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#344 + def line_num; end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#406 + def peek(at); end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#415 + def peek_equal(str); end + + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#392 + def ungetc(_ch); end +end + +# , "when" +# +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#553 +YARD::Parser::Ruby::Legacy::RubyLex::DEINDENT_CLAUSE = T.let(T.unsafe(nil), Array) + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#580 +YARD::Parser::Ruby::Legacy::RubyLex::DLtype2Token = T.let(T.unsafe(nil), Hash) + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#548 +YARD::Parser::Ruby::Legacy::RubyLex::ENINDENT_CLAUSE = T.let(T.unsafe(nil), Array) + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#571 +YARD::Parser::Ruby::Legacy::RubyLex::Ltype2Token = T.let(T.unsafe(nil), Hash) + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#555 +YARD::Parser::Ruby::Legacy::RubyLex::PERCENT_LTYPE = T.let(T.unsafe(nil), Hash) + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#564 +YARD::Parser::Ruby::Legacy::RubyLex::PERCENT_PAREN = T.let(T.unsafe(nil), Hash) + +# Legacy Ruby parser +# +# @since 0.5.6 +# +# source://yard//lib/yard/parser/ruby/legacy/ruby_parser.rb#8 +class YARD::Parser::Ruby::Legacy::RubyParser < ::YARD::Parser::Base + # @return [RubyParser] a new instance of RubyParser + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_parser.rb#9 + def initialize(source, _filename); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_parser.rb#26 + def encoding_line; end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_parser.rb#22 + def enumerator; end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_parser.rb#13 + def parse; end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_parser.rb#27 + def shebang_line; end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_parser.rb#18 + def tokenize; end +end + +# Legacy lexical tokenizer module. +# +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#6 +module YARD::Parser::Ruby::Legacy::RubyToken + # @private + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#125 + def Token(token, value = T.unsafe(nil)); end + + # @private + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#119 + def set_token_position(line, char); end + + class << self + # @private + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#275 + def def_token(token_n, super_token = T.unsafe(nil), reading = T.unsafe(nil), *opts); end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#10 +YARD::Parser::Ruby::Legacy::RubyToken::EXPR_ARG = T.let(T.unsafe(nil), Symbol) + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#7 +YARD::Parser::Ruby::Legacy::RubyToken::EXPR_BEG = T.let(T.unsafe(nil), Symbol) + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#13 +YARD::Parser::Ruby::Legacy::RubyToken::EXPR_CLASS = T.let(T.unsafe(nil), Symbol) + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#12 +YARD::Parser::Ruby::Legacy::RubyToken::EXPR_DOT = T.let(T.unsafe(nil), Symbol) + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#9 +YARD::Parser::Ruby::Legacy::RubyToken::EXPR_END = T.let(T.unsafe(nil), Symbol) + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#11 +YARD::Parser::Ruby::Legacy::RubyToken::EXPR_FNAME = T.let(T.unsafe(nil), Symbol) + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#8 +YARD::Parser::Ruby::Legacy::RubyToken::EXPR_MID = T.let(T.unsafe(nil), Symbol) + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#308 +YARD::Parser::Ruby::Legacy::RubyToken::NEWLINE_TOKEN = T.let(T.unsafe(nil), YARD::Parser::Ruby::Legacy::RubyToken::TkNL) + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::OPASGN < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkALIAS < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkAMPER < ::YARD::Parser::Ruby::Legacy::RubyToken::Token; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkAND < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkANDOP < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkAREF < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkASET < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkASSIGN < ::YARD::Parser::Ruby::Legacy::RubyToken::Token; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkASSOC < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkAT < ::YARD::Parser::Ruby::Legacy::RubyToken::TkUnknownChar; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkBACKQUOTE < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkBACKSLASH < ::YARD::Parser::Ruby::Legacy::RubyToken::TkUnknownChar; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkBACK_REF < ::YARD::Parser::Ruby::Legacy::RubyToken::TkId; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkBEGIN < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkBITAND < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkBITNOT < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkBITOR < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkBITXOR < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkBREAK < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# Represents a block +# +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#54 +class YARD::Parser::Ruby::Legacy::RubyToken::TkBlockContents < ::YARD::Parser::Ruby::Legacy::RubyToken::Token + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#55 + def text; end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkCASE < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkCLASS < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkCMP < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkCOLON < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkCOLON2 < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkCOLON3 < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkCOMMA < ::YARD::Parser::Ruby::Legacy::RubyToken::Token; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkCOMMENT < ::YARD::Parser::Ruby::Legacy::RubyToken::TkVal; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkCONSTANT < ::YARD::Parser::Ruby::Legacy::RubyToken::TkId; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkDEF < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkDEFINED < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkDIV < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkDO < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkDOLLAR < ::YARD::Parser::Ruby::Legacy::RubyToken::TkUnknownChar; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkDOT < ::YARD::Parser::Ruby::Legacy::RubyToken::Token; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkDOT2 < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkDOT3 < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkDREGEXP < ::YARD::Parser::Ruby::Legacy::RubyToken::TkNode; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkDSTRING < ::YARD::Parser::Ruby::Legacy::RubyToken::TkNode; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkDXSTRING < ::YARD::Parser::Ruby::Legacy::RubyToken::TkNode; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkELSE < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkELSIF < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkEND < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkEND_OF_SCRIPT < ::YARD::Parser::Ruby::Legacy::RubyToken::TkWhitespace; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkENSURE < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkEQ < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkEQQ < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#115 +class YARD::Parser::Ruby::Legacy::RubyToken::TkError < ::YARD::Parser::Ruby::Legacy::RubyToken::Token; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkFALSE < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkFID < ::YARD::Parser::Ruby::Legacy::RubyToken::TkId; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkFLOAT < ::YARD::Parser::Ruby::Legacy::RubyToken::TkVal; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkFOR < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkGEQ < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkGT < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkGVAR < ::YARD::Parser::Ruby::Legacy::RubyToken::TkId; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkIDENTIFIER < ::YARD::Parser::Ruby::Legacy::RubyToken::TkId; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkIF < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkIF_MOD < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkIN < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkINTEGER < ::YARD::Parser::Ruby::Legacy::RubyToken::TkVal; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkIVAR < ::YARD::Parser::Ruby::Legacy::RubyToken::TkId; end + +# Represents a Ruby identifier +# +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#72 +class YARD::Parser::Ruby::Legacy::RubyToken::TkId < ::YARD::Parser::Ruby::Legacy::RubyToken::Token + # @return [TkId] a new instance of TkId + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#73 + def initialize(line_no, char_no, name); end + + # Returns the value of attribute name. + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#77 + def name; end +end + +# Represents a Ruby keyword +# +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#81 +class YARD::Parser::Ruby::Legacy::RubyToken::TkKW < ::YARD::Parser::Ruby::Legacy::RubyToken::TkId; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkLABEL < ::YARD::Parser::Ruby::Legacy::RubyToken::TkVal; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkLBRACE < ::YARD::Parser::Ruby::Legacy::RubyToken::Token; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkLBRACK < ::YARD::Parser::Ruby::Legacy::RubyToken::Token; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkLEQ < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkLPAREN < ::YARD::Parser::Ruby::Legacy::RubyToken::Token; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkLSHFT < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkLT < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkMATCH < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkMINUS < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkMOD < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkMODULE < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkMULT < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkNEQ < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkNEXT < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkNIL < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkNL < ::YARD::Parser::Ruby::Legacy::RubyToken::TkWhitespace; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkNMATCH < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkNOT < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkNOTOP < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkNTH_REF < ::YARD::Parser::Ruby::Legacy::RubyToken::TkId; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#63 +class YARD::Parser::Ruby::Legacy::RubyToken::TkNode < ::YARD::Parser::Ruby::Legacy::RubyToken::Token + # Returns the value of attribute node. + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#64 + def node; end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#98 +class YARD::Parser::Ruby::Legacy::RubyToken::TkOPASGN < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + # @return [TkOPASGN] a new instance of TkOPASGN + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#99 + def initialize(line_no, char_no, op); end + + # Returns the value of attribute op. + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#104 + def op; end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkOR < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkOROP < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#92 +class YARD::Parser::Ruby::Legacy::RubyToken::TkOp < ::YARD::Parser::Ruby::Legacy::RubyToken::Token + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#93 + def name; end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkPLUS < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkPOW < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkQUESTION < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkRBRACE < ::YARD::Parser::Ruby::Legacy::RubyToken::Token; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkRBRACK < ::YARD::Parser::Ruby::Legacy::RubyToken::Token; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkREDO < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkREGEXP < ::YARD::Parser::Ruby::Legacy::RubyToken::TkVal; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkRESCUE < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkRETRY < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkRETURN < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkRPAREN < ::YARD::Parser::Ruby::Legacy::RubyToken::Token; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkRSHFT < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# { reading => token_class } +# { reading => [token_class, *opt] } +# +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#271 +YARD::Parser::Ruby::Legacy::RubyToken::TkReading2Token = T.let(T.unsafe(nil), Hash) + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkSELF < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkSEMICOLON < ::YARD::Parser::Ruby::Legacy::RubyToken::Token; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkSPACE < ::YARD::Parser::Ruby::Legacy::RubyToken::TkWhitespace; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkSTAR < ::YARD::Parser::Ruby::Legacy::RubyToken::Token; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkSTRING < ::YARD::Parser::Ruby::Legacy::RubyToken::TkVal; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkSUPER < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkSYMBEG < ::YARD::Parser::Ruby::Legacy::RubyToken::TkId; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkSYMBOL < ::YARD::Parser::Ruby::Legacy::RubyToken::TkVal; end + +# Represents an end statement +# +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#59 +class YARD::Parser::Ruby::Legacy::RubyToken::TkStatementEnd < ::YARD::Parser::Ruby::Legacy::RubyToken::Token + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#60 + def text; end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#272 +YARD::Parser::Ruby::Legacy::RubyToken::TkSymbol2Token = T.let(T.unsafe(nil), Hash) + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkTHEN < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkTRUE < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkUMINUS < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkUNDEF < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkUNLESS < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkUNLESS_MOD < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkUNTIL < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkUNTIL_MOD < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkUPLUS < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp + class << self + def op_name; end + end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#107 +class YARD::Parser::Ruby::Legacy::RubyToken::TkUnknownChar < ::YARD::Parser::Ruby::Legacy::RubyToken::Token + # @return [TkUnknownChar] a new instance of TkUnknownChar + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#108 + def initialize(line_no, char_no, _id); end + + # Returns the value of attribute name. + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#112 + def name; end +end + +# Represents a Ruby value +# +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#85 +class YARD::Parser::Ruby::Legacy::RubyToken::TkVal < ::YARD::Parser::Ruby::Legacy::RubyToken::Token + # @return [TkVal] a new instance of TkVal + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#86 + def initialize(line_no, char_no, value = T.unsafe(nil)); end +end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkWHEN < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkWHILE < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkWHILE_MOD < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# Represents whitespace +# +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#68 +class YARD::Parser::Ruby::Legacy::RubyToken::TkWhitespace < ::YARD::Parser::Ruby::Legacy::RubyToken::Token; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkXSTRING < ::YARD::Parser::Ruby::Legacy::RubyToken::TkVal; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TkYIELD < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::Tk__FILE__ < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::Tk__LINE__ < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TklBEGIN < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 +class YARD::Parser::Ruby::Legacy::RubyToken::TklEND < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end + +# Represents a token in the Ruby lexer +# +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#16 +class YARD::Parser::Ruby::Legacy::RubyToken::Token + # Creates a new Token object + # + # @param line_no [Integer] the line number to initialize the token to + # @param char_no [Integer] the char number to initialize the token to + # @return [Token] a new instance of Token + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#37 + def initialize(line_no, char_no); end + + # @return [Integer] the character number in the file/stream the token + # is located. + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#23 + def char_no; end + + # @return [Symbol] the lexical state at the token + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#29 + def lex_state; end + + # @return [Symbol] the lexical state at the token + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#29 + def lex_state=(_arg0); end + + # @return [Integer] the line number in the file/stream the token is + # located. + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#19 + def line_no; end + + # Chainable way to sets the text attribute + # + # @param text [String] the new text + # @return [Token] this token object + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#47 + def set_text(text); end + + # @return [String] the token text value + # + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#26 + def text; end +end + +# @private +# +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#32 +YARD::Parser::Ruby::Legacy::RubyToken::Token::NO_TEXT = T.let(T.unsafe(nil), String) + +# @private +# +# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#147 +YARD::Parser::Ruby::Legacy::RubyToken::TokenDefinitions = T.let(T.unsafe(nil), Array) + +# source://yard//lib/yard/parser/ruby/legacy/statement.rb#4 +class YARD::Parser::Ruby::Legacy::Statement + # @return [Statement] a new instance of Statement + # + # source://yard//lib/yard/parser/ruby/legacy/statement.rb#14 + def initialize(tokens, block = T.unsafe(nil), comments = T.unsafe(nil)); end + + # Returns the value of attribute block. + # + # source://yard//lib/yard/parser/ruby/legacy/statement.rb#5 + def block; end + + # Returns the value of attribute comments. + # + # source://yard//lib/yard/parser/ruby/legacy/statement.rb#5 + def comments; end + + # Returns the value of attribute comments_hash_flag. + # + # source://yard//lib/yard/parser/ruby/legacy/statement.rb#12 + def comments_hash_flag; end + + # Sets the attribute comments_hash_flag + # + # @param value the value to set the attribute comments_hash_flag to. + # + # source://yard//lib/yard/parser/ruby/legacy/statement.rb#12 + def comments_hash_flag=(_arg0); end + + # Returns the value of attribute comments_range. + # + # source://yard//lib/yard/parser/ruby/legacy/statement.rb#6 + def comments_range; end + + # Sets the attribute comments_range + # + # @param value the value to set the attribute comments_range to. + # + # source://yard//lib/yard/parser/ruby/legacy/statement.rb#6 + def comments_range=(_arg0); end + + # source://yard//lib/yard/parser/ruby/legacy/statement.rb#21 + def first_line; end + + # @deprecated Groups are now defined by directives + # @see Tags::GroupDirective + # + # source://yard//lib/yard/parser/ruby/legacy/statement.rb#10 + def group; end + + # @deprecated Groups are now defined by directives + # @see Tags::GroupDirective + # + # source://yard//lib/yard/parser/ruby/legacy/statement.rb#10 + def group=(_arg0); end + + # source://yard//lib/yard/parser/ruby/legacy/statement.rb#34 + def inspect; end + + # @return [Fixnum] the first line of Ruby source + # + # source://yard//lib/yard/parser/ruby/legacy/statement.rb#46 + def line; end + + # @return [Range<Fixnum>] the first to last lines of Ruby source + # @since 0.5.4 + # + # source://yard//lib/yard/parser/ruby/legacy/statement.rb#52 + def line_range; end + + # source://yard//lib/yard/parser/ruby/legacy/statement.rb#41 + def show; end + + # source://yard//lib/yard/parser/ruby/legacy/statement.rb#21 + def signature; end + + # source://yard//lib/yard/parser/ruby/legacy/statement.rb#27 + def source(include_block = T.unsafe(nil)); end + + # source://yard//lib/yard/parser/ruby/legacy/statement.rb#27 + def to_s(include_block = T.unsafe(nil)); end + + # Returns the value of attribute tokens. + # + # source://yard//lib/yard/parser/ruby/legacy/statement.rb#5 + def tokens; end + + private + + # source://yard//lib/yard/parser/ruby/legacy/statement.rb#58 + def clean_tokens(tokens); end +end + +# source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#4 +class YARD::Parser::Ruby::Legacy::StatementList < ::Array + include ::YARD::Parser::Ruby::Legacy::RubyToken + + # Creates a new statement list + # + # @param content [TokenList, String] the tokens to create the list from + # @return [StatementList] a new instance of StatementList + # + # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#17 + def initialize(content); end + + # Returns the value of attribute encoding_line. + # + # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#7 + def encoding_line; end + + # Sets the attribute encoding_line + # + # @param value the value to set the attribute encoding_line to. + # + # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#7 + def encoding_line=(_arg0); end + + # Returns the value of attribute shebang_line. + # + # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#7 + def shebang_line; end + + # Sets the attribute shebang_line + # + # @param value the value to set the attribute shebang_line to. + # + # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#7 + def shebang_line=(_arg0); end + + private + + # Handles the balancing of parentheses and blocks + # + # @param tk [RubyToken::Token] the token to process + # @return [Boolean] whether or not the current statement's parentheses and blocks + # are balanced after +tk+ + # + # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#362 + def balances?(tk); end + + # Returns the next statement in the token stream + # + # @return [Statement] the next statement + # + # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#45 + def next_statement; end + + # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#34 + def parse_statements; end + + # Returns the next token in the stream that's not a space + # + # @return [RubyToken::Token] the next non-space token + # + # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#388 + def peek_no_space; end + + # Processes a token in a block + # + # @param tk [RubyToken::Token] the token to process + # + # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#194 + def process_block_token(tk); end + + # Processes a complex block-opening token; + # that is, a block opener such as +while+ or +for+ + # that is followed by an expression + # + # @param tk [RubyToken::Token] the token to process + # + # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#293 + def process_complex_block_opener(tk); end + + # Processes a comment token that comes before a statement + # + # @param tk [RubyToken::Token] the token to process + # @return [Boolean] whether or not +tk+ was processed as an initial comment + # + # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#213 + def process_initial_comment(tk); end + + # Processes a simple block-opening token; + # that is, a block opener such as +begin+ or +do+ + # that isn't followed by an expression + # + # @param tk [RubyToken::Token] the token to process + # + # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#268 + def process_simple_block_opener(tk); end + + # Processes a token that closes a statement + # + # @param tk [RubyToken::Token] the token to process + # + # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#305 + def process_statement_end(tk); end + + # Processes a single token + # + # @param tk [RubyToken::Token] the token to process + # + # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#130 + def process_token(tk); end + + # Adds a token to the current statement, + # unless it's a newline, semicolon, or comment + # + # @param tk [RubyToken::Token] the token to process + # + # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#380 + def push_token(tk); end + + # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#111 + def sanitize_block; end + + # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#96 + def sanitize_statement_end; end +end + +# The following list of tokens will require a block to be opened +# if used at the beginning of a statement. +# +# source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#11 +YARD::Parser::Ruby::Legacy::StatementList::OPEN_BLOCK_TOKENS = T.let(T.unsafe(nil), Array) + +# source://yard//lib/yard/parser/ruby/legacy/token_list.rb#4 +class YARD::Parser::Ruby::Legacy::TokenList < ::Array + include ::YARD::Parser::Ruby::Legacy::RubyToken + + # @return [TokenList] a new instance of TokenList + # + # source://yard//lib/yard/parser/ruby/legacy/token_list.rb#7 + def initialize(content = T.unsafe(nil)); end + + # @param tokens [TokenList, Token, String] A list of tokens. If the token is a string, it + # is parsed with {RubyLex}. + # + # source://yard//lib/yard/parser/ruby/legacy/token_list.rb#21 + def <<(*tokens); end + + # @param tokens [TokenList, Token, String] A list of tokens. If the token is a string, it + # is parsed with {RubyLex}. + # + # source://yard//lib/yard/parser/ruby/legacy/token_list.rb#21 + def push(*tokens); end + + # source://yard//lib/yard/parser/ruby/legacy/token_list.rb#37 + def squeeze(type = T.unsafe(nil)); end + + # source://yard//lib/yard/parser/ruby/legacy/token_list.rb#11 + def to_s(full_statement = T.unsafe(nil), show_block = T.unsafe(nil)); end + + private + + # source://yard//lib/yard/parser/ruby/legacy/token_list.rb#53 + def convert_token(lex, tk); end + + # source://yard//lib/yard/parser/ruby/legacy/token_list.rb#44 + def parse_content(content); end +end + +# source://yard//lib/yard/parser/ruby/ast_node.rb#372 +class YARD::Parser::Ruby::LiteralNode < ::YARD::Parser::Ruby::AstNode + # @return [Boolean] + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#373 + def literal?; end +end + +# source://yard//lib/yard/parser/ruby/ast_node.rb#541 +class YARD::Parser::Ruby::LoopNode < ::YARD::Parser::Ruby::KeywordNode + # source://yard//lib/yard/parser/ruby/ast_node.rb#544 + def block; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#543 + def condition; end + + # @return [Boolean] + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#542 + def loop?; end +end + +# source://yard//lib/yard/parser/ruby/ast_node.rb#438 +class YARD::Parser::Ruby::MethodCallNode < ::YARD::Parser::Ruby::AstNode + # source://yard//lib/yard/parser/ruby/ast_node.rb#464 + def block; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#462 + def block_param; end + + # @return [Boolean] + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#439 + def call?; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#442 + def method_name(name_only = T.unsafe(nil)); end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#440 + def namespace; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#453 + def parameters(include_block_param = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#474 + def call_has_paren?; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#470 + def index_adjust; end +end + +# source://yard//lib/yard/parser/ruby/ast_node.rb#479 +class YARD::Parser::Ruby::MethodDefinitionNode < ::YARD::Parser::Ruby::AstNode + def block(*_arg0); end + + # @return [Boolean] + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#481 + def def?; end + + # @return [Boolean] + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#480 + def kw?; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#484 + def method_name(name_only = T.unsafe(nil)); end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#482 + def namespace; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#489 + def parameters(include_block_param = T.unsafe(nil)); end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#495 + def signature; end + + private + + # source://yard//lib/yard/parser/ruby/ast_node.rb#510 + def index_adjust; end +end + +# source://yard//lib/yard/parser/ruby/ast_node.rb#536 +class YARD::Parser::Ruby::ModuleNode < ::YARD::Parser::Ruby::KeywordNode + # source://yard//lib/yard/parser/ruby/ast_node.rb#538 + def block; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#537 + def module_name; end +end + +# source://yard//lib/yard/parser/ruby/ast_node.rb#380 +class YARD::Parser::Ruby::ParameterNode < ::YARD::Parser::Ruby::AstNode + # source://yard//lib/yard/parser/ruby/ast_node.rb#430 + def args_forward; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#426 + def block_param; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#414 + def double_splat_param; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#396 + def named_params; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#406 + def splat_param; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#410 + def unnamed_end_params; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#385 + def unnamed_optional_params; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#381 + def unnamed_required_params; end +end + +# source://yard//lib/yard/parser/ruby/ast_node.rb#360 +class YARD::Parser::Ruby::ReferenceNode < ::YARD::Parser::Ruby::AstNode + # source://yard//lib/yard/parser/ruby/ast_node.rb#367 + def namespace; end + + # source://yard//lib/yard/parser/ruby/ast_node.rb#363 + def path; end + + # @return [Boolean] + # + # source://yard//lib/yard/parser/ruby/ast_node.rb#361 + def ref?; end +end + +# Internal parser class +# +# @since 0.5.6 +# +# source://yard//lib/yard/parser/ruby/ruby_parser.rb#27 +class YARD::Parser::Ruby::RipperParser < ::Ripper + # @return [RipperParser] a new instance of RipperParser + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#32 + def initialize(source, filename, *args); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#28 + def ast; end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#28 + def charno; end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#28 + def comments; end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#29 + def encoding_line; end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#64 + def enumerator; end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#28 + def file; end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#68 + def file_encoding; end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#29 + def frozen_string_line; end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_BEGIN(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_CHAR(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_END(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on___end__(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_alias(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_alias_error(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_arg_ambiguous(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_arg_paren(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 + def on_args_add(list, item); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 + def on_args_add_block(list, item); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 + def on_args_add_star(list, item); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_args_forward(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#155 + def on_args_new(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_aryptn(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_assign(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_assign_error(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_assoc_splat(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_backref(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 + def on_backtick(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_begin(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_binary(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_block_var(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_blockarg(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_brace_block(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_break(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_call(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_case(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_class(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_class_name_error(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_comma(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_command(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_command_call(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_const(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_const_path_field(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_const_ref(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_cvar(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_def(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_defined(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_defs(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_do_block(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_dot2(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_dot3(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_else(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_elsif(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 + def on_embexpr_beg(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_embexpr_end(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_embvar(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_ensure(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_excessed_comma(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_fcall(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_field(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_float(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_fndptn(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_for(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_gvar(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 + def on_heredoc_beg(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_heredoc_dedent(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_heredoc_end(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_hshptn(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_ident(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_if(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#449 + def on_if_mod(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_ifop(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#222 + def on_ignored_nl(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_ignored_sp(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_imaginary(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_in(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_int(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_ivar(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#209 + def on_kw(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_kwrest_param(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_label_end(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 + def on_lbrace(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 + def on_lparen(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_magic_comment(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_massign(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 + def on_method_add_arg(list, item); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 + def on_method_add_block(list, item); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 + def on_mlhs_add(list, item); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 + def on_mlhs_add_post(list, item); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 + def on_mlhs_add_star(list, item); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#155 + def on_mlhs_new(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_mlhs_paren(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_module(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 + def on_mrhs_add(list, item); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 + def on_mrhs_add_star(list, item); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#155 + def on_mrhs_new(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_mrhs_new_from_args(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_next(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#222 + def on_nl(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_nokw_param(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#209 + def on_op(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_opassign(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_operator_ambiguous(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_param_error(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_paren(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_period(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#474 + def on_qsymbols_add(list, item); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 + def on_qsymbols_beg(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#462 + def on_qsymbols_new(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#474 + def on_qwords_add(list, item); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 + def on_qwords_beg(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#462 + def on_qwords_new(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_rational(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_rbrace(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_redo(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 + def on_regexp_add(list, item); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 + def on_regexp_beg(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_regexp_end(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_regexp_literal(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#155 + def on_regexp_new(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_rescue_mod(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_rest_param(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_retry(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_return(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_return0(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_rparen(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_sclass(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_semicolon(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 + def on_stmts_add(list, item); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#155 + def on_stmts_new(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 + def on_string_add(list, item); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_string_concat(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_string_dvar(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_string_embexpr(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_super(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 + def on_symbeg(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_symbol(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_symbol_literal(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#474 + def on_symbols_add(list, item); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 + def on_symbols_beg(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#462 + def on_symbols_new(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 + def on_tlambda(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_tlambeg(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_top_const_field(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 + def on_tstring_beg(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_tstring_content(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_tstring_end(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_undef(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_unless(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#449 + def on_unless_mod(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_until(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#449 + def on_until_mod(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_var_alias(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_var_field(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_var_ref(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 + def on_vcall(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_when(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_while(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#449 + def on_while_mod(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 + def on_word_add(list, item); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#155 + def on_word_new(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#474 + def on_words_add(list, item); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 + def on_words_beg(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#462 + def on_words_new(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 + def on_words_sep(tok); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 + def on_xstring_add(list, item); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_xstring_literal(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#155 + def on_xstring_new(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_yield(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_yield0(*args); end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 + def on_zsuper(*args); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#55 + def parse; end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#28 + def root; end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#29 + def shebang_line; end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#28 + def tokens; end + + private + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#667 + def add_comment(line, node = T.unsafe(nil), before_node = T.unsafe(nil), into = T.unsafe(nil)); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#271 + def add_token(token, data); end + + # @return [Boolean] + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#611 + def comment_starts_line?(charno); end + + # @raise [ParserSyntaxError] + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#606 + def compile_error(msg); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#693 + def freeze_tree(node = T.unsafe(nil)); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#620 + def insert_comments; end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#377 + def on_aref(*args); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#385 + def on_aref_field(*args); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#391 + def on_array(other); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#352 + def on_assoc_new(*args); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#364 + def on_assoclist_from_args(*args); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#360 + def on_bare_assoc_hash(*args); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#347 + def on_body_stmt(*args); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#347 + def on_bodystmt(*args); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#542 + def on_comment(comment); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#441 + def on_const_path_ref(*args); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#419 + def on_dyna_symbol(sym); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#592 + def on_embdoc(text); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#586 + def on_embdoc_beg(text); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#597 + def on_embdoc_end(text); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#356 + def on_hash(*args); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#534 + def on_label(data); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#497 + def on_lambda(*args); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#409 + def on_lbracket(tok); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#515 + def on_params(*args); end + + # @raise [ParserSyntaxError] + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#606 + def on_parse_error(msg); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#343 + def on_program(*args); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#414 + def on_rbracket(tok); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#506 + def on_rescue(exc, *args); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#232 + def on_sp(tok); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#501 + def on_string_content(*args); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#484 + def on_string_literal(*args); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#429 + def on_top_const_ref(*args); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#368 + def on_unary(op, val); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#511 + def on_void_stmt; end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#237 + def visit_event(node); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#251 + def visit_event_arr(node); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#259 + def visit_ns_token(token, data, ast_token = T.unsafe(nil)); end +end + +# @since 0.5.6 +# +# source://yard//lib/yard/parser/ruby/ruby_parser.rb#133 +YARD::Parser::Ruby::RipperParser::AST_TOKENS = T.let(T.unsafe(nil), Array) + +# @since 0.5.6 +# +# source://yard//lib/yard/parser/ruby/ruby_parser.rb#136 +YARD::Parser::Ruby::RipperParser::COMMENT_SKIP_NODE_TYPES = T.let(T.unsafe(nil), Array) + +# @since 0.5.6 +# +# source://yard//lib/yard/parser/ruby/ruby_parser.rb#78 +YARD::Parser::Ruby::RipperParser::MAPPINGS = T.let(T.unsafe(nil), Hash) + +# @since 0.5.6 +# +# source://yard//lib/yard/parser/ruby/ruby_parser.rb#131 +YARD::Parser::Ruby::RipperParser::REV_MAPPINGS = T.let(T.unsafe(nil), Hash) + +# Ruby 1.9 parser +# +# source://yard//lib/yard/parser/ruby/ruby_parser.rb#12 +class YARD::Parser::Ruby::RubyParser < ::YARD::Parser::Base + # @return [RubyParser] a new instance of RubyParser + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#13 + def initialize(source, filename); end + + # Ruby 1.9 parser + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#21 + def encoding_line; end + + # Ruby 1.9 parser + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#19 + def enumerator; end + + # Ruby 1.9 parser + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#22 + def frozen_string_line; end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#17 + def parse; end + + # Ruby 1.9 parser + # + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#20 + def shebang_line; end + + # source://yard//lib/yard/parser/ruby/ruby_parser.rb#18 + def tokenize; end +end + +# Supports {#each} enumeration over a source's tokens, yielding +# the token and a possible {CodeObjects::Base} associated with the +# constant or identifier token. +# +# source://yard//lib/yard/parser/ruby/token_resolver.rb#8 +class YARD::Parser::Ruby::TokenResolver + include ::Enumerable + include ::YARD::CodeObjects::NamespaceMapper + + # Creates a token resolver for given source. + # + # @param source [String] the source code to tokenize + # @param namespace [CodeObjects::Base] the object/namespace to resolve from + # @raise [ParserSyntaxError] + # @return [TokenResolver] a new instance of TokenResolver + # + # source://yard//lib/yard/parser/ruby/token_resolver.rb#16 + def initialize(source, namespace = T.unsafe(nil)); end + + # Iterates over each token, yielding the token and a possible code + # object that is associated with the token. + # + # @example Yielding code objects + # r = TokenResolver.new("A::B::C") + # r.each do |tok, obj| + # if obj + # puts "#{tok[0]} -> #{obj.path.inspect}" + # else + # puts "No object: #{tok.inspect}" + # end + # end + # + # # Prints: + # # :const -> "A" + # # No object: [:op, "::"] + # # :const -> "A::B" + # # No object: [:op, "::"] + # # :const -> "A::B::C" + # @yieldparam token [Array(Symbol,String,Array(Integer,Integer))] the + # current token object being iterated + # @yieldparam object [CodeObjects::Base, nil] the fully qualified code + # object associated with the current token, or nil if there is no object + # for the yielded token. + # + # source://yard//lib/yard/parser/ruby/token_resolver.rb#46 + def each; end + + protected + + # source://yard//lib/yard/parser/ruby/token_resolver.rb#94 + def last_sep; end + + # source://yard//lib/yard/parser/ruby/token_resolver.rb#95 + def last_sep=(v); end + + # source://yard//lib/yard/parser/ruby/token_resolver.rb#94 + def next_object; end + + # source://yard//lib/yard/parser/ruby/token_resolver.rb#95 + def next_object=(v); end + + # source://yard//lib/yard/parser/ruby/token_resolver.rb#94 + def object; end + + # source://yard//lib/yard/parser/ruby/token_resolver.rb#95 + def object=(v); end + + # source://yard//lib/yard/parser/ruby/token_resolver.rb#94 + def skip_group; end + + # source://yard//lib/yard/parser/ruby/token_resolver.rb#95 + def skip_group=(v); end + + private + + # source://yard//lib/yard/parser/ruby/token_resolver.rb#112 + def lookup(toktype, name); end + + # source://yard//lib/yard/parser/ruby/token_resolver.rb#134 + def object_resolved_types(obj = T.unsafe(nil)); end + + # source://yard//lib/yard/parser/ruby/token_resolver.rb#106 + def pop_state; end + + # source://yard//lib/yard/parser/ruby/token_resolver.rb#102 + def push_state; end + + class << self + # source://yard//lib/yard/parser/ruby/token_resolver.rb#92 + def state_attr(*attrs); end + end +end + +# Responsible for parsing a source file into the namespace. Parsing +# also invokes handlers to process the parsed statements and generate +# any code objects that may be recognized. +# +# == Custom Parsers +# SourceParser allows custom parsers to be registered and called when +# a certain filetype is recognized. To register a parser and hook it +# up to a set of file extensions, call {register_parser_type} +# +# @see register_parser_type +# @see Handlers::Base +# @see CodeObjects::Base +# +# source://yard//lib/yard/parser/source_parser.rb#64 +class YARD::Parser::SourceParser + # @overload initialize + # @return [SourceParser] a new instance of SourceParser + # + # source://yard//lib/yard/parser/source_parser.rb#406 + def initialize(parser_type = T.unsafe(nil), globals1 = T.unsafe(nil), globals2 = T.unsafe(nil)); end + + # @return [String] the contents of the file to be parsed + # @since 0.7.0 + # + # source://yard//lib/yard/parser/source_parser.rb#399 + def contents; end + + # @return [String] the filename being parsed by the parser. + # + # source://yard//lib/yard/parser/source_parser.rb#386 + def file; end + + # @return [String] the filename being parsed by the parser. + # + # source://yard//lib/yard/parser/source_parser.rb#386 + def file=(_arg0); end + + # @return [OpenStruct] an open struct containing arbitrary global state + # shared between files and handlers. + # @since 0.7.0 + # + # source://yard//lib/yard/parser/source_parser.rb#395 + def globals; end + + # The main parser method. This should not be called directly. Instead, + # use the class methods {parse} and {parse_string}. + # + # @param content [String, #read, Object] the source file to parse + # @return [Object, nil] the parser object used to parse the source + # + # source://yard//lib/yard/parser/source_parser.rb#418 + def parse(content = T.unsafe(nil)); end + + # @return [Symbol] the parser type associated with the parser instance. + # This should be set by the {#initialize constructor}. + # + # source://yard//lib/yard/parser/source_parser.rb#390 + def parser_type; end + + # Tokenizes but does not parse the block of code using the current {#parser_type} + # + # @param content [String] the block of code to tokenize + # @return [Array] a list of tokens + # + # source://yard//lib/yard/parser/source_parser.rb#462 + def tokenize(content); end + + private + + # Searches for encoding line and forces encoding + # + # @since 0.5.3 + # + # source://yard//lib/yard/parser/source_parser.rb#471 + def convert_encoding(content); end + + # @since 0.5.6 + # + # source://yard//lib/yard/parser/source_parser.rb#516 + def parser_class; end + + # source://yard//lib/yard/parser/source_parser.rb#501 + def parser_type=(value); end + + # Guesses the parser type to use depending on the file extension. + # + # @param filename [String] the filename to use to guess the parser type + # @return [Symbol] a parser type that matches the filename + # + # source://yard//lib/yard/parser/source_parser.rb#509 + def parser_type_for_filename(filename); end + + # Runs a {Handlers::Processor} object to post process the parsed statements. + # + # @return [void] + # + # source://yard//lib/yard/parser/source_parser.rb#491 + def post_process; end + + class << self + # Registers a callback to be called after an individual file is parsed. + # The block passed to this method will be called on subsequent parse + # calls. + # + # To register a callback that is called after the entire list of files + # is processed, see {after_parse_list}. + # + # @example Printing the length of each file after it is parsed + # SourceParser.after_parse_file do |parser| + # puts "#{parser.file} is #{parser.contents.size} characters" + # end + # YARD.parse('lib/**/*.rb') + # # prints: + # "lib/foo.rb is 1240 characters" + # "lib/foo_bar.rb is 248 characters" + # @return [Proc] the yielded block + # @see before_parse_file + # @see after_parse_list + # @since 0.7.0 + # @yield [parser] the yielded block is called once after each file + # that is parsed. This might happen many times for a single codebase. + # @yieldparam parser [SourceParser] the parser object that parsed + # the file. + # @yieldreturn [void] the return value for the block is ignored. + # + # source://yard//lib/yard/parser/source_parser.rb#324 + def after_parse_file(&block); end + + # @return [Array<Proc>] the list of callbacks to be called after + # parsing a file. Should only be used for testing. + # @since 0.7.0 + # + # source://yard//lib/yard/parser/source_parser.rb#352 + def after_parse_file_callbacks; end + + # Registers a callback to be called after a list of files is parsed + # via {parse}. The block passed to this method will be called on + # subsequent parse calls. + # + # @example Printing results after parsing occurs + # SourceParser.after_parse_list do + # puts "Finished parsing!" + # end + # YARD.parse + # # Prints "Finished parsing!" after parsing files + # @return [Proc] the yielded block + # @see before_parse_list + # @see before_parse_file + # @since 0.7.0 + # @yield [files, globals] the yielded block is called once before + # parsing all files + # @yieldparam files [Array<String>] the list of files that will be parsed. + # @yieldparam globals [OpenStruct] a global structure to store arbitrary + # state for post processing (see {Handlers::Processor#globals}) + # @yieldreturn [void] the return value for the block is ignored. + # + # source://yard//lib/yard/parser/source_parser.rb#258 + def after_parse_list(&block); end + + # @return [Array<Proc>] the list of callbacks to be called after + # parsing a list of files. Should only be used for testing. + # @since 0.7.0 + # + # source://yard//lib/yard/parser/source_parser.rb#338 + def after_parse_list_callbacks; end + + # Registers a callback to be called before an individual file is parsed. + # The block passed to this method will be called on subsequent parse + # calls. + # + # To register a callback that is called before the entire list of files + # is processed, see {before_parse_list}. + # + # @example Cancel parsing of any test_*.rb files + # SourceParser.before_parse_file do |parser| + # return false if parser.file =~ /^test_.+\.rb$/ + # end + # @example Installing a simple callback + # SourceParser.before_parse_file do |parser| + # puts "I'm parsing #{parser.file}" + # end + # YARD.parse('lib/**/*.rb') + # # prints: + # "I'm parsing lib/foo.rb" + # "I'm parsing lib/foo_bar.rb" + # "I'm parsing lib/last_file.rb" + # @return [Proc] the yielded block + # @see before_parse_list + # @see after_parse_file + # @since 0.7.0 + # @yield [parser] the yielded block is called once before each + # file that is parsed. This might happen many times for a single + # codebase. + # @yieldparam parser [SourceParser] the parser object that will {#parse} + # the file. + # @yieldreturn [Boolean] if the block returns +false+, parsing for + # the file is cancelled. + # + # source://yard//lib/yard/parser/source_parser.rb#295 + def before_parse_file(&block); end + + # @return [Array<Proc>] the list of callbacks to be called before + # parsing a file. Should only be used for testing. + # @since 0.7.0 + # + # source://yard//lib/yard/parser/source_parser.rb#345 + def before_parse_file_callbacks; end + + # Registers a callback to be called before a list of files is parsed + # via {parse}. The block passed to this method will be called on + # subsequent parse calls. + # + # @example Setting global state + # SourceParser.before_parse_list do |files, globals| + # globals.method_count = 0 + # end + # SourceParser.after_parse_list do |files, globals| + # puts "Found #{globals.method_count} methods" + # end + # class MyCountHandler < Handlers::Ruby::Base + # handles :def, :defs + # process { globals.method_count += 1 } + # end + # YARD.parse + # # Prints: "Found 37 methods" + # @example Installing a simple callback + # SourceParser.before_parse_list do |files, globals| + # puts "Starting to parse..." + # end + # YARD.parse('lib/**/*.rb') + # # prints "Starting to parse..." + # @example Using a global callback to cancel parsing + # SourceParser.before_parse_list do |files, globals| + # return false if files.include?('foo.rb') + # end + # + # YARD.parse(['foo.rb', 'bar.rb']) # callback cancels this method + # YARD.parse('bar.rb') # parses normally + # @return [Proc] the yielded block + # @see before_parse_file + # @see after_parse_list + # @since 0.7.0 + # @yield [files, globals] the yielded block is called once before + # parsing all files + # @yieldparam files [Array<String>] the list of files that will be parsed. + # @yieldparam globals [OpenStruct] a global structure to store arbitrary + # state for post processing (see {Handlers::Processor#globals}) + # @yieldreturn [Boolean] if the block returns +false+, parsing is + # cancelled. + # + # source://yard//lib/yard/parser/source_parser.rb#234 + def before_parse_list(&block); end + + # @return [Array<Proc>] the list of callbacks to be called before + # parsing a list of files. Should only be used for testing. + # @since 0.7.0 + # + # source://yard//lib/yard/parser/source_parser.rb#331 + def before_parse_list_callbacks; end + + # Parses a path or set of paths + # + # @param paths [String, Array<String>] a path, glob, or list of paths to + # parse + # @param excluded [Array<String, Regexp>] a list of excluded path matchers + # @param level [Fixnum] the logger level to use during parsing. See + # {YARD::Logger} + # @return [void] + # + # source://yard//lib/yard/parser/source_parser.rb#100 + def parse(paths = T.unsafe(nil), excluded = T.unsafe(nil), level = T.unsafe(nil)); end + + # Parses a string +content+ + # + # @param content [String] the block of code to parse + # @param ptype [Symbol] the parser type to use. See {parser_type}. + # @return the parser object that was used to parse +content+ + # + # source://yard//lib/yard/parser/source_parser.rb#123 + def parse_string(content, ptype = T.unsafe(nil)); end + + # @return [Symbol] the default parser type (defaults to :ruby) + # + # source://yard//lib/yard/parser/source_parser.rb#86 + def parser_type; end + + # source://yard//lib/yard/parser/source_parser.rb#88 + def parser_type=(value); end + + # @private + # @return [Hash] a list of registered parser type extensions + # @since 0.5.6 + # + # source://yard//lib/yard/parser/source_parser.rb#163 + def parser_type_extensions; end + + # source://yard//lib/yard/parser/source_parser.rb#164 + def parser_type_extensions=(value); end + + # Finds a parser type that is registered for the extension. If no + # type is found, the default Ruby type is returned. + # + # @return [Symbol] the parser type to be used for the extension + # @since 0.5.6 + # + # source://yard//lib/yard/parser/source_parser.rb#171 + def parser_type_for_extension(extension); end + + # @private + # @return [Hash{Symbol=>Object}] a list of registered parser types + # @since 0.5.6 + # + # source://yard//lib/yard/parser/source_parser.rb#157 + def parser_types; end + + # source://yard//lib/yard/parser/source_parser.rb#158 + def parser_types=(value); end + + # Registers a new parser type. + # + # @example Registering a parser for "java" files + # SourceParser.register_parser_type :java, JavaParser, 'java' + # @param type [Symbol] a symbolic name for the parser type + # @param parser_klass [Base] a class that implements parsing and tokenization + # @param extensions [Array<String>, String, Regexp] a list of extensions or a + # regex to match against the file extension + # @return [void] + # @see Parser::Base + # + # source://yard//lib/yard/parser/source_parser.rb#146 + def register_parser_type(type, parser_klass, extensions = T.unsafe(nil)); end + + # Tokenizes but does not parse the block of code + # + # @param content [String] the block of code to tokenize + # @param ptype [Symbol] the parser type to use. See {parser_type}. + # @return [Array] a list of tokens + # + # source://yard//lib/yard/parser/source_parser.rb#132 + def tokenize(content, ptype = T.unsafe(nil)); end + + # Returns the validated parser type. Basically, enforces that :ruby + # type is never set if the Ripper library is not available + # + # @param type [Symbol] the parser type to set + # @private + # @return [Symbol] the validated parser type + # + # source://yard//lib/yard/parser/source_parser.rb#184 + def validated_parser_type(type); end + + private + + # Parses a list of files in a queue. + # + # @param files [Array<String>] a list of files to queue for parsing + # @return [void] + # + # source://yard//lib/yard/parser/source_parser.rb#364 + def parse_in_order(*files); end + end +end + +# The default glob of files to be parsed. +# +# @since 0.9.0 +# +# source://yard//lib/yard/parser/source_parser.rb#71 +YARD::Parser::SourceParser::DEFAULT_PATH_GLOB = T.let(T.unsafe(nil), Array) + +# Byte order marks for various encodings +# +# @since 0.7.0 +# +# source://yard//lib/yard/parser/source_parser.rb#75 +YARD::Parser::SourceParser::ENCODING_BYTE_ORDER_MARKS = T.let(T.unsafe(nil), Hash) + +# source://yard//lib/yard/parser/source_parser.rb#66 +YARD::Parser::SourceParser::ENCODING_LINE = T.let(T.unsafe(nil), Regexp) + +# source://yard//lib/yard/parser/source_parser.rb#67 +YARD::Parser::SourceParser::FROZEN_STRING_LINE = T.let(T.unsafe(nil), Regexp) + +# source://yard//lib/yard/parser/source_parser.rb#65 +YARD::Parser::SourceParser::SHEBANG_LINE = T.let(T.unsafe(nil), Regexp) + +# Raised when an object is recognized but cannot be documented. This +# generally occurs when the Ruby syntax used to declare an object is +# too dynamic in nature. +# +# source://yard//lib/yard/parser/source_parser.rb#10 +class YARD::Parser::UndocumentableError < ::RuntimeError; end + +# The root path for YARD source libraries +# +# source://yard//lib/yard.rb#4 +YARD::ROOT = T.let(T.unsafe(nil), String) + +# Holds Rake tasks used by YARD +# +# source://yard//lib/yard/autoload.rb#192 +module YARD::Rake; end + +# The rake task to run {CLI::Yardoc} and generate documentation. +# +# source://yard//lib/yard/rake/yardoc_task.rb#8 +class YARD::Rake::YardocTask < ::Rake::TaskLib + # Creates a new task with name +name+. + # + # @param name [String, Symbol] the name of the rake task + # @return [YardocTask] a new instance of YardocTask + # @yield a block to allow any options to be modified on the task + # @yieldparam _self [YardocTask] the task object to allow any parameters + # to be changed. + # + # source://yard//lib/yard/rake/yardoc_task.rb#50 + def initialize(name = T.unsafe(nil)); end + + # Runs a +Proc+ after the task + # + # @return [Proc] a proc to call after running the task + # + # source://yard//lib/yard/rake/yardoc_task.rb#36 + def after; end + + # Runs a +Proc+ after the task + # + # @return [Proc] a proc to call after running the task + # + # source://yard//lib/yard/rake/yardoc_task.rb#36 + def after=(_arg0); end + + # Runs a +Proc+ before the task + # + # @return [Proc] a proc to call before running the task + # + # source://yard//lib/yard/rake/yardoc_task.rb#32 + def before; end + + # Runs a +Proc+ before the task + # + # @return [Proc] a proc to call before running the task + # + # source://yard//lib/yard/rake/yardoc_task.rb#32 + def before=(_arg0); end + + # The Ruby source files (and any extra documentation files separated by '-') + # to process. + # + # @example Task files assignment + # YARD::Rake::YardocTask.new do |t| + # t.files = ['app/**/*.rb', 'lib/**/*.rb', '-', 'doc/FAQ.md', 'doc/Changes.md'] + # end + # @return [Array<String>] a list of files + # + # source://yard//lib/yard/rake/yardoc_task.rb#28 + def files; end + + # The Ruby source files (and any extra documentation files separated by '-') + # to process. + # + # @example Task files assignment + # YARD::Rake::YardocTask.new do |t| + # t.files = ['app/**/*.rb', 'lib/**/*.rb', '-', 'doc/FAQ.md', 'doc/Changes.md'] + # end + # @return [Array<String>] a list of files + # + # source://yard//lib/yard/rake/yardoc_task.rb#28 + def files=(_arg0); end + + # The name of the task + # + # @return [String] the task name + # + # source://yard//lib/yard/rake/yardoc_task.rb#11 + def name; end + + # The name of the task + # + # @return [String] the task name + # + # source://yard//lib/yard/rake/yardoc_task.rb#11 + def name=(_arg0); end + + # Options to pass to {CLI::Yardoc} + # + # @return [Array<String>] the options passed to the commandline utility + # + # source://yard//lib/yard/rake/yardoc_task.rb#15 + def options; end + + # Options to pass to {CLI::Yardoc} + # + # @return [Array<String>] the options passed to the commandline utility + # + # source://yard//lib/yard/rake/yardoc_task.rb#15 + def options=(_arg0); end + + # Options to pass to {CLI::Stats} + # + # @return [Array<String>] the options passed to the stats utility + # + # source://yard//lib/yard/rake/yardoc_task.rb#19 + def stats_options; end + + # Options to pass to {CLI::Stats} + # + # @return [Array<String>] the options passed to the stats utility + # + # source://yard//lib/yard/rake/yardoc_task.rb#19 + def stats_options=(_arg0); end + + # @return [Verifier, Proc] an optional {Verifier} to run against all objects + # being generated. Any object that the verifier returns false for will be + # excluded from documentation. This attribute can also be a lambda. + # @see Verifier + # + # source://yard//lib/yard/rake/yardoc_task.rb#42 + def verifier; end + + # @return [Verifier, Proc] an optional {Verifier} to run against all objects + # being generated. Any object that the verifier returns false for will be + # excluded from documentation. This attribute can also be a lambda. + # @see Verifier + # + # source://yard//lib/yard/rake/yardoc_task.rb#42 + def verifier=(_arg0); end + + protected + + # Defines the rake task + # + # @return [void] + # + # source://yard//lib/yard/rake/yardoc_task.rb#68 + def define; end +end + +# The +Registry+ is the centralized data store for all {CodeObjects} created +# during parsing. The storage is a key value store with the object's path +# (see {CodeObjects::Base#path}) as the key and the object itself as the value. +# Object paths must be unique to be stored in the Registry. All lookups for +# objects are done on the singleton Registry instance using the {Registry.at} +# or {Registry.resolve} methods. +# +# == Saving / Loading a Registry +# The registry is saved to a "yardoc file" (actually a directory), which can +# be loaded back to perform any lookups. See {Registry.load!} and +# {Registry.save} for information on saving and loading of a yardoc file. +# +# == Threading Notes +# The registry class is a singleton class that is accessed directly in many +# places across YARD. To mitigate threading issues, YARD (0.6.5+) makes +# the Registry thread local. This means all access to a registry for a specific +# object set must occur in the originating thread. +# +# @example Loading the Registry +# Registry.load!('/path/to/yardocfile') # loads all objects into memory +# Registry.at('YARD::CodeObjects::Base').docstring +# # => "+Base+ is the superclass of all code objects ..." +# @example Getting an object by a specific path +# Registry.at('YARD::CodeObjects::Base#docstring') +# @example Performing a lookup on a method anywhere in the inheritance tree +# Registry.resolve(P('YARD::CodeObjects::Base'), '#docstring', true) +# +# source://yard//lib/yard/registry.rb#32 +module YARD::Registry + extend ::Enumerable + + class << self + # Returns the object at a specific path. + # + # @param path [String, :root] the pathname to look for. If +path+ is +root+, + # returns the {root} object. + # @return [CodeObjects::Base] the object at path + # @return [nil] if no object is found + # + # source://yard//lib/yard/registry.rb#261 + def [](path); end + + # Returns all objects in the registry that match one of the types provided + # in the +types+ list (if +types+ is provided). + # + # @example Returns all objects + # Registry.all + # @example Returns all classes and modules + # Registry.all(:class, :module) + # @param types [Array<Symbol>] an optional list of types to narrow the + # objects down by. Equivalent to performing a select: + # +Registry.all.select {|o| types.include(o.type) }+ + # @return [Array<CodeObjects::Base>] the list of objects found + # @see CodeObjects::Base#type + # + # source://yard//lib/yard/registry.rb#237 + def all(*types); end + + # Returns the object at a specific path. + # + # @param path [String, :root] the pathname to look for. If +path+ is +root+, + # returns the {root} object. + # @return [CodeObjects::Base] the object at path + # @return [nil] if no object is found + # + # source://yard//lib/yard/registry.rb#261 + def at(path); end + + # @param data [String] data to checksum + # @return [String] the SHA1 checksum for data + # + # source://yard//lib/yard/registry.rb#318 + def checksum_for(data); end + + # @return [Hash{String => String}] a set of checksums for files + # + # source://yard//lib/yard/registry.rb#312 + def checksums; end + + # Clears the registry + # + # @return [void] + # + # source://yard//lib/yard/registry.rb#200 + def clear; end + + # Deletes an object from the registry + # + # @param object [CodeObjects::Base] the object to remove + # @return [void] + # + # source://yard//lib/yard/registry.rb#194 + def delete(object); end + + # Deletes the yardoc file from disk + # + # @return [void] + # + # source://yard//lib/yard/registry.rb#176 + def delete_from_disk; end + + # Iterates over {all} with no arguments + # + # source://yard//lib/yard/registry.rb#221 + def each(&block); end + + # The registry singleton instance. + # + # @deprecated use Registry.methodname directly. + # @return [Registry] returns the registry instance + # + # source://yard//lib/yard/registry.rb#363 + def instance; end + + # Loads the registry and/or parses a list of files + # + # @example Loads the yardoc file or parses files 'a', 'b' and 'c' (but not both) + # Registry.load(['a', 'b', 'c']) + # @example Reparses files 'a' and 'b' regardless of whether yardoc file exists + # Registry.load(['a', 'b'], true) + # @param files [String, Array] if +files+ is an Array, it should represent + # a list of files that YARD should parse into the registry. If reload is + # set to false and the yardoc file already exists, these files are skipped. + # If files is a String, it should represent the yardoc file to load + # into the registry. + # @param reparse [Boolean] if reparse is false and a yardoc file already + # exists, any files passed in will be ignored. + # @raise [ArgumentError] if files is not a String or Array + # @return [Registry] the registry object (for chaining) + # + # source://yard//lib/yard/registry.rb#109 + def load(files = T.unsafe(nil), reparse = T.unsafe(nil)); end + + # Loads a yardoc file and forces all objects cached on disk into + # memory. Equivalent to calling {load_yardoc} followed by {load_all} + # + # @param file [String] the yardoc file to load + # @return [Registry] the registry object (for chaining) + # @see #load_yardoc + # @see #load_all + # @since 0.5.1 + # + # source://yard//lib/yard/registry.rb#144 + def load!(file = T.unsafe(nil)); end + + # Forces all objects cached on disk into memory + # + # @example Loads all objects from disk + # Registry.load + # Registry.all.count #=> 0 + # Registry.load_all + # Registry.all.count #=> 17 + # @return [Registry] the registry object (for chaining) + # @since 0.5.1 + # + # source://yard//lib/yard/registry.rb#159 + def load_all; end + + # Loads a yardoc file directly + # + # @param file [String] the yardoc file to load. + # @return [Registry] the registry object (for chaining) + # + # source://yard//lib/yard/registry.rb#130 + def load_yardoc(file = T.unsafe(nil)); end + + # @param name [String] the locale name. + # @return [I18n::Locale] the locale object for +name+. + # @since 0.8.3 + # + # source://yard//lib/yard/registry.rb#271 + def locale(name); end + + # Creates a pessmistic transactional lock on the database for writing. + # Use with {YARD.parse} to ensure the database is not written multiple + # times. + # + # @see locked_for_writing? + # + # source://yard//lib/yard/registry.rb#209 + def lock_for_writing(file = T.unsafe(nil), &block); end + + # @return [Boolean] whether the database is currently locked for writing + # + # source://yard//lib/yard/registry.rb#214 + def locked_for_writing?(file = T.unsafe(nil)); end + + # Returns the paths of all of the objects in the registry. + # + # @param reload [Boolean] whether to load entire database + # @return [Array<String>] all of the paths in the registry. + # + # source://yard//lib/yard/registry.rb#252 + def paths(reload = T.unsafe(nil)); end + + # Gets/sets the directory that has LANG.po files + # + # @return [String] the directory that has .po files + # + # source://yard//lib/yard/registry.rb#353 + def po_dir; end + + # Gets/sets the directory that has LANG.po files + # + # @return [String] the directory that has .po files + # + # source://yard//lib/yard/registry.rb#351 + def po_dir=(dir); end + + # The assumed types of a list of paths. This method is used by CodeObjects::Base + # + # @deprecated The registry no longer globally tracks proxy types. + # @private + # @return [{String => Symbol}] a set of unresolved paths and their assumed type + # + # source://yard//lib/yard/registry.rb#341 + def proxy_types; end + + # Registers a new object with the registry + # + # @param object [CodeObjects::Base] the object to register + # @return [CodeObjects::Base] the registered object + # + # source://yard//lib/yard/registry.rb#186 + def register(object); end + + # Attempts to find an object by name starting at +namespace+, performing + # a lookup similar to Ruby's method of resolving a constant in a namespace. + # + # @example Looks for a constant in the root namespace + # Registry.resolve(nil, 'CONSTANT') + # @example Looks for a class method respecting the inheritance tree + # Registry.resolve(myclass, 'mymethod', true) + # @example Looks for instance method #reverse starting from A::B::C + # Registry.resolve(P("A::B::C"), "#reverse") + # @example Looks for a constant but returns a proxy if not found + # Registry.resolve(P('A::B::C'), 'D', false, true) # => #<yardoc proxy A::B::C::D> + # @example Looks for a complex path from a namespace + # Registry.resolve(P('A::B'), 'B::D') # => #<yardoc class A::B::D> + # @param inheritance [Boolean] Follows inheritance chain (mixins, superclass) + # when performing name resolution if set to +true+. + # @param namespace [CodeObjects::NamespaceObject, nil] the starting namespace + # (module or class). If +nil+ or +:root+, starts from the {root} object. + # @param name [String, Symbol] the name (or complex path) to look for from + # +namespace+. + # @param proxy_fallback [Boolean] If +true+, returns a proxy representing + # the unresolved path (namespace + name) if no object is found. + # @param type [Symbol, nil] the {CodeObjects::Base#type} that the resolved + # object must be equal to. No type checking if nil. + # @return [CodeObjects::Base] the object if it is found + # @return [CodeObjects::Proxy] a Proxy representing the object if + # +proxy_fallback+ is +true+. + # @return [nil] if +proxy_fallback+ is +false+ and no object was found. + # @see P + # + # source://yard//lib/yard/registry.rb#303 + def resolve(namespace, name, inheritance = T.unsafe(nil), proxy_fallback = T.unsafe(nil), type = T.unsafe(nil)); end + + # The root namespace object. + # + # @return [CodeObjects::RootObject] the root object in the namespace + # + # source://yard//lib/yard/registry.rb#266 + def root; end + + # Saves the registry to +file+ + # + # @param file [String] the yardoc file to save to + # @return [Boolean] true if the file was saved + # + # source://yard//lib/yard/registry.rb#170 + def save(merge = T.unsafe(nil), file = T.unsafe(nil)); end + + # Whether or not the Registry storage should load everything into a + # single object database (for disk efficiency), or spread them out + # (for load time efficiency). + # + # @note Setting this attribute to nil will offload the decision to + # the {RegistryStore storage adapter}. + # @return [Boolean, nil] if this value is set to nil, the storage + # adapter will decide how to store the data. + # + # source://yard//lib/yard/registry.rb#335 + def single_object_db; end + + # Whether or not the Registry storage should load everything into a + # single object database (for disk efficiency), or spread them out + # (for load time efficiency). + # + # @note Setting this attribute to nil will offload the decision to + # the {RegistryStore storage adapter}. + # @return [Boolean, nil] if this value is set to nil, the storage + # adapter will decide how to store the data. + # + # source://yard//lib/yard/registry.rb#334 + def single_object_db=(v); end + + # Gets/sets the yardoc filename + # + # @return [String] the yardoc filename + # @see DEFAULT_YARDOC_FILE + # + # source://yard//lib/yard/registry.rb#88 + def yardoc_file; end + + # Gets/sets the yardoc filename + # + # @return [String] the yardoc filename + # @see DEFAULT_YARDOC_FILE + # + # source://yard//lib/yard/registry.rb#86 + def yardoc_file=(v); end + + # Returns the .yardoc file associated with a gem. + # + # @param gem [String] the name of the gem to search for + # @param ver_require [String] an optional Gem version requirement + # @param for_writing [Boolean] whether or not the method should search + # for writable locations + # @return [String] if +for_writing+ is set to +true+, returns the best + # location suitable to write the .yardoc file. Otherwise, the first + # existing location associated with the gem's .yardoc file. + # @return [nil] if +for_writing+ is set to false and no yardoc file + # is found, returns nil. + # + # source://yard//lib/yard/registry.rb#53 + def yardoc_file_for_gem(gem, ver_require = T.unsafe(nil), for_writing = T.unsafe(nil)); end + + private + + # source://yard//lib/yard/registry.rb#390 + def global_yardoc_file(spec, for_writing = T.unsafe(nil)); end + + # source://yard//lib/yard/registry.rb#410 + def local_yardoc_file(spec, for_writing = T.unsafe(nil)); end + + # source://yard//lib/yard/registry.rb#403 + def old_global_yardoc_file(spec, for_writing = T.unsafe(nil)); end + + # Attempts to resolve a name in a namespace + # + # @param namespace [CodeObjects::NamespaceObject] the starting namespace + # @param name [String] the name to look for + # @param type [Symbol, nil] the {CodeObjects::Base#type} that the resolved + # object must be equal to + # + # source://yard//lib/yard/registry.rb#375 + def partial_resolve(namespace, name, type = T.unsafe(nil)); end + + # @since 0.9.1 + # + # source://yard//lib/yard/registry.rb#434 + def thread_local_resolver; end + + # @since 0.6.5 + # + # source://yard//lib/yard/registry.rb#424 + def thread_local_store; end + + # @since 0.6.5 + # + # source://yard//lib/yard/registry.rb#429 + def thread_local_store=(value); end + end +end + +# source://yard//lib/yard/registry.rb#35 +YARD::Registry::DEFAULT_PO_DIR = T.let(T.unsafe(nil), String) + +# source://yard//lib/yard/registry.rb#33 +YARD::Registry::DEFAULT_YARDOC_FILE = T.let(T.unsafe(nil), String) + +# source://yard//lib/yard/registry.rb#34 +YARD::Registry::LOCAL_YARDOC_INDEX = T.let(T.unsafe(nil), String) + +# Handles all logic for complex lexical and inherited object resolution. +# Used by {Registry.resolve}, so there is no need to use this class +# directly. +# +# @see Registry.resolve +# @since 0.9.1 +# +# source://yard//lib/yard/registry_resolver.rb#9 +class YARD::RegistryResolver + include ::YARD::CodeObjects::NamespaceMapper + + # Creates a new resolver object for a registry. + # + # @param registry [Registry] only set this if customizing the registry + # object + # @return [RegistryResolver] a new instance of RegistryResolver + # @since 0.9.1 + # + # source://yard//lib/yard/registry_resolver.rb#16 + def initialize(registry = T.unsafe(nil)); end + + # Performs a lookup on a given path in the registry. Resolution will occur + # in a similar way to standard Ruby identifier resolution, doing lexical + # lookup, as well as (optionally) through the inheritance chain. A proxy + # object can be returned if the lookup fails for future resolution. The + # proxy will be type hinted with the +type+ used in the original lookup. + # + # @example A lookup on a method through the inheritance tree + # resolver.lookup_by_math("A::B#foo", inheritance: true) + # @example A lookup from root + # resolver.lookup_by_path("A::B::C") + # @example A lookup from the A::B namespace + # resolver.lookup_by_path("C", namespace: P("A::B")) + # @option opts + # @option opts + # @option opts + # @option opts + # @param opts [Hash] a customizable set of options + # @return [CodeObjects::Base, CodeObjects::Proxy, nil] the first object + # that matches the path lookup. If proxy_fallback is provided, a proxy + # object will be returned in the event of no match, otherwise nil will + # be returned. + # @since 0.9.1 + # + # source://yard//lib/yard/registry_resolver.rb#50 + def lookup_by_path(path, opts = T.unsafe(nil)); end + + private + + # Collects and returns all inherited namespaces for a given object + # + # @since 0.9.1 + # + # source://yard//lib/yard/registry_resolver.rb#181 + def collect_namespaces(object); end + + # Performs a lexical lookup from a namespace for a path and a type hint. + # + # @since 0.9.1 + # + # source://yard//lib/yard/registry_resolver.rb#104 + def lookup_path_direct(namespace, path, type); end + + # Performs a lookup through the inheritance chain on a path with a type hint. + # + # @since 0.9.1 + # + # source://yard//lib/yard/registry_resolver.rb#121 + def lookup_path_inherited(namespace, path, type); end + + # @return [Regexp] the regexp that can be used to split a string on all + # occurrences of separator tokens + # @since 0.9.1 + # + # source://yard//lib/yard/registry_resolver.rb#206 + def split_on_separators_match; end + + # @return [Regexp] the regexp match of the default separator + # @since 0.9.1 + # + # source://yard//lib/yard/registry_resolver.rb#194 + def starts_with_default_separator_match; end + + # @return [Regexp] the regexp that matches strings starting with + # a separator + # @since 0.9.1 + # + # source://yard//lib/yard/registry_resolver.rb#200 + def starts_with_separator_match; end + + # return [Boolean] if the obj's type matches the provided type. + # + # @since 0.9.1 + # + # source://yard//lib/yard/registry_resolver.rb#99 + def validate(obj, type); end +end + +# The data store for the {Registry}. +# +# @see Registry +# @see Serializers::YardocSerializer +# +# source://yard//lib/yard/registry_store.rb#9 +class YARD::RegistryStore + # @return [RegistryStore] a new instance of RegistryStore + # + # source://yard//lib/yard/registry_store.rb#14 + def initialize; end + + # Gets a {CodeObjects::Base} from the store + # + # @param key [String, Symbol] the path name of the object to look for. + # If it is empty or :root, returns the {#root} object. + # @return [CodeObjects::Base, nil] a code object or nil if none is found + # + # source://yard//lib/yard/registry_store.rb#33 + def [](key); end + + # Associates an object with a path + # + # @param key [String, Symbol] the path name (:root or '' for root object) + # @param value [CodeObjects::Base] the object to store + # @return [CodeObjects::Base] returns +value+ + # + # source://yard//lib/yard/registry_store.rb#55 + def []=(key, value); end + + # Returns the value of attribute checksums. + # + # source://yard//lib/yard/registry_store.rb#12 + def checksums; end + + # Deletes an object at a given path + # + # @param key [#to_sym] the key to delete + # @return [void] + # + # source://yard//lib/yard/registry_store.rb#75 + def delete(key); end + + # Deletes the .yardoc database on disk + # + # @param force [Boolean] if force is not set to true, the file/directory + # will only be removed if it ends with .yardoc. This helps with + # cases where the directory might have been named incorrectly. + # @return [Boolean] true if the .yardoc database was deleted, false + # otherwise. + # + # source://yard//lib/yard/registry_store.rb#218 + def destroy(force = T.unsafe(nil)); end + + # Returns the value of attribute file. + # + # source://yard//lib/yard/registry_store.rb#12 + def file; end + + # Gets a {CodeObjects::Base} from the store + # + # @param key [String, Symbol] the path name of the object to look for. + # If it is empty or :root, returns the {#root} object. + # @return [CodeObjects::Base, nil] a code object or nil if none is found + # + # source://yard//lib/yard/registry_store.rb#33 + def get(key); end + + # Gets all path names from the store. Loads the entire database + # if +reload+ is +true+ + # + # @param reload [Boolean] if false, does not load the entire database + # before a lookup. + # @return [Array<Symbol>] the path names of all the code objects + # + # source://yard//lib/yard/registry_store.rb#88 + def keys(reload = T.unsafe(nil)); end + + # @param file [String, nil] the name of the yardoc db to load + # @return [Boolean] whether the database was loaded + # + # source://yard//lib/yard/registry_store.rb#128 + def load(file = T.unsafe(nil)); end + + # Loads the .yardoc file and loads all cached objects into memory + # automatically. + # + # @param file [String, nil] the name of the yardoc db to load + # @return [Boolean] whether the database was loaded + # @see #load_all + # @since 0.5.1 + # + # source://yard//lib/yard/registry_store.rb#142 + def load!(file = T.unsafe(nil)); end + + # Loads all cached objects into memory + # + # @return [void] + # + # source://yard//lib/yard/registry_store.rb#153 + def load_all; end + + # @param name [String] the locale name. + # @return [I18n::Locale] the locale object for +name+. + # @since 0.8.3 + # + # source://yard//lib/yard/registry_store.rb#122 + def locale(name); end + + # Creates a pessmistic transactional lock on the database for writing. + # Use with {YARD.parse} to ensure the database is not written multiple + # times. + # + # @param file [String] if supplied, the path to the database + # @see #locked_for_writing? + # + # source://yard//lib/yard/registry_store.rb#201 + def lock_for_writing(file = T.unsafe(nil), &block); end + + # @param file [String] if supplied, the path to the database + # @return [Boolean] whether the database is currently locked for writing + # + # source://yard//lib/yard/registry_store.rb#207 + def locked_for_writing?(file = T.unsafe(nil)); end + + # @param type [Symbol] the type to look for + # @return [Array<String>] a list of object paths with a given + # {CodeObjects::Base#type} + # @since 0.8.0 + # + # source://yard//lib/yard/registry_store.rb#102 + def paths_for_type(type, reload = T.unsafe(nil)); end + + # @deprecated The registry no longer tracks proxy types + # + # source://yard//lib/yard/registry_store.rb#11 + def proxy_types; end + + # Associates an object with a path + # + # @param key [String, Symbol] the path name (:root or '' for root object) + # @param value [CodeObjects::Base] the object to store + # @return [CodeObjects::Base] returns +value+ + # + # source://yard//lib/yard/registry_store.rb#55 + def put(key, value); end + + # @return [CodeObjects::RootObject] the root object + # + # source://yard//lib/yard/registry_store.rb#117 + def root; end + + # Saves the database to disk + # + # @param merge [Boolean] if true, merges the data in memory with the + # data on disk, otherwise the data on disk is deleted. + # @param file [String, nil] if supplied, the name of the file to save to + # @return [Boolean] whether the database was saved + # + # source://yard//lib/yard/registry_store.rb#177 + def save(merge = T.unsafe(nil), file = T.unsafe(nil)); end + + # Gets all code objects from the store. Loads the entire database + # if +reload+ is +true+ + # + # @param reload [Boolean] if false, does not load the entire database + # before a lookup. + # @return [Array<CodeObjects::Base>] all the code objects + # + # source://yard//lib/yard/registry_store.rb#96 + def values(reload = T.unsafe(nil)); end + + # @param type [Symbol] the type to look for + # @return [Array<CodeObjects::Base>] a list of objects with a given + # {CodeObjects::Base#type} + # @since 0.8.0 + # + # source://yard//lib/yard/registry_store.rb#111 + def values_for_type(type, reload = T.unsafe(nil)); end + + protected + + # source://yard//lib/yard/registry_store.rb#243 + def checksums_path; end + + # source://yard//lib/yard/registry_store.rb#251 + def load_yardoc; end + + # source://yard//lib/yard/registry_store.rb#247 + def object_types_path; end + + # source://yard//lib/yard/registry_store.rb#234 + def objects_path; end + + # @deprecated The registry no longer tracks proxy types + # + # source://yard//lib/yard/registry_store.rb#239 + def proxy_types_path; end + + private + + # source://yard//lib/yard/registry_store.rb#319 + def all_disk_objects; end + + # source://yard//lib/yard/registry_store.rb#291 + def load_checksums; end + + # source://yard//lib/yard/registry_store.rb#313 + def load_locale(name); end + + # source://yard//lib/yard/registry_store.rb#281 + def load_object_types; end + + # @deprecated The registry no longer tracks proxy types + # + # source://yard//lib/yard/registry_store.rb#276 + def load_proxy_types; end + + # source://yard//lib/yard/registry_store.rb#299 + def load_root; end + + # source://yard//lib/yard/registry_store.rb#271 + def load_yardoc_old; end + + # source://yard//lib/yard/registry_store.rb#332 + def write_checksums; end + + # source://yard//lib/yard/registry_store.rb#338 + def write_complete_lock; end + + # source://yard//lib/yard/registry_store.rb#328 + def write_object_types; end + + # @deprecated The registry no longer tracks proxy types + # + # source://yard//lib/yard/registry_store.rb#324 + def write_proxy_types; end +end + +# Namespace for components that serialize to various endpoints +# +# source://yard//lib/yard/autoload.rb#196 +module YARD::Serializers; end + +# The abstract base serializer. Serializers allow templates to be +# rendered to various endpoints. For instance, a {FileSystemSerializer} +# would allow template contents to be written to the filesystem +# +# To implement a custom serializer, override the following methods: +# * {#serialize} +# * {#serialized_path} +# +# Optionally, a serializer can implement before and after filters: +# * {#before_serialize} +# * {#after_serialize} +# +# @abstract Override this class to implement a custom serializer. +# +# source://yard//lib/yard/serializers/base.rb#17 +class YARD::Serializers::Base + # Creates a new serializer with options + # + # @param opts [Hash] the options to assign to {#options} + # @return [Base] a new instance of Base + # + # source://yard//lib/yard/serializers/base.rb#28 + def initialize(opts = T.unsafe(nil)); end + + # Called after serialization. + # + # @abstract Should run code after serialization. + # @param data [String] the data that was serialized. + # @return [void] + # + # source://yard//lib/yard/serializers/base.rb#80 + def after_serialize(data); end + + # Called before serialization. + # + # @abstract Should run code before serialization. Should return false + # if serialization should not occur. + # @return [Boolean] whether or not serialization should occur + # + # source://yard//lib/yard/serializers/base.rb#73 + def before_serialize; end + + # Returns whether an object has been serialized + # + # @abstract This method should return whether the endpoint already exists. + # For instance, a file system serializer would check if the file exists + # on disk. You will most likely use +#basepath+ and {#serialized_path} to + # get the endpoint's location. + # @param object [CodeObjects::Base] the object to check existence of + # @return [Boolean] whether the endpoint exists. + # @since 0.6.0 + # + # source://yard//lib/yard/serializers/base.rb#62 + def exists?(object); end + + # All serializer options are saved so they can be passed to other serializers. + # + # @return [SymbolHash] the serializer options + # + # source://yard//lib/yard/serializers/base.rb#21 + def options; end + + # Serializes an object. + # + # @abstract This method should implement the logic that serializes + # +data+ to the respective endpoint. This method should also call + # the before and after callbacks {#before_serialize} and {#after_serialize} + # @param object [CodeObjects::Base, String] the object to serialize the + # data for. The object can also be a string (for non-object serialization) + # @param data [String] the contents that should be serialized + # + # source://yard//lib/yard/serializers/base.rb#42 + def serialize(object, data); end + + # The serialized path of an object + # + # @abstract This method should return the path of the object on the + # endpoint. For instance, for a file serializer, this should return + # the filename that represents the object on disk. + # @param object [CodeObjects::Base] the object to return a path for + # @return [String] the serialized path of an object + # + # source://yard//lib/yard/serializers/base.rb#51 + def serialized_path(object); end +end + +# Implements a serializer that reads from and writes to the filesystem. +# +# source://yard//lib/yard/serializers/file_system_serializer.rb#5 +class YARD::Serializers::FileSystemSerializer < ::YARD::Serializers::Base + # Creates a new FileSystemSerializer with options + # + # @option opts + # @option opts + # @param opts [Hash] a customizable set of options + # @return [FileSystemSerializer] a new instance of FileSystemSerializer + # + # source://yard//lib/yard/serializers/file_system_serializer.rb#28 + def initialize(opts = T.unsafe(nil)); end + + # The base path to write data to. + # + # @return [String] a base path + # + # source://yard//lib/yard/serializers/file_system_serializer.rb#8 + def basepath; end + + # source://yard//lib/yard/serializers/file_system_serializer.rb#10 + def basepath=(value); end + + # Checks the disk for an object and returns whether it was serialized. + # + # @param object [CodeObjects::Base] the object to check + # @return [Boolean] whether an object has been serialized to disk + # + # source://yard//lib/yard/serializers/file_system_serializer.rb#71 + def exists?(object); end + + # The extension of the filename (defaults to +html+) + # + # @return [String] the extension of the file. Empty string for no extension. + # + # source://yard//lib/yard/serializers/file_system_serializer.rb#17 + def extension; end + + # source://yard//lib/yard/serializers/file_system_serializer.rb#19 + def extension=(value); end + + # Serializes object with data to its serialized path (prefixed by the +#basepath+). + # + # @return [String] the written data (for chaining) + # + # source://yard//lib/yard/serializers/file_system_serializer.rb#38 + def serialize(object, data); end + + # Implements the serialized path of a code object. + # + # @param object [CodeObjects::Base, CodeObjects::ExtraFileObject, String] the object to get a path for. The path of a string is the string itself. + # @return [String] if object is a String, returns + # object, otherwise the path on disk (without the basepath). + # + # source://yard//lib/yard/serializers/file_system_serializer.rb#50 + def serialized_path(object); end + + private + + # Builds a filename mapping from object paths to filesystem path names. + # Needed to handle case sensitive YARD objects mapped into a case + # insensitive filesystem. Uses with {#mapped_name} to determine the + # mapping name for a given object. + # + # @note In order to use filesystem name mapping, you must initialize + # the serializer object after preparing the {YARD::Registry}. + # + # source://yard//lib/yard/serializers/file_system_serializer.rb#84 + def build_filename_map; end + + # Remove special chars from filenames. + # Windows disallows \ / : * ? " < > | but we will just remove any + # non alphanumeric (plus period, underscore and dash). + # + # source://yard//lib/yard/serializers/file_system_serializer.rb#111 + def encode_path_components(*components); end + + # @return [String] the filesystem mapped name of a given object. + # + # source://yard//lib/yard/serializers/file_system_serializer.rb#102 + def mapped_name(object); end +end + +# Serializes an object to a process (like less) +# +# @example Serializing to a pager (less) +# serializer = ProcessSerializer.new('less') +# serializer.serialize(object, "data!") +# +# source://yard//lib/yard/serializers/process_serializer.rb#9 +class YARD::Serializers::ProcessSerializer < ::YARD::Serializers::Base + # Creates a new ProcessSerializer for the shell command +cmd+ + # + # @param cmd [String] the command that will accept data on stdin + # @return [ProcessSerializer] a new instance of ProcessSerializer + # + # source://yard//lib/yard/serializers/process_serializer.rb#13 + def initialize(cmd); end + + # Overrides serialize behaviour and writes data to standard input + # of the associated command + # + # source://yard//lib/yard/serializers/process_serializer.rb#19 + def serialize(_object, data); end +end + +# A serializer that writes data to standard output. +# +# source://yard//lib/yard/serializers/stdout_serializer.rb#5 +class YARD::Serializers::StdoutSerializer < ::YARD::Serializers::Base + # Creates a serializer to print text to stdout + # + # @param wrap [Fixnum, nil] if wrap is a number, wraps text to +wrap+ + # columns, otherwise no wrapping is done. + # @return [StdoutSerializer] a new instance of StdoutSerializer + # + # source://yard//lib/yard/serializers/stdout_serializer.rb#10 + def initialize(wrap = T.unsafe(nil)); end + + # Overrides serialize behaviour to write data to standard output + # + # source://yard//lib/yard/serializers/stdout_serializer.rb#15 + def serialize(_object, data); end + + private + + # Wraps text to a specific column length + # + # @param text [String] the text to wrap + # @param _length [Fixnum] the column length to wrap to + # @return [String] the wrapped text + # + # source://yard//lib/yard/serializers/stdout_serializer.rb#26 + def word_wrap(text, _length = T.unsafe(nil)); end +end + +# source://yard//lib/yard/serializers/yardoc_serializer.rb#32 +class YARD::Serializers::YardocSerializer < ::YARD::Serializers::FileSystemSerializer + # @return [YardocSerializer] a new instance of YardocSerializer + # + # source://yard//lib/yard/serializers/yardoc_serializer.rb#33 + def initialize(yfile); end + + # source://yard//lib/yard/serializers/yardoc_serializer.rb#40 + def checksums_path; end + + # @return [Boolean] + # + # source://yard//lib/yard/serializers/yardoc_serializer.rb#45 + def complete?; end + + # source://yard//lib/yard/serializers/yardoc_serializer.rb#42 + def complete_lock_path; end + + # source://yard//lib/yard/serializers/yardoc_serializer.rb#101 + def deserialize(path, is_path = T.unsafe(nil)); end + + # Creates a pessmistic transactional lock on the database for writing. + # Use with {YARD.parse} to ensure the database is not written multiple + # times. + # + # @see #locked_for_writing? + # + # source://yard//lib/yard/serializers/yardoc_serializer.rb#54 + def lock_for_writing; end + + # @return [Boolean] whether the database is currently locked for writing + # + # source://yard//lib/yard/serializers/yardoc_serializer.rb#62 + def locked_for_writing?; end + + # source://yard//lib/yard/serializers/yardoc_serializer.rb#41 + def object_types_path; end + + # source://yard//lib/yard/serializers/yardoc_serializer.rb#37 + def objects_path; end + + # source://yard//lib/yard/serializers/yardoc_serializer.rb#43 + def processing_path; end + + # @deprecated The registry no longer tracks proxy types + # + # source://yard//lib/yard/serializers/yardoc_serializer.rb#39 + def proxy_types_path; end + + # source://yard//lib/yard/serializers/yardoc_serializer.rb#93 + def serialize(object); end + + # source://yard//lib/yard/serializers/yardoc_serializer.rb#66 + def serialized_path(object); end + + private + + # source://yard//lib/yard/serializers/yardoc_serializer.rb#114 + def dump(object); end + + # source://yard//lib/yard/serializers/yardoc_serializer.rb#119 + def internal_dump(object, first_object = T.unsafe(nil)); end +end + +# Namespace for classes and modules that handle serving documentation over HTTP +# +# == Implementing a Custom Server +# To customize the YARD server, see the {Adapter} and {Router} classes. +# +# == Rack Middleware +# If you want to use the YARD server as a Rack middleware, see the documentation +# in {RackMiddleware}. +# +# @since 0.6.0 +# +# source://yard//lib/yard/autoload.rb#214 +module YARD::Server + class << self + # Registers a static path to be used in static asset lookup. + # + # @param path [String] the pathname to register + # @return [void] + # @since 0.6.2 + # + # source://yard//lib/yard/server.rb#8 + def register_static_path(path); end + end +end + +# This class implements the bridge between the {Router} and the server +# backend for a specific server type. YARD implements concrete adapters +# for WEBrick and Rack respectively, though other adapters can be made +# for other server architectures. +# +# == Subclassing Notes +# To create a concrete adapter class, implement the {#start} method to +# initiate the server backend. +# +# @abstract +# @since 0.6.0 +# +# source://yard//lib/yard/server/adapter.rb#23 +class YARD::Server::Adapter + # Creates a new adapter object + # + # @option opts + # @option opts + # @option opts + # @param libs [Hash{String=>Array<LibraryVersion>}] a list of libraries, + # see {#libraries} for formulating this list. + # @param opts [Hash] extra options to pass to the adapter + # @return [Adapter] a new instance of Adapter + # @since 0.6.0 + # + # source://yard//lib/yard/server/adapter.rb#71 + def initialize(libs, opts = T.unsafe(nil), server_opts = T.unsafe(nil)); end + + # Adds a library to the {#libraries} mapping for a given library object. + # + # @example Adding a new library to an adapter + # adapter.add_library LibraryVersion.new('mylib', '1.0', '/path/to/.yardoc') + # @param library [LibraryVersion] a library to add + # @since 0.6.0 + # + # source://yard//lib/yard/server/adapter.rb#88 + def add_library(library); end + + # @return [String] the location where static files are located, if any. + # To set this field on initialization, pass +:DocumentRoot+ to the + # +server_opts+ argument in {#initialize} + # @since 0.6.0 + # + # source://yard//lib/yard/server/adapter.rb#27 + def document_root; end + + # @return [String] the location where static files are located, if any. + # To set this field on initialization, pass +:DocumentRoot+ to the + # +server_opts+ argument in {#initialize} + # @since 0.6.0 + # + # source://yard//lib/yard/server/adapter.rb#27 + def document_root=(_arg0); end + + # @return [Hash{String=>Array<LibraryVersion>}] a map of libraries. + # @see LibraryVersion LibraryVersion for information on building a list of libraries + # @see #add_library + # @since 0.6.0 + # + # source://yard//lib/yard/server/adapter.rb#32 + def libraries; end + + # @return [Hash{String=>Array<LibraryVersion>}] a map of libraries. + # @see LibraryVersion LibraryVersion for information on building a list of libraries + # @see #add_library + # @since 0.6.0 + # + # source://yard//lib/yard/server/adapter.rb#32 + def libraries=(_arg0); end + + # @return [Hash] options passed and processed by adapters. The actual + # options mostly depend on the adapters themselves. + # @since 0.6.0 + # + # source://yard//lib/yard/server/adapter.rb#36 + def options; end + + # @return [Hash] options passed and processed by adapters. The actual + # options mostly depend on the adapters themselves. + # @since 0.6.0 + # + # source://yard//lib/yard/server/adapter.rb#36 + def options=(_arg0); end + + # @return [Router] the router object used to route URLs to commands + # @since 0.6.0 + # + # source://yard//lib/yard/server/adapter.rb#43 + def router; end + + # @return [Router] the router object used to route URLs to commands + # @since 0.6.0 + # + # source://yard//lib/yard/server/adapter.rb#43 + def router=(_arg0); end + + # @return [Hash] a set of options to pass to the server backend. Note + # that +:DocumentRoot+ also sets the {#document_root}. + # @since 0.6.0 + # + # source://yard//lib/yard/server/adapter.rb#40 + def server_options; end + + # @return [Hash] a set of options to pass to the server backend. Note + # that +:DocumentRoot+ also sets the {#document_root}. + # @since 0.6.0 + # + # source://yard//lib/yard/server/adapter.rb#40 + def server_options=(_arg0); end + + # Implement this method to connect your adapter to your server. + # + # @abstract + # @raise [NotImplementedError] + # @since 0.6.0 + # + # source://yard//lib/yard/server/adapter.rb#95 + def start; end + + class << self + # Performs any global initialization for the adapter. + # + # @note If you subclass this method, make sure to call +super+. + # @return [void] + # @since 0.6.0 + # + # source://yard//lib/yard/server/adapter.rb#48 + def setup; end + + # Performs any global shutdown procedures for the adapter. + # + # @note If you subclass this method, make sure to call +super+. + # @return [void] + # @since 0.6.0 + # + # source://yard//lib/yard/server/adapter.rb#56 + def shutdown; end + end +end + +# @since 0.6.0 +# +# source://yard//lib/yard/server/http_utils.rb#16 +YARD::Server::CR = T.let(T.unsafe(nil), String) + +# @since 0.6.0 +# +# source://yard//lib/yard/server/http_utils.rb#18 +YARD::Server::CRLF = T.let(T.unsafe(nil), String) + +# Commands implement specific kinds of server responses which are routed +# to by the {Router} class. To implement a custom command, subclass {Commands::Base}. +# +# @since 0.6.0 +# +# source://yard//lib/yard/autoload.rb#219 +module YARD::Server::Commands; end + +# This is the base command class used to implement custom commands for +# a server. A command will be routed to by the {Router} class and return +# a Rack-style response. +# +# == Attribute Initializers +# All attributes can be initialized via options passed into the {#initialize} +# method. When creating a custom command, the {Adapter#options} will +# automatically be mapped to attributes by the same name on your class. +# +# class MyCommand < Base +# attr_accessor :myattr +# end +# +# Adapter.new(libs, {:myattr => 'foo'}).start +# +# # when a request comes in, cmd.myattr == 'foo' +# +# == Subclassing Notes +# To implement a custom command, override the {#run} method, not {#call}. +# In your implementation, you should set the body and status for requests. +# See details in the +#run+ method documentation. +# +# Note that if your command deals directly with libraries, you should +# consider subclassing the more specific {LibraryCommand} class instead. +# +# @abstract +# @see #run +# @since 0.6.0 +# +# source://yard//lib/yard/server/commands/base.rb#34 +class YARD::Server::Commands::Base + # Creates a new command object, setting attributes named by keys + # in the options hash. After initialization, the options hash + # is saved in {#command_options} for further inspection. + # + # @example Creating a Command + # cmd = DisplayObjectCommand.new(:caching => true, :library => mylib) + # cmd.library # => mylib + # cmd.command_options # => {:caching => true, :library => mylib} + # @param opts [Hash] the options hash, saved to {#command_options} + # after initialization. + # @return [Base] a new instance of Base + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#75 + def initialize(opts = T.unsafe(nil)); end + + # @return [Adapter] the server adapter + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#41 + def adapter; end + + # @return [Adapter] the server adapter + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#41 + def adapter=(_arg0); end + + # @return [String] the response body. Defaults to empty string. + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#61 + def body; end + + # @return [String] the response body. Defaults to empty string. + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#61 + def body=(_arg0); end + + # @return [Boolean] whether to cache + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#44 + def caching; end + + # @return [Boolean] whether to cache + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#44 + def caching=(_arg0); end + + # The main method called by a router with a request object. + # + # @note This command should not be overridden by subclasses. Implement + # the callback method {#run} instead. + # @param request [Adapter Dependent] the request object + # @return [Array(Numeric,Hash,Array<String>)] a Rack-style response + # of status, headers, and body wrapped in an array. + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#89 + def call(request); end + + # @return [Hash] the options passed to the command's constructor + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#38 + def command_options; end + + # @return [Hash] the options passed to the command's constructor + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#38 + def command_options=(_arg0); end + + # @return [Hash{String => String}] response headers + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#55 + def headers; end + + # @return [Hash{String => String}] response headers + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#55 + def headers=(_arg0); end + + # @return [String] the path after the command base URI + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#52 + def path; end + + # @return [String] the path after the command base URI + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#52 + def path=(_arg0); end + + # @return [Rack::Request] request object + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#49 + def request; end + + # @return [Rack::Request] request object + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#49 + def request=(_arg0); end + + # Subclass this method to implement a custom command. This method + # should set the {#status} and {#body}, and optionally modify the + # {#headers}. Note that +#status+ defaults to 200. + # + # @abstract + # @example A custom command + # class ErrorCommand < Base + # def run + # self.body = 'ERROR! The System is down!' + # self.status = 500 + # self.headers['Content-Type'] = 'text/plain' + # end + # end + # @raise [NotImplementedError] + # @return [void] + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#128 + def run; end + + # @return [Numeric] status code. Defaults to 200 per request + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#58 + def status; end + + # @return [Numeric] status code. Defaults to 200 per request + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#58 + def status=(_arg0); end + + protected + + # Override this method to implement custom caching mechanisms for + # + # @example Caching to memory + # $memory_cache = {} + # def cache(data) + # $memory_cache[path] = data + # end + # @param data [String] the data to cache + # @return [String] the same cached data (for chaining) + # @see StaticCaching + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#165 + def cache(data); end + + # Sets the body and headers for a 404 response. Does not modify the + # body if already set. + # + # @return [void] + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#180 + def not_found; end + + # Sets the headers and status code for a redirection to a given URL + # + # @param url [String] the URL to redirect to + # @raise [FinishRequest] causes the request to terminate. + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#192 + def redirect(url); end + + # Renders a specific object if provided, or a regular template rendering + # if object is not provided. + # + # @param object [CodeObjects::Base, nil] calls {CodeObjects::Base#format} if + # an object is provided, or {Templates::Engine.render} if object is nil. Both + # receive +#options+ as an argument. + # @return [String] the resulting output to display + # @since 0.6.0 + # @todo This method is dependent on +#options+, it should be in {LibraryCommand}. + # + # source://yard//lib/yard/server/commands/base.rb#144 + def render(object = T.unsafe(nil)); end + + private + + # Add a conservative cache control policy to reduce load on + # requests served with "?1234567890" style timestamp query strings. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/base.rb#202 + def add_cache_control; end +end + +# Displays a README or extra file. +# +# @since 0.6.0 +# @todo Implement better support for detecting binary (image) filetypes +# +# source://yard//lib/yard/server/commands/display_file_command.rb#8 +class YARD::Server::Commands::DisplayFileCommand < ::YARD::Server::Commands::LibraryCommand + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/display_file_command.rb#9 + def index; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/display_file_command.rb#9 + def index=(_arg0); end + + # @raise [NotFoundError] + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/display_file_command.rb#11 + def run; end +end + +# Displays documentation for a specific object identified by the path +# +# @since 0.6.0 +# +# source://yard//lib/yard/server/commands/display_object_command.rb#6 +class YARD::Server::Commands::DisplayObjectCommand < ::YARD::Server::Commands::LibraryCommand + include ::YARD::Server::DocServerHelper + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/display_object_command.rb#36 + def index; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/display_object_command.rb#47 + def not_found; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/display_object_command.rb#9 + def run; end + + private + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/display_object_command.rb#54 + def object_path; end +end + +# Displays an object wrapped in frames +# +# @since 0.6.0 +# +# source://yard//lib/yard/server/commands/frames_command.rb#6 +class YARD::Server::Commands::FramesCommand < ::YARD::Server::Commands::DisplayObjectCommand + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/frames_command.rb#7 + def run; end +end + +# This is the base command for all commands that deal directly with libraries. +# Some commands do not, but most (like {DisplayObjectCommand}) do. If your +# command deals with libraries directly, subclass this class instead. +# See {Base} for notes on how to subclass a command. +# +# @abstract +# @since 0.6.0 +# +# source://yard//lib/yard/server/commands/library_command.rb#32 +class YARD::Server::Commands::LibraryCommand < ::YARD::Server::Commands::Base + # @return [LibraryCommand] a new instance of LibraryCommand + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#63 + def initialize(opts = T.unsafe(nil)); end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#68 + def call(request); end + + # @return [Boolean] whether to reparse data + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#53 + def incremental; end + + # @return [Boolean] whether to reparse data + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#53 + def incremental=(_arg0); end + + # @return [LibraryVersion] the object containing library information + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#41 + def library; end + + # @return [LibraryVersion] the object containing library information + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#41 + def library=(_arg0); end + + # @return [LibraryOptions] default options for the library + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#44 + def options; end + + # @return [LibraryOptions] default options for the library + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#44 + def options=(_arg0); end + + # @return [Serializers::Base] the serializer used to perform file linking + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#47 + def serializer; end + + # @return [Serializers::Base] the serializer used to perform file linking + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#47 + def serializer=(_arg0); end + + # @return [Boolean] whether router should route for multiple libraries + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#50 + def single_library; end + + # @return [Boolean] whether router should route for multiple libraries + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#50 + def single_library=(_arg0); end + + # @return [Boolean] whether or not this adapter calls +fork+ when serving + # library requests. Defaults to false. + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#57 + def use_fork; end + + # @return [Boolean] whether or not this adapter calls +fork+ when serving + # library requests. Defaults to false. + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#57 + def use_fork=(_arg0); end + + private + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#96 + def call_with_fork(request, &block); end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#83 + def call_without_fork(request); end + + # @return [Boolean] + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#109 + def can_fork?; end + + # Hack to load a custom fulldoc template object that does + # not do any rendering/generation. We need this to access the + # generate_*_list methods. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#171 + def fulldoc_template; end + + # @raise [LibraryNotPreparedError] + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#147 + def load_yardoc; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#159 + def not_prepared; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#118 + def restore_template_info; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#113 + def save_default_template_info; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#123 + def setup_library; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#130 + def setup_yardopts; end +end + +# source://yard//lib/yard/server/commands/library_command.rb#35 +YARD::Server::Commands::LibraryCommand::CAN_FORK = T.let(T.unsafe(nil), TrueClass) + +# Returns the index of libraries served by the server. +# +# @since 0.6.0 +# +# source://yard//lib/yard/server/commands/library_index_command.rb#13 +class YARD::Server::Commands::LibraryIndexCommand < ::YARD::Server::Commands::Base + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_index_command.rb#14 + def options; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_index_command.rb#14 + def options=(_arg0); end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_index_command.rb#16 + def run; end +end + +# @since 0.6.0 +# +# source://yard//lib/yard/server/commands/library_index_command.rb#5 +class YARD::Server::Commands::LibraryIndexOptions < ::YARD::CLI::YardocOptions + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_index_command.rb#6 + def adapter; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_index_command.rb#6 + def adapter=(_arg0); end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_index_command.rb#6 + def libraries; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_index_command.rb#6 + def libraries=(_arg0); end + + # source://yard//lib/yard/options.rb#82 + def serialize; end + + # source://yard//lib/yard/options.rb#82 + def serialize=(_arg0); end + + # source://yard//lib/yard/options.rb#82 + def template; end + + # source://yard//lib/yard/options.rb#82 + def template=(_arg0); end + + # source://yard//lib/yard/options.rb#82 + def type; end + + # source://yard//lib/yard/options.rb#82 + def type=(_arg0); end +end + +# @since 0.6.0 +# +# source://yard//lib/yard/server/commands/library_command.rb#7 +class YARD::Server::Commands::LibraryOptions < ::YARD::CLI::YardocOptions + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#8 + def adapter; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#14 + def command; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#14 + def command=(_arg0); end + + # @since 0.6.0 + # @yield [:adapter, adapter] + # + # source://yard//lib/yard/server/commands/library_command.rb#17 + def each(&block); end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#15 + def frames; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#15 + def frames=(_arg0); end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#9 + def library; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#12 + def serialize; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#11 + def serializer; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/library_command.rb#10 + def single_library; end +end + +# Returns a list of objects of a specific type +# +# @since 0.6.0 +# +# source://yard//lib/yard/server/commands/list_command.rb#6 +class YARD::Server::Commands::ListCommand < ::YARD::Server::Commands::LibraryCommand + include ::YARD::Templates::Helpers::BaseHelper + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/list_command.rb#9 + def run; end +end + +# Serves requests from the root of the server +# +# @since 0.6.0 +# +# source://yard//lib/yard/server/commands/root_request_command.rb#6 +class YARD::Server::Commands::RootRequestCommand < ::YARD::Server::Commands::Base + include ::YARD::Server::HTTPUtils + include ::YARD::Server::Commands::StaticFileHelpers + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/root_request_command.rb#9 + def run; end +end + +# Performs a search over the objects inside of a library and returns +# the results as HTML or plaintext +# +# @since 0.6.0 +# +# source://yard//lib/yard/server/commands/search_command.rb#7 +class YARD::Server::Commands::SearchCommand < ::YARD::Server::Commands::LibraryCommand + include ::YARD::Templates::Helpers::BaseHelper + include ::YARD::Templates::Helpers::ModuleHelper + include ::YARD::Server::DocServerHelper + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/search_command.rb#12 + def query; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/search_command.rb#12 + def query=(_arg0); end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/search_command.rb#12 + def results; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/search_command.rb#12 + def results=(_arg0); end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/search_command.rb#14 + def run; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/search_command.rb#26 + def visible_results; end + + private + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/search_command.rb#58 + def search_for_object; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/search_command.rb#47 + def serve_normal; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/search_command.rb#37 + def serve_xhr; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/search_command.rb#32 + def url_for(object); end +end + +# Serves static content when no other router matches a request +# +# @since 0.6.0 +# +# source://yard//lib/yard/server/commands/static_file_command.rb#6 +class YARD::Server::Commands::StaticFileCommand < ::YARD::Server::Commands::LibraryCommand + include ::YARD::Server::HTTPUtils + include ::YARD::Server::Commands::StaticFileHelpers + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/static_file_command.rb#17 + def run; end +end + +# Defines the paths used to search for static assets. To define an +# extra path, use {YARD::Server.register_static_path} rather than +# modifying this constant directly. Also note that files in the +# document root will always take precedence over these paths. +# +# @since 0.6.0 +# +# source://yard//lib/yard/server/commands/static_file_command.rb#15 +YARD::Server::Commands::StaticFileCommand::STATIC_PATHS = T.let(T.unsafe(nil), Array) + +# Include this module to get access to {#static_template_file?} +# and {favicon?} helpers. +# +# @since 0.6.0 +# +# source://yard//lib/yard/server/commands/static_file_helpers.rb#8 +module YARD::Server::Commands::StaticFileHelpers + include ::YARD::Server::HTTPUtils + + # Serves an empty favicon. + # + # @raise [FinishRequest] finalizes an empty body if the path matches + # /favicon.ico so browsers don't complain. + # @return [Boolean] + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/static_file_helpers.rb#14 + def favicon?; end + + # Attempts to route a path to a static template file. + # + # @raise [FinishRequest] if a file was found and served + # @return [void] + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/static_file_helpers.rb#26 + def static_template_file?; end + + private + + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/static_file_helpers.rb#42 + def find_file(adapter, url); end + + class << self + # @since 0.6.0 + # + # source://yard//lib/yard/server/commands/static_file_helpers.rb#42 + def find_file(adapter, url); end + end +end + +# A module that is mixed into {Templates::Template} in order to customize +# certain template methods. +# +# @since 0.6.0 +# +# source://yard//lib/yard/server/doc_server_helper.rb#6 +module YARD::Server::DocServerHelper + # @param path_components [Array<String>] components of a URL + # @return [String] the absolute path from any mounted base URI. + # @since 0.6.0 + # + # source://yard//lib/yard/server/doc_server_helper.rb#61 + def abs_url(*path_components); end + + # @example The base path for a library 'foo' + # base_path('docs') # => 'docs/foo' + # @param path [String] the path prefix for a base path URI + # @return [String] the base URI for a library with an extra +path+ prefix + # @since 0.6.0 + # + # source://yard//lib/yard/server/doc_server_helper.rb#69 + def base_path(path); end + + # @return [String] a timestamp for a given file + # @since 0.6.0 + # + # source://yard//lib/yard/server/doc_server_helper.rb#78 + def mtime(file); end + + # @return [String] a URL for a file with a timestamp + # @since 0.6.0 + # + # source://yard//lib/yard/server/doc_server_helper.rb#84 + def mtime_url(file); end + + # @return [Router] convenience method for accessing the router + # @since 0.6.0 + # + # source://yard//lib/yard/server/doc_server_helper.rb#75 + def router; end + + # Modifies {Templates::Helpers::HtmlHelper#url_for} to return a URL instead + # of a disk location. + # + # @param obj [String, CodeObjects::Base] the object (or object path) to link to + # @param anchor [String] the anchor to link to + # @param relative [Boolean] use a relative or absolute link + # @return [String] the URL location of the object + # @since 0.6.0 + # + # source://yard//lib/yard/server/doc_server_helper.rb#11 + def url_for(obj, anchor = T.unsafe(nil), relative = T.unsafe(nil)); end + + # Modifies {Templates::Helpers::HtmlHelper#url_for_file} to return a URL instead + # of a disk location. + # + # @param filename [String, CodeObjects::ExtraFileObject] the filename to link to + # @param anchor [String] optional anchor + # @return [String] the URL pointing to the file + # @since 0.6.0 + # + # source://yard//lib/yard/server/doc_server_helper.rb#24 + def url_for_file(filename, anchor = T.unsafe(nil)); end + + # Returns the frames URL for the page + # + # @return [String] the URL pointing to the frames page + # @since 0.6.0 + # + # source://yard//lib/yard/server/doc_server_helper.rb#43 + def url_for_frameset; end + + # Returns the URL for the alphabetic index page + # + # @return [String] the URL pointing to the first main page the + # user should see. + # @since 0.6.0 + # + # source://yard//lib/yard/server/doc_server_helper.rb#55 + def url_for_index; end + + # Modifies {Templates::Helpers::HtmlHelper#url_for_list} to return a URL + # based on the list prefix instead of a HTML filename. + # + # @param type [String, Symbol] the list type to generate a URL for + # @return [String] the URL pointing to the list + # @since 0.6.0 + # + # source://yard//lib/yard/server/doc_server_helper.rb#37 + def url_for_list(type); end + + # Returns the main URL, first checking a readme and then linking to the index + # + # @return [String] the URL pointing to the first main page the + # user should see. + # @since 0.6.0 + # + # source://yard//lib/yard/server/doc_server_helper.rb#49 + def url_for_main; end +end + +# A custom {Serializers::Base serializer} which returns resource URLs instead of +# static relative paths to files on disk. +# +# @since 0.6.0 +# +# source://yard//lib/yard/server/doc_server_serializer.rb#6 +class YARD::Server::DocServerSerializer < ::YARD::Serializers::FileSystemSerializer + # @return [DocServerSerializer] a new instance of DocServerSerializer + # @since 0.6.0 + # + # source://yard//lib/yard/server/doc_server_serializer.rb#7 + def initialize(_command = T.unsafe(nil)); end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/doc_server_serializer.rb#11 + def serialized_path(object); end + + private + + # @since 0.6.0 + # + # source://yard//lib/yard/server/doc_server_serializer.rb#31 + def urlencode(name); end +end + +# Short circuits a request by raising an error. This exception is caught +# by {Commands::Base#call} to immediately end a request and return a response. +# +# @since 0.6.0 +# +# source://yard//lib/yard/server/adapter.rb#6 +class YARD::Server::FinishRequest < ::RuntimeError; end + +# HTTPUtils provides utility methods for working with the HTTP protocol. +# +# This module is generally used internally by WEBrick +# +# @since 0.6.0 +# +# source://yard//lib/yard/server/http_utils.rb#25 +module YARD::Server::HTTPUtils + private + + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#443 + def _escape(str, regex); end + + # :stopdoc: + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#441 + def _make_regex(str); end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#442 + def _make_regex!(str); end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#449 + def _unescape(str, regex); end + + # Removes quotes and escapes from +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#223 + def dequote(str); end + + # Escapes HTTP reserved and unwise characters in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#467 + def escape(str); end + + # Escapes 8 bit characters in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#508 + def escape8bit(str); end + + # Escapes form reserved characters in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#481 + def escape_form(str); end + + # Escapes path +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#497 + def escape_path(str); end + + # Loads Apache-compatible mime.types in +file+. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#112 + def load_mime_types(file); end + + # Returns the mime type of +filename+ from the list in +mime_tab+. If no + # mime type was found application/octet-stream is returned. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#134 + def mime_type(filename, mime_tab); end + + # Normalizes a request path. Raises an exception if the path cannot be + # normalized. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#31 + def normalize_path(path); end + + # Parses form data in +io+ with the given +boundary+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#395 + def parse_form_data(io, boundary); end + + # Parses an HTTP header +raw+ into a hash of header fields with an Array + # of values. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#145 + def parse_header(raw); end + + # Parses the query component of a URI in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#371 + def parse_query(str); end + + # Parses q values in +value+ as used in Accept headers. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#202 + def parse_qvalues(value); end + + # Parses a Range header value +ranges_specifier+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#184 + def parse_range_header(ranges_specifier); end + + # Quotes and escapes quotes in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#233 + def quote(str); end + + # Splits a header value +str+ according to HTTP specification. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#175 + def split_header_value(str); end + + # Unescapes HTTP reserved and unwise characters in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#474 + def unescape(str); end + + # Unescapes form reserved characters in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#490 + def unescape_form(str); end + + class << self + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#443 + def _escape(str, regex); end + + # :stopdoc: + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#441 + def _make_regex(str); end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#442 + def _make_regex!(str); end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#449 + def _unescape(str, regex); end + + # Removes quotes and escapes from +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#223 + def dequote(str); end + + # Escapes HTTP reserved and unwise characters in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#467 + def escape(str); end + + # Escapes 8 bit characters in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#508 + def escape8bit(str); end + + # Escapes form reserved characters in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#481 + def escape_form(str); end + + # Escapes path +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#497 + def escape_path(str); end + + # Loads Apache-compatible mime.types in +file+. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#112 + def load_mime_types(file); end + + # Returns the mime type of +filename+ from the list in +mime_tab+. If no + # mime type was found application/octet-stream is returned. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#134 + def mime_type(filename, mime_tab); end + + # Normalizes a request path. Raises an exception if the path cannot be + # normalized. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#31 + def normalize_path(path); end + + # Parses form data in +io+ with the given +boundary+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#395 + def parse_form_data(io, boundary); end + + # Parses an HTTP header +raw+ into a hash of header fields with an Array + # of values. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#145 + def parse_header(raw); end + + # Parses the query component of a URI in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#371 + def parse_query(str); end + + # Parses q values in +value+ as used in Accept headers. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#202 + def parse_qvalues(value); end + + # Parses a Range header value +ranges_specifier+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#184 + def parse_range_header(ranges_specifier); end + + # Quotes and escapes quotes in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#233 + def quote(str); end + + # Splits a header value +str+ according to HTTP specification. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#175 + def split_header_value(str); end + + # Unescapes HTTP reserved and unwise characters in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#474 + def unescape(str); end + + # Unescapes form reserved characters in +str+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#490 + def unescape_form(str); end + end +end + +# Default mime types +# +# @since 0.6.0 +# +# source://yard//lib/yard/server/http_utils.rb#47 +YARD::Server::HTTPUtils::DefaultMimeTypes = T.let(T.unsafe(nil), Hash) + +# @since 0.6.0 +# +# source://yard//lib/yard/server/http_utils.rb#459 +YARD::Server::HTTPUtils::ESCAPED = T.let(T.unsafe(nil), Regexp) + +# Stores multipart form data. FormData objects are created when +# WEBrick::HTTPUtils.parse_form_data is called. +# +# @since 0.6.0 +# +# source://yard//lib/yard/server/http_utils.rb#242 +class YARD::Server::HTTPUtils::FormData < ::String + # Creates a new FormData object. + # + # +args+ is an Array of form data entries. One FormData will be created + # for each entry. + # + # This is called by WEBrick::HTTPUtils.parse_form_data for you + # + # @return [FormData] a new instance of FormData + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#267 + def initialize(*args); end + + # Adds +str+ to this FormData which may be the body, a header or a + # header entry. + # + # This is called by WEBrick::HTTPUtils.parse_form_data for you + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#300 + def <<(str); end + + # Retrieves the header at the first entry in +key+ + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#286 + def [](*key); end + + # Adds +data+ at the end of the chain of entries + # + # This is called by WEBrick::HTTPUtils.parse_form_data for you. + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#320 + def append_data(data); end + + # Yields each entry in this FormData + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#335 + def each_data; end + + # The filename of the form data part + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#254 + def filename; end + + # The filename of the form data part + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#254 + def filename=(_arg0); end + + # Returns all the FormData as an Array + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#347 + def list; end + + # The name of the form data part + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#249 + def name; end + + # The name of the form data part + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#249 + def name=(_arg0); end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#256 + def next_data=(_arg0); end + + # Returns all the FormData as an Array + # A FormData will behave like an Array + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#347 + def to_ary; end + + # This FormData's body + # + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#363 + def to_s; end + + protected + + # @since 0.6.0 + # + # source://yard//lib/yard/server/http_utils.rb#256 + def next_data; end +end + +# @since 0.6.0 +# +# source://yard//lib/yard/server/http_utils.rb#244 +YARD::Server::HTTPUtils::FormData::EmptyHeader = T.let(T.unsafe(nil), Hash) + +# @since 0.6.0 +# +# source://yard//lib/yard/server/http_utils.rb#243 +YARD::Server::HTTPUtils::FormData::EmptyRawHeader = T.let(T.unsafe(nil), Array) + +# @since 0.6.0 +# +# source://yard//lib/yard/server/http_utils.rb#458 +YARD::Server::HTTPUtils::NONASCII = T.let(T.unsafe(nil), Regexp) + +# @since 0.6.0 +# +# source://yard//lib/yard/server/http_utils.rb#456 +YARD::Server::HTTPUtils::UNESCAPED = T.let(T.unsafe(nil), Regexp) + +# @since 0.6.0 +# +# source://yard//lib/yard/server/http_utils.rb#457 +YARD::Server::HTTPUtils::UNESCAPED_FORM = T.let(T.unsafe(nil), Regexp) + +# @since 0.6.0 +# +# source://yard//lib/yard/server/http_utils.rb#460 +YARD::Server::HTTPUtils::UNESCAPED_PCHAR = T.let(T.unsafe(nil), Regexp) + +# @since 0.6.0 +# +# source://yard//lib/yard/server/http_utils.rb#17 +YARD::Server::LF = T.let(T.unsafe(nil), String) + +# This exception is raised when {LibraryVersion#prepare!} fails, or discovers +# that the library is not "prepared" to be served by +# +# @since 0.6.0 +# +# source://yard//lib/yard/server/library_version.rb#9 +class YARD::Server::LibraryNotPreparedError < ::RuntimeError; end + +# A library version encapsulates a library's documentation at a specific version. +# Although the version is optional, this allows for creating multiple documentation +# points for a specific library, each representing a unique version. The term +# "library" used in other parts of the YARD::Server documentation refers to +# objects of this class unless otherwise noted. +# +# A library points to a location where a {#yardoc_file} is located so that +# its documentation may be loaded and served. Optionally, a {#source_path} is +# given to point to a location where any extra files (and {YARD::CLI::Yardoc .yardopts}) +# should be loaded from. Both of these methods may not be known immediately, +# since the yardoc file may not be built until later. Resolving the yardoc +# file and source path are dependent on the specific library "source type" used. +# Source types (known as "library source") are discussed in detail below. +# +# == Using with Adapters +# A list of libraries need to be passed into adapters upon creation. In +# most cases, you will never do this manually, but if you use a {RackMiddleware}, +# you will need to pass in this list yourself. To build this list of libraries, +# you should create a hash of library names mapped to an *Array* of LibraryVersion +# objects. For example: +# +# {'mylib' => [LibraryVersion.new('mylib', '1.0', ...), +# LibraryVersion.new('mylib', '2.0', ...)]} +# +# Note that you can also use {Adapter#add_library} for convenience. +# +# The "array" part is required, even for just one library version. +# +# == Library Sources +# The {#source} method represents the library source type, ie. where the +# library "comes from". It might come from "disk", or it might come from a +# "gem" (technically the disk, but a separate type nonetheless). In these +# two cases, the yardoc file sits somewhere on your filesystem, though +# it may also be built dynamically if it does not yet exist. This behaviour +# is controlled through the {#prepare!} method, which prepares the yardoc file +# given a specific library source. We will see how this works in detail in +# the following section. +# +# == Implementing a Custom Library Source +# YARD can be extended to support custom library sources in order to +# build or retrieve a yardoc file at runtime from many different locations. +# +# To implement this behaviour, 3 methods can be added to the +LibraryVersion+ +# class, +#load_yardoc_from_SOURCE+, +#yardoc_file_for_SOURCE+, and +# +#source_path_for_SOURCE+. In all cases, "SOURCE" represents the source +# type used in {#source} when creating the library object. The +# +#yardoc_file_for_SOURCE+ and +#source_path_for_SOURCE+ methods are called upon +# creation and should return the location where the source code for the library +# lives. The load method is called from {#prepare!} if there is no yardoc file +# and should set {#yardoc_file}. Below is a full example for +# implementing a custom library source, +:http+, which reads packaged .yardoc +# databases from zipped archives off of an HTTP server. +# +# Note that only +#load_yardoc_from_SOURCE+ is required. The other two +# methods are optional and can be set manually (via {#source_path=} and +# {#yardoc_file=}) on the object at any time. +# +# @example Implementing a Custom Library Source +# # Adds the source type "http" for .yardoc files zipped on HTTP servers +# class LibraryVersion +# def load_yardoc_from_http +# Thread.new do +# # zip/unzip method implementations are not shown +# download_zip_file("http://mysite.com/yardocs/#{self}.zip") +# unzip_file_to("/path/to/yardocs/#{self}") +# end +# +# # tell the server it's not ready yet (but it might be next time) +# raise LibraryNotPreparedError +# end +# +# def yardoc_file_for_http +# "/path/to/yardocs/#{self}/.yardoc" +# end +# +# def source_path_for_http +# File.dirname(yardoc_file) +# end +# end +# +# # Creating a library of this source type: +# LibraryVersion.new('name', '1.0', nil, :http) +# @since 0.6.0 +# +# source://yard//lib/yard/server/library_version.rb#94 +class YARD::Server::LibraryVersion + # @param name [String] the name of the library + # @param version [String] the specific (usually, but not always, numeric) library + # version + # @param yardoc [String] the location of the yardoc file, or nil if it is + # generated later + # @param source [Symbol] the location of the files used to build the yardoc. + # Builtin source types are +:disk+ or +:gem+. + # @return [LibraryVersion] a new instance of LibraryVersion + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#134 + def initialize(name, version = T.unsafe(nil), yardoc = T.unsafe(nil), source = T.unsafe(nil)); end + + # @return [Boolean] whether another LibraryVersion is equal to this one + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#153 + def ==(other); end + + # @return [Boolean] whether another LibraryVersion is equal to this one + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#153 + def eql?(other); end + + # @return [Boolean] whether another LibraryVersion is equal to this one + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#153 + def equal?(other); end + + # @return [Gem::Specification] a gemspec object for a given library. Used + # for :gem source types. + # @return [nil] if there is no installed gem for the library + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#191 + def gemspec; end + + # @return [Fixnum] used for Hash mapping. + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#150 + def hash; end + + # @return [String] the name of the library + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#96 + def name; end + + # @return [String] the name of the library + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#96 + def name=(_arg0); end + + # Prepares a library to be displayed by the server. This callback is + # performed before each request on a library to ensure that it is loaded + # and ready to be viewed. If any steps need to be performed prior to loading, + # they are performed through this method (though they should be implemented + # through the +load_yardoc_from_SOURCE+ method). + # + # @note You should not directly override this method. Instead, implement + # +load_yardoc_from_SOURCENAME+ when implementing loading for a specific + # source type. See the {LibraryVersion} documentation for "Implementing + # a Custom Library Source" + # @raise [LibraryNotPreparedError] if the library is not ready to be + # displayed. Usually when raising this error, you would simultaneously + # begin preparing the library for subsequent requests, although this + # is not necessary. + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#182 + def prepare!; end + + # @return [Boolean] whether the library has been completely processed + # and is ready to be served + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#162 + def ready?; end + + # @return [Symbol] the source type representing where the yardoc should be + # loaded from. Defaults are +:disk+ and +:gem+, though custom sources + # may be implemented. This value is used to inform {#prepare!} about how + # to load the necessary data in order to display documentation for an object. + # @see LibraryVersion LibraryVersion documentation for "Implementing a Custom Library Source" + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#116 + def source; end + + # @return [Symbol] the source type representing where the yardoc should be + # loaded from. Defaults are +:disk+ and +:gem+, though custom sources + # may be implemented. This value is used to inform {#prepare!} about how + # to load the necessary data in order to display documentation for an object. + # @see LibraryVersion LibraryVersion documentation for "Implementing a Custom Library Source" + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#116 + def source=(_arg0); end + + # @return [String] the location of the source code for a library. This + # value is filled by calling +#source_path_for_SOURCE+ on this class. + # @return [nil] if there is no source code + # @see LibraryVersion LibraryVersion documentation for "Implementing a Custom Library Source" + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#122 + def source_path; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#125 + def source_path=(_arg0); end + + # @param url_format [Boolean] if true, returns the string in a URI-compatible + # format (for appending to a URL). Otherwise, it is given in a more human + # readable format. + # @return [String] the string representation of the library. + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#145 + def to_s(url_format = T.unsafe(nil)); end + + # @return [String] the version of the specific library + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#99 + def version; end + + # @return [String] the version of the specific library + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#99 + def version=(_arg0); end + + # @note To implement a custom yardoc file getter, implement + # @return [String] the location of the yardoc file used to load the object + # information from. + # @return [nil] if no yardoc file exists yet. In this case, {#prepare!} will + # be called on this library to build the yardoc file. + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#106 + def yardoc_file; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#109 + def yardoc_file=(_arg0); end + + protected + + # Called when a library of source type "disk" is to be prepared. In this + # case, the {#yardoc_file} should already be set, but the library may not + # be prepared. Run preparation if not done. + # + # @raise [LibraryNotPreparedError] if the yardoc file has not been + # prepared. + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#206 + def load_yardoc_from_disk; end + + # Called when a library of source type "gem" is to be prepared. In this + # case, the {#yardoc_file} needs to point to the correct location for + # the installed gem. The yardoc file is built if it has not been done. + # + # @raise [LibraryNotPreparedError] if the gem does not have an existing + # yardoc file. + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#226 + def load_yardoc_from_gem; end + + # @return [String] the source path for a disk source + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#243 + def source_path_for_disk; end + + # @return [String] the source path for a gem source + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#248 + def source_path_for_gem; end + + # @return [String] the yardoc file for a gem source + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#253 + def yardoc_file_for_gem; end + + private + + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#261 + def load_source_path; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#266 + def load_yardoc_file; end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/library_version.rb#271 + def serializer; end +end + +# Raises an error if a resource is not found. This exception is caught by +# {Commands::Base#call} to immediately end a request and return a 404 response +# code. If a message is provided, the body is set to the exception message. +# +# @since 0.6.0 +# +# source://yard//lib/yard/server/adapter.rb#11 +class YARD::Server::NotFoundError < ::RuntimeError; end + +# A router class implements the logic used to recognize a request for a specific +# URL and run specific {Commands::Base commands}. +# +# == Subclassing Notes +# To create a custom router, subclass this class and pass it into the adapter +# options through {Adapter#initialize} or by directly modifying {Adapter#router}. +# +# The most general customization is to change the URL prefixes recognized by +# routing, which can be done by overriding {#docs_prefix}, {#list_prefix}, +# {#static_prefix}, and {#search_prefix}. +# +# == Implementing Custom Caching +# By default, the Router class performs static disk-based caching on all +# requests through the +#check_static_cache+. To override this behaviour, +# or create your own caching mechanism, mixin your own custom module with +# this method implemented as per {StaticCaching#check_static_cache}. +# +# @example Creating a subclassed router +# # Adds 'my' to all routing prefixes +# class MyRouter < YARD::Server::Router +# def docs_prefix; 'mydocs' end +# def list_prefix; 'mylist' end +# def static_prefix; 'mystatic' end +# def search_prefix; 'mysearch' end +# end +# +# # Using it: +# WebrickAdapter.new(libraries, :router => MyRouter).start +# @since 0.6.0 +# +# source://yard//lib/yard/server/router.rb#32 +class YARD::Server::Router + include ::YARD::Server::StaticCaching + include ::YARD::Server::Commands + + # Creates a new router for a specific adapter + # + # @param adapter [Adapter] the adapter to route requests to + # @return [Router] a new instance of Router + # @since 0.6.0 + # + # source://yard//lib/yard/server/router.rb#45 + def initialize(adapter); end + + # @return [Adapter] the adapter used by the router + # @since 0.6.0 + # + # source://yard//lib/yard/server/router.rb#40 + def adapter; end + + # @return [Adapter] the adapter used by the router + # @since 0.6.0 + # + # source://yard//lib/yard/server/router.rb#40 + def adapter=(_arg0); end + + # Perform routing on a specific request, serving the request as a static + # file through {Commands::RootRequestCommand} if no route is found. + # + # @param request [Adapter Dependent] the request object + # @return [Array(Numeric,Hash,Array)] the Rack-style server response data + # @since 0.6.0 + # + # source://yard//lib/yard/server/router.rb#54 + def call(request); end + + # @return [String] the URI prefix for all object documentation requests + # @since 0.6.0 + # + # source://yard//lib/yard/server/router.rb#63 + def docs_prefix; end + + # @return [String] the URI prefix for all class/method/file list requests + # @since 0.6.0 + # + # source://yard//lib/yard/server/router.rb#66 + def list_prefix; end + + # @return [Array(LibraryVersion, Array<String>)] the library followed + # by the rest of the path components in the request path. LibraryVersion + # will be nil if no matching library was found. + # @since 0.6.0 + # + # source://yard//lib/yard/server/router.rb#79 + def parse_library_from_path(paths); end + + # @return [Adapter Dependent] the request data coming in with the routing + # @since 0.6.0 + # + # source://yard//lib/yard/server/router.rb#37 + def request; end + + # @return [Adapter Dependent] the request data coming in with the routing + # @since 0.6.0 + # + # source://yard//lib/yard/server/router.rb#37 + def request=(_arg0); end + + # @return [String] the URI prefix for all search requests + # @since 0.6.0 + # + # source://yard//lib/yard/server/router.rb#69 + def search_prefix; end + + # @return [String] the URI prefix for all static assets (templates) + # @since 0.6.0 + # + # source://yard//lib/yard/server/router.rb#72 + def static_prefix; end + + protected + + # Adds extra :library/:path option keys to the adapter options. + # Use this method when passing options to a command. + # + # @param library [LibraryVersion] the library to route for + # @param paths [Array<String>] path components (split by '/') + # @return [Hash] finalized options + # @since 0.6.0 + # + # source://yard//lib/yard/server/router.rb#181 + def final_options(library, paths); end + + # Performs routing algorithm to find which prefix is called, first + # parsing out library name/version information. + # + # @return [Array(Numeric,Hash,Array<String>)] the Rack-style response + # @return [nil] if no route is matched + # @since 0.6.0 + # + # source://yard//lib/yard/server/router.rb#105 + def route(path = T.unsafe(nil)); end + + # Routes requests from {#docs_prefix} and calls the appropriate command + # + # @param library [LibraryVersion] the library to route for + # @param paths [Array<String>] path components (split by '/') + # @return [Array(Numeric,Hash,Array<String>)] the Rack-style response + # @return [nil] if no route is matched + # @since 0.6.0 + # + # source://yard//lib/yard/server/router.rb#128 + def route_docs(library, paths); end + + # Routes for the index of a library / multiple libraries + # + # @return [Array(Numeric,Hash,Array<String>)] the Rack-style response + # @return [nil] if no route is matched + # @since 0.6.0 + # + # source://yard//lib/yard/server/router.rb#146 + def route_index; end + + # Routes requests from {#list_prefix} and calls the appropriate command + # + # @param library [LibraryVersion] the library to route for + # @param paths [Array<String>] path components (split by '/') + # @return [Array(Numeric,Hash,Array<String>)] the Rack-style response + # @return [nil] if no route is matched + # @since 0.6.0 + # + # source://yard//lib/yard/server/router.rb#157 + def route_list(library, paths); end + + # Routes requests from {#search_prefix} and calls the appropriate command + # + # @param library [LibraryVersion] the library to route for + # @param paths [Array<String>] path components (split by '/') + # @return [Array(Numeric,Hash,Array<String>)] the Rack-style response + # @return [nil] if no route is matched + # @since 0.6.0 + # + # source://yard//lib/yard/server/router.rb#165 + def route_search(library, paths); end + + # @since 0.6.0 + # + # source://yard//lib/yard/server/router.rb#170 + def route_static(library, paths); end +end + +# Implements static caching for requests. +# +# @see Router Router documentation for "Caching" +# @since 0.6.0 +# +# source://yard//lib/yard/server/static_caching.rb#7 +module YARD::Server::StaticCaching + # Called by a router to return the cached object. By default, this + # method performs disk-based caching. To perform other forms of caching, + # implement your own +#check_static_cache+ method and mix the module into + # the Router class. + # + # Note that caching does not occur here. This method simply checks for + # the existence of cached data. To actually cache a response, see + # {Commands::Base#cache}. + # + # @example Implementing In-Memory Cache Checking + # module MemoryCaching + # def check_static_cache + # # $memory_cache is filled by {Commands::Base#cache} + # cached_data = $memory_cache[request.path] + # if cached_data + # [200, {'Content-Type' => 'text/html'}, [cached_data]] + # else + # nil + # end + # end + # end + # + # class YARD::Server::Router; include MemoryCaching; end + # @return [Array(Numeric,Hash,Array)] the Rack-style response + # @return [nil] if no cache is available and routing should continue + # @see Commands::Base#cache + # @since 0.6.0 + # + # source://yard//lib/yard/server/static_caching.rb#34 + def check_static_cache; end +end + +# Stubs marshal dumps and acts a delegate class for an object by path +# +# @private +# +# source://yard//lib/yard/serializers/yardoc_serializer.rb#6 +class YARD::StubProxy + # @return [StubProxy] a new instance of StubProxy + # + # source://yard//lib/yard/serializers/yardoc_serializer.rb#13 + def initialize(path, transient = T.unsafe(nil)); end + + # source://yard//lib/yard/serializers/yardoc_serializer.rb#9 + def _dump(_depth); end + + # source://yard//lib/yard/serializers/yardoc_serializer.rb#11 + def hash; end + + # source://yard//lib/yard/serializers/yardoc_serializer.rb#18 + def method_missing(meth, *args, &block); end + + class << self + # source://yard//lib/yard/serializers/yardoc_serializer.rb#10 + def _load(str); end + end +end + +# source://yard//lib/yard/serializers/yardoc_serializer.rb#28 +YARD::StubProxy::FILELEN = T.let(T.unsafe(nil), Integer) + +# The root path for YARD builtin templates +# +# source://yard//lib/yard.rb#10 +YARD::TEMPLATE_ROOT = T.let(T.unsafe(nil), String) + +# Namespace for Tag components +# +# source://yard//lib/yard/autoload.rb#248 +module YARD::Tags; end + +# Defines an attribute with a given name, using indented block data as the +# attribute's docstring. If the type specifier is supplied with "r", "w", or +# "rw", the attribute is made readonly, writeonly or readwrite respectively. +# A readwrite attribute is the default, if no type is specified. The comment +# containing this directive does not need to be attached to any source, but +# if it is, that source code will be used as the method's source. +# +# To define a regular method, see {tag:!method} +# +# @example Defining a simple readonly attribute +# # @!attribute [r] count +# # @return [Fixnum] the size of the list +# @example Defining a simple readwrite attribute +# # @!attribute name +# # @return [String] the name of the user +# @note This directive should only be used if there is no explicit +attr_*+ +# declaration for the attribute in any source files (i.e., the attribute +# is declared dynamically via meta-programming). In all other cases, add +# documentation to the attribute declaration itself. +# @note For backwards compatibility support, you do not need to indent +# the attribute's docstring text. If an +@!attribute+ directive is seen with +# no indented block, the entire docstring is used as the new attribute's +# docstring text. +# @see tag:!method +# @since 0.7.0 +# +# source://yard//lib/yard/tags/directives.rb#461 +class YARD::Tags::AttributeDirective < ::YARD::Tags::MethodDirective + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#462 + def after_parse; end + + protected + + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#470 + def method_name; end + + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#476 + def method_signature; end + + private + + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#486 + def create_attribute_data(object); end + + # @return [Boolean] + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#516 + def readable?; end + + # @return [Boolean] + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#512 + def writable?; end +end + +# source://yard//lib/yard/tags/default_factory.rb#4 +class YARD::Tags::DefaultFactory + # Parses tag text and creates a new tag with descriptive text + # + # @param tag_name the name of the tag to parse + # @param text [String] the raw tag text + # @return [Tag] a tag object with the tag_name and text values filled + # + # source://yard//lib/yard/tags/default_factory.rb#13 + def parse_tag(tag_name, text); end + + # Parses tag text and creates a new tag with a key name and descriptive text + # + # @param tag_name the name of the tag to parse + # @param text [String] the raw tag text + # @return [Tag] a tag object with the tag_name, name and text values filled + # + # source://yard//lib/yard/tags/default_factory.rb#22 + def parse_tag_with_name(tag_name, text); end + + # source://yard//lib/yard/tags/default_factory.rb#89 + def parse_tag_with_options(tag_name, text); end + + # source://yard//lib/yard/tags/default_factory.rb#70 + def parse_tag_with_title_and_text(tag_name, text); end + + # Parses tag text and creates a new tag with formally declared types and + # descriptive text + # + # @param tag_name the name of the tag to parse + # @param text [String] the raw tag text + # @raise [TagFormatError] + # @return [Tag] a tag object with the tag_name, types and text values filled + # + # source://yard//lib/yard/tags/default_factory.rb#33 + def parse_tag_with_types(tag_name, text); end + + # Parses tag text and creates a new tag with formally declared types, a key + # name and descriptive text + # + # @param tag_name the name of the tag to parse + # @param text [String] the raw tag text + # @return [Tag] a tag object with the tag_name, name, types and text values filled + # + # source://yard//lib/yard/tags/default_factory.rb#45 + def parse_tag_with_types_and_name(tag_name, text); end + + # Parses tag text and creates a new tag with formally declared types, a title + # on the first line and descriptive text + # + # @param tag_name the name of the tag to parse + # @param text [String] the raw tag text + # @return [Tag] a tag object with the tag_name, name, types and text values filled + # + # source://yard//lib/yard/tags/default_factory.rb#57 + def parse_tag_with_types_and_title(tag_name, text); end + + # source://yard//lib/yard/tags/default_factory.rb#75 + def parse_tag_with_types_name_and_default(tag_name, text); end + + private + + # Extracts the name from raw tag text returning the name and remaining value + # + # @param text [String] the raw tag text + # @return [Array] an array holding the name as the first element and the + # value as the second element + # + # source://yard//lib/yard/tags/default_factory.rb#101 + def extract_name_from_text(text); end + + # @raise [TagFormatError] + # + # source://yard//lib/yard/tags/default_factory.rb#105 + def extract_title_and_desc_from_text(text); end + + # Parses a [], <>, {} or () block at the beginning of a line of text + # into a list of comma delimited values. + # + # @example + # obj.parse_types('[String, Array<Hash, String>, nil]') # => [nil, ['String', 'Array<Hash, String>', 'nil'], ""] + # obj.parse_types('b<String> A string') # => ['b', ['String'], 'A string'] + # @return [Array(String, Array<String>, String)] the text before the type + # list (or nil), followed by the type list parsed into an array of + # strings, followed by the text following the type list. + # + # source://yard//lib/yard/tags/default_factory.rb#129 + def extract_types_and_name_from_text(text, opening_types = T.unsafe(nil), closing_types = T.unsafe(nil)); end + + # source://yard//lib/yard/tags/default_factory.rb#138 + def extract_types_and_name_from_text_unstripped(text, opening_types = T.unsafe(nil), closing_types = T.unsafe(nil)); end +end + +# source://yard//lib/yard/tags/default_factory.rb#6 +YARD::Tags::DefaultFactory::TYPELIST_CLOSING_CHARS = T.let(T.unsafe(nil), String) + +# source://yard//lib/yard/tags/default_factory.rb#5 +YARD::Tags::DefaultFactory::TYPELIST_OPENING_CHARS = T.let(T.unsafe(nil), String) + +# source://yard//lib/yard/tags/default_tag.rb#4 +class YARD::Tags::DefaultTag < ::YARD::Tags::Tag + # @return [DefaultTag] a new instance of DefaultTag + # + # source://yard//lib/yard/tags/default_tag.rb#7 + def initialize(tag_name, text, types = T.unsafe(nil), name = T.unsafe(nil), defaults = T.unsafe(nil)); end + + # Returns the value of attribute defaults. + # + # source://yard//lib/yard/tags/default_tag.rb#5 + def defaults; end +end + +# The base directive class. Subclass this class to create a custom +# directive, registering it with {Library.define_directive}. Directive +# classes are executed via the {#call} method, which perform all directive +# processing on the object. +# +# If processing occurs within a handler, the {#handler} attribute is +# available to access more information about parsing context and state. +# Handlers are only available when parsing from {Parser::SourceParser}, +# not when parsing directly from {DocstringParser}. If the docstring is +# attached to an object declaration, {#object} will be set and available +# to modify the generated code object directly. Note that both of these +# attributes may be nil, and directives should test their existence +# before attempting to use them. +# +# @abstract Subclasses should implement {#call}. +# @see Library.define_directive +# @since 0.8.0 +# +# source://yard//lib/yard/tags/directives.rb#23 +class YARD::Tags::Directive + # @param tag [Tag] the meta-data tag containing all input to the docstring + # @param parser [DocstringParser] the docstring parser object + # @return [Directive] a new instance of Directive + # @since 0.8.0 + # + # source://yard//lib/yard/tags/directives.rb#55 + def initialize(tag, parser); end + + # Called after parsing all directives and tags in the docstring. Used + # to perform any cleanup after all directives perform their main task. + # + # @return [void] + # @since 0.8.0 + # + # source://yard//lib/yard/tags/directives.rb#74 + def after_parse; end + + # Called when processing the directive. Subclasses should implement + # this method to perform all functionality of the directive. + # + # @abstract implement this method to perform all data processing for + # the directive. + # @raise [NotImplementedError] + # @return [void] + # @since 0.8.0 + # + # source://yard//lib/yard/tags/directives.rb#69 + def call; end + + # Set this field to replace the directive definition inside of a docstring + # with arbitrary text. For instance, the {MacroDirective} uses this field + # to expand its macro data in place of the call to a +@!macro+. + # + # @return [String] the text to expand in the original docstring in place + # of this directive definition. + # @return [nil] if no expansion should take place for this directive + # @since 0.8.0 + # + # source://yard//lib/yard/tags/directives.rb#34 + def expanded_text; end + + # Set this field to replace the directive definition inside of a docstring + # with arbitrary text. For instance, the {MacroDirective} uses this field + # to expand its macro data in place of the call to a +@!macro+. + # + # @return [String] the text to expand in the original docstring in place + # of this directive definition. + # @return [nil] if no expansion should take place for this directive + # @since 0.8.0 + # + # source://yard//lib/yard/tags/directives.rb#34 + def expanded_text=(_arg0); end + + # @return [Handlers::Base, nil] the handler object the docstring parser + # might be attached to. May be nil. Only available when parsing + # through {Parser::SourceParser}. + # @since 0.8.0 + # + # source://yard//lib/yard/tags/directives.rb#49 + def handler; end + + # @return [CodeObjects::Base, nil] the object the parent docstring is + # attached to. May be nil. + # @since 0.8.0 + # + # source://yard//lib/yard/tags/directives.rb#43 + def object; end + + # @return [DocstringParser] the parser that is parsing all tag + # information out of the docstring + # @since 0.8.0 + # + # source://yard//lib/yard/tags/directives.rb#38 + def parser=(_arg0); end + + # @return [Tag] the meta-data tag containing data input to the directive + # @since 0.8.0 + # + # source://yard//lib/yard/tags/directives.rb#25 + def tag; end + + # @return [Tag] the meta-data tag containing data input to the directive + # @since 0.8.0 + # + # source://yard//lib/yard/tags/directives.rb#25 + def tag=(_arg0); end + + protected + + # @return [Boolean] + # @since 0.8.0 + # + # source://yard//lib/yard/tags/directives.rb#80 + def inside_directive?; end + + # @return [DocstringParser] the parser that is parsing all tag + # information out of the docstring + # @since 0.8.0 + # + # source://yard//lib/yard/tags/directives.rb#38 + def parser; end +end + +# Ends a group listing definition. Group definition automatically end +# when class or module blocks are closed, and defining a new group overrides +# the last group definition, but occasionally you need to end the current +# group to return to the default listing. Use {tag:!group} to begin a +# group listing. +# +# @example +# class Controller +# # @!group Callbacks +# +# def before_filter; end +# def after_filter; end +# +# # @!endgroup +# +# def index; end +# end +# @see tag:!group +# @since 0.6.0 +# +# source://yard//lib/yard/tags/directives.rb#105 +class YARD::Tags::EndGroupDirective < ::YARD::Tags::Directive + # @since 0.6.0 + # + # source://yard//lib/yard/tags/directives.rb#106 + def call; end +end + +# Defines a group listing. All methods (and attributes) seen after this +# directive are placed into a group with the given description as the +# group name. The group listing is used by templates to organize methods +# and attributes into respective logical groups. To end a group listing +# use {tag:!endgroup}. +# +# @example +# # @!group Callbacks +# +# def before_filter; end +# def after_filter; end +# @note A group definition only applies to the scope it is defined in. +# If a new class or module is opened after the directive, this directive +# will not apply to methods in that class or module. +# @see tag:!endgroup +# @since 0.6.0 +# +# source://yard//lib/yard/tags/directives.rb#128 +class YARD::Tags::GroupDirective < ::YARD::Tags::Directive + # @since 0.6.0 + # + # source://yard//lib/yard/tags/directives.rb#129 + def call; end +end + +# Keeps track of all the registered meta-data tags and directives. +# Also allows for defining of custom tags and customizing the tag parsing +# syntax. +# +# == Defining Custom Meta-Data Tags +# +# To define a custom tag, use {define_tag}. You should pass the tag +# name and the factory method to use when creating the tag. If you do not +# provide a factory method to use, it will default to {DefaultFactory#parse_tag} +# +# You can also define tag objects manually by simply implementing a "tagname_tag" +# method that returns a {Tag} object, but they will not take advantage of tag factory +# parsing: +# +# def mytag_tag(text) +# Tag.new(:mytag, text) +# end +# +# == Defining Custom Directives +# +# Directives can be defined by calling the {define_directive} method, taking +# the directive name, an optional tag factory parser method (to parse the +# data in the directive into a temporary {Tag} object) and a {Directive} subclass +# that performs the directive processing. For more information on creating a +# Directive subclass, see the {Directive} class documentation. +# +# Similar to tags, Directives can also be defined manually, in this case using +# the method name "mydirective_directive" and returning a new {Directive} object: +# +# def mydirective_directive(tag, parser) +# MyDirective.new(tag, parser) +# end +# +# == Namespaced Tags +# +# In YARD 0.8.0+, tags can be namespaced using the '.' character. It is recommended +# to namespace project specific tags, like +@yard.tag_name+, so that tags do not +# collide with other plugins or new built-in tags. +# +# == Adding/Changing the Tag Syntax +# +# If you have specialized tag parsing needs you can substitute the {#factory} +# object with your own by setting {Library.default_factory= Library.default_factory} +# to a new class with its own parsing methods before running YARD. This is useful +# if you want to change the syntax of existing tags (@see, @since, etc.) +# +# @example Defining a custom tag +# define_tag "Parameter", :param, :with_types_and_name +# define_tag "Author", :author +# @example Defining a custom directive +# define_directive :method, :with_title_and_text, MethodDirective +# @see DefaultFactory +# @see define_tag +# @see define_directive +# @see Directive +# +# source://yard//lib/yard/tags/library.rb#59 +class YARD::Tags::Library + # @return [Library] a new instance of Library + # + # source://yard//lib/yard/tags/library.rb#260 + def initialize(factory = T.unsafe(nil)); end + + # Marks a class/module/method as abstract with optional + # implementor information. + # + # @example + # # @abstract Subclass and override {#run} to implement + # # a custom Threadable class. + # class Runnable + # def run; raise NotImplementedError end + # end + # + # source://yard//lib/yard/tags/library.rb#168 + def abstract_tag(text); end + + # Declares the API that the object belongs to. Does not display in + # output, but useful for performing queries (+yardoc --query+). Any text is + # allowable in this tag, and there are no predefined values. + # + # @example + # class Post + # # @api private + # def reset_table!; table.flush end + # end + # @note This tag is *transitive*. If it is applied on a + # namespace (module or class), it will immediately be + # applied to all children objects of that namespace unless + # it is redefined on the child object. + # @note The special name +@api private+ does display a notice in + # documentation if it is listed, letting users know that the + # method is not to be used by external components. + # + # source://yard//lib/yard/tags/library.rb#168 + def api_tag(text); end + + # Declares a readonly attribute on a Struct or class. + # + # @deprecated Use the more powerful {tag:!attribute} directive instead. + # @example + # # @attr_reader [String] name the name of the structure + # # @attr_reader [Fixnum] size the size of the structure + # class MyStruct < Struct; end + # @note This attribute is only applicable on class docstrings + # + # source://yard//lib/yard/tags/library.rb#168 + def attr_reader_tag(text); end + + # Declares a readwrite attribute on a Struct or class. + # + # @deprecated Use the more powerful {tag:!attribute} directive instead. + # @example + # # @attr [String] name the name of the structure + # # @attr [Fixnum] size the size of the structure + # class MyStruct < Struct; end + # @note This attribute is only applicable on class docstrings + # + # source://yard//lib/yard/tags/library.rb#168 + def attr_tag(text); end + + # Declares a writeonly attribute on a Struct or class. + # + # @deprecated Use the more powerful {tag:!attribute} directive instead. + # @example + # # @attr_reader [String] name the name of the structure + # # @attr_reader [Fixnum] size the size of the structure + # class MyStruct < Struct; end + # @note This attribute is only applicable on class docstrings + # + # source://yard//lib/yard/tags/library.rb#168 + def attr_writer_tag(text); end + + # source://yard//lib/yard/tags/library.rb#202 + def attribute_directive(tag, parser); end + + # List the author or authors of a class, module, or method. + # + # @example + # # @author Foo Bar <foo@bar.com> + # class MyClass; end + # + # source://yard//lib/yard/tags/library.rb#168 + def author_tag(text); end + + # Marks a method/class as deprecated with an optional description. + # The description should be used to inform users of the recommended + # migration path, and/or any useful information about why the object + # was marked as deprecated. + # + # @example Deprecate a method with a replacement API + # # @deprecated Use {#bar} instead. + # def foo; end + # @example Deprecate a method with no replacement + # class Thread + # # @deprecated Exiting a thread in this way is not reliable and + # # can cause a program crash. + # def kill; end + # end + # + # source://yard//lib/yard/tags/library.rb#168 + def deprecated_tag(text); end + + # Creates a new directive with tag information and a docstring parser + # object. + # + # @param tag_name [String] the name of the tag + # @param tag_buf [String] the tag data + # @param parser [DocstringParser] the parser object parsing the docstring + # @return [Directive] the newly created directive + # + # source://yard//lib/yard/tags/library.rb#290 + def directive_create(tag_name, tag_buf, parser); end + + # source://yard//lib/yard/tags/library.rb#202 + def endgroup_directive(tag, parser); end + + # Show an example snippet of code for an object. The first line + # is an optional title. + # + # @example + # # @example Reverse a String + # # "mystring".reverse #=> "gnirtsym" + # def reverse; end + # + # source://yard//lib/yard/tags/library.rb#168 + def example_tag(text); end + + # A factory class to handle parsing of tags, defaults to {default_factory} + # + # source://yard//lib/yard/tags/library.rb#258 + def factory; end + + # A factory class to handle parsing of tags, defaults to {default_factory} + # + # source://yard//lib/yard/tags/library.rb#258 + def factory=(_arg0); end + + # source://yard//lib/yard/tags/library.rb#202 + def group_directive(tag, parser); end + + # @param tag_name [#to_s] the name of the tag to look for + # @return [Boolean] whether a directive by the given name is registered in + # the library. + # + # source://yard//lib/yard/tags/library.rb#280 + def has_directive?(tag_name); end + + # @param tag_name [#to_s] the name of the tag to look for + # @return [Boolean] whether a tag by the given name is registered in + # the library. + # + # source://yard//lib/yard/tags/library.rb#267 + def has_tag?(tag_name); end + + # source://yard//lib/yard/tags/library.rb#202 + def macro_directive(tag, parser); end + + # source://yard//lib/yard/tags/library.rb#202 + def method_directive(tag, parser); end + + # Adds an emphasized note at the top of the docstring for the object + # + # @example + # # @note This method should only be used in outer space. + # def eject; end + # @see tag:todo + # + # source://yard//lib/yard/tags/library.rb#168 + def note_tag(text); end + + # Describe an options hash in a method. The tag takes the + # name of the options parameter first, followed by optional types, + # the option key name, a default value for the key and a + # description of the option. The default value should be placed within + # parentheses and is optional (can be omitted). + # + # Note that a +@param+ tag need not be defined for the options + # hash itself, though it is useful to do so for completeness. + # + # @example + # # @param [Hash] opts the options to create a message with. + # # @option opts [String] :subject The subject + # # @option opts [String] :from ('nobody') From address + # # @option opts [String] :to Recipient email + # # @option opts [String] :body ('') The email's body + # def send_email(opts = {}) end + # @note For keyword parameters, use +@param+, not +@option+. + # + # source://yard//lib/yard/tags/library.rb#168 + def option_tag(text); end + + # Describe that your method can be used in various + # contexts with various parameters or return types. The first + # line should declare the new method signature, and the following + # indented tag data will be a new documentation string with its + # own tags adding metadata for such an overload. + # + # @example + # # @overload set(key, value) + # # Sets a value on key + # # @param key [Symbol] describe key param + # # @param value [Object] describe value param + # # @overload set(value) + # # Sets a value on the default key +:foo+ + # # @param value [Object] describe value param + # def set(*args) end + # + # source://yard//lib/yard/tags/library.rb#161 + def overload_tag(text); end + + # Documents a single method parameter (either regular or keyword) with a given name, type + # and optional description. + # + # @example + # # @param url [String] the URL of the page to download + # # @param directory [String] the name of the directory to save to + # def load_page(url, directory: 'pages') end + # + # source://yard//lib/yard/tags/library.rb#168 + def param_tag(text); end + + # source://yard//lib/yard/tags/library.rb#202 + def parse_directive(tag, parser); end + + # Declares that the _logical_ visibility of an object is private. + # In other words, it specifies that this method should be marked + # private but cannot due to Ruby's visibility restrictions. This + # exists for classes, modules and constants that do not obey Ruby's + # visibility rules. For instance, an inner class might be considered + # "private", though Ruby would make no such distinction. + # + # This tag is meant to be used in conjunction with the +--no-private+ + # command-line option, and is required to actually remove these objects + # from documentation output. See {file:README.md} for more information on + # switches. + # + # If you simply want to set the API visibility of a method, you should + # look at the {tag:api} tag instead. + # + # @example + # # @private + # class InteralImplementation; end + # @note This method is not recommended for hiding undocumented or + # "unimportant" methods. This tag should only be used to mark objects + # private when Ruby visibility rules cannot do so. In Ruby 1.9.3, you + # can use +private_constant+ to declare constants (like classes or + # modules) as private, and should be used instead of +@private+. + # @note This tag is *transitive*. If it is applied on a + # namespace (module or class), it will immediately be + # applied to all children objects of that namespace unless + # it is redefined on the child object. + # @see tag:api + # + # source://yard//lib/yard/tags/library.rb#168 + def private_tag(text); end + + # Describes that a method may raise a given exception, with + # an optional description of what it may mean. + # + # @example + # # @raise [AccountBalanceError] if the account does not have + # # sufficient funds to perform the transaction + # def withdraw(amount) end + # + # source://yard//lib/yard/tags/library.rb#168 + def raise_tag(text); end + + # Describes the return value (and type or types) of a method. + # You can list multiple return tags for a method in the case + # where a method has distinct return cases. In this case, each + # case should begin with "if ...". + # + # @example A regular return value + # # @return [Fixnum] the size of the file + # def size; @file.size end + # @example A method returns an Array or a single object + # # @return [String] if a single object was returned + # # from the database. + # # @return [Array<String>] if multiple objects were + # # returned. + # def find(query) end + # + # source://yard//lib/yard/tags/library.rb#168 + def return_tag(text); end + + # Sets the scope of a DSL method. Only applicable to DSL method + # calls. Acceptable values are 'class' or 'instance' + # + # source://yard//lib/yard/tags/library.rb#202 + def scope_directive(tag, parser); end + + # "See Also" references for an object. Accepts URLs or + # other code objects with an optional description at the end. + # Note that the URL or object will be automatically linked by + # YARD and does not need to be formatted with markup. + # + # @example + # # Synchronizes system time using NTP. + # # @see http://ntp.org/documentation.html NTP Documentation + # # @see NTPHelperMethods + # class NTPUpdater; end + # + # source://yard//lib/yard/tags/library.rb#168 + def see_tag(text); end + + # Lists the version that the object was first added. + # + # @example + # # @since 1.2.4 + # def clear_routes; end + # @note This tag is *transitive*. If it is applied on a + # namespace (module or class), it will immediately be + # applied to all children objects of that namespace unless + # it is redefined on the child object. + # + # source://yard//lib/yard/tags/library.rb#168 + def since_tag(text); end + + # Creates a new {Tag} object with a given tag name and data + # + # @return [Tag] the newly created tag object + # + # source://yard//lib/yard/tags/library.rb#273 + def tag_create(tag_name, tag_buf); end + + # Marks a TODO note in the object being documented. + # For reference, objects with TODO items can be enumerated + # from the command line with a simple command: + # + # !!!sh + # mocker$ yard list --query '@todo' + # lib/mocker/mocker.rb:15: Mocker + # lib/mocker/report/html.rb:5: Mocker::Report::Html + # + # YARD can also be used to enumerate the TODO items from + # a short script: + # + # !!!ruby + # require 'yard' + # YARD::Registry.load!.all.each do |o| + # puts o.tag(:todo).text if o.tag(:todo) + # end + # + # @example + # # @todo Add support for Jabberwocky service. + # # There is an open source Jabberwocky library available + # # at http://jbrwcky.org that can be easily integrated. + # class Wonderlander; end + # @see tag:note + # + # source://yard//lib/yard/tags/library.rb#168 + def todo_tag(text); end + + # Lists the version of a class, module or method. This is + # similar to a library version, but at finer granularity. + # In some cases, version of specific modules, classes, methods + # or generalized components might change independently between + # releases. A version tag is used to infer the API compatibility + # of a specific object. + # + # @example + # # The public REST API for http://jbrwcky.org + # # @version 2.0 + # class JabberwockyAPI; end + # + # source://yard//lib/yard/tags/library.rb#168 + def version_tag(text); end + + # Sets the visibility of a DSL method. Only applicable to + # DSL method calls. Acceptable values are public, protected, or private. + # + # source://yard//lib/yard/tags/library.rb#202 + def visibility_directive(tag, parser); end + + # Describes what a method might yield to a given block. + # The types specifier list should not list types, but names + # of the parameters yielded to the block. If you define + # parameters with +@yieldparam+, you do not need to define + # the parameters in the type specification of +@yield+ as + # well. + # + # @example + # # For a block {|a,b,c| ... } + # # @yield [a, b, c] Gives 3 random numbers to the block + # def provide3values(&block) yield(42, 42, 42) end + # @see tag:yieldparam + # @see tag:yieldreturn + # + # source://yard//lib/yard/tags/library.rb#168 + def yield_tag(text); end + + # Defines a parameter yielded by a block. If you define the + # parameters with +@yieldparam+, you do not need to define + # them via +@yield+ as well. + # + # @example + # # @yieldparam [String] name the name that is yielded + # def with_name(name) yield(name) end + # + # source://yard//lib/yard/tags/library.rb#168 + def yieldparam_tag(text); end + + # Documents the value and type that the block is expected + # to return to the method. + # + # @example + # # @yieldreturn [Fixnum] the number to add 5 to. + # def add5_block(&block) 5 + yield end + # @see tag:return + # + # source://yard//lib/yard/tags/library.rb#168 + def yieldreturn_tag(text); end + + private + + # @return [Directive] + # + # source://yard//lib/yard/tags/library.rb#244 + def directive_call(tag, parser); end + + # source://yard//lib/yard/tags/library.rb#233 + def send_to_factory(tag_name, meth, text); end + + class << self + # Replace the factory object responsible for parsing tags by setting + # this to an object (or class) that responds to +parse_TAGNAME+ methods + # where +TAGNAME+ is the name of the tag. + # + # You should set this value before performing any source parsing with + # YARD, otherwise your factory class will not be used. + # + # @example + # YARD::Tags::Library.default_factory = MyFactory + # @see DefaultFactory + # + # source://yard//lib/yard/tags/library.rb#83 + def default_factory; end + + # Replace the factory object responsible for parsing tags by setting + # this to an object (or class) that responds to +parse_TAGNAME+ methods + # where +TAGNAME+ is the name of the tag. + # + # You should set this value before performing any source parsing with + # YARD, otherwise your factory class will not be used. + # + # @example + # YARD::Tags::Library.default_factory = MyFactory + # @see DefaultFactory + # + # source://yard//lib/yard/tags/library.rb#87 + def default_factory=(factory); end + + # @overload define_directive + # + # source://yard//lib/yard/tags/library.rb#196 + def define_directive(tag, tag_meth = T.unsafe(nil), directive_class = T.unsafe(nil)); end + + # Convenience method to define a new tag using one of {Tag}'s factory methods, or the + # regular {DefaultFactory#parse_tag} factory method if none is supplied. + # + # @param label [#to_s] the label used when displaying the tag in templates + # @param tag [#to_s] the tag name to create + # @param meth [#to_s, Class<Tag>] the {Tag} factory method to call when + # creating the tag or the name of the class to directly create a tag for + # + # source://yard//lib/yard/tags/library.rb#157 + def define_tag(label, tag, meth = T.unsafe(nil)); end + + # source://yard//lib/yard/tags/library.rb#220 + def directive_method_name(tag_name); end + + # Returns the factory method used to parse the tag text for a specific tag + # + # @param tag [Symbol] the tag name + # @return [Symbol] the factory method name for the tag + # @return [Class<Tag>, Symbol] the Tag class to use to parse the tag + # or the method to call on the factory class + # @return [nil] if the tag is freeform text + # @since 0.6.0 + # + # source://yard//lib/yard/tags/library.rb#99 + def factory_method_for(tag); end + + # Returns the factory method used to parse the tag text for a specific + # directive + # + # @param directive [Symbol] the directive name + # @return [Symbol] the factory method name for the tag + # @return [Class<Tag>, Symbol] the Tag class to use to parse the tag or + # the methods to call on the factory class + # @return [nil] if the tag is freeform text + # @since 0.8.0 + # + # source://yard//lib/yard/tags/library.rb#112 + def factory_method_for_directive(directive); end + + # @return [Library] the main Library instance object. + # + # source://yard//lib/yard/tags/library.rb#67 + def instance; end + + # @return [SymbolHash{Symbol=>String}] the map of tag names and their + # respective display labels. + # + # source://yard//lib/yard/tags/library.rb#63 + def labels; end + + # Sorts the labels lexically by their label name, often used when displaying + # the tags. + # + # @return [Array<Symbol>, String] the sorted labels as an array of the tag name and label + # + # source://yard//lib/yard/tags/library.rb#142 + def sorted_labels; end + + # source://yard//lib/yard/tags/library.rb#216 + def tag_method_name(tag_name); end + + # Sets the list of tags that should apply to any children inside the + # namespace they are defined in. For instance, a "@since" tag should + # apply to all methods inside a module it is defined in. Transitive + # tags can be overridden by directly defining a tag on the child object. + # + # @return [Array<Symbol>] a list of transitive tags + # @since 0.6.0 + # + # source://yard//lib/yard/tags/library.rb#136 + def transitive_tags; end + + # Sets the list of tags that should apply to any children inside the + # namespace they are defined in. For instance, a "@since" tag should + # apply to all methods inside a module it is defined in. Transitive + # tags can be overridden by directly defining a tag on the child object. + # + # @return [Array<Symbol>] a list of transitive tags + # @since 0.6.0 + # + # source://yard//lib/yard/tags/library.rb#136 + def transitive_tags=(_arg0); end + + # Sets the list of tags to display when rendering templates. The order of + # tags in the list is also significant, as it represents the order that + # tags are displayed in templates. + # + # You can use the {Array#place} to insert new tags to be displayed in + # the templates at specific positions: + # + # Library.visible_tags.place(:mytag).before(:return) + # + # @return [Array<Symbol>] a list of ordered tags + # @since 0.6.0 + # + # source://yard//lib/yard/tags/library.rb#127 + def visible_tags; end + + # Sets the list of tags to display when rendering templates. The order of + # tags in the list is also significant, as it represents the order that + # tags are displayed in templates. + # + # You can use the {Array#place} to insert new tags to be displayed in + # the templates at specific positions: + # + # Library.visible_tags.place(:mytag).before(:return) + # + # @return [Array<Symbol>] a list of ordered tags + # @since 0.6.0 + # + # source://yard//lib/yard/tags/library.rb#127 + def visible_tags=(_arg0); end + + private + + # source://yard//lib/yard/tags/library.rb#226 + def tag_or_directive_method_name(tag_name, type = T.unsafe(nil)); end + end +end + +# Defines a block of text to be expanded whenever the macro is called by name +# in subsequent docstrings. The macro data can be any arbitrary text data, be +# it regular documentation, meta-data tags or directives. +# +# == Defining a Macro +# +# A macro must first be defined in order to be used. Note that a macro is also +# expanded upon definition if it defined on an object (the docstring of a +# method, class, module or constant object as opposed to a free standing +# comment). To define a macro, use the "new" or "attach" identifier in the +# types specifier list. A macro will also automatically be created if an +# indented macro data block is given, so the keywords are not strictly needed. +# +# === Anonymous Macros +# +# In addition to standard named macros, macros can be defined anonymously if +# no name is given. In this case, they can not be re-used in future docstrings, +# but they will expand in the first definition. This is useful when needing +# to take advantage of the macro expansion variables (described below). +# +# == Using a Macro +# +# To re-use a macro in another docstring after it is defined, simply use +# <tt>@!macro the_name</tt> with no indented block of macro data. The resulting +# data will be expanded in place. +# +# == Attaching a Macro to a DSL Method +# +# Macros can be defined to auto-expand on DSL-style class method calls. To +# define a macro to be auto expanded in this way, use the "attach" keyword +# in the type specifier list ("new" is implied). +# +# Attached macros can also be attached directly on the class method declaration +# that provides the DSL method to its subclasses. The syntax in either case +# is the same. +# +# == Macro Expansion Variables +# +# In the case of using macros on DSL-style method calls, a number of expansion +# variables can be used for interpolation inside of the macro data. The variables, +# similar in syntax to Ruby's global variables, are as follows: +# +# * $0 - the method name being called +# * $1, $2, $3, ... - the Nth argument in the method call +# * $& - the full source line +# +# The following example shows what the expansion variables might hold for a given +# DSL method call: +# +# property :foo, :a, :b, :c, String +# # $0 => "property" +# # $1 => "foo" +# # $2 => "a" +# # $& => "property :foo, :a, :b, :c, String" +# +# === Ranges +# +# Ranges are also acceptable with the syntax <tt>${N-M}</tt>. Negative values +# on either N or M are valid, and refer to indexes from the end of the list. +# Consider a DSL method that creates a method using the first argument with +# argument names following, ending with the return type of the method. This +# could be documented as: +# +# # @!macro dsl_method +# # @!method $1(${2--2}) +# # @return [${-1}] the return value of $0 +# create_method_with_args :foo, :a, :b, :c, String +# +# As described, the method is using the signature <tt>foo(a, b, c)</tt> and the return +# type from the last argument, +String+. When using ranges, tokens are joined +# with commas. Note that this includes using $0: +# +# !!!plain +# $0-1 # => Interpolates to "create_method_with_args, foo" +# +# If you want to separate them with spaces, use <tt>$1 $2 $3 $4 ...</tt>. Note that +# if the token cannot be expanded, it will return the empty string (not an error), +# so it would be safe to list <tt>$1 $2 ... $10</tt>, for example. +# +# === Escaping Interpolation +# +# Interpolation can be escaped by prefixing the +$+ with +\\\+, like so: +# +# # @!macro foo +# # I have \$2.00 USD. +# +# @example Defining a simple macro +# # @!macro [new] returnself +# # @return [self] returns itself +# @example Using a simple macro in multiple docstrings +# # Documentation for map +# # ... +# # @macro returnself +# def map; end +# +# # Documentation for filter +# # ... +# # @macro returnself +# def filter; end +# @example Attaching a macro to a class method (for DSL usage) +# class Resource +# # Defines a new property +# # @param [String] name the property name +# # @param [Class] type the property's type +# # @!macro [attach] property +# # @return [$2] the $1 property +# def self.property(name, type) end +# end +# +# class Post < Resource +# property :title, String +# property :view_count, Integer +# end +# @example Attaching a macro directly to a DSL method +# class Post < Resource +# # @!macro [attach] property +# # @return [$2] the $1 property +# property :title, String +# +# # Macro will expand on this definition too +# property :view_count, Integer +# end +# @since 0.7.0 +# +# source://yard//lib/yard/tags/directives.rb#258 +class YARD::Tags::MacroDirective < ::YARD::Tags::Directive + # @raise [TagFormatError] + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#259 + def call; end + + private + + # @return [Boolean] + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#288 + def anonymous?; end + + # @return [Boolean] + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#277 + def attach?; end + + # @return [Boolean] + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#283 + def class_method?; end + + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#292 + def expand(macro_data); end + + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#308 + def find_or_create; end + + # @return [Boolean] + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#272 + def new?; end + + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#332 + def warn; end +end + +# Defines a method object with a given method signature, using indented +# block data as the method's docstring. The signature is similar to the +# {tag:overload} tag. The comment containing this directive does not need +# to be attached to any source, but if it is, that source code will be +# used as the method's source. +# +# To define an attribute method, see {tag:!attribute} +# +# @example Defining a simple method +# # @!method quit(username, message = "Quit") +# # Sends a quit message to the server for a +username+. +# # @param [String] username the username to quit +# # @param [String] message the quit message +# quit_message_method +# @example Attaching multiple methods to the same source +# # @!method method1 +# # @!method method2 +# create_methods :method1, :method2 +# @note This directive should only be used if there is no explicit +# declaration for the method in any source files (i.e., the method +# is declared dynamically via meta-programming). In all other cases, add +# documentation to the method definition itself. +# @note For backwards compatibility support, you do not need to indent +# the method's docstring text. If a +@!method+ directive is seen with +# no indented block, the entire docstring is used as the new method's +# docstring text. +# @see tag:!attribute +# @since 0.7.0 +# +# source://yard//lib/yard/tags/directives.rb#368 +class YARD::Tags::MethodDirective < ::YARD::Tags::Directive + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#373 + def after_parse; end + + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#371 + def call; end + + protected + + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#413 + def create_object; end + + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#381 + def method_name; end + + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#390 + def method_signature; end + + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#394 + def sanitized_tag_signature; end + + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#403 + def use_indented_text; end +end + +# @since 0.7.0 +# +# source://yard//lib/yard/tags/directives.rb#369 +YARD::Tags::MethodDirective::SCOPE_MATCH = T.let(T.unsafe(nil), Regexp) + +# source://yard//lib/yard/tags/option_tag.rb#4 +class YARD::Tags::OptionTag < ::YARD::Tags::Tag + # @return [OptionTag] a new instance of OptionTag + # + # source://yard//lib/yard/tags/option_tag.rb#7 + def initialize(tag_name, name, pair); end + + # Returns the value of attribute pair. + # + # source://yard//lib/yard/tags/option_tag.rb#5 + def pair; end + + # Sets the attribute pair + # + # @param value the value to set the attribute pair to. + # + # source://yard//lib/yard/tags/option_tag.rb#5 + def pair=(_arg0); end +end + +# source://yard//lib/yard/tags/overload_tag.rb#4 +class YARD::Tags::OverloadTag < ::YARD::Tags::Tag + # @return [OverloadTag] a new instance of OverloadTag + # + # source://yard//lib/yard/tags/overload_tag.rb#7 + def initialize(tag_name, text); end + + # Returns the value of attribute docstring. + # + # source://yard//lib/yard/tags/overload_tag.rb#5 + def docstring; end + + # @return [Boolean] + # + # source://yard//lib/yard/tags/overload_tag.rb#15 + def has_tag?(name); end + + # @return [Boolean] + # + # source://yard//lib/yard/tags/overload_tag.rb#36 + def is_a?(other); end + + # @return [Boolean] + # + # source://yard//lib/yard/tags/overload_tag.rb#36 + def kind_of?(other); end + + # source://yard//lib/yard/tags/overload_tag.rb#28 + def method_missing(*args, &block); end + + # source://yard//lib/yard/tags/overload_tag.rb#23 + def name(prefix = T.unsafe(nil)); end + + # source://yard//lib/yard/tags/overload_tag.rb#17 + def object=(value); end + + # Returns the value of attribute parameters. + # + # source://yard//lib/yard/tags/overload_tag.rb#5 + def parameters; end + + # Returns the value of attribute signature. + # + # source://yard//lib/yard/tags/overload_tag.rb#5 + def signature; end + + # source://yard//lib/yard/tags/overload_tag.rb#13 + def tag(name); end + + # source://yard//lib/yard/tags/overload_tag.rb#14 + def tags(name = T.unsafe(nil)); end + + # source://yard//lib/yard/tags/overload_tag.rb#32 + def type; end + + private + + # source://yard//lib/yard/tags/overload_tag.rb#53 + def parse_signature; end + + # source://yard//lib/yard/tags/overload_tag.rb#43 + def parse_tag(text); end +end + +# Parses a block of code as if it were present in the source file at that +# location. This directive is useful if a class has dynamic meta-programmed +# behaviour that cannot be recognized by YARD. +# +# You can specify the language of the code block using the types +# specification list. By default, the code language is "ruby". +# +# @example Documenting dynamic module inclusion +# class User +# # includes "UserMixin" and extends "UserMixin::ClassMethods" +# # using the UserMixin.included callback. +# # @!parse include UserMixin +# # @!parse extend UserMixin::ClassMethods +# end +# @example Declaring a method as an attribute +# # This should really be an attribute +# # @!parse attr_reader :foo +# def object; @parent.object end +# @example Parsing C code +# # @!parse [c] +# # void Init_Foo() { +# # rb_define_method(rb_cFoo, "method", method, 0); +# # } +# @since 0.8.0 +# +# source://yard//lib/yard/tags/directives.rb#545 +class YARD::Tags::ParseDirective < ::YARD::Tags::Directive + # @since 0.8.0 + # + # source://yard//lib/yard/tags/directives.rb#546 + def call; end +end + +# source://yard//lib/yard/tags/ref_tag.rb#4 +module YARD::Tags::RefTag + # Returns the value of attribute owner. + # + # source://yard//lib/yard/tags/ref_tag.rb#5 + def owner; end + + # Sets the attribute owner + # + # @param value the value to set the attribute owner to. + # + # source://yard//lib/yard/tags/ref_tag.rb#5 + def owner=(_arg0); end +end + +# source://yard//lib/yard/tags/ref_tag_list.rb#4 +class YARD::Tags::RefTagList + # @return [RefTagList] a new instance of RefTagList + # + # source://yard//lib/yard/tags/ref_tag_list.rb#7 + def initialize(tag_name, owner, name = T.unsafe(nil)); end + + # Returns the value of attribute name. + # + # source://yard//lib/yard/tags/ref_tag_list.rb#5 + def name; end + + # Sets the attribute name + # + # @param value the value to set the attribute name to. + # + # source://yard//lib/yard/tags/ref_tag_list.rb#5 + def name=(_arg0); end + + # Returns the value of attribute owner. + # + # source://yard//lib/yard/tags/ref_tag_list.rb#5 + def owner; end + + # Sets the attribute owner + # + # @param value the value to set the attribute owner to. + # + # source://yard//lib/yard/tags/ref_tag_list.rb#5 + def owner=(_arg0); end + + # Returns the value of attribute tag_name. + # + # source://yard//lib/yard/tags/ref_tag_list.rb#5 + def tag_name; end + + # Sets the attribute tag_name + # + # @param value the value to set the attribute tag_name to. + # + # source://yard//lib/yard/tags/ref_tag_list.rb#5 + def tag_name=(_arg0); end + + # source://yard//lib/yard/tags/ref_tag_list.rb#13 + def tags; end +end + +# Modifies the current parsing scope (class or instance). If this +# directive is defined on a docstring attached to an object definition, +# it is applied only to that object. Otherwise, it applies the scope +# to all future objects in the namespace. +# +# @example Modifying the scope of a DSL method +# # @!scope class +# cattr_accessor :subclasses +# @example Modifying the scope of a set of methods +# # @!scope class +# +# # Documentation for method1 +# def method1; end +# +# # Documentation for method2 +# def method2; end +# @since 0.7.0 +# +# source://yard//lib/yard/tags/directives.rb#579 +class YARD::Tags::ScopeDirective < ::YARD::Tags::Directive + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#580 + def call; end +end + +# Represents a metadata tag value (+@tag+). Tags can have any combination of +# {#types}, {#name} and {#text}, or none of the above. +# +# @example Programmatic tag creation +# # The following docstring syntax: +# # @param [String, nil] arg an argument +# # +# # is equivalent to: +# Tag.new(:param, 'an argument', ['String', 'nil'], 'arg') +# +# source://yard//lib/yard/tags/tag.rb#13 +class YARD::Tags::Tag + # Creates a new tag object with a tag name and text. Optionally, formally declared types + # and a key name can be specified. + # + # Types are mainly for meta tags that rely on type information, such as +param+, +return+, etc. + # + # Key names are for tags that declare meta data for a specific key or name, such as +param+, + # +raise+, etc. + # + # @param tag_name [#to_s] the tag name to create the tag for + # @param text [String] the descriptive text for this tag + # @param types [Array<String>] optional type list of formally declared types + # for the tag + # @param name [String] optional key name which the tag refers to + # @return [Tag] a new instance of Tag + # + # source://yard//lib/yard/tags/tag.rb#44 + def initialize(tag_name, text, types = T.unsafe(nil), name = T.unsafe(nil)); end + + # Provides a plain English summary of the type specification, or nil + # if no types are provided or parsable. + # + # @return [String] a plain English description of the associated types + # @return [nil] if no types are provided or not parsable + # + # source://yard//lib/yard/tags/tag.rb#65 + def explain_types; end + + # @return [String] a name associated with the tag + # + # source://yard//lib/yard/tags/tag.rb#26 + def name; end + + # @return [String] a name associated with the tag + # + # source://yard//lib/yard/tags/tag.rb#26 + def name=(_arg0); end + + # @return [CodeObjects::Base] the associated object + # + # source://yard//lib/yard/tags/tag.rb#29 + def object; end + + # @return [CodeObjects::Base] the associated object + # + # source://yard//lib/yard/tags/tag.rb#29 + def object=(_arg0); end + + # @return [String] the name of the tag + # + # source://yard//lib/yard/tags/tag.rb#15 + def tag_name; end + + # @return [String] the name of the tag + # + # source://yard//lib/yard/tags/tag.rb#15 + def tag_name=(_arg0); end + + # @return [String] the tag text associated with the tag + # @return [nil] if no tag text is supplied + # + # source://yard//lib/yard/tags/tag.rb#19 + def text; end + + # @return [String] the tag text associated with the tag + # @return [nil] if no tag text is supplied + # + # source://yard//lib/yard/tags/tag.rb#19 + def text=(_arg0); end + + # Convenience method to access the first type specified. This should mainly + # be used for tags that only specify one type. + # + # @return [String] the first of the list of specified types + # @see #types + # + # source://yard//lib/yard/tags/tag.rb#56 + def type; end + + # @return [Array<String>] a list of types associated with the tag + # @return [nil] if no types are associated with the tag + # + # source://yard//lib/yard/tags/tag.rb#23 + def types; end + + # @return [Array<String>] a list of types associated with the tag + # @return [nil] if no types are associated with the tag + # + # source://yard//lib/yard/tags/tag.rb#23 + def types=(_arg0); end +end + +# source://yard//lib/yard/tags/tag_format_error.rb#4 +class YARD::Tags::TagFormatError < ::RuntimeError; end + +# source://yard//lib/yard/tags/types_explainer.rb#6 +class YARD::Tags::TypesExplainer + class << self + # Provides a plain English summary of the type specification, or nil + # if no types are provided or parsable. + # + # @param types [Array<String>] a list of types to parse and summarize + # @return [String] a plain English description of the associated types + # @return [nil] if no types are provided or not parsable + # + # source://yard//lib/yard/tags/types_explainer.rb#9 + def explain(*types); end + + # Provides a plain English summary of the type specification, or nil + # if no types are provided or parsable. + # + # @param types [Array<String>] a list of types to parse and summarize + # @raise [SyntaxError] if the types are not parsable + # @return [String] a plain English description of the associated types + # @return [nil] if no types are provided or not parsable + # + # source://yard//lib/yard/tags/types_explainer.rb#17 + def explain!(*types); end + + private + + def new(*_arg0); end + end +end + +# @private +# +# source://yard//lib/yard/tags/types_explainer.rb#58 +class YARD::Tags::TypesExplainer::CollectionType < ::YARD::Tags::TypesExplainer::Type + # @return [CollectionType] a new instance of CollectionType + # + # source://yard//lib/yard/tags/types_explainer.rb#61 + def initialize(name, types); end + + # source://yard//lib/yard/tags/types_explainer.rb#66 + def to_s(_singular = T.unsafe(nil)); end + + # Returns the value of attribute types. + # + # source://yard//lib/yard/tags/types_explainer.rb#59 + def types; end + + # Sets the attribute types + # + # @param value the value to set the attribute types to. + # + # source://yard//lib/yard/tags/types_explainer.rb#59 + def types=(_arg0); end +end + +# @private +# +# source://yard//lib/yard/tags/types_explainer.rb#72 +class YARD::Tags::TypesExplainer::FixedCollectionType < ::YARD::Tags::TypesExplainer::CollectionType + # source://yard//lib/yard/tags/types_explainer.rb#73 + def to_s(_singular = T.unsafe(nil)); end +end + +# @private +# +# source://yard//lib/yard/tags/types_explainer.rb#79 +class YARD::Tags::TypesExplainer::HashCollectionType < ::YARD::Tags::TypesExplainer::Type + # @return [HashCollectionType] a new instance of HashCollectionType + # + # source://yard//lib/yard/tags/types_explainer.rb#82 + def initialize(name, key_types, value_types); end + + # Returns the value of attribute key_types. + # + # source://yard//lib/yard/tags/types_explainer.rb#80 + def key_types; end + + # Sets the attribute key_types + # + # @param value the value to set the attribute key_types to. + # + # source://yard//lib/yard/tags/types_explainer.rb#80 + def key_types=(_arg0); end + + # source://yard//lib/yard/tags/types_explainer.rb#88 + def to_s(_singular = T.unsafe(nil)); end + + # Returns the value of attribute value_types. + # + # source://yard//lib/yard/tags/types_explainer.rb#80 + def value_types; end + + # Sets the attribute value_types + # + # @param value the value to set the attribute value_types to. + # + # source://yard//lib/yard/tags/types_explainer.rb#80 + def value_types=(_arg0); end +end + +# @private +# +# source://yard//lib/yard/tags/types_explainer.rb#96 +class YARD::Tags::TypesExplainer::Parser + include ::YARD::CodeObjects + + # @return [Parser] a new instance of Parser + # + # source://yard//lib/yard/tags/types_explainer.rb#117 + def initialize(string); end + + # source://yard//lib/yard/tags/types_explainer.rb#121 + def parse; end + + class << self + # source://yard//lib/yard/tags/types_explainer.rb#113 + def parse(string); end + end +end + +# source://yard//lib/yard/tags/types_explainer.rb#99 +YARD::Tags::TypesExplainer::Parser::TOKENS = T.let(T.unsafe(nil), Hash) + +# @private +# +# source://yard//lib/yard/tags/types_explainer.rb#26 +class YARD::Tags::TypesExplainer::Type + # @return [Type] a new instance of Type + # + # source://yard//lib/yard/tags/types_explainer.rb#29 + def initialize(name); end + + # Returns the value of attribute name. + # + # source://yard//lib/yard/tags/types_explainer.rb#27 + def name; end + + # Sets the attribute name + # + # @param value the value to set the attribute name to. + # + # source://yard//lib/yard/tags/types_explainer.rb#27 + def name=(_arg0); end + + # source://yard//lib/yard/tags/types_explainer.rb#33 + def to_s(singular = T.unsafe(nil)); end + + private + + # source://yard//lib/yard/tags/types_explainer.rb#45 + def list_join(list); end +end + +# Modifies the current parsing visibility (public, protected, or private). +# If this directive is defined on a docstring attached to an object +# definition, it is applied only to that object. Otherwise, it applies +# the visibility to all future objects in the namespace. +# +# @example Modifying the visibility of a DSL method +# # @!visibility private +# cattr_accessor :subclasses +# @example Modifying the visibility of a set of methods +# # Note that Ruby's "protected" is recommended over this directive +# # @!visibility protected +# +# # Documentation for method1 +# def method1; end +# +# # Documentation for method2 +# def method2; end +# @since 0.7.0 +# +# source://yard//lib/yard/tags/directives.rb#611 +class YARD::Tags::VisibilityDirective < ::YARD::Tags::Directive + # @since 0.7.0 + # + # source://yard//lib/yard/tags/directives.rb#612 + def call; end +end + +# Namespace for templating system +# +# source://yard//lib/yard/autoload.rb#271 +module YARD::Templates; end + +# This module manages all creation, handling and rendering of {Template} +# objects. +# +# * To create a template object at a path, use {template}. +# * To render a template, call {render}. +# * To register a template path in the lookup paths, call {register_template_path}. +# +# source://yard//lib/yard/templates/engine.rb#12 +module YARD::Templates::Engine + class << self + # Passes a set of objects to the +:fulldoc+ template for full documentation generation. + # This is called by {CLI::Yardoc} to most commonly perform HTML + # documentation generation. + # + # @param objects [Array<CodeObjects::Base>] a list of {CodeObjects::Base} + # objects to pass to the template + # @param options [Hash] (see {render}) + # @return [void] + # + # source://yard//lib/yard/templates/engine.rb#101 + def generate(objects, options = T.unsafe(nil)); end + + # Registers a new template path in {template_paths} + # + # @param path [String] a new template path + # @return [void] + # + # source://yard//lib/yard/templates/engine.rb#21 + def register_template_path(path); end + + # Renders a template on a {CodeObjects::Base code object} using + # a set of default (overridable) options. Either the +:object+ + # or +:type+ keys must be provided. + # + # If a +:serializer+ key is provided and +:serialize+ is not set to + # false, the rendered contents will be serialized through the {Serializers::Base} + # object. See {with_serializer}. + # + # @example Renders an object with html formatting + # Engine.render(:format => :html, :object => obj) + # @example Renders without an object + # Engine.render(:type => :fulldoc, :otheropts => somevalue) + # @option options + # @option options + # @option options + # @param options [Hash] the options hash + # @return [String] the rendered template + # + # source://yard//lib/yard/templates/engine.rb#82 + def render(options = T.unsafe(nil)); end + + # Creates a template module representing the path. Searches on disk + # for the first directory named +path+ (joined by '/') within the + # template paths and builds a template module for. All other matching + # directories in other template paths will be included in the + # generated module as mixins (for overriding). + # + # @param path [Array<String, Symbol>] a list of path components + # @raise [ArgumentError] if the path does not exist within one of the + # {template_paths} on disk. + # @return [Template] the module representing the template + # + # source://yard//lib/yard/templates/engine.rb#35 + def template(*path); end + + # Forces creation of a template at +path+ within a +full_path+. + # + # @param path [String] the path name of the template + # @param full_paths [Array<String>] the full path on disk of the template + # @return [Template] the template module representing the +path+ + # + # source://yard//lib/yard/templates/engine.rb#53 + def template!(path, full_paths = T.unsafe(nil)); end + + # @return [Array<String>] the list of registered template paths + # + # source://yard//lib/yard/templates/engine.rb#15 + def template_paths; end + + # @return [Array<String>] the list of registered template paths + # + # source://yard//lib/yard/templates/engine.rb#15 + def template_paths=(_arg0); end + + # Serializes the results of a block with a +serializer+ object. + # + # @param object [CodeObjects::Base] the code object to serialize + # @param serializer [Serializers::Base] the serializer object + # @see Serializers::Base + # @yield a block whose result will be serialize + # @yieldreturn [String] the contents to serialize + # + # source://yard//lib/yard/templates/engine.rb#115 + def with_serializer(object, serializer); end + + private + + # Searches through the registered {template_paths} and returns + # all full directories that have the +path+ within them on disk. + # + # @param from_template [Template] if provided, allows a relative + # path to be specified from this template's full path. + # @param path [String] the path component to search for in the + # {template_paths} + # @return [Array<String>] a list of full paths that are existing + # candidates for a template module + # + # source://yard//lib/yard/templates/engine.rb#161 + def find_template_paths(from_template, path); end + + # Sets default options on the options hash + # + # @option options + # @option options + # @option options + # @param options [Hash] the options hash + # @return [void] + # + # source://yard//lib/yard/templates/engine.rb#141 + def set_default_options(options = T.unsafe(nil)); end + + # The name of the module that represents a +path+ + # + # @param path [String] the path to generate a module name for + # @return [String] the module name + # + # source://yard//lib/yard/templates/engine.rb#176 + def template_module_name(path); end + end +end + +# @since 0.5.4 +# +# source://yard//lib/yard/templates/erb_cache.rb#5 +module YARD::Templates::ErbCache + class << self + # @since 0.5.4 + # + # source://yard//lib/yard/templates/erb_cache.rb#17 + def clear!; end + + # @since 0.5.4 + # + # source://yard//lib/yard/templates/erb_cache.rb#6 + def method_for(filename); end + end +end + +# Namespace for template helpers +# +# source://yard//lib/yard/autoload.rb#272 +module YARD::Templates::Helpers; end + +# The base helper module included in all templates. +# +# source://yard//lib/yard/templates/helpers/base_helper.rb#4 +module YARD::Templates::Helpers::BaseHelper + # @example + # s = format_object_title ModuleObject.new(:root, :MyModuleName) + # s # => "Module: MyModuleName" + # @param object [CodeObjects::Base] the object to retrieve a title for + # @return [String] the page title name for a given object + # + # source://yard//lib/yard/templates/helpers/base_helper.rb#196 + def format_object_title(object); end + + # @example Formatted type of an exception class + # o = ClassObject.new(:root, :MyError) + # o.superclass = P('RuntimeError') + # format_object_type(o) # => "Exception" + # @example Formatted type of a method + # o = MethodObject.new(:root, :to_s) + # format_object_type(o) # => "Method" + # @param object [CodeObjects::Base] the object to retrieve the type for + # @return [String] the human-readable formatted {CodeObjects::Base#type #type} + # for the object + # + # source://yard//lib/yard/templates/helpers/base_helper.rb#182 + def format_object_type(object); end + + # Indents and formats source code + # + # @param value [String] the input source code + # @return [String] formatted source code + # + # source://yard//lib/yard/templates/helpers/base_helper.rb#209 + def format_source(value); end + + # Formats a list of return types for output and links each type. + # + # @example Formatting types + # format_types(['String', 'Array']) #=> "(String, Array)" + # @example Formatting types without surrounding brackets + # format_types(['String', 'Array'], false) #=> "String, Array" + # @param list [Array<String>] a list of types + # @param brackets [Boolean] whether to surround the types in brackets + # @return [String] the formatted list of Ruby types + # + # source://yard//lib/yard/templates/helpers/base_helper.rb#168 + def format_types(list, brackets = T.unsafe(nil)); end + + # An object that keeps track of global state throughout the entire template + # rendering process (including any sub-templates). + # + # @return [OpenStruct] a struct object that stores state + # @since 0.6.0 + # + # source://yard//lib/yard/templates/helpers/base_helper.rb#20 + def globals; end + + # Escapes text. This is used a lot by the HtmlHelper and there should + # be some helper to "clean up" text for whatever, this is it. + # + # source://yard//lib/yard/templates/helpers/base_helper.rb#38 + def h(text); end + + # Links to an extra file + # + # @param filename [String] the filename to link to + # @param title [String] the title of the link + # @param anchor [String] optional anchor + # @return [String] the link to the file + # @since 0.5.5 + # + # source://yard//lib/yard/templates/helpers/base_helper.rb#152 + def link_file(filename, title = T.unsafe(nil), anchor = T.unsafe(nil)); end + + # Include a file as a docstring in output + # + # @param file [String] the filename to include + # @return [String] the file's contents + # @since 0.7.0 + # + # source://yard//lib/yard/templates/helpers/base_helper.rb#113 + def link_include_file(file); end + + # Includes an object's docstring into output. + # + # @param obj [CodeObjects::Base] the object to include + # @return [String] the object's docstring (no tags) + # @since 0.6.0 + # + # source://yard//lib/yard/templates/helpers/base_helper.rb#105 + def link_include_object(obj); end + + # Links to an object with an optional title + # + # @param obj [CodeObjects::Base] the object to link to + # @param title [String] the title to use for the link + # @return [String] the linked object + # + # source://yard//lib/yard/templates/helpers/base_helper.rb#122 + def link_object(obj, title = T.unsafe(nil)); end + + # Links to a URL + # + # @param url [String] the URL to link to + # @param title [String] the optional title to display the link as + # @param params [Hash] optional parameters for the link + # @return [String] the linked URL + # + # source://yard//lib/yard/templates/helpers/base_helper.rb#141 + def link_url(url, title = T.unsafe(nil), params = T.unsafe(nil)); end + + # Links objects or URLs. This method will delegate to the correct +link_+ + # method depending on the arguments passed in. + # + # @example Linking a URL + # linkify('http://example.com') + # @example Including docstring contents of an object + # linkify('include:YARD::Docstring') + # @example Linking to an extra file + # linkify('file:README') + # @example Linking an object by path + # linkify('YARD::Docstring') + # + # source://yard//lib/yard/templates/helpers/base_helper.rb#55 + def linkify(*args); end + + # Returns the value of attribute object. + # + # source://yard//lib/yard/templates/helpers/base_helper.rb#5 + def object; end + + # Sets the attribute object + # + # @param value the value to set the attribute object to. + # + # source://yard//lib/yard/templates/helpers/base_helper.rb#5 + def object=(_arg0); end + + # @return [CodeObjects::Base] the object representing the current generated + # page. Might not be the current {#object} when inside sub-templates. + # + # source://yard//lib/yard/templates/helpers/base_helper.rb#11 + def owner; end + + # Runs a list of objects against the {Verifier} object passed into the + # template and returns the subset of verified objects. + # + # @param list [Array<CodeObjects::Base>] a list of code objects + # @return [Array<CodeObjects::Base>] a list of code objects that match + # the verifier. If no verifier is supplied, all objects are returned. + # + # source://yard//lib/yard/templates/helpers/base_helper.rb#30 + def run_verifier(list); end + + # Returns the value of attribute serializer. + # + # source://yard//lib/yard/templates/helpers/base_helper.rb#5 + def serializer; end + + # Sets the attribute serializer + # + # @param value the value to set the attribute serializer to. + # + # source://yard//lib/yard/templates/helpers/base_helper.rb#5 + def serializer=(_arg0); end +end + +# Helpers for various object types +# +# source://yard//lib/yard/templates/helpers/filter_helper.rb#5 +module YARD::Templates::Helpers::FilterHelper + # @return [Boolean] whether an object is a class + # + # source://yard//lib/yard/templates/helpers/filter_helper.rb#17 + def is_class?(object); end + + # @return [Boolean] whether an object is a method + # + # source://yard//lib/yard/templates/helpers/filter_helper.rb#7 + def is_method?(object); end + + # @return [Boolean] whether an object is a module + # + # source://yard//lib/yard/templates/helpers/filter_helper.rb#22 + def is_module?(object); end + + # @return [Boolean] whether an object is a namespace + # + # source://yard//lib/yard/templates/helpers/filter_helper.rb#12 + def is_namespace?(object); end +end + +# The helper module for HTML templates. +# +# source://yard//lib/yard/templates/helpers/html_helper.rb#7 +module YARD::Templates::Helpers::HtmlHelper + include ::YARD::Templates::Helpers::MarkupHelper + include ::YARD::Templates::Helpers::ModuleHelper + include ::YARD::Templates::Helpers::HtmlSyntaxHighlightHelper + + # @param object [CodeObjects::Base] the object to get an anchor for + # @return [String] the anchor for a specific object + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#347 + def anchor_for(object); end + + # Returns the current character set. The default value can be overridden + # by setting the +LANG+ environment variable or by overriding this + # method. In Ruby 1.9 you can also modify this value by setting + # +Encoding.default_external+. + # + # @return [String] the current character set + # @since 0.5.4 + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#574 + def charset; end + + # Formats a list of objects and links them + # + # @return [String] a formatted list of objects + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#458 + def format_object_name_list(objects); end + + # Formats a list of types from a tag. + # + # @param typelist [Array<String>, FalseClass] the list of types to be formatted. + # @param brackets [Boolean] omits the surrounding + # brackets if +brackets+ is set to +false+. + # @return [String] the list of types formatted + # as [Type1, Type2, ...] with the types linked + # to their respective descriptions. + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#476 + def format_types(typelist, brackets = T.unsafe(nil)); end + + # Escapes HTML entities + # + # @param text [String] the text to escape + # @return [String] the HTML with escaped entities + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#23 + def h(text); end + + # Converts Asciidoc to HTML + # + # @param text [String] input Asciidoc text + # @return [String] output HTML + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#109 + def html_markup_asciidoc(text); end + + # Converts HTML to HTML + # + # @param text [String] input html + # @return [String] output HTML + # @since 0.6.0 + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#168 + def html_markup_html(text); end + + # Converts Markdown to HTML + # + # @param text [String] input Markdown text + # @return [String] output HTML + # @since 0.6.0 + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#78 + def html_markup_markdown(text); end + + # @return [String] the same text with no markup + # @since 0.6.6 + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#160 + def html_markup_none(text); end + + # Converts org-mode to HTML + # + # @param text [String] input org-mode text + # @return [String] output HTML + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#102 + def html_markup_org(text); end + + # Converts plaintext to pre-formatted HTML + # + # @param text [String] the input text + # @return [String] the output HTML + # @since 0.6.0 + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#146 + def html_markup_pre(text); end + + # Converts RDoc formatting (SimpleMarkup) to HTML + # + # @param text [String] the input RDoc formatted text + # @return [String] output HTML + # @since 0.6.0 + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#136 + def html_markup_rdoc(text); end + + # Highlights Ruby source. Similar to {#html_syntax_highlight}, but + # this method is meant to be called from {#htmlify} when markup is + # set to "ruby". + # + # @param source [String] the Ruby source + # @return [String] the highlighted HTML + # @since 0.7.0 + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#179 + def html_markup_ruby(source); end + + # Converts plaintext to regular HTML + # + # @param text [String] the input text + # @return [String] the output HTML + # @since 0.6.0 + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#154 + def html_markup_text(text); end + + # Converts Textile to HTML + # + # @param text [String] the input Textile text + # @return [String] output HTML + # @since 0.6.0 + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#118 + def html_markup_textile(text); end + + # Converts plaintext to strict Textile (hard breaks) + # + # @param text [String] the input textile data + # @return [String] the output HTML + # @since 0.6.0 + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#128 + def html_markup_textile_strict(text); end + + # Syntax highlights +source+ in language +type+. + # + # @note To support a specific language +type+, implement the method + # +html_syntax_highlight_TYPE+ in this class. + # @param source [String] the source code to highlight + # @param type [Symbol, String] the language type (:ruby, :plain, etc). Use + # :plain for no syntax highlighting. + # @return [String] the highlighted source + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#199 + def html_syntax_highlight(source, type = T.unsafe(nil)); end + + # @return [String] unhighlighted source + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#210 + def html_syntax_highlight_plain(source); end + + # Turns text into HTML using +markup+ style formatting. + # + # @param text [String] the text to format + # @param markup [Symbol] examples are +:markdown+, +:textile+, +:rdoc+. + # To add a custom markup type, see {MarkupHelper} + # @return [String] the HTML + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#57 + def htmlify(text, markup = T.unsafe(nil)); end + + # @return [String] HTMLified text as a single line (paragraphs removed) + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#184 + def htmlify_line(*args); end + + # Inserts an include link while respecting inlining + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#296 + def insert_include(text, markup = T.unsafe(nil)); end + + # Links to an extra file + # + # @param filename [String] the filename to link to + # @param title [String] the title of the link + # @param anchor [String] optional anchor + # @return [String] the link to the file + # @since 0.5.5 + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#270 + def link_file(filename, title = T.unsafe(nil), anchor = T.unsafe(nil)); end + + # Include a file as a docstring in output + # + # @param file [String] the filename to include + # @return [String] the file's contents + # @since 0.7.0 + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#282 + def link_include_file(file); end + + # Includes an object's docstring into output. + # + # @param obj [CodeObjects::Base] the object to include + # @return [String] the object's docstring (no tags) + # @since 0.6.0 + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#291 + def link_include_object(obj); end + + # Links to an object with an optional title + # + # @param obj [CodeObjects::Base] the object to link to + # @param title [String] the title to use for the link + # @return [String] the linked object + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#301 + def link_object(obj, title = T.unsafe(nil), anchor = T.unsafe(nil), relative = T.unsafe(nil)); end + + # Links to a URL + # + # @param url [String] the URL to link to + # @param title [String] the optional title to display the link as + # @param params [Hash] optional parameters for the link + # @return [String] the linked URL + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#332 + def link_url(url, title = T.unsafe(nil), params = T.unsafe(nil)); end + + # source://yard//lib/yard/templates/helpers/html_helper.rb#400 + def mtime(_file); end + + # Returns the URL for an object. + # + # @param obj [String, CodeObjects::Base] the object (or object path) to link to + # @param anchor [String] the anchor to link to + # @param relative [Boolean] use a relative or absolute link + # @return [String] the URL location of the object + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#368 + def mtime_url(obj, anchor = T.unsafe(nil), relative = T.unsafe(nil)); end + + # Resolves any text in the form of +{Name}+ to the object specified by + # Name. Also supports link titles in the form +{Name title}+. + # + # @example Linking to an instance method + # resolve_links("{MyClass#method}") # => "<a href='...'>MyClass#method</a>" + # @example Linking to a class with a title + # resolve_links("{A::B::C the C class}") # => "<a href='...'>the c class</a>" + # @param text [String] the text to resolve links in + # @return [String] HTML with linkified references + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#225 + def resolve_links(text); end + + # Formats the signature of method +meth+. + # + # @param meth [CodeObjects::MethodObject] the method object to list + # the signature of + # @param link [Boolean] whether to link the method signature to the details view + # @param show_extras [Boolean] whether to show extra meta-data (visibility, attribute info) + # @param full_attr_name [Boolean] whether to show the full attribute name + # ("name=" instead of "name") + # @return [String] the formatted method signature + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#529 + def signature(meth, link = T.unsafe(nil), show_extras = T.unsafe(nil), full_attr_name = T.unsafe(nil)); end + + # Get the return types for a method signature. + # + # @param meth [CodeObjects::MethodObject] the method object + # @param link [Boolean] whether to link the types + # @return [String] the signature types + # @since 0.5.3 + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#492 + def signature_types(meth, link = T.unsafe(nil)); end + + # Returns the URL for an object. + # + # @param obj [String, CodeObjects::Base] the object (or object path) to link to + # @param anchor [String] the anchor to link to + # @param relative [Boolean] use a relative or absolute link + # @return [String] the URL location of the object + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#368 + def url_for(obj, anchor = T.unsafe(nil), relative = T.unsafe(nil)); end + + # Returns the URL for a specific file + # + # @param filename [String, CodeObjects::ExtraFileObject] the filename to link to + # @param anchor [String] optional anchor + # @return [String] the URL pointing to the file + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#407 + def url_for_file(filename, anchor = T.unsafe(nil)); end + + # Returns the URL for the frameset page + # + # @return [String] the URL pointing to the frames page + # @since 0.8.0 + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#434 + def url_for_frameset; end + + # Returns the URL for the alphabetic index page + # + # @return [String] the URL pointing to the first main page the + # user should see. + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#450 + def url_for_index; end + + # Returns the URL for a list type + # + # @param type [String, Symbol] the list type to generate a URL for + # @return [String] the URL pointing to the list + # @since 0.8.0 + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#426 + def url_for_list(type); end + + # Returns the URL for the main page (README or alphabetic index) + # + # @return [String] the URL pointing to the first main page the + # user should see. + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#442 + def url_for_main; end + + private + + # Converts a {CodeObjects::MethodObject} into an overload object + # + # @since 0.5.3 + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#609 + def convert_method_to_overload(meth); end + + # Parses code block's HTML attributes in order to detect the programming + # language of what's enclosed in that code block. + # + # @param pre_html_attrs [String, nil] HTML attribute list of +pre+ element + # @param code_html_attrs [String, nil] HTML attribute list of +code+ + # element + # @return [String, nil] detected programming language + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#664 + def detect_lang_in_codeblock_attributes(pre_html_attrs, code_html_attrs); end + + # Parses code blocks out of html and performs syntax highlighting + # on code inside of the blocks. + # + # @param html [String] the html to search for code in + # @return [String] highlighted html + # @see #html_syntax_highlight + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#640 + def parse_codeblocks(html); end + + # Parses !!!lang out of codeblock, returning the codeblock language + # followed by the source code. + # + # @param source [String] the source code whose language to determine + # @return [Array(String, String)] the language, if any, and the + # remaining source + # @since 0.7.5 + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#624 + def parse_lang_for_codeblock(source); end + + # Converts a set of hash options into HTML attributes for a tag + # + # @param opts [Hash{String => String}] the tag options + # @return [String] the tag attributes of an HTML tag + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#603 + def tag_attrs(opts = T.unsafe(nil)); end + + # Escapes a URL + # + # @param text [String] the URL + # @return [String] the escaped URL + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#31 + def urlencode(text); end + + class << self + # Escapes a URL + # + # @param text [String] the URL + # @return [String] the escaped URL + # + # source://yard//lib/yard/templates/helpers/html_helper.rb#31 + def urlencode(text); end + end +end + +# @private +# +# source://yard//lib/yard/templates/helpers/html_helper.rb#15 +YARD::Templates::Helpers::HtmlHelper::ASCIIDOC_ATTRIBUTES = T.let(T.unsafe(nil), Hash) + +# @private +# +# source://yard//lib/yard/templates/helpers/html_helper.rb#12 +YARD::Templates::Helpers::HtmlHelper::URLMATCH = T.let(T.unsafe(nil), Regexp) + +# Helper methods for syntax highlighting. +# +# source://yard//lib/yard/templates/helpers/html_syntax_highlight_helper.rb#6 +module YARD::Templates::Helpers::HtmlSyntaxHighlightHelper + include ::YARD::Templates::Helpers::ModuleHelper + + # Highlights Ruby source + # + # @param source [String] the Ruby source code + # @return [String] the highlighted Ruby source + # + # source://yard//lib/yard/templates/helpers/html_syntax_highlight_helper.rb#12 + def html_syntax_highlight_ruby(source); end + + private + + # source://yard//lib/yard/templates/helpers/html_syntax_highlight_helper.rb#63 + def clean_token_object(token_obj); end + + # source://yard//lib/yard/templates/helpers/html_syntax_highlight_helper.rb#45 + def html_syntax_highlight_ruby_legacy(source); end + + # source://yard//lib/yard/templates/helpers/html_syntax_highlight_helper.rb#22 + def html_syntax_highlight_ruby_ripper(source); end +end + +# Namespace for markup providers +# +# source://yard//lib/yard/autoload.rb#273 +module YARD::Templates::Helpers::Markup; end + +# source://yard//lib/yard/templates/helpers/markup/rdoc_markdown.rb#13 +class YARD::Templates::Helpers::Markup::RDocMarkdown < ::YARD::Templates::Helpers::Markup::RDocMarkup + # @return [RDocMarkdown] a new instance of RDocMarkdown + # + # source://yard//lib/yard/templates/helpers/markup/rdoc_markdown.rb#14 + def initialize(text); end + + # source://yard//lib/yard/templates/helpers/markup/rdoc_markdown.rb#18 + def fix_typewriter(html); end +end + +# source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#12 +class YARD::Templates::Helpers::Markup::RDocMarkup + # @return [RDocMarkup] a new instance of RDocMarkup + # + # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#41 + def initialize(text); end + + # Returns the value of attribute from_path. + # + # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#35 + def from_path; end + + # Sets the attribute from_path + # + # @param value the value to set the attribute from_path to. + # + # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#35 + def from_path=(_arg0); end + + # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#50 + def to_html; end + + private + + # Don't allow -- to turn into — element. The chances of this being + # some --option is far more likely than the typographical meaning. + # + # @todo Refactor into own SimpleMarkup subclass + # + # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#87 + def fix_dash_dash(text); end + + # Fixes RDoc behaviour with ++ only supporting alphanumeric text. + # + # @todo Refactor into own SimpleMarkup subclass + # + # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#66 + def fix_typewriter(text); end +end + +# source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#12 +YARD::Templates::Helpers::Markup::RDocMarkup::MARKUP = RDoc::Markup + +# source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#13 +class YARD::Templates::Helpers::Markup::RDocMarkupToHtml < ::RDoc::Markup::ToHtml + # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#16 + def initialize; end + + # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#100 + def accept_paragraph(*args); end + + # Returns the value of attribute from_path. + # + # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#93 + def from_path; end + + # Sets the attribute from_path + # + # @param value the value to set the attribute from_path to. + # + # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#93 + def from_path=(_arg0); end + + # Disable auto-link of URLs + # + # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#96 + def handle_special_HYPERLINK(special); end +end + +# Helper methods for loading and managing markup types. +# +# source://yard//lib/yard/templates/helpers/markup_helper.rb#7 +module YARD::Templates::Helpers::MarkupHelper + # Attempts to load the first valid markup provider in {MARKUP_PROVIDERS}. + # If a provider is specified, immediately try to load it. + # + # On success this sets `@markup_provider` and `@markup_class` to + # the provider name and library constant class/module respectively for + # the loaded provider. + # + # On failure this method will inform the user that no provider could be + # found and exit the program. + # + # @return [Boolean] whether the markup provider was successfully loaded. + # + # source://yard//lib/yard/templates/helpers/markup_helper.rb#87 + def load_markup_provider(type = T.unsafe(nil)); end + + # Gets the markup provider class/module constant for a markup type + # Call {#load_markup_provider} before using this method. + # + # @param type [Symbol] the markup type (:rdoc, :markdown, etc.) + # @return [Class] the markup class + # + # source://yard//lib/yard/templates/helpers/markup_helper.rb#158 + def markup_class(type = T.unsafe(nil)); end + + # Strips any shebang lines on the file contents that pertain to + # markup or preprocessing data. + # + # @deprecated Use {CodeObjects::ExtraFileObject#contents} instead + # @return [String] the file contents minus any preprocessing tags + # @since 0.6.0 + # + # source://yard//lib/yard/templates/helpers/markup_helper.rb#149 + def markup_file_contents(contents); end + + # Checks for a shebang or looks at the file extension to determine + # the markup type for the file contents. File extensions are registered + # for a markup type in {MARKUP_EXTENSIONS}. + # + # A shebang should be on the first line of a file and be in the form: + # + # #!markup_type + # + # Standard markup types are text, html, rdoc, markdown, textile + # + # @param contents [String] Unused. Was necessary prior to 0.7.0. + # Newer versions of YARD use {CodeObjects::ExtraFileObject#contents} + # @return [Symbol] the markup type recognized for the file + # @see MARKUP_EXTENSIONS + # @since 0.6.0 + # + # source://yard//lib/yard/templates/helpers/markup_helper.rb#133 + def markup_for_file(contents, filename); end + + # Gets the markup provider name for a markup type + # Call {#load_markup_provider} before using this method. + # + # @param type [Symbol] the markup type (:rdoc, :markdown, etc.) + # @return [Symbol] the markup provider name (usually the gem name of the library) + # + # source://yard//lib/yard/templates/helpers/markup_helper.rb#168 + def markup_provider(type = T.unsafe(nil)); end + + class << self + # Clears the markup provider cache information. Mainly used for testing. + # + # @return [void] + # + # source://yard//lib/yard/templates/helpers/markup_helper.rb#11 + def clear_markup_cache; end + + # @private + # @return [Hash{Symbol=>{(:provider,:class)=>Object}}] the cached markup providers + # @since 0.6.4 + # + # source://yard//lib/yard/templates/helpers/markup_helper.rb#18 + def markup_cache; end + + # @private + # @return [Hash{Symbol=>{(:provider,:class)=>Object}}] the cached markup providers + # @since 0.6.4 + # + # source://yard//lib/yard/templates/helpers/markup_helper.rb#18 + def markup_cache=(_arg0); end + end +end + +# Returns a list of extensions for various markup types. To register +# extensions for a type, add them to the array of extensions for the +# type. +# +# @since 0.6.0 +# +# source://yard//lib/yard/templates/helpers/markup_helper.rb#61 +YARD::Templates::Helpers::MarkupHelper::MARKUP_EXTENSIONS = T.let(T.unsafe(nil), Hash) + +# Contains the Regexp object that matches the shebang line of extra +# files to detect the markup type. +# +# source://yard//lib/yard/templates/helpers/markup_helper.rb#74 +YARD::Templates::Helpers::MarkupHelper::MARKUP_FILE_SHEBANG = T.let(T.unsafe(nil), Regexp) + +# The default list of markup providers for each markup type +# +# source://yard//lib/yard/templates/helpers/markup_helper.rb#24 +YARD::Templates::Helpers::MarkupHelper::MARKUP_PROVIDERS = T.let(T.unsafe(nil), Hash) + +# Helper methods for method objects. +# +# source://yard//lib/yard/templates/helpers/method_helper.rb#5 +module YARD::Templates::Helpers::MethodHelper + # @return [String] formatted arguments for a method + # + # source://yard//lib/yard/templates/helpers/method_helper.rb#7 + def format_args(object); end + + # @return [String] formatted block if one exists + # + # source://yard//lib/yard/templates/helpers/method_helper.rb#35 + def format_block(object); end + + # @return [String] formats source of an object + # + # source://yard//lib/yard/templates/helpers/method_helper.rb#57 + def format_code(object, _show_lines = T.unsafe(nil)); end + + # @return [String] formats source code of a constant value + # + # source://yard//lib/yard/templates/helpers/method_helper.rb#68 + def format_constant(value); end + + # @return [String] formats line numbers for source code of an object + # + # source://yard//lib/yard/templates/helpers/method_helper.rb#50 + def format_lines(object); end + + # @return [String] formatted and linked return types for a method + # + # source://yard//lib/yard/templates/helpers/method_helper.rb#28 + def format_return_types(object); end +end + +# Helper methods for managing module objects. +# +# source://yard//lib/yard/templates/helpers/module_helper.rb#6 +module YARD::Templates::Helpers::ModuleHelper + # Prunes the method listing by running the verifier and removing attributes/aliases + # + # @param list [Array<CodeObjects::Base>] a list of methods + # @param hide_attributes [Boolean] whether to prune attribute methods from the list + # @return [Array<CodeObjects::Base>] a pruned list of methods + # + # source://yard//lib/yard/templates/helpers/module_helper.rb#11 + def prune_method_listing(list, hide_attributes = T.unsafe(nil)); end +end + +# Helper methods for text template formats. +# +# source://yard//lib/yard/templates/helpers/text_helper.rb#6 +module YARD::Templates::Helpers::TextHelper + # @return [String] aligns text to the right + # + # source://yard//lib/yard/templates/helpers/text_helper.rb#39 + def align_right(text, spacer = T.unsafe(nil), col = T.unsafe(nil)); end + + # @return [String] escapes text + # + # source://yard//lib/yard/templates/helpers/text_helper.rb#8 + def h(text); end + + # @return [String] returns a horizontal rule for output + # + # source://yard//lib/yard/templates/helpers/text_helper.rb#45 + def hr(col = T.unsafe(nil), sep = T.unsafe(nil)); end + + # @return [String] indents +text+ by +len+ characters. + # + # source://yard//lib/yard/templates/helpers/text_helper.rb#29 + def indent(text, len = T.unsafe(nil)); end + + # @return [String] the formatted signature for a method + # + # source://yard//lib/yard/templates/helpers/text_helper.rb#50 + def signature(meth); end + + # @return [String] aligns a title to the right + # + # source://yard//lib/yard/templates/helpers/text_helper.rb#34 + def title_align_right(text, col = T.unsafe(nil)); end + + # @return [String] wraps text at +col+ columns. + # + # source://yard//lib/yard/templates/helpers/text_helper.rb#24 + def wrap(text, col = T.unsafe(nil)); end + + private + + # source://yard//lib/yard/templates/helpers/text_helper.rb#98 + def resolve_links(text); end +end + +# Helpers for UML template format +# +# source://yard//lib/yard/templates/helpers/uml_helper.rb#5 +module YARD::Templates::Helpers::UMLHelper + # Formats the path of an object for Graphviz syntax + # + # @param object [CodeObjects::Base] an object to format the path of + # @return [String] the encoded path + # + # source://yard//lib/yard/templates/helpers/uml_helper.rb#20 + def format_path(object); end + + # Encodes text in escaped Graphviz syntax + # + # @param text [String] text to encode + # @return [String] the encoded text + # + # source://yard//lib/yard/templates/helpers/uml_helper.rb#27 + def h(text); end + + # Tidies data by formatting and indenting text + # + # @param data [String] pre-formatted text + # @return [String] tidied text. + # + # source://yard//lib/yard/templates/helpers/uml_helper.rb#34 + def tidy(data); end + + # Official UML visibility prefix syntax for an object given its visibility + # + # @param object [CodeObjects::Base] the object to retrieve visibility for + # @return [String] the UML visibility prefix + # + # source://yard//lib/yard/templates/helpers/uml_helper.rb#9 + def uml_visibility(object); end +end + +# Abstracts the structure for a section and its subsections into an ordered +# list of sections and subsections. +# +# @since 0.6.0 +# +# source://yard//lib/yard/templates/section.rb#7 +class YARD::Templates::Section < ::Array + # @return [Section] a new instance of Section + # @since 0.6.0 + # + # source://yard//lib/yard/templates/section.rb#10 + def initialize(name, *args); end + + # @since 0.6.0 + # + # source://yard//lib/yard/templates/section.rb#45 + def <<(*args); end + + # @since 0.6.0 + # + # source://yard//lib/yard/templates/section.rb#34 + def ==(other); end + + # @since 0.6.0 + # + # source://yard//lib/yard/templates/section.rb#21 + def [](*args); end + + # @since 0.6.0 + # + # source://yard//lib/yard/templates/section.rb#74 + def any(item); end + + # @since 0.6.0 + # + # source://yard//lib/yard/templates/section.rb#15 + def dup; end + + # @return [Boolean] + # @since 0.6.0 + # + # source://yard//lib/yard/templates/section.rb#30 + def eql?(other); end + + # @since 0.6.0 + # + # source://yard//lib/yard/templates/section.rb#54 + def inspect; end + + # @since 0.6.0 + # + # source://yard//lib/yard/templates/section.rb#8 + def name; end + + # @since 0.6.0 + # + # source://yard//lib/yard/templates/section.rb#8 + def name=(_arg0); end + + # @since 0.6.0 + # + # source://yard//lib/yard/templates/section.rb#60 + def place(*args); end + + # @since 0.6.0 + # + # source://yard//lib/yard/templates/section.rb#45 + def push(*args); end + + # @since 0.6.0 + # + # source://yard//lib/yard/templates/section.rb#64 + def to_a; end + + # @since 0.6.0 + # + # source://yard//lib/yard/templates/section.rb#50 + def unshift(*args); end + + private + + # @since 0.6.0 + # + # source://yard//lib/yard/templates/section.rb#84 + def parse_sections(args); end +end + +# source://yard//lib/yard/templates/template.rb#6 +module YARD::Templates::Template + include ::YARD::Templates::ErbCache + include ::YARD::Templates::Helpers::BaseHelper + include ::YARD::Templates::Helpers::MethodHelper + + mixes_in_class_methods ::YARD::Templates::Template::ClassMethods + + # source://yard//lib/yard/templates/template.rb#186 + def initialize(opts = T.unsafe(nil)); end + + # Loads a template specified by path. If +:template+ or +:format+ is + # specified in the {#options} hash, they are prepended and appended + # to the path respectively. + # + # @param path [Array<String, Symbol>] the path of the template + # @return [Template] the loaded template module + # + # source://yard//lib/yard/templates/template.rb#204 + def T(*path); end + + # Returns the value of attribute class. + # + # source://yard//lib/yard/templates/template.rb#7 + def class; end + + # Sets the attribute class + # + # @param value the value to set the attribute class to. + # + # source://yard//lib/yard/templates/template.rb#7 + def class=(_arg0); end + + # @param section [String, Symbol] the section name + # @return [String] the contents of the ERB rendered section + # @yield calls subsections to be rendered + # + # source://yard//lib/yard/templates/template.rb#285 + def erb(section, &block); end + + # Returns the contents of a file. If +allow_inherited+ is set to +true+, + # use +{{{__super__}}}+ inside the file contents to insert the contents + # of the file from an inherited template. For instance, if +templates/b+ + # inherits from +templates/a+ and file "test.css" exists in both directories, + # both file contents can be retrieved by having +templates/b/test.css+ look + # like: + # + # {{{__super__}}} + # ... + # body { css styles here } + # p.class { other styles } + # + # @param basename [String] the name of the file + # @param allow_inherited [Boolean] whether inherited templates can + # be inserted with +{{{__super__}}}+ + # @raise [ArgumentError] + # @return [String] the contents of a file identified by +basename+. All + # template paths (including any mixed in templates) are searched for + # the file + # @see ClassMethods#find_file + # @see ClassMethods#find_nth_file + # + # source://yard//lib/yard/templates/template.rb#312 + def file(basename, allow_inherited = T.unsafe(nil)); end + + # Initialization called on the template. Override this in a 'setup.rb' + # file in the template's path to implement a template + # + # @example A default set of sections + # def init + # sections :section1, :section2, [:subsection1, :etc] + # end + # @see #sections + # + # source://yard//lib/yard/templates/template.rb#239 + def init; end + + # source://yard//lib/yard/templates/template.rb#342 + def inspect; end + + # Returns the value of attribute options. + # + # source://yard//lib/yard/templates/template.rb#8 + def options; end + + # source://yard//lib/yard/templates/template.rb#337 + def options=(value); end + + # Runs a template on +sects+ using extra options. This method should + # not be called directly. Instead, call the class method {ClassMethods#run} + # + # @param opts [Hash, nil] any extra options to apply to sections + # @param sects [Section, Array] a section list of sections to render + # @param start_at [Fixnum] the index in the section list to start from + # @param break_first [Boolean] if true, renders only the first section + # @return [String] the rendered sections joined together + # @yield [opts] calls for the subsections to be rendered + # @yieldparam opts [Hash] any extra options to yield + # + # source://yard//lib/yard/templates/template.rb#252 + def run(opts = T.unsafe(nil), sects = T.unsafe(nil), start_at = T.unsafe(nil), break_first = T.unsafe(nil), &block); end + + # Returns the value of attribute section. + # + # source://yard//lib/yard/templates/template.rb#7 + def section; end + + # Sets the attribute section + # + # @param value the value to set the attribute section to. + # + # source://yard//lib/yard/templates/template.rb#7 + def section=(_arg0); end + + # Sets the sections (and subsections) to be rendered for the template + # + # @example Sets a set of erb sections + # sections :a, :b, :c # searches for a.erb, b.erb, c.erb + # @example Sets a set of method and erb sections + # sections :a, :b, :c # a is a method, the rest are erb files + # @example Sections with subsections + # sections :header, [:name, :children] + # # the above will call header.erb and only renders the subsections + # # if they are yielded by the template (see #yieldall) + # @param args [Array<Symbol, String, Template, Array>] the sections + # to use to render the template. For symbols and strings, the + # section will be executed as a method (if one exists), or rendered + # from the file "name.erb" where name is the section name. For + # templates, they will have {Template::ClassMethods#run} called on them. + # Any subsections can be yielded to using yield or {#yieldall} + # + # source://yard//lib/yard/templates/template.rb#226 + def sections(*args); end + + # Calls the ERB file from the last inherited template with {#section}.erb + # + # @param sect [Symbol, String] if provided, uses a specific section name + # @return [String] the rendered ERB file in any of the inherited template + # paths. + # + # source://yard//lib/yard/templates/template.rb#330 + def superb(sect = T.unsafe(nil), &block); end + + # Yields all subsections with any extra options + # + # @param opts [Hash] extra options to be applied to subsections + # + # source://yard//lib/yard/templates/template.rb#278 + def yieldall(opts = T.unsafe(nil), &block); end + + protected + + # source://yard//lib/yard/templates/template.rb#348 + def erb_file_for(section); end + + # source://yard//lib/yard/templates/template.rb#352 + def erb_with(content, filename = T.unsafe(nil)); end + + private + + # source://yard//lib/yard/templates/template.rb#399 + def add_options(opts = T.unsafe(nil)); end + + # @raise [ArgumentError] + # + # source://yard//lib/yard/templates/template.rb#378 + def cache(section); end + + # source://yard//lib/yard/templates/template.rb#388 + def cache_filename(section); end + + # source://yard//lib/yard/templates/template.rb#364 + def render_section(section, &block); end + + # source://yard//lib/yard/templates/template.rb#393 + def set_ivars; end + + # source://yard//lib/yard/templates/template.rb#412 + def with_section; end + + class << self + # Extra includes are mixins that are included after a template is created. These + # mixins can be registered by plugins to operate on templates and override behaviour. + # + # Note that this array can be filled with modules or proc objects. If a proc object + # is given, the proc will be called with the {Template#options} hash containing + # relevant template information like the object, format, and more. The proc should + # return a module or nil if there is none. + # + # @example Adding in extra mixins to include on a template + # Template.extra_includes << MyHelper + # @example Conditionally including a mixin if the format is html + # Template.extra_includes << proc {|opts| MyHelper if opts.format == :html } + # @return [Array<Module, Proc>] a list of modules to be automatically included + # into any new template module + # + # source://yard//lib/yard/templates/template.rb#25 + def extra_includes; end + + # Extra includes are mixins that are included after a template is created. These + # mixins can be registered by plugins to operate on templates and override behaviour. + # + # Note that this array can be filled with modules or proc objects. If a proc object + # is given, the proc will be called with the {Template#options} hash containing + # relevant template information like the object, format, and more. The proc should + # return a module or nil if there is none. + # + # @example Adding in extra mixins to include on a template + # Template.extra_includes << MyHelper + # @example Conditionally including a mixin if the format is html + # Template.extra_includes << proc {|opts| MyHelper if opts.format == :html } + # @return [Array<Module, Proc>] a list of modules to be automatically included + # into any new template module + # + # source://yard//lib/yard/templates/template.rb#25 + def extra_includes=(_arg0); end + + # Includes the {extra_includes} modules into the template object. + # + # @param template [Template] the template object to mixin the extra includes. + # @param options [SymbolHash] the options hash containing all template information + # @return [void] + # + # source://yard//lib/yard/templates/template.rb#38 + def include_extra(template, options); end + + # @private + # @private + # + # source://yard//lib/yard/templates/template.rb#29 + def included(klass); end + end +end + +# source://yard//lib/yard/templates/template.rb#59 +module YARD::Templates::Template::ClassMethods + # source://yard//lib/yard/templates/template.rb#81 + def initialize(path, full_paths); end + + # Alias for creating a {Section} with arguments + # + # @see Section#initialize + # @since 0.6.0 + # + # source://yard//lib/yard/templates/template.rb#149 + def S(*args); end + + # Alias for creating {Engine.template}. + # + # source://yard//lib/yard/templates/template.rb#142 + def T(*path); end + + # Searches for a file identified by +basename+ in the template's + # path as well as any mixed in template paths. Equivalent to calling + # {ClassMethods#find_nth_file} with index of 1. + # + # @param basename [String] the filename to search for + # @return [String] the full path of a file on disk with filename + # +basename+ in one of the template's paths. + # @see find_nth_file + # + # source://yard//lib/yard/templates/template.rb#98 + def find_file(basename); end + + # Searches for the nth file (where n = +index+) identified + # by basename in the template's path and any mixed in template paths. + # + # @param basename [String] the filename to search for + # @param index [Fixnum] the nth existing file to return + # @return [String] the full path of the nth file on disk with + # filename +basename+ in one of the template paths + # + # source://yard//lib/yard/templates/template.rb#109 + def find_nth_file(basename, index = T.unsafe(nil)); end + + # Returns the value of attribute full_path. + # + # source://yard//lib/yard/templates/template.rb#60 + def full_path; end + + # Sets the attribute full_path + # + # @param value the value to set the attribute full_path to. + # + # source://yard//lib/yard/templates/template.rb#60 + def full_path=(_arg0); end + + # @note This method caches path results. Paths should not be modified + # after this method is called; call {#reset_full_paths} to reset cache. + # @return [Array<String>] a list of full paths + # + # source://yard//lib/yard/templates/template.rb#65 + def full_paths; end + + # @return [Boolean] + # + # source://yard//lib/yard/templates/template.rb#122 + def is_a?(klass); end + + # Creates a new template object to be rendered with {Template#run} + # + # source://yard//lib/yard/templates/template.rb#128 + def new(*args); end + + # Returns the value of attribute path. + # + # source://yard//lib/yard/templates/template.rb#60 + def path; end + + # Sets the attribute path + # + # @param value the value to set the attribute path to. + # + # source://yard//lib/yard/templates/template.rb#60 + def path=(_arg0); end + + # Resets cache for {#full_paths} + # + # source://yard//lib/yard/templates/template.rb#77 + def reset_full_paths; end + + # source://yard//lib/yard/templates/template.rb#135 + def run(*args); end + + private + + # source://yard//lib/yard/templates/template.rb#170 + def include_inherited(full_paths); end + + # source://yard//lib/yard/templates/template.rb#157 + def include_parent; end + + # source://yard//lib/yard/templates/template.rb#176 + def load_setup_rb; end +end + +# An Options class containing default options for base template rendering. For +# options specific to generation of HTML output, see {CLI::YardocOptions}. +# +# @see CLI::YardocOptions +# +# source://yard//lib/yard/templates/template_options.rb#10 +class YARD::Templates::TemplateOptions < ::YARD::Options + # @return [OpenStruct] an open struct containing any global state across all + # generated objects in a template. + # + # source://yard//lib/yard/options.rb#82 + def __globals; end + + # @return [String] the default return type for a method with no return tags + # + # source://yard//lib/yard/options.rb#82 + def default_return; end + + # @return [String] the default return type for a method with no return tags + # + # source://yard//lib/yard/options.rb#82 + def default_return=(_arg0); end + + # @example A list of mixin path names (including wildcards) + # opts.embed_mixins #=> ['ClassMethods', '*Helper', 'YARD::*'] + # @return [Array<String>] an array of module name wildcards to embed into + # class documentation as if their methods were defined directly in the class. + # Useful for modules like ClassMethods. If the name contains '::', the module + # is matched against the full mixin path, otherwise only the module name is used. + # + # source://yard//lib/yard/options.rb#82 + def embed_mixins; end + + # @example A list of mixin path names (including wildcards) + # opts.embed_mixins #=> ['ClassMethods', '*Helper', 'YARD::*'] + # @return [Array<String>] an array of module name wildcards to embed into + # class documentation as if their methods were defined directly in the class. + # Useful for modules like ClassMethods. If the name contains '::', the module + # is matched against the full mixin path, otherwise only the module name is used. + # + # source://yard//lib/yard/options.rb#82 + def embed_mixins=(_arg0); end + + # @param mixin [CodeObjects::Base] accepts any code object, but returns + # nil unless the object is a module. + # @return [Boolean] whether a mixin matches the embed_mixins list + # @return [nil] if the mixin is not a module object + # + # source://yard//lib/yard/templates/template_options.rb#78 + def embed_mixins_match?(mixin); end + + # @return [Symbol] the template output format + # + # source://yard//lib/yard/options.rb#82 + def format; end + + # @return [Symbol] the template output format + # + # source://yard//lib/yard/options.rb#82 + def format=(_arg0); end + + # @return [OpenStruct] an open struct containing any global state across all + # generated objects in a template. + # + # source://yard//lib/yard/options.rb#82 + def globals; end + + # @return [OpenStruct] an open struct containing any global state across all + # generated objects in a template. + # + # source://yard//lib/yard/options.rb#82 + def globals=(_arg0); end + + # @return [Boolean] whether void methods should show "void" in their signature + # + # source://yard//lib/yard/options.rb#82 + def hide_void_return; end + + # @return [Boolean] whether void methods should show "void" in their signature + # + # source://yard//lib/yard/options.rb#82 + def hide_void_return=(_arg0); end + + # @return [Boolean] whether code blocks should be syntax highlighted + # + # source://yard//lib/yard/options.rb#82 + def highlight; end + + # @return [Boolean] whether code blocks should be syntax highlighted + # + # source://yard//lib/yard/options.rb#82 + def highlight=(_arg0); end + + # @return [Boolean] whether the page is the "index" + # + # source://yard//lib/yard/templates/template_options.rb#64 + def index; end + + # @return [Boolean] whether the page is the "index" + # + # source://yard//lib/yard/templates/template_options.rb#64 + def index=(_arg0); end + + # @return [Symbol] the markup format to use when parsing docstrings + # + # source://yard//lib/yard/options.rb#82 + def markup; end + + # @return [Symbol] the markup format to use when parsing docstrings + # + # source://yard//lib/yard/options.rb#82 + def markup=(_arg0); end + + # @return [Class] the markup provider class for the markup format + # + # source://yard//lib/yard/templates/template_options.rb#30 + def markup_provider; end + + # @return [Class] the markup provider class for the markup format + # + # source://yard//lib/yard/templates/template_options.rb#30 + def markup_provider=(_arg0); end + + # @deprecated use {#highlight} instead. + # @return [Boolean] whether highlighting should be ignored + # + # source://yard//lib/yard/templates/template_options.rb#57 + def no_highlight; end + + # source://yard//lib/yard/templates/template_options.rb#58 + def no_highlight=(value); end + + # @return [CodeObjects::Base] the main object being generated in the template + # + # source://yard//lib/yard/templates/template_options.rb#38 + def object; end + + # @return [CodeObjects::Base] the main object being generated in the template + # + # source://yard//lib/yard/templates/template_options.rb#38 + def object=(_arg0); end + + # @return [CodeObjects::Base] the owner of the generated object + # + # source://yard//lib/yard/templates/template_options.rb#41 + def owner; end + + # @return [CodeObjects::Base] the owner of the generated object + # + # source://yard//lib/yard/templates/template_options.rb#41 + def owner=(_arg0); end + + # @return [String] the title of a given page + # + # source://yard//lib/yard/templates/template_options.rb#61 + def page_title; end + + # @return [String] the title of a given page + # + # source://yard//lib/yard/templates/template_options.rb#61 + def page_title=(_arg0); end + + # @return [Boolean] whether serialization should be performed + # + # source://yard//lib/yard/options.rb#82 + def serialize; end + + # @return [Boolean] whether serialization should be performed + # + # source://yard//lib/yard/options.rb#82 + def serialize=(_arg0); end + + # @return [Serializers::Base] the serializer used to generate links and serialize + # output. Serialization output only occurs if {#serialize} is +true+. + # + # source://yard//lib/yard/templates/template_options.rb#51 + def serializer; end + + # @return [Serializers::Base] the serializer used to generate links and serialize + # output. Serialization output only occurs if {#serialize} is +true+. + # + # source://yard//lib/yard/templates/template_options.rb#51 + def serializer=(_arg0); end + + # @return [Symbol] the template name used to render output + # + # source://yard//lib/yard/options.rb#82 + def template; end + + # @return [Symbol] the template name used to render output + # + # source://yard//lib/yard/options.rb#82 + def template=(_arg0); end + + # @return [Symbol] the template type used to generate output + # + # source://yard//lib/yard/templates/template_options.rb#44 + def type; end + + # @return [Symbol] the template type used to generate output + # + # source://yard//lib/yard/templates/template_options.rb#44 + def type=(_arg0); end + + # @return [Verifier] the verifier object + # + # source://yard//lib/yard/templates/template_options.rb#89 + def verifier; end + + # @return [Verifier] the verifier object + # + # source://yard//lib/yard/templates/template_options.rb#89 + def verifier=(_arg0); end +end + +# source://yard//lib/yard/version.rb#5 +YARD::VERSION = T.let(T.unsafe(nil), String) + +# Similar to a Proc, but runs a set of Ruby expressions using a small +# DSL to make tag lookups easier. +# +# The syntax is as follows: +# * All syntax is Ruby compatible +# * +object+ (+o+ for short) exist to access the object being verified +# * +@TAGNAME+ is translated into +object.tag('TAGNAME')+ +# * +@@TAGNAME+ is translated into +object.tags('TAGNAME')+ +# * +object+ can be omitted as target for method calls (it is implied) +# +# @example Create a verifier to check for objects that don't have @private tags +# verifier = Verifier.new('!@private') +# verifier.call(object) # => true (no @private tag) +# @example Create a verifier to find any return tag with an empty description +# Verifier.new('@return.text.empty?') +# # Equivalent to: +# Verifier.new('object.tag(:return).text.empty?') +# @example Check if there are any @param tags +# Verifier.new('@@param.empty?') +# # Equivalent to: +# Verifier.new('object.tags(:param).empty?') +# @example Using +object+ or +o+ to look up object attributes directly +# Verifier.new('object.docstring == "hello world"') +# # Equivalent to: +# Verifier.new('o.docstring == "hello world"') +# @example Without using +object+ or +o+ +# Verifier.new('tag(:return).size == 1 || has_tag?(:author)') +# @example Specifying multiple expressions +# Verifier.new('@return', '@param', '@yield') +# # Equivalent to: +# Verifier.new('@return && @param && @yield') +# +# source://yard//lib/yard/verifier.rb#34 +class YARD::Verifier + # Creates a verifier from a set of expressions + # + # @param expressions [Array<String>] a list of Ruby expressions to + # parse. + # @return [Verifier] a new instance of Verifier + # + # source://yard//lib/yard/verifier.rb#48 + def initialize(*expressions); end + + # Adds a set of expressions and recompiles the verifier + # + # @param expressions [Array<String>] a list of expressions + # @return [void] + # @since 0.5.6 + # + # source://yard//lib/yard/verifier.rb#58 + def add_expressions(*expressions); end + + # Tests the expressions on the object. + # + # @note If the object is a {CodeObjects::Proxy} the result will always be true. + # @param object [CodeObjects::Base] the object to verify + # @return [Boolean] the result of the expressions + # + # source://yard//lib/yard/verifier.rb#76 + def call(object); end + + # @return [Array<String>] a list of all expressions the verifier checks for + # @since 0.5.6 + # + # source://yard//lib/yard/verifier.rb#37 + def expressions; end + + # source://yard//lib/yard/verifier.rb#39 + def expressions=(value); end + + # Passes any method calls to the object from the {#call} + # + # source://yard//lib/yard/verifier.rb#63 + def method_missing(sym, *args, &block); end + + # Runs a list of objects against the verifier and returns the subset + # of verified objects. + # + # @param list [Array<CodeObjects::Base>] a list of code objects + # @return [Array<CodeObjects::Base>] a list of code objects that match + # the verifier. + # + # source://yard//lib/yard/verifier.rb#91 + def run(list); end + + protected + + # @return [CodeObjects::Base] the current object being tested + # + # source://yard//lib/yard/verifier.rb#98 + def o; end + + # @return [CodeObjects::Base] the current object being tested + # + # source://yard//lib/yard/verifier.rb#98 + def object; end + + private + + # Creates the +__execute+ method by evaluating the expressions + # as Ruby code + # + # @return [void] + # + # source://yard//lib/yard/verifier.rb#130 + def create_method_from_expressions; end + + # Modifies nil to not throw NoMethodErrors. This allows + # syntax like object.tag(:return).text to work if the #tag + # call returns nil, which means users don't need to perform + # stringent nil checking + # + # @return [void] + # + # source://yard//lib/yard/verifier.rb#112 + def modify_nilclass; end + + # Parses a single expression, handling some of the DSL syntax. + # + # The syntax "@tag" should be turned into object.tag(:tag), + # and "@@tag" should be turned into object.tags(:tag) + # + # @return [String] the parsed expression + # + # source://yard//lib/yard/verifier.rb#145 + def parse_expression(expr); end + + # Returns the state of NilClass back to normal + # + # @return [void] + # + # source://yard//lib/yard/verifier.rb#120 + def unmodify_nilclass; end +end + +# @private +# +# source://yard//lib/yard/verifier.rb#104 +YARD::Verifier::NILCLASS_METHODS = T.let(T.unsafe(nil), Array) diff --git a/sorbet/rbi/shims/.keep b/sorbet/rbi/shims/.keep new file mode 100644 index 0000000..e69de29 diff --git a/sorbet/tapioca/config.yml b/sorbet/tapioca/config.yml new file mode 100644 index 0000000..6cbea6b --- /dev/null +++ b/sorbet/tapioca/config.yml @@ -0,0 +1,25 @@ +gem: + # Add your `gem` command parameters here: + # + exclude: + - rubocop + - tapioca + - spoom + - sorbet + - sorbet-runtime + - rbi + - rspec-core + - rspec-expectations + - rspec-mocks + - rspec-support + - rubocop-ast + - syntax_tree + - racc + # doc: true + # workers: 5 +dsl: + # Add your `dsl` command parameters here: + # + # exclude: + # - SomeGeneratorName + # workers: 5 diff --git a/sorbet/tapioca/require.rb b/sorbet/tapioca/require.rb new file mode 100644 index 0000000..34ba029 --- /dev/null +++ b/sorbet/tapioca/require.rb @@ -0,0 +1,11 @@ +# typed: true +# frozen_string_literal: true + +require 'connection_pool' +require 'json' +require 'money' +require 'money/distributed/fetcher/base' +require 'money/distributed/redis' +require 'open-uri' +require 'rspec' +require 'timecop' diff --git a/spec/redis_spec.rb b/spec/redis_spec.rb index deb6680..20a2f2b 100644 --- a/spec/redis_spec.rb +++ b/spec/redis_spec.rb @@ -27,6 +27,6 @@ it "doesn't accept other classes" do redis = double(ping: true) expect { described_class.new(redis).exec(&:ping) }.to \ - raise_error(ArgumentError) + raise_error(TypeError) end end From 6979fb64753f3099d0498040a824889a97e24931 Mon Sep 17 00:00:00 2001 From: Lud <lud@reinmiedl.com> Date: Mon, 17 Jul 2023 17:57:39 +0200 Subject: [PATCH 2/6] run rubocop in its own test run --- .github/workflows/ci.yml | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b63fde0..7666130 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,8 +44,31 @@ jobs: - name: Run RSspec run: bundle exec rspec --format documentation - - name: Run Rubocop - run: bundle exec rubocop - - name: Run Sorbet Typechecks run: bundle exec spoom tc + lint: + runs-on: ubuntu-latest + if: "!contains(github.event.head_commit.message, '[skip ci]')" + steps: + - uses: actions/checkout@v3 + + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: 3.2 + + - uses: actions/cache@v3 + with: + path: vendor/bundle + key: ${{ runner.os }}-3.2-gems-${{ hashFiles('**/Gemfile.lock') }} + restore-keys: | + ${{ runner.os }}-gems- + + - name: bundle install + run: | + gem install bundler + bundle config path vendor/bundle + bundle install -j $(getconf _NPROCESSORS_ONLN) --retry 3 + + - name: Run Rubocop + run: bundle exec rubocop From 082d74a0150089086b20874dc2a77b1e42c6bbcc Mon Sep 17 00:00:00 2001 From: Lud <lud@reinmiedl.com> Date: Mon, 17 Jul 2023 17:58:39 +0200 Subject: [PATCH 3/6] --ignore-unrecognized-cops --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7666130..72e0c2f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -71,4 +71,4 @@ jobs: bundle install -j $(getconf _NPROCESSORS_ONLN) --retry 3 - name: Run Rubocop - run: bundle exec rubocop + run: bundle exec rubocop --ignore-unrecognized-cops From 9bb931f888e7b6a9280f11196ad99fe308361651 Mon Sep 17 00:00:00 2001 From: Lud <lud@reinmiedl.com> Date: Mon, 17 Jul 2023 18:35:45 +0200 Subject: [PATCH 4/6] use rubocop dbl, fix all rubocop issues --- .gitignore | 1 + .irbrc | 1 + .rubocop.yml | 49 +- .rubocop_todo.yml | 27 +- bin/rubocop | 27 + lib/money/distributed/fetcher/base.rb | 14 +- lib/money/distributed/fetcher/file.rb | 10 +- lib/money/distributed/redis.rb | 10 +- lib/money/distributed/storage.rb | 16 +- ...ey-distributed.rb => money_distributed.rb} | 0 money-distributed.gemspec | 3 +- sorbet/rbi/dsl/active_support/callbacks.rbi | 22 + sorbet/rbi/gems/activesupport@7.0.6.rbi | 2851 ++++++++ sorbet/rbi/gems/minitest@5.18.1.rbi | 8 + sorbet/rbi/gems/rack@3.0.8.rbi | 5183 +++++++++++++++ sorbet/rbi/gems/rubocop-capybara@2.18.0.rbi | 8 + sorbet/rbi/gems/rubocop-dbl@1.2.0.rbi | 8 + .../rbi/gems/rubocop-factory_bot@2.23.1.rbi | 8 + sorbet/rbi/gems/rubocop-packaging@0.5.2.rbi | 8 + .../rbi/gems/rubocop-performance@1.18.0.rbi | 8 + sorbet/rbi/gems/rubocop-rails@2.20.2.rbi | 8 + sorbet/rbi/gems/rubocop-rspec@2.22.0.rbi | 8 + sorbet/rbi/gems/rubocop-sorbet@0.7.0.rbi | 8 + sorbet/rbi/gems/tzinfo@2.0.6.rbi | 5917 +++++++++++++++++ .../shims/money/distributed/fetcher/base.rbi | 5 + .../distributed}/fetcher/file_spec.rb | 7 +- spec/{ => money/distributed}/redis_spec.rb | 1 + spec/{ => money/distributed}/storage_spec.rb | 5 +- spec/spec_helper.rb | 3 +- 29 files changed, 14177 insertions(+), 47 deletions(-) create mode 100644 .irbrc create mode 100755 bin/rubocop rename lib/{money-distributed.rb => money_distributed.rb} (100%) create mode 100644 sorbet/rbi/dsl/active_support/callbacks.rbi create mode 100644 sorbet/rbi/gems/activesupport@7.0.6.rbi create mode 100644 sorbet/rbi/gems/minitest@5.18.1.rbi create mode 100644 sorbet/rbi/gems/rack@3.0.8.rbi create mode 100644 sorbet/rbi/gems/rubocop-capybara@2.18.0.rbi create mode 100644 sorbet/rbi/gems/rubocop-dbl@1.2.0.rbi create mode 100644 sorbet/rbi/gems/rubocop-factory_bot@2.23.1.rbi create mode 100644 sorbet/rbi/gems/rubocop-packaging@0.5.2.rbi create mode 100644 sorbet/rbi/gems/rubocop-performance@1.18.0.rbi create mode 100644 sorbet/rbi/gems/rubocop-rails@2.20.2.rbi create mode 100644 sorbet/rbi/gems/rubocop-rspec@2.22.0.rbi create mode 100644 sorbet/rbi/gems/rubocop-sorbet@0.7.0.rbi create mode 100644 sorbet/rbi/gems/tzinfo@2.0.6.rbi create mode 100644 sorbet/rbi/shims/money/distributed/fetcher/base.rbi rename spec/{ => money/distributed}/fetcher/file_spec.rb (90%) rename spec/{ => money/distributed}/redis_spec.rb (98%) rename spec/{ => money/distributed}/storage_spec.rb (98%) diff --git a/.gitignore b/.gitignore index 8efe630..9a2ba49 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ /spec/reports/ /tmp/ .ruby-version +.irb_history diff --git a/.irbrc b/.irbrc new file mode 100644 index 0000000..da4bdd8 --- /dev/null +++ b/.irbrc @@ -0,0 +1 @@ +require_relative './lib/money_distributed' # rubocop:disable Packaging/RequireRelativeHardcodingLib diff --git a/.rubocop.yml b/.rubocop.yml index 04750fb..b6e67f8 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,13 +1,48 @@ inherit_from: .rubocop_todo.yml -Style/FileName: - Enabled: false - -Gemspec/RequiredRubyVersion: - Enabled: false +inherit_gem: + rubocop-dbl: + - config/dbl.yml AllCops: + TargetRubyVersion: 3.0 Exclude: + - 'sorbet/**/*' - 'bin/*' - - 'spec/*' - - 'sorbet/*' + +Layout/LineLength: + Max: 120 + +Style/IfUnlessModifier: + Enabled: false + +Lint/UnusedMethodArgument: + Enabled: false + +Style/AccessModifierDeclarations: + EnforcedStyle: inline + +Naming/PredicateName: + Enabled: false + +Lint/BooleanSymbol: + Enabled: false + +Style/HashSyntax: + Enabled: false + +Style/FrozenStringLiteralComment: + Enabled: false + +Naming/BlockForwarding: + Enabled: false + +Metrics/MethodLength: + CountAsOne: ['array', 'heredoc', 'method_call'] + +Gemspec/DevelopmentDependencies: + EnforcedStyle: gemspec + +# we do not have active support for Time.zone.now +Rails/TimeZone: + Enabled: false diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 5c5f37a..c8c24f5 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,12 +1,31 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2023-07-17 15:39:56 UTC using RuboCop version 1.54.2. +# on 2023-07-17 16:35:16 UTC using RuboCop version 1.49.0. # The point is for the user to remove these configuration records # one by one as the offenses are removed from the code base. # Note that changes in the inspected code, or installation of new # versions of RuboCop, may require this file to be generated again. # Offense count: 1 -# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns. -Metrics/MethodLength: - Max: 12 +# Configuration parameters: CountAsOne. +RSpec/ExampleLength: + Max: 10 + +# Offense count: 1 +RSpec/MultipleExpectations: + Max: 9 + +# Offense count: 7 +# Configuration parameters: EnforcedStyle, IgnoreSharedExamples. +# SupportedStyles: always, named_only +RSpec/NamedSubject: + Exclude: + - 'spec/money/distributed/fetcher/file_spec.rb' + - 'spec/money/distributed/storage_spec.rb' + +# Offense count: 2 +# Configuration parameters: IgnoreNameless, IgnoreSymbolicNames. +RSpec/VerifiedDoubles: + Exclude: + - 'spec/money/distributed/fetcher/file_spec.rb' + - 'spec/money/distributed/redis_spec.rb' diff --git a/bin/rubocop b/bin/rubocop new file mode 100755 index 0000000..369a05b --- /dev/null +++ b/bin/rubocop @@ -0,0 +1,27 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true + +# +# This file was generated by Bundler. +# +# The application 'rubocop' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) + +bundle_binstub = File.expand_path("bundle", __dir__) + +if File.file?(bundle_binstub) + if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") + load(bundle_binstub) + else + abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. +Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") + end +end + +require "rubygems" +require "bundler/setup" + +load Gem.bin_path("rubocop", "rubocop") diff --git a/lib/money/distributed/fetcher/base.rb b/lib/money/distributed/fetcher/base.rb index 00cea24..b59b56b 100644 --- a/lib/money/distributed/fetcher/base.rb +++ b/lib/money/distributed/fetcher/base.rb @@ -1,4 +1,4 @@ -# typed: false +# typed: true # frozen_string_literal: true class Money @@ -16,22 +16,20 @@ def fetch currencies.each { |cur| add_rate(cur, cur, 1) } - currencies.combination(2).each do |curr1, curr2| - rate = rates[curr2] / rates[curr1] - add_rate(curr1, curr2, rate) + currencies.combination(2).each do |curr_1, curr_2| + rate = rates[curr_2] / rates[curr_1] + add_rate(curr_1, curr_2, rate) end end - private - - def add_rate(from_iso, to_iso, rate) + private def add_rate(from_iso, to_iso, rate) @bank.add_rate(from_iso, to_iso, rate.round(4)) return if from_iso == to_iso @bank.add_rate(to_iso, from_iso, (1 / rate).round(4)) end - def exchange_rates + private def exchange_rates raise NotImplementedError end end diff --git a/lib/money/distributed/fetcher/file.rb b/lib/money/distributed/fetcher/file.rb index 8eac2ab..9f77bbb 100644 --- a/lib/money/distributed/fetcher/file.rb +++ b/lib/money/distributed/fetcher/file.rb @@ -16,7 +16,7 @@ class File sig do params( file_path: T.any(String, Pathname), - bank: T.untyped + bank: T.untyped, ).void end def initialize(file_path, bank = nil) @@ -24,12 +24,10 @@ def initialize(file_path, bank = nil) @file_path = file_path end - private - sig { returns(T::Hash[String, BigDecimal]) } - def exchange_rates - ::File.open(@file_path).read.split("\n").each_with_object({}) do |line, h| - code_rate = line.split(' ') + private def exchange_rates + ::File.read(@file_path).split("\n").each_with_object({}) do |line, h| + code_rate = line.split currency = T.cast(code_rate[0], String) rate = T.cast(code_rate[1], T.any(Integer, Float, Rational, BigDecimal, String)) h[currency] = BigDecimal(rate) diff --git a/lib/money/distributed/redis.rb b/lib/money/distributed/redis.rb index 7cc43e0..9b7a05d 100644 --- a/lib/money/distributed/redis.rb +++ b/lib/money/distributed/redis.rb @@ -9,7 +9,7 @@ class Redis sig do params( - redis: T.any(::Redis, ConnectionPool, Hash, Proc) + redis: T.any(::Redis, ConnectionPool, Hash, Proc), ).void end def initialize(redis) @@ -18,21 +18,19 @@ def initialize(redis) sig do params( - block: T.proc.returns(T.untyped) + block: T.proc.returns(T.untyped), ).returns(T.untyped) end def exec(&block) @redis_proc.call(&block) end - private - sig do params( - redis: T.any(::Redis, ConnectionPool, Hash, Proc) + redis: T.any(::Redis, ConnectionPool, Hash, Proc), ).returns(Proc) end - def build_redis_proc(redis) + private def build_redis_proc(redis) case redis when ::Redis proc { |&b| b.call(redis) } diff --git a/lib/money/distributed/storage.rb b/lib/money/distributed/storage.rb index 414efef..7a84697 100644 --- a/lib/money/distributed/storage.rb +++ b/lib/money/distributed/storage.rb @@ -37,7 +37,7 @@ def each_rate(&block) end end - block_given? ? enum.each(&block) : enum + block ? enum.each(&block) : enum end def transaction @@ -49,33 +49,31 @@ def marshal_dump [self.class, @cache_ttl] end - private - - def key_for(iso_from, iso_to) + private def key_for(iso_from, iso_to) [iso_from, iso_to].join(INDEX_KEY_SEPARATOR).upcase end - def cached_rates + private def cached_rates @mutex.synchronize do retrieve_rates if @cache.empty? || cache_outdated? @cache end end - def cache_outdated? + private def cache_outdated? return false unless @cache_ttl @cache_updated_at.nil? || - @cache_updated_at < Time.now - @cache_ttl + @cache_updated_at < Time.now - @cache_ttl end - def clear_cache + private def clear_cache @mutex.synchronize do @cache.clear end end - def retrieve_rates + private def retrieve_rates @redis.exec do |r| r.hgetall(REDIS_KEY).each_with_object(@cache) do |(key, val), h| next if val.nil? || val == '' diff --git a/lib/money-distributed.rb b/lib/money_distributed.rb similarity index 100% rename from lib/money-distributed.rb rename to lib/money_distributed.rb diff --git a/money-distributed.gemspec b/money-distributed.gemspec index b4652b9..702ba62 100644 --- a/money-distributed.gemspec +++ b/money-distributed.gemspec @@ -31,7 +31,8 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rake', '>= 12.3.3' spec.add_development_dependency 'rspec' - spec.add_development_dependency 'rubocop' + spec.add_development_dependency 'rubocop', '= 1.49.0' # 1.50 has a bug prevening rubocop from running + spec.add_development_dependency 'rubocop-dbl' spec.add_development_dependency 'spoom' spec.add_development_dependency 'tapioca' spec.add_development_dependency 'timecop' diff --git a/sorbet/rbi/dsl/active_support/callbacks.rbi b/sorbet/rbi/dsl/active_support/callbacks.rbi new file mode 100644 index 0000000..646f995 --- /dev/null +++ b/sorbet/rbi/dsl/active_support/callbacks.rbi @@ -0,0 +1,22 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for dynamic methods in `ActiveSupport::Callbacks`. +# Please instead update this file by running `bin/tapioca dsl ActiveSupport::Callbacks`. + +module ActiveSupport::Callbacks + include GeneratedInstanceMethods + + mixes_in_class_methods GeneratedClassMethods + + module GeneratedClassMethods + def __callbacks; end + def __callbacks=(value); end + def __callbacks?; end + end + + module GeneratedInstanceMethods + def __callbacks; end + def __callbacks?; end + end +end diff --git a/sorbet/rbi/gems/activesupport@7.0.6.rbi b/sorbet/rbi/gems/activesupport@7.0.6.rbi new file mode 100644 index 0000000..f7e53cc --- /dev/null +++ b/sorbet/rbi/gems/activesupport@7.0.6.rbi @@ -0,0 +1,2851 @@ +# typed: false + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `activesupport` gem. +# Please instead update this file by running `bin/tapioca gem activesupport`. + +# source://activesupport//lib/active_support/json/decoding.rb#7 +module ActiveSupport + extend ::ActiveSupport::LazyLoadHooks + + # source://activesupport//lib/active_support/json/decoding.rb#9 + def parse_json_times; end + + # source://activesupport//lib/active_support/json/decoding.rb#9 + def parse_json_times=(val); end + + class << self + # source://activesupport//lib/active_support/json/encoding.rb#8 + def escape_html_entities_in_json(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/json/encoding.rb#8 + def escape_html_entities_in_json=(arg); end + + # source://activesupport//lib/active_support/json/encoding.rb#8 + def json_encoder(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/json/encoding.rb#8 + def json_encoder=(arg); end + + # source://activesupport//lib/active_support/json/decoding.rb#9 + def parse_json_times; end + + # source://activesupport//lib/active_support/json/decoding.rb#9 + def parse_json_times=(val); end + + # source://activesupport//lib/active_support/json/encoding.rb#8 + def time_precision(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/json/encoding.rb#8 + def time_precision=(arg); end + + # source://activesupport//lib/active_support/json/encoding.rb#8 + def use_standard_json_time_format(*_arg0, **_arg1, &_arg2); end + + # source://activesupport//lib/active_support/json/encoding.rb#8 + def use_standard_json_time_format=(arg); end + end +end + +# source://activesupport//lib/active_support/core_ext/big_decimal/conversions.rb#7 +module ActiveSupport::BigDecimalWithDefaultFormat + # source://activesupport//lib/active_support/core_ext/big_decimal/conversions.rb#8 + def to_s(format = T.unsafe(nil)); end +end + +# The Inflector transforms words from singular to plural, class names to table +# names, modularized class names to ones without, and class names to foreign +# keys. The default inflections for pluralization, singularization, and +# uncountable words are kept in inflections.rb. +# +# The Rails core team has stated patches for the inflections library will not +# be accepted in order to avoid breaking legacy applications which may be +# relying on errant inflections. If you discover an incorrect inflection and +# require it for your application or wish to define rules for languages other +# than English, please correct or add them yourself (explained below). +# +# source://activesupport//lib/active_support/inflector/inflections.rb#7 +module ActiveSupport::Inflector + extend ::ActiveSupport::Inflector + + # Converts strings to UpperCamelCase. + # If the +uppercase_first_letter+ parameter is set to false, then produces + # lowerCamelCase. + # + # Also converts '/' to '::' which is useful for converting + # paths to namespaces. + # + # camelize('active_model') # => "ActiveModel" + # camelize('active_model', false) # => "activeModel" + # camelize('active_model/errors') # => "ActiveModel::Errors" + # camelize('active_model/errors', false) # => "activeModel::Errors" + # + # As a rule of thumb you can think of +camelize+ as the inverse of + # #underscore, though there are cases where that does not hold: + # + # camelize(underscore('SSLError')) # => "SslError" + # + # source://activesupport//lib/active_support/inflector/methods.rb#69 + def camelize(term, uppercase_first_letter = T.unsafe(nil)); end + + # Creates a class name from a plural table name like Rails does for table + # names to models. Note that this returns a string and not a Class. (To + # convert to an actual class follow +classify+ with #constantize.) + # + # classify('ham_and_eggs') # => "HamAndEgg" + # classify('posts') # => "Post" + # + # Singular names are not handled correctly: + # + # classify('calculus') # => "Calculu" + # + # source://activesupport//lib/active_support/inflector/methods.rb#206 + def classify(table_name); end + + # Tries to find a constant with the name specified in the argument string. + # + # constantize('Module') # => Module + # constantize('Foo::Bar') # => Foo::Bar + # + # The name is assumed to be the one of a top-level constant, no matter + # whether it starts with "::" or not. No lexical context is taken into + # account: + # + # C = 'outside' + # module M + # C = 'inside' + # C # => 'inside' + # constantize('C') # => 'outside', same as ::C + # end + # + # NameError is raised when the name is not in CamelCase or the constant is + # unknown. + # + # source://activesupport//lib/active_support/inflector/methods.rb#277 + 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 + def dasherize(underscored_word); end + + # Removes the rightmost segment from the constant expression in the string. + # + # deconstantize('Net::HTTP') # => "Net" + # deconstantize('::Net::HTTP') # => "::Net" + # deconstantize('String') # => "" + # deconstantize('::String') # => "" + # deconstantize('') # => "" + # + # See also #demodulize. + # + # source://activesupport//lib/active_support/inflector/methods.rb#244 + def deconstantize(path); end + + # Removes the module part from the expression in the string. + # + # demodulize('ActiveSupport::Inflector::Inflections') # => "Inflections" + # demodulize('Inflections') # => "Inflections" + # demodulize('::Inflections') # => "Inflections" + # demodulize('') # => "" + # + # See also #deconstantize. + # + # source://activesupport//lib/active_support/inflector/methods.rb#226 + def demodulize(path); end + + # Creates a foreign key name from a class name. + # +separate_class_name_and_id_with_underscore+ sets whether + # the method should put '_' between the name and 'id'. + # + # foreign_key('Message') # => "message_id" + # foreign_key('Message', false) # => "messageid" + # foreign_key('Admin::Post') # => "post_id" + # + # source://activesupport//lib/active_support/inflector/methods.rb#255 + def foreign_key(class_name, separate_class_name_and_id_with_underscore = T.unsafe(nil)); end + + # Tweaks an attribute name for display to end users. + # + # Specifically, performs these transformations: + # + # * Applies human inflection rules to the argument. + # * Deletes leading underscores, if any. + # * Removes an "_id" suffix if present. + # * Replaces underscores with spaces, if any. + # * Downcases all words except acronyms. + # * Capitalizes the first word. + # The capitalization of the first word can be turned off by setting the + # +:capitalize+ option to false (default is true). + # + # The trailing '_id' can be kept and capitalized by setting the + # optional parameter +keep_id_suffix+ to true (default is false). + # + # humanize('employee_salary') # => "Employee salary" + # humanize('author_id') # => "Author" + # humanize('author_id', capitalize: false) # => "author" + # humanize('_id') # => "Id" + # humanize('author_id', keep_id_suffix: true) # => "Author id" + # + # If "SSL" was defined to be an acronym: + # + # humanize('ssl_error') # => "SSL error" + # + # source://activesupport//lib/active_support/inflector/methods.rb#132 + def humanize(lower_case_and_underscored_word, capitalize: T.unsafe(nil), keep_id_suffix: T.unsafe(nil)); end + + # Yields a singleton instance of Inflector::Inflections so you can specify + # additional inflector rules. If passed an optional locale, rules for other + # languages can be specified. If not specified, defaults to <tt>:en</tt>. + # Only rules for English are provided. + # + # ActiveSupport::Inflector.inflections(:en) do |inflect| + # inflect.uncountable 'rails' + # end + # + # source://activesupport//lib/active_support/inflector/inflections.rb#263 + def inflections(locale = T.unsafe(nil)); end + + # Returns the suffix that should be added to a number to denote the position + # in an ordered sequence such as 1st, 2nd, 3rd, 4th. + # + # ordinal(1) # => "st" + # ordinal(2) # => "nd" + # ordinal(1002) # => "nd" + # ordinal(1003) # => "rd" + # ordinal(-11) # => "th" + # ordinal(-1021) # => "st" + # + # source://activesupport//lib/active_support/inflector/methods.rb#322 + def ordinal(number); end + + # Turns a number into an ordinal string used to denote the position in an + # ordered sequence such as 1st, 2nd, 3rd, 4th. + # + # ordinalize(1) # => "1st" + # ordinalize(2) # => "2nd" + # ordinalize(1002) # => "1002nd" + # ordinalize(1003) # => "1003rd" + # ordinalize(-11) # => "-11th" + # ordinalize(-1021) # => "-1021st" + # + # source://activesupport//lib/active_support/inflector/methods.rb#335 + def ordinalize(number); end + + # Returns the plural form of the word in the string. + # + # If passed an optional +locale+ parameter, the word will be + # pluralized using rules defined for that language. By default, + # this parameter is set to <tt>:en</tt>. + # + # pluralize('post') # => "posts" + # pluralize('octopus') # => "octopi" + # pluralize('sheep') # => "sheep" + # pluralize('words') # => "words" + # pluralize('CamelOctopus') # => "CamelOctopi" + # pluralize('ley', :es) # => "leyes" + # + # source://activesupport//lib/active_support/inflector/methods.rb#32 + def pluralize(word, locale = T.unsafe(nil)); end + + # Tries to find a constant with the name specified in the argument string. + # + # safe_constantize('Module') # => Module + # safe_constantize('Foo::Bar') # => Foo::Bar + # + # The name is assumed to be the one of a top-level constant, no matter + # whether it starts with "::" or not. No lexical context is taken into + # account: + # + # C = 'outside' + # module M + # C = 'inside' + # C # => 'inside' + # safe_constantize('C') # => 'outside', same as ::C + # end + # + # +nil+ is returned when the name is not in CamelCase or the constant (or + # part of it) is unknown. + # + # safe_constantize('blargle') # => nil + # safe_constantize('UnknownModule') # => nil + # safe_constantize('UnknownModule::Foo::Bar') # => nil + # + # source://activesupport//lib/active_support/inflector/methods.rb#303 + def safe_constantize(camel_cased_word); end + + # The reverse of #pluralize, returns the singular form of a word in a + # string. + # + # If passed an optional +locale+ parameter, the word will be + # singularized using rules defined for that language. By default, + # this parameter is set to <tt>:en</tt>. + # + # singularize('posts') # => "post" + # singularize('octopi') # => "octopus" + # singularize('sheep') # => "sheep" + # singularize('word') # => "word" + # singularize('CamelOctopi') # => "CamelOctopus" + # singularize('leyes', :es) # => "ley" + # + # source://activesupport//lib/active_support/inflector/methods.rb#49 + def singularize(word, locale = T.unsafe(nil)); end + + # Creates the name of a table like Rails does for models to table names. + # This method uses the #pluralize method on the last word in the string. + # + # tableize('RawScaledScorer') # => "raw_scaled_scorers" + # tableize('ham_and_egg') # => "ham_and_eggs" + # tableize('fancyCategory') # => "fancy_categories" + # + # source://activesupport//lib/active_support/inflector/methods.rb#192 + def tableize(class_name); end + + # Capitalizes all the words and replaces some characters in the string to + # create a nicer looking title. +titleize+ is meant for creating pretty + # output. It is not used in the Rails internals. + # + # The trailing '_id','Id'.. can be kept and capitalized by setting the + # optional parameter +keep_id_suffix+ to true. + # By default, this parameter is false. + # + # titleize('man from the boondocks') # => "Man From The Boondocks" + # titleize('x-men: the last stand') # => "X Men: The Last Stand" + # titleize('TheManWithoutAPast') # => "The Man Without A Past" + # titleize('raiders_of_the_lost_ark') # => "Raiders Of The Lost Ark" + # titleize('string_ending_with_id', keep_id_suffix: true) # => "String Ending With Id" + # + # source://activesupport//lib/active_support/inflector/methods.rb#180 + def titleize(word, keep_id_suffix: T.unsafe(nil)); end + + # Makes an underscored, lowercase form from the expression in the string. + # + # Changes '::' to '/' to convert namespaces to paths. + # + # underscore('ActiveModel') # => "active_model" + # underscore('ActiveModel::Errors') # => "active_model/errors" + # + # As a rule of thumb you can think of +underscore+ as the inverse of + # #camelize, though there are cases where that does not hold: + # + # camelize(underscore('SSLError')) # => "SslError" + # + # source://activesupport//lib/active_support/inflector/methods.rb#96 + def underscore(camel_cased_word); end + + # Converts just the first character to uppercase. + # + # upcase_first('what a Lovely Day') # => "What a Lovely Day" + # upcase_first('w') # => "W" + # upcase_first('') # => "" + # + # source://activesupport//lib/active_support/inflector/methods.rb#163 + def upcase_first(string); end + + private + + # Applies inflection rules for +singularize+ and +pluralize+. + # + # If passed an optional +locale+ parameter, the uncountables will be + # found for that locale. + # + # apply_inflections('post', inflections.plurals, :en) # => "posts" + # apply_inflections('posts', inflections.singulars, :en) # => "post" + # + # source://activesupport//lib/active_support/inflector/methods.rb#364 + def apply_inflections(word, rules, locale = T.unsafe(nil)); end + + # Mounts a regular expression, returned as a string to ease interpolation, + # that will match part by part the given constant. + # + # const_regexp("Foo::Bar::Baz") # => "Foo(::Bar(::Baz)?)?" + # const_regexp("::") # => "::" + # + # source://activesupport//lib/active_support/inflector/methods.rb#345 + def const_regexp(camel_cased_word); end +end + +# A singleton instance of this class is yielded by Inflector.inflections, +# which can then be used to specify additional inflection rules. If passed +# an optional locale, rules for other languages can be specified. The +# default locale is <tt>:en</tt>. Only rules for English are provided. +# +# ActiveSupport::Inflector.inflections(:en) do |inflect| +# inflect.plural /^(ox)$/i, '\1\2en' +# inflect.singular /^(ox)en/i, '\1' +# +# inflect.irregular 'cactus', 'cacti' +# +# inflect.uncountable 'equipment' +# end +# +# New rules are added at the top. So in the example above, the irregular +# rule for cactus will now be the first of the pluralization and +# singularization rules that is runs. This guarantees that your rules run +# before any of the rules that may already have been loaded. +# +# source://activesupport//lib/active_support/inflector/inflections.rb#28 +class ActiveSupport::Inflector::Inflections + # @return [Inflections] a new instance of Inflections + # + # source://activesupport//lib/active_support/inflector/inflections.rb#78 + def initialize; end + + # Specifies a new acronym. An acronym must be specified as it will appear + # in a camelized string. An underscore string that contains the acronym + # will retain the acronym when passed to +camelize+, +humanize+, or + # +titleize+. A camelized string that contains the acronym will maintain + # the acronym when titleized or humanized, and will convert the acronym + # into a non-delimited single lowercase word when passed to +underscore+. + # + # acronym 'HTML' + # titleize 'html' # => 'HTML' + # camelize 'html' # => 'HTML' + # underscore 'MyHTML' # => 'my_html' + # + # The acronym, however, must occur as a delimited unit and not be part of + # another word for conversions to recognize it: + # + # acronym 'HTTP' + # camelize 'my_http_delimited' # => 'MyHTTPDelimited' + # camelize 'https' # => 'Https', not 'HTTPs' + # underscore 'HTTPS' # => 'http_s', not 'https' + # + # acronym 'HTTPS' + # camelize 'https' # => 'HTTPS' + # underscore 'HTTPS' # => 'https' + # + # Note: Acronyms that are passed to +pluralize+ will no longer be + # recognized, since the acronym will not occur as a delimited unit in the + # pluralized result. To work around this, you must specify the pluralized + # form as an acronym as well: + # + # acronym 'API' + # camelize(pluralize('api')) # => 'Apis' + # + # acronym 'APIs' + # camelize(pluralize('api')) # => 'APIs' + # + # +acronym+ may be used to specify any word that contains an acronym or + # otherwise needs to maintain a non-standard capitalization. The only + # restriction is that the word must begin with a capital letter. + # + # acronym 'RESTful' + # underscore 'RESTful' # => 'restful' + # underscore 'RESTfulController' # => 'restful_controller' + # titleize 'RESTfulController' # => 'RESTful Controller' + # camelize 'restful' # => 'RESTful' + # camelize 'restful_controller' # => 'RESTfulController' + # + # acronym 'McDonald' + # underscore 'McDonald' # => 'mcdonald' + # camelize 'mcdonald' # => 'McDonald' + # + # source://activesupport//lib/active_support/inflector/inflections.rb#140 + def acronym(word); end + + # Returns the value of attribute acronyms. + # + # source://activesupport//lib/active_support/inflector/inflections.rb#74 + def acronyms; end + + # source://activesupport//lib/active_support/inflector/inflections.rb#76 + def acronyms_camelize_regex; end + + # source://activesupport//lib/active_support/inflector/inflections.rb#76 + def acronyms_underscore_regex; end + + # Clears the loaded inflections within a given scope (default is + # <tt>:all</tt>). Give the scope as a symbol of the inflection type, the + # options are: <tt>:plurals</tt>, <tt>:singulars</tt>, <tt>:uncountables</tt>, + # <tt>:humans</tt>, <tt>:acronyms</tt>. + # + # clear :all + # clear :plurals + # + # source://activesupport//lib/active_support/inflector/inflections.rb#229 + def clear(scope = T.unsafe(nil)); end + + # Specifies a humanized form of a string by a regular expression rule or + # by a string mapping. When using a regular expression based replacement, + # the normal humanize formatting is called after the replacement. When a + # string is used, the human form should be specified as desired (example: + # 'The name', not 'the_name'). + # + # human /_cnt$/i, '\1_count' + # human 'legacy_col_person_name', 'Name' + # + # source://activesupport//lib/active_support/inflector/inflections.rb#218 + def human(rule, replacement); end + + # Returns the value of attribute humans. + # + # source://activesupport//lib/active_support/inflector/inflections.rb#74 + def humans; end + + # Specifies a new irregular that applies to both pluralization and + # singularization at the same time. This can only be used for strings, not + # regular expressions. You simply pass the irregular in singular and + # plural form. + # + # irregular 'cactus', 'cacti' + # irregular 'person', 'people' + # + # source://activesupport//lib/active_support/inflector/inflections.rb#172 + def irregular(singular, plural); end + + # Specifies a new pluralization rule and its replacement. The rule can + # either be a string or a regular expression. The replacement should + # always be a string that may include references to the matched data from + # the rule. + # + # source://activesupport//lib/active_support/inflector/inflections.rb#149 + def plural(rule, replacement); end + + # Returns the value of attribute plurals. + # + # source://activesupport//lib/active_support/inflector/inflections.rb#74 + def plurals; end + + # Specifies a new singularization rule and its replacement. The rule can + # either be a string or a regular expression. The replacement should + # always be a string that may include references to the matched data from + # the rule. + # + # source://activesupport//lib/active_support/inflector/inflections.rb#159 + def singular(rule, replacement); end + + # Returns the value of attribute singulars. + # + # source://activesupport//lib/active_support/inflector/inflections.rb#74 + def singulars; end + + # Specifies words that are uncountable and should not be inflected. + # + # uncountable 'money' + # uncountable 'money', 'information' + # uncountable %w( money information rice ) + # + # source://activesupport//lib/active_support/inflector/inflections.rb#206 + def uncountable(*words); end + + # Returns the value of attribute uncountables. + # + # source://activesupport//lib/active_support/inflector/inflections.rb#74 + def uncountables; end + + private + + # source://activesupport//lib/active_support/inflector/inflections.rb#248 + def define_acronym_regex_patterns; end + + # Private, for the test suite. + # + # source://activesupport//lib/active_support/inflector/inflections.rb#84 + def initialize_dup(orig); end + + class << self + # source://activesupport//lib/active_support/inflector/inflections.rb#63 + def instance(locale = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/inflector/inflections.rb#67 + def instance_or_fallback(locale); end + end +end + +# source://activesupport//lib/active_support/inflector/inflections.rb#31 +class ActiveSupport::Inflector::Inflections::Uncountables < ::Array + # @return [Uncountables] a new instance of Uncountables + # + # source://activesupport//lib/active_support/inflector/inflections.rb#32 + def initialize; end + + # source://activesupport//lib/active_support/inflector/inflections.rb#42 + def <<(*word); end + + # source://activesupport//lib/active_support/inflector/inflections.rb#46 + def add(words); end + + # source://activesupport//lib/active_support/inflector/inflections.rb#37 + def delete(entry); end + + # @return [Boolean] + # + # source://activesupport//lib/active_support/inflector/inflections.rb#53 + def uncountable?(str); end + + private + + # source://activesupport//lib/active_support/inflector/inflections.rb#58 + def to_regex(string); end +end + +# source://activesupport//lib/active_support/json/decoding.rb#11 +module ActiveSupport::JSON + class << self + # Parses a JSON string (JavaScript Object Notation) into a hash. + # See http://www.json.org for more info. + # + # ActiveSupport::JSON.decode("{\"team\":\"rails\",\"players\":\"36\"}") + # => {"team" => "rails", "players" => "36"} + # + # source://activesupport//lib/active_support/json/decoding.rb#22 + def decode(json); end + + # Dumps objects in JSON (JavaScript Object Notation). + # See http://www.json.org for more info. + # + # ActiveSupport::JSON.encode({ team: 'rails', players: '36' }) + # # => "{\"team\":\"rails\",\"players\":\"36\"}" + # + # source://activesupport//lib/active_support/json/encoding.rb#21 + def encode(value, options = T.unsafe(nil)); end + + # Returns the class of the error that will be raised when there is an + # error in decoding JSON. Using this method means you won't directly + # depend on the ActiveSupport's JSON implementation, in case it changes + # in the future. + # + # begin + # obj = ActiveSupport::JSON.decode(some_string) + # rescue ActiveSupport::JSON.parse_error + # Rails.logger.warn("Attempted to decode invalid JSON: #{some_string}") + # end + # + # source://activesupport//lib/active_support/json/decoding.rb#42 + def parse_error; end + + private + + # source://activesupport//lib/active_support/json/decoding.rb#47 + def convert_dates_from(data); end + end +end + +# source://activesupport//lib/active_support/json/decoding.rb#14 +ActiveSupport::JSON::DATETIME_REGEX = T.let(T.unsafe(nil), Regexp) + +# matches YAML-formatted dates +# +# source://activesupport//lib/active_support/json/decoding.rb#13 +ActiveSupport::JSON::DATE_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://activesupport//lib/active_support/json/encoding.rb#25 +module ActiveSupport::JSON::Encoding + class << self + # If true, encode >, <, & as escaped unicode sequences (e.g. > as \u003e) + # as a safety measure. + # + # source://activesupport//lib/active_support/json/encoding.rb#121 + def escape_html_entities_in_json; end + + # If true, encode >, <, & as escaped unicode sequences (e.g. > as \u003e) + # as a safety measure. + # + # source://activesupport//lib/active_support/json/encoding.rb#121 + def escape_html_entities_in_json=(_arg0); end + + # Sets the encoder used by Rails to encode Ruby objects into JSON strings + # in +Object#to_json+ and +ActiveSupport::JSON.encode+. + # + # source://activesupport//lib/active_support/json/encoding.rb#129 + def json_encoder; end + + # Sets the encoder used by Rails to encode Ruby objects into JSON strings + # in +Object#to_json+ and +ActiveSupport::JSON.encode+. + # + # source://activesupport//lib/active_support/json/encoding.rb#129 + def json_encoder=(_arg0); end + + # Sets the precision of encoded time values. + # Defaults to 3 (equivalent to millisecond precision) + # + # source://activesupport//lib/active_support/json/encoding.rb#125 + def time_precision; end + + # Sets the precision of encoded time values. + # Defaults to 3 (equivalent to millisecond precision) + # + # source://activesupport//lib/active_support/json/encoding.rb#125 + def time_precision=(_arg0); end + + # If true, use ISO 8601 format for dates and times. Otherwise, fall back + # to the Active Support legacy format. + # + # source://activesupport//lib/active_support/json/encoding.rb#117 + def use_standard_json_time_format; end + + # If true, use ISO 8601 format for dates and times. Otherwise, fall back + # to the Active Support legacy format. + # + # source://activesupport//lib/active_support/json/encoding.rb#117 + def use_standard_json_time_format=(_arg0); end + end +end + +# source://activesupport//lib/active_support/json/encoding.rb#26 +class ActiveSupport::JSON::Encoding::JSONGemEncoder + # @return [JSONGemEncoder] a new instance of JSONGemEncoder + # + # source://activesupport//lib/active_support/json/encoding.rb#29 + def initialize(options = T.unsafe(nil)); end + + # Encode the given object into a JSON string + # + # source://activesupport//lib/active_support/json/encoding.rb#34 + def encode(value); end + + # Returns the value of attribute options. + # + # source://activesupport//lib/active_support/json/encoding.rb#27 + def options; end + + private + + # Convert an object into a "JSON-ready" representation composed of + # primitives like Hash, Array, String, Numeric, + # and +true+/+false+/+nil+. + # Recursively calls #as_json to the object to recursively build a + # fully JSON-ready object. + # + # This allows developers to implement #as_json without having to + # worry about what base types of objects they are allowed to return + # or having to remember to call #as_json recursively. + # + # Note: the +options+ hash passed to +object.to_json+ is only passed + # to +object.as_json+, not any of this method's recursive +#as_json+ + # calls. + # + # source://activesupport//lib/active_support/json/encoding.rb#89 + def jsonify(value); end + + # Encode a "jsonified" Ruby data structure using the JSON gem + # + # source://activesupport//lib/active_support/json/encoding.rb#109 + def stringify(jsonified); end +end + +# Rails does more escaping than the JSON gem natively does (we +# escape \u2028 and \u2029 and optionally >, <, & to work around +# certain browser problems). +# +# source://activesupport//lib/active_support/json/encoding.rb#42 +ActiveSupport::JSON::Encoding::JSONGemEncoder::ESCAPED_CHARS = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/json/encoding.rb#51 +ActiveSupport::JSON::Encoding::JSONGemEncoder::ESCAPE_REGEX_WITHOUT_HTML_ENTITIES = T.let(T.unsafe(nil), Regexp) + +# source://activesupport//lib/active_support/json/encoding.rb#50 +ActiveSupport::JSON::Encoding::JSONGemEncoder::ESCAPE_REGEX_WITH_HTML_ENTITIES = T.let(T.unsafe(nil), Regexp) + +# This class wraps all the strings we see and does the extra escaping +# +# source://activesupport//lib/active_support/json/encoding.rb#54 +class ActiveSupport::JSON::Encoding::JSONGemEncoder::EscapedString < ::String + # source://activesupport//lib/active_support/json/encoding.rb#55 + def to_json(*_arg0); end + + # source://activesupport//lib/active_support/json/encoding.rb#67 + def to_s; end +end + +# 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 <tt>ActiveRecord::Base</tt> at boot time purely to apply +# configuration. Instead a hook is registered that applies configuration once +# <tt>ActiveRecord::Base</tt> is loaded. Here <tt>ActiveRecord::Base</tt> is +# used as example but this feature can be applied elsewhere too. +# +# Here is an example where on_load method is called to register a hook. +# +# initializer 'active_record.initialize_timezone' do +# ActiveSupport.on_load(:active_record) do +# self.time_zone_aware_attributes = true +# self.default_timezone = :utc +# end +# end +# +# When the entirety of +ActiveRecord::Base+ has been +# evaluated then run_load_hooks is invoked. The very last line of +# +ActiveRecord::Base+ is: +# +# ActiveSupport.run_load_hooks(:active_record, ActiveRecord::Base) +# +# run_load_hooks will then execute all the hooks that were registered +# with the on_load method. In the case of the above example, it will +# execute the block of code that is in the +initializer+. +# +# Registering a hook that has already run results in that hook executing +# immediately. This allows hooks to be nested for code that relies on +# multiple lazily loaded components: +# +# initializer "action_text.renderer" do +# ActiveSupport.on_load(:action_controller_base) do +# ActiveSupport.on_load(:action_text_content) do +# self.default_renderer = Class.new(ActionController::Base).renderer +# end +# end +# end +# +# source://activesupport//lib/active_support/lazy_load_hooks.rb#41 +module ActiveSupport::LazyLoadHooks + # Declares a block that will be executed when a Rails component is fully + # loaded. If the component has already loaded, the block is executed + # immediately. + # + # Options: + # + # * <tt>:yield</tt> - Yields the object that run_load_hooks to +block+. + # * <tt>:run_once</tt> - Given +block+ will run only once. + # + # source://activesupport//lib/active_support/lazy_load_hooks.rb#58 + def on_load(name, options = T.unsafe(nil), &block); end + + # Executes all blocks registered to +name+ via on_load, using +base+ as the + # evaluation context. + # + # ActiveSupport.run_load_hooks(:active_record, ActiveRecord::Base) + # + # In the case of the above example, it will execute all hooks registered + # for +:active_record+ within the class +ActiveRecord::Base+. + # + # source://activesupport//lib/active_support/lazy_load_hooks.rb#73 + def run_load_hooks(name, base = T.unsafe(nil)); end + + private + + # source://activesupport//lib/active_support/lazy_load_hooks.rb#89 + def execute_hook(name, base, options, block); end + + # source://activesupport//lib/active_support/lazy_load_hooks.rb#81 + def with_execution_control(name, block, once); end + + class << self + # source://activesupport//lib/active_support/lazy_load_hooks.rb#42 + def extended(base); end + end +end + +# The TimeZone class serves as a wrapper around <tt>TZInfo::Timezone</tt> 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 <tt>TZInfo::Timezone</tt> instances only when they're needed. +# * Create ActiveSupport::TimeWithZone instances via TimeZone's +local+, +# +parse+, +at+, and +now+ methods. +# +# If you set <tt>config.time_zone</tt> in the Rails Application, you can +# access this TimeZone object via <tt>Time.zone</tt>: +# +# # application.rb: +# class Application < Rails::Application +# config.time_zone = 'Eastern Time (US & Canada)' +# end +# +# Time.zone # => #<ActiveSupport::TimeZone:0x514834...> +# Time.zone.name # => "Eastern Time (US & Canada)" +# Time.zone.now # => Sun, 18 May 2008 14:30:44 EDT -04:00 +# +# source://activesupport//lib/active_support/values/time_zone.rb#29 +class ActiveSupport::TimeZone + include ::Comparable + + # Create a new TimeZone object with the given name and offset. The + # offset is the number of seconds that this time zone is offset from UTC + # (GMT). Seconds were chosen as the offset unit because that is the unit + # that Ruby uses to represent time zone offsets (see Time#utc_offset). + # + # @return [TimeZone] a new instance of TimeZone + # + # source://activesupport//lib/active_support/values/time_zone.rb#301 + 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 + 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 + def =~(re); end + + # Method for creating new ActiveSupport::TimeWithZone instance in time zone + # of +self+ from number of seconds since the Unix epoch. + # + # Time.zone = 'Hawaii' # => "Hawaii" + # Time.utc(2000).to_f # => 946684800.0 + # Time.zone.at(946684800.0) # => Fri, 31 Dec 1999 14:00:00 HST -10:00 + # + # A second argument can be supplied to specify sub-second precision. + # + # Time.zone = 'Hawaii' # => "Hawaii" + # Time.at(946684800, 123456.789).nsec # => 123456789 + # + # source://activesupport//lib/active_support/values/time_zone.rb#370 + def at(*args); end + + # source://activesupport//lib/active_support/values/time_zone.rb#566 + def encode_with(coder); end + + # Returns a formatted string of the offset from UTC, or an alternative + # string if the time zone is already UTC. + # + # zone = ActiveSupport::TimeZone['Central Time (US & Canada)'] + # zone.formatted_offset # => "-06:00" + # zone.formatted_offset(false) # => "-0600" + # + # source://activesupport//lib/active_support/values/time_zone.rb#318 + def formatted_offset(colon = T.unsafe(nil), alternate_utc_string = T.unsafe(nil)); end + + # source://activesupport//lib/active_support/values/time_zone.rb#562 + def init_with(coder); end + + # Method for creating new ActiveSupport::TimeWithZone instance in time zone + # of +self+ from an ISO 8601 string. + # + # Time.zone = 'Hawaii' # => "Hawaii" + # Time.zone.iso8601('1999-12-31T14:00:00') # => Fri, 31 Dec 1999 14:00:00 HST -10:00 + # + # If the time components are missing then they will be set to zero. + # + # Time.zone = 'Hawaii' # => "Hawaii" + # Time.zone.iso8601('1999-12-31') # => Fri, 31 Dec 1999 00:00:00 HST -10:00 + # + # If the string is invalid then an +ArgumentError+ will be raised unlike +parse+ + # which usually returns +nil+ when given an invalid date string. + # + # source://activesupport//lib/active_support/values/time_zone.rb#387 + def iso8601(str); end + + # Method for creating new ActiveSupport::TimeWithZone instance in time zone + # of +self+ from given values. + # + # Time.zone = 'Hawaii' # => "Hawaii" + # Time.zone.local(2007, 2, 1, 15, 30, 45) # => Thu, 01 Feb 2007 15:30:45 HST -10:00 + # + # source://activesupport//lib/active_support/values/time_zone.rb#354 + 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 + 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 + def match?(re); end + + # Returns the value of attribute name. + # + # source://activesupport//lib/active_support/values/time_zone.rb#294 + def name; end + + # Returns an ActiveSupport::TimeWithZone instance representing the current + # time in the time zone represented by +self+. + # + # Time.zone = 'Hawaii' # => "Hawaii" + # Time.zone.now # => Wed, 23 Jan 2008 20:24:27 HST -10:00 + # + # source://activesupport//lib/active_support/values/time_zone.rb#507 + def now; end + + # Method for creating new ActiveSupport::TimeWithZone instance in time zone + # of +self+ from parsed string. + # + # Time.zone = 'Hawaii' # => "Hawaii" + # Time.zone.parse('1999-12-31 14:00:00') # => Fri, 31 Dec 1999 14:00:00 HST -10:00 + # + # If upper components are missing from the string, they are supplied from + # TimeZone#now: + # + # Time.zone.now # => Fri, 31 Dec 1999 14:00:00 HST -10:00 + # Time.zone.parse('22:30:00') # => Fri, 31 Dec 1999 22:30:00 HST -10:00 + # + # However, if the date component is not provided, but any other upper + # components are supplied, then the day of the month defaults to 1: + # + # Time.zone.parse('Mar 2000') # => Wed, 01 Mar 2000 00:00:00 HST -10:00 + # + # If the string is invalid then an +ArgumentError+ could be raised. + # + # source://activesupport//lib/active_support/values/time_zone.rb#444 + def parse(str, now = T.unsafe(nil)); end + + # Available so that TimeZone instances respond like <tt>TZInfo::Timezone</tt> + # instances. + # + # source://activesupport//lib/active_support/values/time_zone.rb#554 + def period_for_local(time, dst = T.unsafe(nil)); end + + # Available so that TimeZone instances respond like <tt>TZInfo::Timezone</tt> + # instances. + # + # source://activesupport//lib/active_support/values/time_zone.rb#548 + def period_for_utc(time); end + + # source://activesupport//lib/active_support/values/time_zone.rb#558 + def periods_for_local(time); end + + # Method for creating new ActiveSupport::TimeWithZone instance in time zone + # of +self+ from an RFC 3339 string. + # + # Time.zone = 'Hawaii' # => "Hawaii" + # Time.zone.rfc3339('2000-01-01T00:00:00Z') # => Fri, 31 Dec 1999 14:00:00 HST -10:00 + # + # If the time or zone components are missing then an +ArgumentError+ will + # be raised. This is much stricter than either +parse+ or +iso8601+ which + # allow for missing components. + # + # Time.zone = 'Hawaii' # => "Hawaii" + # Time.zone.rfc3339('1999-12-31') # => ArgumentError: invalid date + # + # @raise [ArgumentError] + # + # source://activesupport//lib/active_support/values/time_zone.rb#460 + def rfc3339(str); end + + # Parses +str+ according to +format+ and returns an ActiveSupport::TimeWithZone. + # + # Assumes that +str+ is a time in the time zone +self+, + # unless +format+ includes an explicit time zone. + # (This is the same behavior as +parse+.) + # In either case, the returned TimeWithZone has the timezone of +self+. + # + # Time.zone = 'Hawaii' # => "Hawaii" + # Time.zone.strptime('1999-12-31 14:00:00', '%Y-%m-%d %H:%M:%S') # => Fri, 31 Dec 1999 14:00:00 HST -10:00 + # + # If upper components are missing from the string, they are supplied from + # TimeZone#now: + # + # Time.zone.now # => Fri, 31 Dec 1999 14:00:00 HST -10:00 + # Time.zone.strptime('22:30:00', '%H:%M:%S') # => Fri, 31 Dec 1999 22:30:00 HST -10:00 + # + # However, if the date component is not provided, but any other upper + # components are supplied, then the day of the month defaults to 1: + # + # Time.zone.strptime('Mar 2000', '%b %Y') # => Wed, 01 Mar 2000 00:00:00 HST -10:00 + # + # source://activesupport//lib/active_support/values/time_zone.rb#498 + 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 + def to_s; end + + # Returns the current date in this time zone. + # + # source://activesupport//lib/active_support/values/time_zone.rb#512 + def today; end + + # Returns the next date in this time zone. + # + # source://activesupport//lib/active_support/values/time_zone.rb#517 + def tomorrow; end + + # Returns the value of attribute tzinfo. + # + # source://activesupport//lib/active_support/values/time_zone.rb#295 + def tzinfo; end + + # Returns the offset of this time zone from UTC in seconds. + # + # source://activesupport//lib/active_support/values/time_zone.rb#308 + def utc_offset; end + + # Adjust the given time to the simultaneous time in the time zone + # represented by +self+. Returns a local time with the appropriate offset + # -- if you want an ActiveSupport::TimeWithZone instance, use + # Time#in_time_zone() instead. + # + # As of tzinfo 2, utc_to_local returns a Time with a non-zero utc_offset. + # See the +utc_to_local_returns_utc_offset_times+ config for more info. + # + # source://activesupport//lib/active_support/values/time_zone.rb#533 + def utc_to_local(time); end + + # Returns the previous date in this time zone. + # + # source://activesupport//lib/active_support/values/time_zone.rb#522 + def yesterday; end + + private + + # @raise [ArgumentError] + # + # source://activesupport//lib/active_support/values/time_zone.rb#572 + def parts_to_time(parts, now); end + + # source://activesupport//lib/active_support/values/time_zone.rb#597 + def time_now; end + + class << self + # Locate a specific time zone object. If the argument is a string, it + # is interpreted to mean the name of the timezone to locate. If it is a + # numeric value it is either the hour offset, or the second offset, of the + # timezone to find. (The first one with that offset will be returned.) + # Returns +nil+ if no such time zone is known to the system. + # + # source://activesupport//lib/active_support/values/time_zone.rb#230 + def [](arg); end + + # Returns an array of all TimeZone objects. There are multiple + # TimeZone objects per time zone, in many cases, to make it easier + # for users to find their own time zone. + # + # source://activesupport//lib/active_support/values/time_zone.rb#221 + def all; end + + # source://activesupport//lib/active_support/values/time_zone.rb#263 + 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 + def country_zones(country_code); end + + def create(*_arg0); end + + # source://activesupport//lib/active_support/values/time_zone.rb#205 + def find_tzinfo(name); end + + # Returns a TimeZone instance with the given name, or +nil+ if no + # such TimeZone instance exists. (This exists to support the use of + # this class with the +composed_of+ macro.) + # + # source://activesupport//lib/active_support/values/time_zone.rb#214 + def new(name); end + + # Assumes self represents an offset from UTC in seconds (as returned from + # Time#utc_offset) and turns this into an +HH:MM formatted string. + # + # ActiveSupport::TimeZone.seconds_to_utc_offset(-21_600) # => "-06:00" + # + # source://activesupport//lib/active_support/values/time_zone.rb#197 + def seconds_to_utc_offset(seconds, colon = T.unsafe(nil)); end + + # A convenience method for returning a collection of TimeZone objects + # for time zones in the USA. + # + # source://activesupport//lib/active_support/values/time_zone.rb#252 + def us_zones; end + + private + + # source://activesupport//lib/active_support/values/time_zone.rb#271 + def load_country_zones(code); end + + # source://activesupport//lib/active_support/values/time_zone.rb#285 + def zones_map; end + end +end + +# Keys are Rails TimeZone names, values are TZInfo identifiers. +# +# source://activesupport//lib/active_support/values/time_zone.rb#31 +ActiveSupport::TimeZone::MAPPING = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/values/time_zone.rb#186 +ActiveSupport::TimeZone::UTC_OFFSET_WITHOUT_COLON = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/values/time_zone.rb#185 +ActiveSupport::TimeZone::UTC_OFFSET_WITH_COLON = T.let(T.unsafe(nil), String) + +# source://activesupport//lib/active_support/core_ext/object/json.rb#35 +module ActiveSupport::ToJsonWithActiveSupportEncoder + # source://activesupport//lib/active_support/core_ext/object/json.rb#36 + def to_json(options = T.unsafe(nil)); end +end + +# source://activesupport//lib/active_support/core_ext/object/blank.rb#83 +class Array + include ::Enumerable + + # source://activesupport//lib/active_support/core_ext/object/json.rb#158 + def as_json(options = T.unsafe(nil)); end +end + +# source://activesupport//lib/active_support/core_ext/object/json.rb#118 +class BigDecimal < ::Numeric + include ::ActiveSupport::BigDecimalWithDefaultFormat + + # A BigDecimal would be naturally represented as a JSON number. Most libraries, + # however, parse non-integer JSON numbers directly as floats. Clients using + # those libraries would get in general a wrong number and no way to recover + # other than manually inspecting the string with the JSON code itself. + # + # That's why a JSON string is returned. The JSON literal is not numeric, but + # if the other end knows by contract that the data is supposed to be a + # BigDecimal, it still has the chance to post-process the string and get the + # real value. + # + # source://activesupport//lib/active_support/core_ext/object/json.rb#128 + 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/date/zones.rb#6 +class Date + include ::Comparable + include ::DateAndTime::Zones + + # source://activesupport//lib/active_support/core_ext/object/json.rb#197 + def as_json(options = T.unsafe(nil)); end + + # Overrides the default inspect method with a human readable one, e.g., "Mon, 21 Feb 2005" + # + # source://activesupport//lib/active_support/core_ext/date/conversions.rb#62 + def inspect; end + + # Overrides the default inspect method with a human readable one, e.g., "Mon, 21 Feb 2005" + # + # source://activesupport//lib/active_support/core_ext/date/conversions.rb#62 + def readable_inspect; end + + # Convert to a formatted string. See DATE_FORMATS for predefined formats. + # + # This method is aliased to <tt>to_formatted_s</tt>. + # + # date = Date.new(2007, 11, 10) # => Sat, 10 Nov 2007 + # + # date.to_fs(:db) # => "2007-11-10" + # date.to_formatted_s(:db) # => "2007-11-10" + # + # date.to_fs(:short) # => "10 Nov" + # date.to_fs(:number) # => "20071110" + # date.to_fs(:long) # => "November 10, 2007" + # date.to_fs(:long_ordinal) # => "November 10th, 2007" + # date.to_fs(:rfc822) # => "10 Nov 2007" + # date.to_fs(:iso8601) # => "2007-11-10" + # + # == Adding your own date formats to to_fs + # You can add your own formats to the Date::DATE_FORMATS hash. + # Use the format name as the hash key and either a strftime string + # or Proc instance that takes a date argument as the value. + # + # # config/initializers/date_formats.rb + # Date::DATE_FORMATS[:month_and_year] = '%B %Y' + # Date::DATE_FORMATS[:short_ordinal] = ->(date) { date.strftime("%B #{date.day.ordinalize}") } + # + # source://activesupport//lib/active_support/core_ext/date/conversions.rb#47 + def to_formatted_s(format = T.unsafe(nil)); end + + # Convert to a formatted string. See DATE_FORMATS for predefined formats. + # + # This method is aliased to <tt>to_formatted_s</tt>. + # + # date = Date.new(2007, 11, 10) # => Sat, 10 Nov 2007 + # + # date.to_fs(:db) # => "2007-11-10" + # date.to_formatted_s(:db) # => "2007-11-10" + # + # date.to_fs(:short) # => "10 Nov" + # date.to_fs(:number) # => "20071110" + # date.to_fs(:long) # => "November 10, 2007" + # date.to_fs(:long_ordinal) # => "November 10th, 2007" + # date.to_fs(:rfc822) # => "10 Nov 2007" + # date.to_fs(:iso8601) # => "2007-11-10" + # + # == Adding your own date formats to to_fs + # You can add your own formats to the Date::DATE_FORMATS hash. + # Use the format name as the hash key and either a strftime string + # or Proc instance that takes a date argument as the value. + # + # # config/initializers/date_formats.rb + # Date::DATE_FORMATS[:month_and_year] = '%B %Y' + # Date::DATE_FORMATS[:short_ordinal] = ->(date) { date.strftime("%B #{date.day.ordinalize}") } + # + # source://activesupport//lib/active_support/core_ext/date/conversions.rb#47 + def to_fs(format = T.unsafe(nil)); end + + # Converts a Date instance to a Time, where the time is set to the beginning of the day. + # The timezone can be either +:local+ or +:utc+ (default +:local+). + # + # date = Date.new(2007, 11, 10) # => Sat, 10 Nov 2007 + # + # date.to_time # => 2007-11-10 00:00:00 0800 + # date.to_time(:local) # => 2007-11-10 00:00:00 0800 + # + # date.to_time(:utc) # => 2007-11-10 00:00:00 UTC + # + # NOTE: The +:local+ timezone is Ruby's *process* timezone, i.e. <tt>ENV['TZ']</tt>. + # If the <b>application's</b> timezone is needed, then use +in_time_zone+ instead. + # + # @raise [ArgumentError] + # + # source://activesupport//lib/active_support/core_ext/date/conversions.rb#82 + def to_time(form = T.unsafe(nil)); end + + # Returns a string which represents the time in used time zone as DateTime + # defined by XML Schema: + # + # date = Date.new(2015, 05, 23) # => Sat, 23 May 2015 + # date.xmlschema # => "2015-05-23T00:00:00+04:00" + # + # source://activesupport//lib/active_support/core_ext/date/conversions.rb#94 + def xmlschema; end +end + +# source://activesupport//lib/active_support/core_ext/date/conversions.rb#9 +Date::DATE_FORMATS = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/core_ext/date_and_time/zones.rb#3 +module DateAndTime; end + +# source://activesupport//lib/active_support/core_ext/date_and_time/zones.rb#4 +module DateAndTime::Zones + # Returns the simultaneous time in <tt>Time.zone</tt> if a zone is given or + # if Time.zone_default is set. Otherwise, it returns the current time. + # + # Time.zone = 'Hawaii' # => 'Hawaii' + # Time.utc(2000).in_time_zone # => Fri, 31 Dec 1999 14:00:00 HST -10:00 + # Date.new(2000).in_time_zone # => Sat, 01 Jan 2000 00:00:00 HST -10:00 + # + # This method is similar to Time#localtime, except that it uses <tt>Time.zone</tt> as the local zone + # instead of the operating system's time zone. + # + # You can also pass in a TimeZone instance or string that identifies a TimeZone as an argument, + # and the conversion will be based on that zone instead of <tt>Time.zone</tt>. + # + # Time.utc(2000).in_time_zone('Alaska') # => Fri, 31 Dec 1999 15:00:00 AKST -09:00 + # Date.new(2000).in_time_zone('Alaska') # => Sat, 01 Jan 2000 00:00:00 AKST -09:00 + # + # source://activesupport//lib/active_support/core_ext/date_and_time/zones.rb#20 + def in_time_zone(zone = T.unsafe(nil)); end + + private + + # source://activesupport//lib/active_support/core_ext/date_and_time/zones.rb#32 + def time_with_zone(time, zone); end +end + +# source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#5 +class DateTime < ::Date + # Layers additional behavior on DateTime#<=> so that Time and + # ActiveSupport::TimeWithZone instances can be compared with a DateTime. + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#208 + def <=>(other); end + + # Uses Date to provide precise Time calculations for years, months, and days. + # The +options+ parameter takes a hash with any of these keys: <tt>:years</tt>, + # <tt>:months</tt>, <tt>:weeks</tt>, <tt>:days</tt>, <tt>:hours</tt>, + # <tt>:minutes</tt>, <tt>:seconds</tt>. + # + # Just like Date#advance, increments are applied in order of time units from + # largest to smallest. This order can affect the result around the end of a + # month. + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#82 + def advance(options); end + + # Returns a new DateTime representing the time a number of seconds ago. + # Do not use this method in combination with x.months, use months_ago instead! + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#109 + def ago(seconds); end + + # source://activesupport//lib/active_support/core_ext/object/json.rb#207 + def as_json(options = T.unsafe(nil)); end + + # Returns a new DateTime representing the start of the day (0:00). + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#122 + def at_beginning_of_day; end + + # Returns a new DateTime representing the start of the hour (hh:00:00). + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#146 + def at_beginning_of_hour; end + + # Returns a new DateTime representing the start of the minute (hh:mm:00). + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#158 + def at_beginning_of_minute; end + + # Returns a new DateTime representing the end of the day (23:59:59). + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#140 + def at_end_of_day; end + + # Returns a new DateTime representing the end of the hour (hh:59:59). + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#152 + def at_end_of_hour; end + + # Returns a new DateTime representing the end of the minute (hh:mm:59). + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#164 + def at_end_of_minute; end + + # Returns a new DateTime representing the middle of the day (12:00) + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#130 + def at_midday; end + + # Returns a new DateTime representing the middle of the day (12:00) + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#130 + def at_middle_of_day; end + + # Returns a new DateTime representing the start of the day (0:00). + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#122 + def at_midnight; end + + # Returns a new DateTime representing the middle of the day (12:00) + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#130 + def at_noon; end + + # Returns a new DateTime representing the start of the day (0:00). + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#122 + def beginning_of_day; end + + # Returns a new DateTime representing the start of the hour (hh:00:00). + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#146 + def beginning_of_hour; end + + # Returns a new DateTime representing the start of the minute (hh:mm:00). + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#158 + def beginning_of_minute; end + + # Returns a new DateTime where one or more of the elements have been changed + # according to the +options+ parameter. The time options (<tt>:hour</tt>, + # <tt>:min</tt>, <tt>:sec</tt>) reset cascadingly, so if only the hour is + # passed, then minute and sec is set to 0. If the hour and minute is passed, + # then sec is set to 0. The +options+ parameter takes a hash with any of these + # keys: <tt>:year</tt>, <tt>:month</tt>, <tt>:day</tt>, <tt>:hour</tt>, + # <tt>:min</tt>, <tt>:sec</tt>, <tt>:offset</tt>, <tt>:start</tt>. + # + # DateTime.new(2012, 8, 29, 22, 35, 0).change(day: 1) # => DateTime.new(2012, 8, 1, 22, 35, 0) + # DateTime.new(2012, 8, 29, 22, 35, 0).change(year: 1981, day: 1) # => DateTime.new(1981, 8, 1, 22, 35, 0) + # DateTime.new(2012, 8, 29, 22, 35, 0).change(year: 1981, hour: 0) # => DateTime.new(1981, 8, 29, 0, 0, 0) + # + # @raise [ArgumentError] + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#51 + def change(options); end + + # Returns a new DateTime representing the end of the day (23:59:59). + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#140 + def end_of_day; end + + # Returns a new DateTime representing the end of the hour (hh:59:59). + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#152 + def end_of_hour; end + + # Returns a new DateTime representing the end of the minute (hh:mm:59). + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#164 + def end_of_minute; end + + # Returns a formatted string of the offset from UTC, or an alternative + # string if the time zone is already UTC. + # + # datetime = DateTime.civil(2000, 1, 1, 0, 0, 0, Rational(-6, 24)) + # datetime.formatted_offset # => "-06:00" + # datetime.formatted_offset(false) # => "-0600" + # + # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#51 + def formatted_offset(colon = T.unsafe(nil), alternate_utc_string = T.unsafe(nil)); end + + # Returns a <tt>Time</tt> instance of the simultaneous time in the UTC timezone. + # + # DateTime.civil(2005, 2, 21, 10, 11, 12, Rational(-6, 24)) # => Mon, 21 Feb 2005 10:11:12 -0600 + # DateTime.civil(2005, 2, 21, 10, 11, 12, Rational(-6, 24)).utc # => Mon, 21 Feb 2005 16:11:12 UTC + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#184 + def getgm; end + + # Returns a <tt>Time</tt> instance of the simultaneous time in the system timezone. + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#170 + def getlocal(utc_offset = T.unsafe(nil)); end + + # Returns a <tt>Time</tt> instance of the simultaneous time in the UTC timezone. + # + # DateTime.civil(2005, 2, 21, 10, 11, 12, Rational(-6, 24)) # => Mon, 21 Feb 2005 10:11:12 -0600 + # DateTime.civil(2005, 2, 21, 10, 11, 12, Rational(-6, 24)).utc # => Mon, 21 Feb 2005 16:11:12 UTC + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#184 + def getutc; end + + # Returns a <tt>Time</tt> instance of the simultaneous time in the UTC timezone. + # + # DateTime.civil(2005, 2, 21, 10, 11, 12, Rational(-6, 24)) # => Mon, 21 Feb 2005 10:11:12 -0600 + # DateTime.civil(2005, 2, 21, 10, 11, 12, Rational(-6, 24)).utc # => Mon, 21 Feb 2005 16:11:12 UTC + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#184 + def gmtime; end + + # Returns a new DateTime representing the time a number of seconds since the + # instance time. Do not use this method in combination with x.months, use + # months_since instead! + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#116 + def in(seconds); end + + # Overrides the default inspect method with a human readable one, e.g., "Mon, 21 Feb 2005 14:30:00 +0000". + # + # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#56 + def inspect; end + + # Returns a <tt>Time</tt> instance of the simultaneous time in the system timezone. + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#170 + def localtime(utc_offset = T.unsafe(nil)); end + + # Returns a new DateTime representing the middle of the day (12:00) + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#130 + def midday; end + + # Returns a new DateTime representing the middle of the day (12:00) + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#130 + def middle_of_day; end + + # Returns a new DateTime representing the start of the day (0:00). + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#122 + def midnight; end + + # Returns a new DateTime representing the middle of the day (12:00) + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#130 + def noon; end + + # Returns the fraction of a second as nanoseconds + # + # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#94 + def nsec; end + + # Overrides the default inspect method with a human readable one, e.g., "Mon, 21 Feb 2005 14:30:00 +0000". + # + # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#56 + def readable_inspect; end + + # Returns the number of seconds since 00:00:00. + # + # DateTime.new(2012, 8, 29, 0, 0, 0).seconds_since_midnight # => 0 + # DateTime.new(2012, 8, 29, 12, 34, 56).seconds_since_midnight # => 45296 + # DateTime.new(2012, 8, 29, 23, 59, 59).seconds_since_midnight # => 86399 + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#20 + def seconds_since_midnight; end + + # Returns the number of seconds until 23:59:59. + # + # DateTime.new(2012, 8, 29, 0, 0, 0).seconds_until_end_of_day # => 86399 + # DateTime.new(2012, 8, 29, 12, 34, 56).seconds_until_end_of_day # => 41103 + # DateTime.new(2012, 8, 29, 23, 59, 59).seconds_until_end_of_day # => 0 + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#29 + def seconds_until_end_of_day; end + + # Returns a new DateTime representing the time a number of seconds since the + # instance time. Do not use this method in combination with x.months, use + # months_since instead! + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#116 + def since(seconds); end + + # Returns the fraction of a second as a +Rational+ + # + # DateTime.new(2012, 8, 29, 0, 0, 0.5).subsec # => (1/2) + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#36 + def subsec; end + + # Converts +self+ to a floating-point number of seconds, including fractional microseconds, since the Unix epoch. + # + # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#79 + def to_f; end + + # Convert to a formatted string. See Time::DATE_FORMATS for predefined formats. + # + # This method is aliased to <tt>to_formatted_s</tt>. + # + # === Examples + # datetime = DateTime.civil(2007, 12, 4, 0, 0, 0, 0) # => Tue, 04 Dec 2007 00:00:00 +0000 + # + # datetime.to_fs(:db) # => "2007-12-04 00:00:00" + # datetime.to_formatted_s(:db) # => "2007-12-04 00:00:00" + # datetime.to_fs(:number) # => "20071204000000" + # datetime.to_fs(:short) # => "04 Dec 00:00" + # datetime.to_fs(:long) # => "December 04, 2007 00:00" + # datetime.to_fs(:long_ordinal) # => "December 4th, 2007 00:00" + # datetime.to_fs(:rfc822) # => "Tue, 04 Dec 2007 00:00:00 +0000" + # datetime.to_fs(:iso8601) # => "2007-12-04T00:00:00+00:00" + # + # == Adding your own datetime formats to to_fs + # DateTime formats are shared with Time. You can add your own to the + # Time::DATE_FORMATS hash. Use the format name as the hash key and + # either a strftime string or Proc instance that takes a time or + # datetime argument as the value. + # + # # config/initializers/time_formats.rb + # Time::DATE_FORMATS[:month_and_year] = '%B %Y' + # Time::DATE_FORMATS[:short_ordinal] = lambda { |time| time.strftime("%B #{time.day.ordinalize}") } + # + # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#35 + def to_formatted_s(format = T.unsafe(nil)); end + + # Convert to a formatted string. See Time::DATE_FORMATS for predefined formats. + # + # This method is aliased to <tt>to_formatted_s</tt>. + # + # === Examples + # datetime = DateTime.civil(2007, 12, 4, 0, 0, 0, 0) # => Tue, 04 Dec 2007 00:00:00 +0000 + # + # datetime.to_fs(:db) # => "2007-12-04 00:00:00" + # datetime.to_formatted_s(:db) # => "2007-12-04 00:00:00" + # datetime.to_fs(:number) # => "20071204000000" + # datetime.to_fs(:short) # => "04 Dec 00:00" + # datetime.to_fs(:long) # => "December 04, 2007 00:00" + # datetime.to_fs(:long_ordinal) # => "December 4th, 2007 00:00" + # datetime.to_fs(:rfc822) # => "Tue, 04 Dec 2007 00:00:00 +0000" + # datetime.to_fs(:iso8601) # => "2007-12-04T00:00:00+00:00" + # + # == Adding your own datetime formats to to_fs + # DateTime formats are shared with Time. You can add your own to the + # Time::DATE_FORMATS hash. Use the format name as the hash key and + # either a strftime string or Proc instance that takes a time or + # datetime argument as the value. + # + # # config/initializers/time_formats.rb + # Time::DATE_FORMATS[:month_and_year] = '%B %Y' + # Time::DATE_FORMATS[:short_ordinal] = lambda { |time| time.strftime("%B #{time.day.ordinalize}") } + # + # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#35 + def to_fs(format = T.unsafe(nil)); end + + # Converts +self+ to an integer number of seconds since the Unix epoch. + # + # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#84 + def to_i; end + + # Returns the fraction of a second as microseconds + # + # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#89 + def usec; end + + # Returns a <tt>Time</tt> instance of the simultaneous time in the UTC timezone. + # + # DateTime.civil(2005, 2, 21, 10, 11, 12, Rational(-6, 24)) # => Mon, 21 Feb 2005 10:11:12 -0600 + # DateTime.civil(2005, 2, 21, 10, 11, 12, Rational(-6, 24)).utc # => Mon, 21 Feb 2005 16:11:12 UTC + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#184 + def utc; end + + # Returns +true+ if <tt>offset == 0</tt>. + # + # @return [Boolean] + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#197 + def utc?; end + + # Returns the offset value in seconds. + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#202 + def utc_offset; end + + private + + # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#99 + def offset_in_seconds; end + + # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#103 + def seconds_since_unix_epoch; end + + class << self + # Returns DateTime with local offset for given year if format is local else + # offset is zero. + # + # DateTime.civil_from_format :local, 2012 + # # => Sun, 01 Jan 2012 00:00:00 +0300 + # DateTime.civil_from_format :local, 2012, 12, 17 + # # => Mon, 17 Dec 2012 00:00:00 +0000 + # + # source://activesupport//lib/active_support/core_ext/date_time/conversions.rb#69 + def civil_from_format(utc_or_local, year, month = T.unsafe(nil), day = T.unsafe(nil), hour = T.unsafe(nil), min = T.unsafe(nil), sec = T.unsafe(nil)); end + + # Returns <tt>Time.zone.now.to_datetime</tt> when <tt>Time.zone</tt> or + # <tt>config.time_zone</tt> are set, otherwise returns + # <tt>Time.now.to_datetime</tt>. + # + # source://activesupport//lib/active_support/core_ext/date_time/calculations.rb#10 + def current; end + end +end + +# source://activesupport//lib/active_support/core_ext/object/json.rb#139 +module Enumerable + include ::ActiveSupport::ToJsonWithActiveSupportEncoder + + # source://activesupport//lib/active_support/core_ext/object/json.rb#140 + def as_json(options = T.unsafe(nil)); end +end + +# source://activesupport//lib/active_support/core_ext/object/json.rb#240 +class Exception + # source://activesupport//lib/active_support/core_ext/object/json.rb#241 + def as_json(options = T.unsafe(nil)); end +end + +# source://activesupport//lib/active_support/core_ext/object/blank.rb#61 +class FalseClass + # source://activesupport//lib/active_support/core_ext/object/json.rb#81 + def as_json(options = T.unsafe(nil)); end + + # +false+ is blank: + # + # false.blank? # => true + # + # @return [true] + # + # source://activesupport//lib/active_support/core_ext/object/blank.rb#67 + def blank?; end +end + +# source://activesupport//lib/active_support/core_ext/object/json.rb#110 +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 + def as_json(options = T.unsafe(nil)); end +end + +# source://activesupport//lib/active_support/core_ext/hash/except.rb#3 +class Hash + include ::Enumerable + + # source://activesupport//lib/active_support/core_ext/object/json.rb#164 + def as_json(options = T.unsafe(nil)); end + + # Returns a new hash with +self+ and +other_hash+ merged recursively. + # + # h1 = { a: true, b: { c: [1, 2, 3] } } + # h2 = { a: false, b: { x: [3, 4, 5] } } + # + # h1.deep_merge(h2) # => { a: false, b: { c: [1, 2, 3], x: [3, 4, 5] } } + # + # Like with Hash#merge in the standard library, a block can be provided + # to merge values: + # + # h1 = { a: 100, b: 200, c: { c1: 100 } } + # h2 = { b: 250, c: { c1: 200 } } + # h1.deep_merge(h2) { |key, this_val, other_val| this_val + other_val } + # # => { a: 100, b: 450, c: { c1: 300 } } + # + # source://activesupport//lib/active_support/core_ext/hash/deep_merge.rb#18 + def deep_merge(other_hash, &block); end + + # Same as +deep_merge+, but modifies +self+. + # + # source://activesupport//lib/active_support/core_ext/hash/deep_merge.rb#23 + def deep_merge!(other_hash, &block); end + + # Removes the given keys from hash and returns it. + # hash = { a: true, b: false, c: nil } + # hash.except!(:c) # => { a: true, b: false } + # hash # => { a: true, b: false } + # + # source://activesupport//lib/active_support/core_ext/hash/except.rb#20 + def except!(*keys); end + + # Removes and returns the key/value pairs matching the given keys. + # + # hash = { a: 1, b: 2, c: 3, d: 4 } + # hash.extract!(:a, :b) # => {:a=>1, :b=>2} + # hash # => {:c=>3, :d=>4} + # + # source://activesupport//lib/active_support/core_ext/hash/slice.rb#24 + def extract!(*keys); end + + # Replaces the hash with only the given keys. + # Returns a hash containing the removed key/value pairs. + # + # hash = { a: 1, b: 2, c: 3, d: 4 } + # hash.slice!(:a, :b) # => {:c=>3, :d=>4} + # hash # => {:a=>1, :b=>2} + # + # source://activesupport//lib/active_support/core_ext/hash/slice.rb#10 + def slice!(*keys); end +end + +# source://activesupport//lib/active_support/core_ext/object/json.rb#145 +class IO + include ::Enumerable + include ::File::Constants + + # source://activesupport//lib/active_support/core_ext/object/json.rb#146 + def as_json(options = T.unsafe(nil)); end +end + +class IO::Buffer + include ::Comparable + + def initialize(*_arg0); end + + def &(_arg0); end + def <=>(_arg0); end + def ^(_arg0); end + def and!(_arg0); end + def clear(*_arg0); end + def copy(*_arg0); end + def each(*_arg0); end + def each_byte(*_arg0); end + def empty?; end + def external?; end + def free; end + def get_string(*_arg0); end + def get_value(_arg0, _arg1); end + def get_values(_arg0, _arg1); end + def hexdump; end + def inspect; end + def internal?; end + def locked; end + def locked?; end + def mapped?; end + def not!; end + def null?; end + def or!(_arg0); end + def pread(*_arg0); end + def pwrite(*_arg0); end + def read(*_arg0); end + def readonly?; end + def resize(_arg0); end + def set_string(*_arg0); end + def set_value(_arg0, _arg1, _arg2); end + def set_values(_arg0, _arg1, _arg2); end + def shared?; end + def size; end + def slice(*_arg0); end + def to_s; end + def transfer; end + def valid?; end + def values(*_arg0); end + def write(*_arg0); end + def xor!(_arg0); end + def |(_arg0); end + def ~; end + + private + + def initialize_copy(_arg0); end + + class << self + def for(_arg0); end + def map(*_arg0); end + def size_of(_arg0); end + end +end + +class IO::Buffer::AccessError < ::RuntimeError; end +class IO::Buffer::AllocationError < ::RuntimeError; end +IO::Buffer::BIG_ENDIAN = T.let(T.unsafe(nil), Integer) +IO::Buffer::DEFAULT_SIZE = T.let(T.unsafe(nil), Integer) +IO::Buffer::EXTERNAL = T.let(T.unsafe(nil), Integer) +IO::Buffer::HOST_ENDIAN = T.let(T.unsafe(nil), Integer) +IO::Buffer::INTERNAL = T.let(T.unsafe(nil), Integer) +class IO::Buffer::InvalidatedError < ::RuntimeError; end +IO::Buffer::LITTLE_ENDIAN = T.let(T.unsafe(nil), Integer) +IO::Buffer::LOCKED = T.let(T.unsafe(nil), Integer) +class IO::Buffer::LockedError < ::RuntimeError; end +IO::Buffer::MAPPED = T.let(T.unsafe(nil), Integer) +class IO::Buffer::MaskError < ::ArgumentError; end +IO::Buffer::NETWORK_ENDIAN = T.let(T.unsafe(nil), Integer) +IO::Buffer::PAGE_SIZE = T.let(T.unsafe(nil), Integer) +IO::Buffer::PRIVATE = T.let(T.unsafe(nil), Integer) +IO::Buffer::READONLY = T.let(T.unsafe(nil), Integer) +IO::Buffer::SHARED = T.let(T.unsafe(nil), Integer) + +class IO::ConsoleMode + def echo=(_arg0); end + def raw(*_arg0); end + def raw!(*_arg0); end + + private + + def initialize_copy(_arg0); end +end + +class IO::EAGAINWaitReadable < ::Errno::EAGAIN + include ::IO::WaitReadable +end + +class IO::EAGAINWaitWritable < ::Errno::EAGAIN + include ::IO::WaitWritable +end + +class IO::EINPROGRESSWaitReadable < ::Errno::EINPROGRESS + include ::IO::WaitReadable +end + +class IO::EINPROGRESSWaitWritable < ::Errno::EINPROGRESS + include ::IO::WaitWritable +end + +IO::EWOULDBLOCKWaitReadable = IO::EAGAINWaitReadable +IO::EWOULDBLOCKWaitWritable = IO::EAGAINWaitWritable +IO::PRIORITY = T.let(T.unsafe(nil), Integer) +IO::READABLE = T.let(T.unsafe(nil), Integer) +class IO::TimeoutError < ::IOError; end +IO::WRITABLE = T.let(T.unsafe(nil), Integer) + +# source://activesupport//lib/active_support/core_ext/object/json.rb#228 +class IPAddr + # source://activesupport//lib/active_support/core_ext/object/json.rb#229 + def as_json(options = T.unsafe(nil)); end +end + +class Integer < ::Numeric; end + +class LoadError < ::ScriptError + include ::DidYouMean::Correctable +end + +# == Attribute Accessors per Thread +# +# Extends the module object with class/module and instance accessors for +# class/module attributes, just like the native attr* accessors for instance +# attributes, but does so on a per-thread basis. +# +# So the values are scoped within the Thread.current space under the class name +# of the module. +# +# Note that it can also be scoped per-fiber if +Rails.application.config.active_support.isolation_level+ +# is set to +:fiber+. +# +# source://activesupport//lib/active_support/core_ext/module/attribute_accessors.rb#8 +class Module + # source://activesupport//lib/active_support/core_ext/object/json.rb#53 + def as_json(options = T.unsafe(nil)); 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 <tt>instance_writer: false</tt>. + # To omit the instance reader method, pass <tt>instance_reader: false</tt>. + # + # 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 <tt>instance_accessor: false</tt>, 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 + 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 + # <tt>instance_reader: false</tt> or <tt>instance_accessor: false</tt>. + # + # 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 + 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 + # <tt>instance_writer: false</tt> or <tt>instance_accessor: false</tt>. + # + # module HairColors + # mattr_writer :hair_colors, instance_writer: false + # end + # + # class Person + # include HairColors + # end + # + # Person.new.hair_colors = [:blonde, :red] # => NoMethodError + # + # You can set a default value for the attribute. + # + # module HairColors + # mattr_writer :hair_colors, default: [:brown, :black, :blonde, :red] + # end + # + # class Person + # include HairColors + # end + # + # Person.class_variable_get("@@hair_colors") # => [:brown, :black, :blonde, :red] + # + # @raise [TypeError] + # + # source://activesupport//lib/active_support/core_ext/module/attribute_accessors.rb#117 + def cattr_writer(*syms, instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil), location: T.unsafe(nil)); end + + # Provides a +delegate+ class method to easily expose contained objects' + # public methods as your own. + # + # ==== Options + # * <tt>:to</tt> - Specifies the target object name as a symbol or string + # * <tt>:prefix</tt> - Prefixes the new method with the target name or a custom prefix + # * <tt>:allow_nil</tt> - If set to true, prevents a +Module::DelegationError+ + # from being raised + # * <tt>:private</tt> - If set to true, changes method visibility to private + # + # The macro receives one or more method names (specified as symbols or + # strings) and the name of the target object via the <tt>:to</tt> option + # (also a symbol or string). + # + # Delegation is particularly useful with Active Record associations: + # + # class Greeter < ActiveRecord::Base + # def hello + # 'hello' + # end + # + # def goodbye + # 'goodbye' + # end + # end + # + # class Foo < ActiveRecord::Base + # belongs_to :greeter + # delegate :hello, to: :greeter + # end + # + # Foo.new.hello # => "hello" + # Foo.new.goodbye # => NoMethodError: undefined method `goodbye' for #<Foo:0x1af30c> + # + # Multiple delegates to the same target are allowed: + # + # class Foo < ActiveRecord::Base + # belongs_to :greeter + # delegate :hello, :goodbye, to: :greeter + # end + # + # Foo.new.goodbye # => "goodbye" + # + # Methods can be delegated to instance variables, class variables, or constants + # by providing them as a symbols: + # + # class Foo + # CONSTANT_ARRAY = [0,1,2,3] + # @@class_array = [4,5,6,7] + # + # def initialize + # @instance_array = [8,9,10,11] + # end + # delegate :sum, to: :CONSTANT_ARRAY + # delegate :min, to: :@@class_array + # delegate :max, to: :@instance_array + # end + # + # Foo.new.sum # => 6 + # Foo.new.min # => 4 + # Foo.new.max # => 11 + # + # It's also possible to delegate a method to the class by using +:class+: + # + # class Foo + # def self.hello + # "world" + # end + # + # delegate :hello, to: :class + # end + # + # Foo.new.hello # => "world" + # + # Delegates can optionally be prefixed using the <tt>:prefix</tt> option. If the value + # is <tt>true</tt>, the delegate methods are prefixed with the name of the object being + # delegated to. + # + # Person = Struct.new(:name, :address) + # + # class Invoice < Struct.new(:client) + # delegate :name, :address, to: :client, prefix: true + # end + # + # john_doe = Person.new('John Doe', 'Vimmersvej 13') + # invoice = Invoice.new(john_doe) + # invoice.client_name # => "John Doe" + # invoice.client_address # => "Vimmersvej 13" + # + # It is also possible to supply a custom prefix. + # + # class Invoice < Struct.new(:client) + # delegate :name, :address, to: :client, prefix: :customer + # end + # + # invoice = Invoice.new(john_doe) + # invoice.customer_name # => 'John Doe' + # invoice.customer_address # => 'Vimmersvej 13' + # + # The delegated methods are public by default. + # Pass <tt>private: true</tt> to change that. + # + # class User < ActiveRecord::Base + # has_one :profile + # delegate :first_name, to: :profile + # delegate :date_of_birth, to: :profile, private: true + # + # def age + # Date.today.year - date_of_birth.year + # end + # end + # + # User.new.first_name # => "Tomas" + # User.new.date_of_birth # => NoMethodError: private method `date_of_birth' called for #<User:0x00000008221340> + # User.new.age # => 2 + # + # If the target is +nil+ and does not respond to the delegated method a + # +Module::DelegationError+ is raised. If you wish to instead return +nil+, + # use the <tt>:allow_nil</tt> option. + # + # class User < ActiveRecord::Base + # has_one :profile + # delegate :age, to: :profile + # end + # + # User.new.age + # # => Module::DelegationError: User#age delegated to profile.age, but profile is nil + # + # But if not having a profile yet is fine and should not be an error + # condition: + # + # class User < ActiveRecord::Base + # has_one :profile + # delegate :age, to: :profile, allow_nil: true + # end + # + # User.new.age # nil + # + # Note that if the target is not +nil+ then the call is attempted regardless of the + # <tt>:allow_nil</tt> option, and thus an exception is still raised if said object + # does not respond to the method: + # + # class Foo + # def initialize(bar) + # @bar = bar + # end + # + # delegate :name, to: :@bar, allow_nil: true + # end + # + # Foo.new("Bar").name # raises NoMethodError: undefined method `name' + # + # The target method must be public, otherwise it will raise +NoMethodError+. + # + # source://activesupport//lib/active_support/core_ext/module/delegation.rb#171 + def delegate(*methods, to: T.unsafe(nil), prefix: T.unsafe(nil), allow_nil: T.unsafe(nil), private: T.unsafe(nil)); end + + # When building decorators, a common pattern may emerge: + # + # class Partition + # def initialize(event) + # @event = event + # end + # + # def person + # detail.person || creator + # end + # + # private + # def respond_to_missing?(name, include_private = false) + # @event.respond_to?(name, include_private) + # end + # + # def method_missing(method, *args, &block) + # @event.send(method, *args, &block) + # end + # end + # + # With <tt>Module#delegate_missing_to</tt>, the above is condensed to: + # + # class Partition + # delegate_missing_to :@event + # + # def initialize(event) + # @event = event + # end + # + # def person + # detail.person || creator + # end + # end + # + # The target can be anything callable within the object, e.g. instance + # variables, methods, constants, etc. + # + # The delegated method must be public on the target, otherwise it will + # raise +DelegationError+. If you wish to instead return +nil+, + # use the <tt>:allow_nil</tt> option. + # + # The <tt>marshal_dump</tt> and <tt>_dump</tt> methods are exempt from + # delegation due to possible interference when calling + # <tt>Marshal.dump(object)</tt>, should the delegation target method + # of <tt>object</tt> add or remove instance variables. + # + # source://activesupport//lib/active_support/core_ext/module/delegation.rb#289 + def delegate_missing_to(target, allow_nil: T.unsafe(nil)); 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 <tt>instance_writer: false</tt>. + # To omit the instance reader method, pass <tt>instance_reader: false</tt>. + # + # 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 <tt>instance_accessor: false</tt>, 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 + def mattr_accessor(*syms, instance_reader: T.unsafe(nil), instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil), &blk); end + + # Defines a class attribute and creates a class and instance reader methods. + # The underlying class variable is set to +nil+, if it is not previously + # defined. All class and instance methods created will be public, even if + # this method is called with a private or protected access modifier. + # + # module HairColors + # mattr_reader :hair_colors + # end + # + # HairColors.hair_colors # => nil + # HairColors.class_variable_set("@@hair_colors", [:brown, :black]) + # HairColors.hair_colors # => [:brown, :black] + # + # The attribute name must be a valid method name in Ruby. + # + # module Foo + # mattr_reader :"1_Badname" + # end + # # => NameError: invalid attribute name: 1_Badname + # + # To omit the instance reader method, pass + # <tt>instance_reader: false</tt> or <tt>instance_accessor: false</tt>. + # + # 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 + def mattr_reader(*syms, instance_reader: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil), location: T.unsafe(nil)); end + + # Defines a class attribute and creates a class and instance writer methods to + # allow assignment to the attribute. All class and instance methods created + # will be public, even if this method is called with a private or protected + # access modifier. + # + # module HairColors + # mattr_writer :hair_colors + # end + # + # class Person + # include HairColors + # end + # + # HairColors.hair_colors = [:brown, :black] + # Person.class_variable_get("@@hair_colors") # => [:brown, :black] + # Person.new.hair_colors = [:blonde, :red] + # HairColors.class_variable_get("@@hair_colors") # => [:blonde, :red] + # + # To omit the instance writer method, pass + # <tt>instance_writer: false</tt> or <tt>instance_accessor: false</tt>. + # + # module HairColors + # mattr_writer :hair_colors, instance_writer: false + # end + # + # class Person + # include HairColors + # end + # + # Person.new.hair_colors = [:blonde, :red] # => NoMethodError + # + # You can set a default value for the attribute. + # + # module HairColors + # mattr_writer :hair_colors, default: [:brown, :black, :blonde, :red] + # end + # + # class Person + # include HairColors + # end + # + # Person.class_variable_get("@@hair_colors") # => [:brown, :black, :blonde, :red] + # + # @raise [TypeError] + # + # source://activesupport//lib/active_support/core_ext/module/attribute_accessors.rb#117 + def mattr_writer(*syms, instance_writer: T.unsafe(nil), instance_accessor: T.unsafe(nil), default: T.unsafe(nil), location: T.unsafe(nil)); end + + # source://activesupport//lib/active_support/core_ext/module/redefine_method.rb#30 + def method_visibility(method); end + + # Replaces the existing method definition, if there is one, with the passed + # block as its body. + # + # source://activesupport//lib/active_support/core_ext/module/redefine_method.rb#17 + def redefine_method(method, &block); end + + # Replaces the existing singleton method definition, if there is one, with + # the passed block as its body. + # + # source://activesupport//lib/active_support/core_ext/module/redefine_method.rb#26 + def redefine_singleton_method(method, &block); end + + # 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 +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) + +class NameError < ::StandardError + include ::ErrorHighlight::CoreExt + include ::DidYouMean::Correctable +end + +# source://activesupport//lib/active_support/core_ext/object/blank.rb#50 +class NilClass + # source://activesupport//lib/active_support/core_ext/object/json.rb#87 + def as_json(options = T.unsafe(nil)); end + + # +nil+ is blank: + # + # nil.blank? # => true + # + # @return [true] + # + # source://activesupport//lib/active_support/core_ext/object/blank.rb#56 + def blank?; end +end + +# source://activesupport//lib/active_support/core_ext/object/blank.rb#134 +class Numeric + include ::Comparable + + # source://activesupport//lib/active_support/core_ext/object/json.rb#105 + def as_json(options = T.unsafe(nil)); end + + # No number is blank: + # + # 1.blank? # => false + # 0.blank? # => false + # + # @return [false] + # + # source://activesupport//lib/active_support/core_ext/object/blank.rb#141 + def blank?; end +end + +# -- +# Most objects are cloneable, but not all. For example you can't dup methods: +# +# method(:puts).dup # => TypeError: allocator undefined for Method +# +# Classes may signal their instances are not duplicable removing +dup+/+clone+ +# or raising exceptions from them. So, to dup an arbitrary object you normally +# use an optimistic approach and are ready to catch an exception, say: +# +# arbitrary_object.dup rescue object +# +# Rails dups objects in a few critical spots where they are not that arbitrary. +# That rescue is very expensive (like 40 times slower than a predicate), and it +# is often triggered. +# +# That's why we hardcode the following cases and check duplicable? instead of +# using that rescue idiom. +# ++ +# +# source://activesupport//lib/active_support/core_ext/object/instance_variables.rb#3 +class Object < ::BasicObject + include ::ActiveSupport::ToJsonWithActiveSupportEncoder + include ::Kernel + include ::PP::ObjectMixin + + # source://activesupport//lib/active_support/core_ext/object/json.rb#59 + def as_json(options = T.unsafe(nil)); end + + # An object is blank if it's false, empty, or a whitespace string. + # For example, +nil+, '', ' ', [], {}, and +false+ are all blank. + # + # This simplifies + # + # !address || address.empty? + # + # to + # + # address.blank? + # + # @return [true, false] + # + # source://activesupport//lib/active_support/core_ext/object/blank.rb#18 + def blank?; end + + # Returns a hash with string keys that maps instance variable names without "@" to their + # corresponding values. + # + # class C + # def initialize(x, y) + # @x, @y = x, y + # end + # end + # + # C.new(0, 1).instance_values # => {"x" => 0, "y" => 1} + # + # source://activesupport//lib/active_support/core_ext/object/instance_variables.rb#14 + def instance_values; end + + # Returns an array of instance variable names as strings including "@". + # + # class C + # def initialize(x, y) + # @x, @y = x, y + # end + # end + # + # C.new(0, 1).instance_variable_names # => ["@y", "@x"] + # + # source://activesupport//lib/active_support/core_ext/object/instance_variables.rb#27 + def instance_variable_names; end + + # Returns the receiver if it's present otherwise returns +nil+. + # <tt>object.presence</tt> is equivalent to + # + # object.present? ? object : nil + # + # For example, something like + # + # state = params[:state] if params[:state].present? + # country = params[:country] if params[:country].present? + # region = state || country || 'US' + # + # becomes + # + # region = params[:state].presence || params[:country].presence || 'US' + # + # @return [Object] + # + # source://activesupport//lib/active_support/core_ext/object/blank.rb#45 + def presence; end + + # An object is present if it's not blank. + # + # @return [true, false] + # + # source://activesupport//lib/active_support/core_ext/object/blank.rb#25 + def present?; end +end + +# source://activesupport//lib/active_support/core_ext/object/json.rb#222 +class Pathname + # source://activesupport//lib/active_support/core_ext/object/json.rb#223 + def as_json(options = T.unsafe(nil)); end +end + +# source://activesupport//lib/active_support/core_ext/object/json.rb#234 +class Process::Status + # source://activesupport//lib/active_support/core_ext/object/json.rb#235 + def as_json(options = T.unsafe(nil)); end +end + +# source://activesupport//lib/active_support/core_ext/object/json.rb#151 +class Range + include ::Enumerable + + # source://activesupport//lib/active_support/core_ext/object/json.rb#152 + def as_json(options = T.unsafe(nil)); end +end + +# source://activesupport//lib/active_support/core_ext/object/json.rb#133 +class Regexp + # source://activesupport//lib/active_support/core_ext/object/json.rb#134 + def as_json(options = T.unsafe(nil)); end +end + +class Regexp::TimeoutError < ::RegexpError; end + +# String inflections define new methods on the String class to transform names for different purposes. +# For instance, you can figure out the name of a table from the name of a class. +# +# 'ScaleScore'.tableize # => "scale_scores" +# +# source://activesupport//lib/active_support/core_ext/object/blank.rb#103 +class String + include ::Comparable + + # source://activesupport//lib/active_support/core_ext/object/json.rb#93 + def as_json(options = T.unsafe(nil)); end + + # A string is blank if it's empty or contains whitespaces only: + # + # ''.blank? # => true + # ' '.blank? # => true + # "\t\n\r".blank? # => true + # ' blah '.blank? # => false + # + # Unicode whitespace is supported: + # + # "\u00a0".blank? # => true + # + # @return [true, false] + # + # source://activesupport//lib/active_support/core_ext/object/blank.rb#121 + def blank?; end +end + +# source://activesupport//lib/active_support/core_ext/object/blank.rb#104 +String::BLANK_RE = T.let(T.unsafe(nil), Regexp) + +# source://activesupport//lib/active_support/core_ext/object/blank.rb#105 +String::ENCODED_BLANKS = T.let(T.unsafe(nil), Concurrent::Map) + +# source://activesupport//lib/active_support/core_ext/object/json.rb#68 +class Struct + include ::Enumerable + + # source://activesupport//lib/active_support/core_ext/object/json.rb#69 + def as_json(options = T.unsafe(nil)); end +end + +# source://activesupport//lib/active_support/core_ext/object/json.rb#98 +class Symbol + include ::Comparable + + # source://activesupport//lib/active_support/core_ext/object/json.rb#99 + def as_json(options = T.unsafe(nil)); end +end + +# source://activesupport//lib/active_support/core_ext/object/blank.rb#146 +class Time + include ::Comparable + + # source://activesupport//lib/active_support/core_ext/object/json.rb#187 + def as_json(options = T.unsafe(nil)); end + + # No Time is blank: + # + # Time.now.blank? # => false + # + # @return [false] + # + # source://activesupport//lib/active_support/core_ext/object/blank.rb#152 + def blank?; end + + # 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 + def formatted_offset(colon = T.unsafe(nil), alternate_utc_string = T.unsafe(nil)); end + + # Converts to a formatted string. See DATE_FORMATS for built-in formats. + # + # This method is aliased to <tt>to_formatted_s</tt>. + # + # time = Time.now # => 2007-01-18 06:10:17 -06:00 + # + # time.to_fs(:time) # => "06:10" + # time.to_formatted_s(:time) # => "06:10" + # + # time.to_fs(:db) # => "2007-01-18 06:10:17" + # time.to_fs(:number) # => "20070118061017" + # time.to_fs(:short) # => "18 Jan 06:10" + # time.to_fs(:long) # => "January 18, 2007 06:10" + # time.to_fs(:long_ordinal) # => "January 18th, 2007 06:10" + # time.to_fs(:rfc822) # => "Thu, 18 Jan 2007 06:10:17 -0600" + # time.to_fs(:iso8601) # => "2007-01-18T06:10:17-06:00" + # + # == Adding your own time formats to +to_fs+ + # You can add your own formats to the Time::DATE_FORMATS hash. + # Use the format name as the hash key and either a strftime string + # or Proc instance that takes a time argument as the value. + # + # # config/initializers/time_formats.rb + # Time::DATE_FORMATS[:month_and_year] = '%B %Y' + # Time::DATE_FORMATS[:short_ordinal] = ->(time) { time.strftime("%B #{time.day.ordinalize}") } + # + # source://activesupport//lib/active_support/core_ext/time/conversions.rb#53 + def to_formatted_s(format = T.unsafe(nil)); end + + # Converts to a formatted string. See DATE_FORMATS for built-in formats. + # + # This method is aliased to <tt>to_formatted_s</tt>. + # + # time = Time.now # => 2007-01-18 06:10:17 -06:00 + # + # time.to_fs(:time) # => "06:10" + # time.to_formatted_s(:time) # => "06:10" + # + # time.to_fs(:db) # => "2007-01-18 06:10:17" + # time.to_fs(:number) # => "20070118061017" + # time.to_fs(:short) # => "18 Jan 06:10" + # time.to_fs(:long) # => "January 18, 2007 06:10" + # time.to_fs(:long_ordinal) # => "January 18th, 2007 06:10" + # time.to_fs(:rfc822) # => "Thu, 18 Jan 2007 06:10:17 -0600" + # time.to_fs(:iso8601) # => "2007-01-18T06:10:17-06:00" + # + # == Adding your own time formats to +to_fs+ + # You can add your own formats to the Time::DATE_FORMATS hash. + # Use the format name as the hash key and either a strftime string + # or Proc instance that takes a time argument as the value. + # + # # config/initializers/time_formats.rb + # Time::DATE_FORMATS[:month_and_year] = '%B %Y' + # Time::DATE_FORMATS[:short_ordinal] = ->(time) { time.strftime("%B #{time.day.ordinalize}") } + # + # source://activesupport//lib/active_support/core_ext/time/conversions.rb#53 + def to_fs(format = T.unsafe(nil)); end +end + +# source://activesupport//lib/active_support/core_ext/time/conversions.rb#8 +Time::DATE_FORMATS = T.let(T.unsafe(nil), Hash) + +# source://activesupport//lib/active_support/core_ext/object/blank.rb#72 +class TrueClass + # source://activesupport//lib/active_support/core_ext/object/json.rb#75 + def as_json(options = T.unsafe(nil)); end + + # +true+ is not blank: + # + # true.blank? # => false + # + # @return [false] + # + # source://activesupport//lib/active_support/core_ext/object/blank.rb#78 + def blank?; end +end + +# source://activesupport//lib/active_support/core_ext/object/json.rb#216 +class URI::Generic + include ::URI::RFC2396_REGEXP + include ::URI + + # source://activesupport//lib/active_support/core_ext/object/json.rb#217 + def as_json(options = T.unsafe(nil)); end +end diff --git a/sorbet/rbi/gems/minitest@5.18.1.rbi b/sorbet/rbi/gems/minitest@5.18.1.rbi new file mode 100644 index 0000000..fb99ee8 --- /dev/null +++ b/sorbet/rbi/gems/minitest@5.18.1.rbi @@ -0,0 +1,8 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `minitest` gem. +# Please instead update this file by running `bin/tapioca gem minitest`. + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/rack@3.0.8.rbi b/sorbet/rbi/gems/rack@3.0.8.rbi new file mode 100644 index 0000000..d6a4eac --- /dev/null +++ b/sorbet/rbi/gems/rack@3.0.8.rbi @@ -0,0 +1,5183 @@ +# 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 <tt>autoload</tt>ed here, +# so it should be enough just to <tt>require 'rack'</tt> 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#31 + def release; end + + # The Rack protocol version number implemented. + # + # source://rack//lib/rack/version.rb#23 + def version; end + end +end + +# source://rack//lib/rack.rb#65 +module Rack::Auth; end + +# Rack::Auth::AbstractHandler implements common authentication functionality. +# +# +realm+ should be set for all handlers. +# +# source://rack//lib/rack/auth/abstract/handler.rb#11 +class Rack::Auth::AbstractHandler + # @return [AbstractHandler] a new instance of AbstractHandler + # + # source://rack//lib/rack/auth/abstract/handler.rb#15 + def initialize(app, realm = T.unsafe(nil), &authenticator); end + + # Returns the value of attribute realm. + # + # source://rack//lib/rack/auth/abstract/handler.rb#13 + def realm; end + + # Sets the attribute realm + # + # @param value the value to set the attribute realm to. + # + # source://rack//lib/rack/auth/abstract/handler.rb#13 + def realm=(_arg0); end + + private + + # source://rack//lib/rack/auth/abstract/handler.rb#31 + def bad_request; end + + # source://rack//lib/rack/auth/abstract/handler.rb#22 + def unauthorized(www_authenticate = T.unsafe(nil)); end +end + +# source://rack//lib/rack/auth/abstract/request.rb#7 +class Rack::Auth::AbstractRequest + # @return [AbstractRequest] a new instance of AbstractRequest + # + # source://rack//lib/rack/auth/abstract/request.rb#9 + def initialize(env); end + + # source://rack//lib/rack/auth/abstract/request.rb#33 + def params; end + + # source://rack//lib/rack/auth/abstract/request.rb#25 + def parts; end + + # @return [Boolean] + # + # source://rack//lib/rack/auth/abstract/request.rb#17 + def provided?; end + + # source://rack//lib/rack/auth/abstract/request.rb#13 + def request; end + + # source://rack//lib/rack/auth/abstract/request.rb#29 + def scheme; end + + # @return [Boolean] + # + # source://rack//lib/rack/auth/abstract/request.rb#21 + def valid?; end + + private + + # source://rack//lib/rack/auth/abstract/request.rb#42 + def authorization_key; end +end + +# source://rack//lib/rack/auth/abstract/request.rb#40 +Rack::Auth::AbstractRequest::AUTHORIZATION_KEYS = T.let(T.unsafe(nil), Array) + +# Rack::Auth::Basic implements HTTP Basic Authentication, as per RFC 2617. +# +# Initialize with the Rack application that you want protecting, +# and a block that checks if a username and password pair are valid. +# +# source://rack//lib/rack/auth/basic.rb#14 +class Rack::Auth::Basic < ::Rack::Auth::AbstractHandler + # source://rack//lib/rack/auth/basic.rb#16 + def call(env); end + + private + + # source://rack//lib/rack/auth/basic.rb#35 + def challenge; end + + # @return [Boolean] + # + # source://rack//lib/rack/auth/basic.rb#39 + def valid?(auth); end +end + +# source://rack//lib/rack/auth/basic.rb#43 +class Rack::Auth::Basic::Request < ::Rack::Auth::AbstractRequest + # @return [Boolean] + # + # source://rack//lib/rack/auth/basic.rb#44 + def basic?; end + + # source://rack//lib/rack/auth/basic.rb#48 + def credentials; end + + # source://rack//lib/rack/auth/basic.rb#52 + def username; end +end + +# source://rack//lib/rack/auth/digest.rb#12 +module Rack::Auth::Digest; end + +# Rack::Auth::Digest::MD5 implements the MD5 algorithm version of +# HTTP Digest Authentication, as per RFC 2617. +# +# Initialize with the [Rack] application that you want protecting, +# and a block that looks up a plaintext password for a given username. +# +# +opaque+ needs to be set to a constant base64/hexadecimal string. +# +# source://rack//lib/rack/auth/digest.rb#144 +class Rack::Auth::Digest::MD5 < ::Rack::Auth::AbstractHandler + # @return [MD5] a new instance of MD5 + # + # source://rack//lib/rack/auth/digest.rb#150 + def initialize(app, realm = T.unsafe(nil), opaque = T.unsafe(nil), &authenticator); end + + # source://rack//lib/rack/auth/digest.rb#163 + def call(env); end + + # Returns the value of attribute opaque. + # + # source://rack//lib/rack/auth/digest.rb#146 + def opaque; end + + # Sets the attribute opaque + # + # @param value the value to set the attribute opaque to. + # + # source://rack//lib/rack/auth/digest.rb#146 + def opaque=(_arg0); end + + # Sets the attribute passwords_hashed + # + # @param value the value to set the attribute passwords_hashed to. + # + # source://rack//lib/rack/auth/digest.rb#148 + def passwords_hashed=(_arg0); end + + # @return [Boolean] + # + # source://rack//lib/rack/auth/digest.rb#159 + def passwords_hashed?; end + + private + + # source://rack//lib/rack/auth/digest.rb#238 + def A1(auth, password); end + + # source://rack//lib/rack/auth/digest.rb#242 + def A2(auth); end + + # source://rack//lib/rack/auth/digest.rb#228 + def H(data); end + + # source://rack//lib/rack/auth/digest.rb#234 + def KD(secret, data); end + + # source://rack//lib/rack/auth/digest.rb#203 + def challenge(hash = T.unsafe(nil)); end + + # source://rack//lib/rack/auth/digest.rb#246 + def digest(auth, password); end + + # source://rack//lib/rack/auth/digest.rb#228 + def md5(data); end + + # source://rack//lib/rack/auth/digest.rb#192 + def params(hash = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rack//lib/rack/auth/digest.rb#207 + def valid?(auth); end + + # @return [Boolean] + # + # source://rack//lib/rack/auth/digest.rb#223 + def valid_digest?(auth); end + + # @return [Boolean] + # + # source://rack//lib/rack/auth/digest.rb#219 + def valid_nonce?(auth); end + + # @return [Boolean] + # + # source://rack//lib/rack/auth/digest.rb#215 + def valid_opaque?(auth); end + + # @return [Boolean] + # + # source://rack//lib/rack/auth/digest.rb#211 + def valid_qop?(auth); end +end + +# source://rack//lib/rack/auth/digest.rb#190 +Rack::Auth::Digest::MD5::QOP = T.let(T.unsafe(nil), String) + +# Rack::Auth::Digest::Nonce is the default nonce generator for the +# Rack::Auth::Digest::MD5 authentication handler. +# +# +private_key+ needs to set to a constant string. +# +# +time_limit+ can be optionally set to an integer (number of seconds), +# to limit the validity of the generated nonces. +# +# source://rack//lib/rack/auth/digest.rb#21 +class Rack::Auth::Digest::Nonce + # @return [Nonce] a new instance of Nonce + # + # source://rack//lib/rack/auth/digest.rb#31 + def initialize(timestamp = T.unsafe(nil), given_digest = T.unsafe(nil)); end + + # source://rack//lib/rack/auth/digest.rb#39 + def digest; end + + # @return [Boolean] + # + # source://rack//lib/rack/auth/digest.rb#51 + def fresh?; end + + # @return [Boolean] + # + # source://rack//lib/rack/auth/digest.rb#47 + def stale?; end + + # source://rack//lib/rack/auth/digest.rb#35 + def to_s; end + + # @return [Boolean] + # + # source://rack//lib/rack/auth/digest.rb#43 + def valid?; end + + class << self + # source://rack//lib/rack/auth/digest.rb#27 + def parse(string); end + + # Returns the value of attribute private_key. + # + # source://rack//lib/rack/auth/digest.rb#24 + def private_key; end + + # Sets the attribute private_key + # + # @param value the value to set the attribute private_key to. + # + # source://rack//lib/rack/auth/digest.rb#24 + def private_key=(_arg0); end + + # Returns the value of attribute time_limit. + # + # source://rack//lib/rack/auth/digest.rb#24 + def time_limit; end + + # Sets the attribute time_limit + # + # @param value the value to set the attribute time_limit to. + # + # source://rack//lib/rack/auth/digest.rb#24 + def time_limit=(_arg0); end + end +end + +# source://rack//lib/rack/auth/digest.rb#57 +class Rack::Auth::Digest::Params < ::Hash + # @return [Params] a new instance of Params + # @yield [_self] + # @yieldparam _self [Rack::Auth::Digest::Params] the object that the method was called on + # + # source://rack//lib/rack/auth/digest.rb#76 + def initialize; end + + # source://rack//lib/rack/auth/digest.rb#82 + def [](k); end + + # source://rack//lib/rack/auth/digest.rb#86 + def []=(k, v); end + + # From WEBrick::HTTPUtils + # + # source://rack//lib/rack/auth/digest.rb#98 + def quote(str); end + + # source://rack//lib/rack/auth/digest.rb#92 + def to_s; end + + class << self + # From WEBrick::HTTPUtils + # + # source://rack//lib/rack/auth/digest.rb#66 + def dequote(str); end + + # source://rack//lib/rack/auth/digest.rb#59 + def parse(str); end + + # source://rack//lib/rack/auth/digest.rb#72 + def split_header_value(str); end + end +end + +# source://rack//lib/rack/auth/digest.rb#90 +Rack::Auth::Digest::Params::UNQUOTED = T.let(T.unsafe(nil), Array) + +# source://rack//lib/rack/auth/digest.rb#104 +class Rack::Auth::Digest::Request < ::Rack::Auth::AbstractRequest + # @return [Boolean] + # + # source://rack//lib/rack/auth/digest.rb#113 + def correct_uri?; end + + # @return [Boolean] + # + # source://rack//lib/rack/auth/digest.rb#109 + def digest?; end + + # source://rack//lib/rack/auth/digest.rb#105 + def method; end + + # @raise [ArgumentError] + # + # source://rack//lib/rack/auth/digest.rb#129 + def method_missing(sym, *args); end + + # source://rack//lib/rack/auth/digest.rb#117 + def nonce; end + + # source://rack//lib/rack/auth/digest.rb#121 + def params; end + + # @return [Boolean] + # + # source://rack//lib/rack/auth/digest.rb#125 + def respond_to?(sym, *_arg1); end +end + +# Proxy for response bodies allowing calling a block when +# the response body is closed (after the response has been fully +# sent to the client). +# +# source://rack//lib/rack/body_proxy.rb#7 +class Rack::BodyProxy + # Set the response body to wrap, and the block to call when the + # response has been fully sent. + # + # @return [BodyProxy] a new instance of BodyProxy + # + # source://rack//lib/rack/body_proxy.rb#10 + def initialize(body, &block); end + + # If not already closed, close the wrapped body and + # then call the block the proxy was initialized with. + # + # source://rack//lib/rack/body_proxy.rb#23 + def close; end + + # Whether the proxy is closed. The proxy starts as not closed, + # and becomes closed on the first call to close. + # + # @return [Boolean] + # + # source://rack//lib/rack/body_proxy.rb#35 + def closed?; end + + # Delegate missing methods to the wrapped body. + # + # source://rack//lib/rack/body_proxy.rb#40 + def method_missing(method_name, *args, **_arg2, &block); end + + private + + # Return whether the wrapped body responds to the method. + # + # @return [Boolean] + # + # source://rack//lib/rack/body_proxy.rb#17 + def respond_to_missing?(method_name, include_all = T.unsafe(nil)); end +end + +# Rack::Builder provides a domain-specific language (DSL) to construct Rack +# applications. It is primarily used to parse +config.ru+ files which +# instantiate several middleware and a final application which are hosted +# by a Rack-compatible web server. +# +# Example: +# +# app = Rack::Builder.new do +# use Rack::CommonLogger +# map "/ok" do +# run lambda { |env| [200, {'content-type' => 'text/plain'}, ['OK']] } +# end +# end +# +# run app +# +# Or +# +# app = Rack::Builder.app do +# use Rack::CommonLogger +# run lambda { |env| [200, {'content-type' => 'text/plain'}, ['OK']] } +# end +# +# run app +# +# +use+ adds middleware to the stack, +run+ dispatches to an application. +# You can use +map+ to construct a Rack::URLMap in a convenient way. +# +# source://rack//lib/rack/builder.rb#33 +class Rack::Builder + # Initialize a new Rack::Builder instance. +default_app+ specifies the + # default application if +run+ is not called later. If a block + # is given, it is evaluated in the context of the instance. + # + # @return [Builder] a new instance of Builder + # + # source://rack//lib/rack/builder.rb#111 + def initialize(default_app = T.unsafe(nil), &block); end + + # Call the Rack application generated by this builder instance. Note that + # this rebuilds the Rack application and runs the warmup code (if any) + # every time it is called, so it should not be used if performance is important. + # + # source://rack//lib/rack/builder.rb#263 + def call(env); end + + # Freeze the app (set using run) and all middleware instances when building the application + # in to_app. + # + # source://rack//lib/rack/builder.rb#246 + def freeze_app; end + + # Creates a route within the application. Routes under the mapped path will be sent to + # the Rack application specified by run inside the block. Other requests will be sent to the + # default application specified by run outside the block. + # + # class App + # def call(env) + # [200, {'content-type' => 'text/plain'}, ["Hello World"]] + # end + # end + # + # class Heartbeat + # def call(env) + # [200, { "content-type" => "text/plain" }, ["OK"]] + # end + # end + # + # app = Rack::Builder.app do + # map '/heartbeat' do + # run Heartbeat.new + # end + # run App.new + # end + # + # run app + # + # The +use+ method can also be used inside the block to specify middleware to run under a specific path: + # + # app = Rack::Builder.app do + # map '/heartbeat' do + # use Middleware + # run Heartbeat.new + # end + # run App.new + # end + # + # This example includes a piece of middleware which will run before +/heartbeat+ requests hit +Heartbeat+. + # + # Note that providing a +path+ of +/+ will ignore any default application given in a +run+ statement + # outside the block. + # + # source://rack//lib/rack/builder.rb#239 + def map(path, &block); end + + # Takes a block or argument that is an object that responds to #call and + # returns a Rack response. + # + # You can use a block: + # + # run do |env| + # [200, { "content-type" => "text/plain" }, ["Hello World!"]] + # end + # + # You can also provide a lambda: + # + # run lambda { |env| [200, { "content-type" => "text/plain" }, ["OK"]] } + # + # You can also provide a class instance: + # + # class Heartbeat + # def call(env) + # [200, { "content-type" => "text/plain" }, ["OK"]] + # end + # end + # + # run Heartbeat.new + # + # @raise [ArgumentError] + # + # source://rack//lib/rack/builder.rb#180 + def run(app = T.unsafe(nil), &block); end + + # Return the Rack application generated by this instance. + # + # source://rack//lib/rack/builder.rb#251 + def to_app; end + + # Specifies middleware to use in a stack. + # + # class Middleware + # def initialize(app) + # @app = app + # end + # + # def call(env) + # env["rack.some_header"] = "setting an example" + # @app.call(env) + # end + # end + # + # use Middleware + # run lambda { |env| [200, { "content-type" => "text/plain" }, ["OK"]] } + # + # All requests through to this application will first be processed by the middleware class. + # The +call+ method in this example sets an additional environment key which then can be + # referenced in the application if required. + # + # source://rack//lib/rack/builder.rb#146 + def use(middleware, *args, **_arg2, &block); end + + # Takes a lambda or block that is used to warm-up the application. This block is called + # before the Rack application is returned by to_app. + # + # warmup do |app| + # client = Rack::MockRequest.new(app) + # client.get('/') + # end + # + # use SomeMiddleware + # run MyApp + # + # source://rack//lib/rack/builder.rb#196 + def warmup(prc = T.unsafe(nil), &block); end + + private + + # Generate a URLMap instance by generating new Rack applications for each + # map block in this instance. + # + # source://rack//lib/rack/builder.rb#271 + def generate_map(default_app, mapping); end + + class << self + # Create a new Rack::Builder instance and return the Rack application + # generated from it. + # + # source://rack//lib/rack/builder.rb#123 + def app(default_app = T.unsafe(nil), &block); end + + # Load the given file as a rackup file, treating the + # contents as if specified inside a Rack::Builder block. + # + # Ignores content in the file after +__END__+, so that + # use of +__END__+ will not result in a syntax error. + # + # Example config.ru file: + # + # $ cat config.ru + # + # use Rack::ContentLength + # require './app.rb' + # run App + # + # source://rack//lib/rack/builder.rb#84 + def load_file(path); end + + # Evaluate the given +builder_script+ string in the context of + # a Rack::Builder block, returning a Rack application. + # + # source://rack//lib/rack/builder.rb#99 + def new_from_string(builder_script, file = T.unsafe(nil)); end + + # Parse the given config file to get a Rack application. + # + # If the config file ends in +.ru+, it is treated as a + # rackup file and the contents will be treated as if + # specified inside a Rack::Builder block. + # + # If the config file does not end in +.ru+, it is + # required and Rack will use the basename of the file + # to guess which constant will be the Rack application to run. + # + # Examples: + # + # Rack::Builder.parse_file('config.ru') + # # Rack application built using Rack::Builder.new + # + # Rack::Builder.parse_file('app.rb') + # # requires app.rb, which can be anywhere in Ruby's + # # load path. After requiring, assumes App constant + # # contains Rack application + # + # Rack::Builder.parse_file('./my_app.rb') + # # requires ./my_app.rb, which should be in the + # # process's current directory. After requiring, + # # assumes MyApp constant contains Rack application + # + # source://rack//lib/rack/builder.rb#62 + def parse_file(path); end + end +end + +# https://stackoverflow.com/questions/2223882/whats-the-difference-between-utf-8-and-utf-8-without-bom +# +# source://rack//lib/rack/builder.rb#36 +Rack::Builder::UTF_8_BOM = T.let(T.unsafe(nil), String) + +# Response Header Keys +# +# source://rack//lib/rack/constants.rb#19 +Rack::CACHE_CONTROL = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#20 +Rack::CONTENT_LENGTH = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#21 +Rack::CONTENT_TYPE = T.let(T.unsafe(nil), String) + +# Rack::Cascade tries a request on several apps, and returns the +# first response that is not 404 or 405 (or in a list of configured +# status codes). If all applications tried return one of the configured +# status codes, return the last response. +# +# source://rack//lib/rack/cascade.rb#11 +class Rack::Cascade + # Set the apps to send requests to, and what statuses result in + # cascading. Arguments: + # + # apps: An enumerable of rack applications. + # cascade_for: The statuses to use cascading for. If a response is received + # from an app, the next app is tried. + # + # @return [Cascade] a new instance of Cascade + # + # source://rack//lib/rack/cascade.rb#24 + def initialize(apps, cascade_for = T.unsafe(nil)); end + + # Append an app to the list of apps to cascade. This app will + # be tried last. + # + # source://rack//lib/rack/cascade.rb#59 + def <<(app); end + + # Append an app to the list of apps to cascade. This app will + # be tried last. + # + # source://rack//lib/rack/cascade.rb#59 + def add(app); end + + # An array of applications to try in order. + # + # source://rack//lib/rack/cascade.rb#16 + def apps; end + + # Call each app in order. If the responses uses a status that requires + # cascading, try the next app. If all responses require cascading, + # return the response from the last app. + # + # source://rack//lib/rack/cascade.rb#35 + def call(env); end + + # Whether the given app is one of the apps to cascade to. + # + # @return [Boolean] + # + # source://rack//lib/rack/cascade.rb#64 + def include?(app); end +end + +# deprecated, no longer used +# +# source://rack//lib/rack/cascade.rb#13 +Rack::Cascade::NotFound = T.let(T.unsafe(nil), Array) + +# Middleware that applies chunked transfer encoding to response bodies +# when the response does not include a content-length header. +# +# This supports the trailer response header to allow the use of trailing +# headers in the chunked encoding. However, using this requires you manually +# specify a response body that supports a +trailers+ method. Example: +# +# [200, { 'trailer' => 'expires'}, ["Hello", "World"]] +# # error raised +# +# body = ["Hello", "World"] +# def body.trailers +# { 'expires' => Time.now.to_s } +# end +# [200, { 'trailer' => 'expires'}, body] +# # No exception raised +# +# source://rack//lib/rack/chunked.rb#25 +class Rack::Chunked + include ::Rack::Utils + + # @return [Chunked] a new instance of Chunked + # + # source://rack//lib/rack/chunked.rb#82 + def initialize(app); end + + # If the rack app returns a response that should have a body, + # but does not have content-length or transfer-encoding headers, + # modify the response to use chunked transfer-encoding. + # + # source://rack//lib/rack/chunked.rb#101 + def call(env); end + + # Whether the HTTP version supports chunked encoding (HTTP 1.1 does). + # + # @return [Boolean] + # + # source://rack//lib/rack/chunked.rb#87 + def chunkable_version?(ver); end +end + +# A body wrapper that emits chunked responses. +# +# source://rack//lib/rack/chunked.rb#29 +class Rack::Chunked::Body + # Store the response body to be chunked. + # + # @return [Body] a new instance of Body + # + # source://rack//lib/rack/chunked.rb#34 + def initialize(body); end + + # Close the response body if the response body supports it. + # + # source://rack//lib/rack/chunked.rb#54 + def close; end + + # For each element yielded by the response body, yield + # the element in chunked encoding. + # + # @yield [TAIL] + # + # source://rack//lib/rack/chunked.rb#40 + def each(&block); end + + private + + # Do nothing as this class does not support trailer headers. + # + # source://rack//lib/rack/chunked.rb#61 + def yield_trailers; end +end + +# source://rack//lib/rack/chunked.rb#31 +Rack::Chunked::Body::TAIL = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/chunked.rb#30 +Rack::Chunked::Body::TERM = T.let(T.unsafe(nil), String) + +# A body wrapper that emits chunked responses and also supports +# sending Trailer headers. Note that the response body provided to +# initialize must have a +trailers+ method that returns a hash +# of trailer headers, and the rack response itself should have a +# Trailer header listing the headers that the +trailers+ method +# will return. +# +# source://rack//lib/rack/chunked.rb#71 +class Rack::Chunked::TrailerBody < ::Rack::Chunked::Body + private + + # Yield strings for each trailer header. + # + # source://rack//lib/rack/chunked.rb#75 + def yield_trailers; end +end + +# Rack::CommonLogger forwards every request to the given +app+, and +# logs a line in the +# {Apache common log format}[http://httpd.apache.org/docs/1.3/logs.html#common] +# to the configured logger. +# +# source://rack//lib/rack/common_logger.rb#13 +class Rack::CommonLogger + # +logger+ can be any object that supports the +write+ or +<<+ methods, + # which includes the standard library Logger. These methods are called + # with a single string argument, the log message. + # If +logger+ is nil, CommonLogger will fall back <tt>env['rack.errors']</tt>. + # + # @return [CommonLogger] a new instance of CommonLogger + # + # source://rack//lib/rack/common_logger.rb#29 + def initialize(app, logger = T.unsafe(nil)); end + + # Log all requests in common_log format after a response has been + # returned. Note that if the app raises an exception, the request + # will not be logged, so if exception handling middleware are used, + # they should be loaded after this middleware. Additionally, because + # the logging happens after the request body has been fully sent, any + # exceptions raised during the sending of the response body will + # cause the request not to be logged. + # + # source://rack//lib/rack/common_logger.rb#41 + def call(env); end + + private + + # Attempt to determine the content length for the response to + # include it in the logged data. + # + # source://rack//lib/rack/common_logger.rb#83 + def extract_content_length(headers); end + + # Log the request to the configured logger. + # + # source://rack//lib/rack/common_logger.rb#52 + def log(env, status, response_headers, began_at); end +end + +# Common Log Format: http://httpd.apache.org/docs/1.3/logs.html#common +# +# lilith.local - - [07/Aug/2006 23:58:02 -0400] "GET / HTTP/1.1" 500 - +# +# %{%s - %s [%s] "%s %s%s %s" %d %s\n} % +# +# The actual format is slightly different than the above due to the +# separation of SCRIPT_NAME and PATH_INFO, and because the elapsed +# time in seconds is included at the end. +# +# source://rack//lib/rack/common_logger.rb#23 +Rack::CommonLogger::FORMAT = T.let(T.unsafe(nil), String) + +# Middleware that enables conditional GET using if-none-match and +# if-modified-since. The application should set either or both of the +# last-modified or etag response headers according to RFC 2616. When +# either of the conditions is met, the response body is set to be zero +# length and the response status is set to 304 Not Modified. +# +# Applications that defer response body generation until the body's each +# message is received will avoid response body generation completely when +# a conditional GET matches. +# +# Adapted from Michael Klishin's Merb implementation: +# https://github.com/wycats/merb/blob/master/merb-core/lib/merb-core/rack/middleware/conditional_get.rb +# +# source://rack//lib/rack/conditional_get.rb#21 +class Rack::ConditionalGet + # @return [ConditionalGet] a new instance of ConditionalGet + # + # source://rack//lib/rack/conditional_get.rb#22 + def initialize(app); end + + # Return empty 304 response if the response has not been + # modified since the last request. + # + # source://rack//lib/rack/conditional_get.rb#28 + def call(env); end + + private + + # Whether the etag response header matches the if-none-match request header. + # If so, the request has not been modified. + # + # @return [Boolean] + # + # source://rack//lib/rack/conditional_get.rb#62 + def etag_matches?(none_match, headers); end + + # Return whether the response has not been modified since the + # last request. + # + # @return [Boolean] + # + # source://rack//lib/rack/conditional_get.rb#51 + def fresh?(env, headers); end + + # Whether the last-modified response header matches the if-modified-since + # request header. If so, the request has not been modified. + # + # @return [Boolean] + # + # source://rack//lib/rack/conditional_get.rb#68 + def modified_since?(modified_since, headers); end + + # Return a Time object for the given string (which should be in RFC2822 + # format), or nil if the string cannot be parsed. + # + # source://rack//lib/rack/conditional_get.rb#75 + def to_rfc2822(since); end +end + +# Rack::Config modifies the environment using the block given during +# initialization. +# +# Example: +# use Rack::Config do |env| +# env['my-key'] = 'some-value' +# end +# +# source://rack//lib/rack/config.rb#11 +class Rack::Config + # @return [Config] a new instance of Config + # + # source://rack//lib/rack/config.rb#12 + def initialize(app, &block); end + + # source://rack//lib/rack/config.rb#17 + def call(env); end +end + +# Sets the content-length header on responses that do not specify +# a content-length or transfer-encoding header. Note that this +# does not fix responses that have an invalid content-length +# header specified. +# +# source://rack//lib/rack/content_length.rb#12 +class Rack::ContentLength + include ::Rack::Utils + + # @return [ContentLength] a new instance of ContentLength + # + # source://rack//lib/rack/content_length.rb#15 + def initialize(app); end + + # source://rack//lib/rack/content_length.rb#19 + def call(env); end +end + +# Sets the content-type header on responses which don't have one. +# +# Builder Usage: +# use Rack::ContentType, "text/plain" +# +# When no content type argument is provided, "text/html" is the +# default. +# +# source://rack//lib/rack/content_type.rb#15 +class Rack::ContentType + include ::Rack::Utils + + # @return [ContentType] a new instance of ContentType + # + # source://rack//lib/rack/content_type.rb#18 + def initialize(app, content_type = T.unsafe(nil)); end + + # source://rack//lib/rack/content_type.rb#23 + def call(env); end +end + +# source://rack//lib/rack/constants.rb#32 +Rack::DELETE = T.let(T.unsafe(nil), String) + +# This middleware enables content encoding of http responses, +# usually for purposes of compression. +# +# Currently supported encodings: +# +# * gzip +# * identity (no transformation) +# +# This middleware automatically detects when encoding is supported +# and allowed. For example no encoding is made when a cache +# directive of 'no-transform' is present, when the response status +# code is one that doesn't allow an entity body, or when the body +# is empty. +# +# Note that despite the name, Deflater does not support the +deflate+ +# encoding. +# +# source://rack//lib/rack/deflater.rb#28 +class Rack::Deflater + # Creates Rack::Deflater middleware. Options: + # + # :if :: a lambda enabling / disabling deflation based on returned boolean value + # (e.g <tt>use Rack::Deflater, :if => lambda { |*, body| sum=0; body.each { |i| sum += i.length }; sum > 512 }</tt>). + # However, be aware that calling `body.each` inside the block will break cases where `body.each` is not idempotent, + # such as when it is an +IO+ instance. + # :include :: a list of content types that should be compressed. By default, all content types are compressed. + # :sync :: determines if the stream is going to be flushed after every chunk. Flushing after every chunk reduces + # latency for time-sensitive streaming applications, but hurts compression and throughput. + # Defaults to +true+. + # + # @return [Deflater] a new instance of Deflater + # + # source://rack//lib/rack/deflater.rb#39 + def initialize(app, options = T.unsafe(nil)); end + + # source://rack//lib/rack/deflater.rb#46 + def call(env); end + + private + + # Whether the body should be compressed. + # + # @return [Boolean] + # + # source://rack//lib/rack/deflater.rb#136 + def should_deflate?(env, status, headers, body); end +end + +# Body class used for gzip encoded responses. +# +# source://rack//lib/rack/deflater.rb#83 +class Rack::Deflater::GzipStream + # Initialize the gzip stream. Arguments: + # body :: Response body to compress with gzip + # mtime :: The modification time of the body, used to set the + # modification time in the gzip header. + # sync :: Whether to flush each gzip chunk as soon as it is ready. + # + # @return [GzipStream] a new instance of GzipStream + # + # source://rack//lib/rack/deflater.rb#92 + def initialize(body, mtime, sync); end + + # Close the original body if possible. + # + # source://rack//lib/rack/deflater.rb#128 + def close; end + + # Yield gzip compressed strings to the given block. + # + # source://rack//lib/rack/deflater.rb#99 + def each(&block); end + + # Call the block passed to #each with the gzipped data. + # + # source://rack//lib/rack/deflater.rb#123 + def write(data); end +end + +# source://rack//lib/rack/deflater.rb#85 +Rack::Deflater::GzipStream::BUFFER_LENGTH = T.let(T.unsafe(nil), Integer) + +# Rack::Directory serves entries below the +root+ given, according to the +# path info of the Rack request. If a directory is found, the file's contents +# will be presented in an html based index. If a file is found, the env will +# be passed to the specified +app+. +# +# If +app+ is not specified, a Rack::Files of the same +root+ will be used. +# +# source://rack//lib/rack/directory.rb#19 +class Rack::Directory + # Set the root directory and application for serving files. + # + # @return [Directory] a new instance of Directory + # + # source://rack//lib/rack/directory.rb#83 + def initialize(root, app = T.unsafe(nil)); end + + # source://rack//lib/rack/directory.rb#89 + def call(env); end + + # Rack response to use for requests with invalid paths, or nil if path is valid. + # + # source://rack//lib/rack/directory.rb#109 + def check_bad_request(path_info); end + + # Rack response to use for requests with paths outside the root, or nil if path is inside the root. + # + # source://rack//lib/rack/directory.rb#119 + def check_forbidden(path_info); end + + # Rack response to use for unreadable and non-file, non-directory entries. + # + # source://rack//lib/rack/directory.rb#181 + def entity_not_found(path_info); end + + # Provide human readable file sizes + # + # source://rack//lib/rack/directory.rb#197 + def filesize_format(int); end + + # Internals of request handling. Similar to call but does + # not remove body for HEAD requests. + # + # source://rack//lib/rack/directory.rb#96 + def get(env); end + + # Rack response to use for directories under the root. + # + # source://rack//lib/rack/directory.rb#130 + def list_directory(path_info, path, script_name); end + + # Rack response to use for files and directories under the root. + # Unreadable and non-file, non-directory entries will get a 404 response. + # + # source://rack//lib/rack/directory.rb#171 + def list_path(env, path, path_info, script_name); end + + # The root of the directory hierarchy. Only requests for files and + # directories inside of the root directory are supported. + # + # source://rack//lib/rack/directory.rb#80 + def root; end + + # File::Stat for the given path, but return nil for missing/bad entries. + # + # source://rack//lib/rack/directory.rb#163 + def stat(path); end +end + +# source://rack//lib/rack/directory.rb#20 +Rack::Directory::DIR_FILE = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/directory.rb#43 +Rack::Directory::DIR_PAGE_FOOTER = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/directory.rb#21 +Rack::Directory::DIR_PAGE_HEADER = T.let(T.unsafe(nil), String) + +# Body class for directory entries, showing an index page with links +# to each file. +# +# source://rack//lib/rack/directory.rb#51 +class Rack::Directory::DirectoryBody < ::Struct + # Yield strings for each part of the directory entry + # + # @yield [DIR_PAGE_HEADER % [ show_path, show_path ]] + # + # source://rack//lib/rack/directory.rb#53 + def each; end + + private + + # Escape each element in the array of html strings. + # + # source://rack//lib/rack/directory.rb#73 + def DIR_FILE_escape(htmls); end +end + +# Stolen from Ramaze +# +# source://rack//lib/rack/directory.rb#189 +Rack::Directory::FILESIZE_FORMAT = T.let(T.unsafe(nil), Array) + +# source://rack//lib/rack/constants.rb#22 +Rack::ETAG = T.let(T.unsafe(nil), String) + +# Automatically sets the etag header on all String bodies. +# +# The etag header is skipped if etag or last-modified headers are sent or if +# a sendfile body (body.responds_to :to_path) is given (since such cases +# should be handled by apache/nginx). +# +# On initialization, you can pass two parameters: a cache-control directive +# used when etag is absent and a directive when it is present. The first +# defaults to nil, while the second defaults to "max-age=0, private, must-revalidate" +# +# source://rack//lib/rack/etag.rb#18 +class Rack::ETag + # @return [ETag] a new instance of ETag + # + # source://rack//lib/rack/etag.rb#22 + def initialize(app, no_cache_control = T.unsafe(nil), cache_control = T.unsafe(nil)); end + + # source://rack//lib/rack/etag.rb#28 + def call(env); end + + private + + # source://rack//lib/rack/etag.rb#58 + def digest_body(body); end + + # @return [Boolean] + # + # source://rack//lib/rack/etag.rb#50 + def etag_status?(status); end + + # @return [Boolean] + # + # source://rack//lib/rack/etag.rb#54 + def skip_caching?(headers); end +end + +# source://rack//lib/rack/etag.rb#20 +Rack::ETag::DEFAULT_CACHE_CONTROL = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/etag.rb#19 +Rack::ETag::ETAG_STRING = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#23 +Rack::EXPIRES = T.let(T.unsafe(nil), String) + +# This middleware provides hooks to certain places in the request / +# response lifecycle. This is so that middleware that don't need to filter +# the response data can safely leave it alone and not have to send messages +# down the traditional "rack stack". +# +# The events are: +# +# * on_start(request, response) +# +# This event is sent at the start of the request, before the next +# middleware in the chain is called. This method is called with a request +# object, and a response object. Right now, the response object is always +# nil, but in the future it may actually be a real response object. +# +# * on_commit(request, response) +# +# The response has been committed. The application has returned, but the +# response has not been sent to the webserver yet. This method is always +# called with a request object and the response object. The response +# object is constructed from the rack triple that the application returned. +# Changes may still be made to the response object at this point. +# +# * on_send(request, response) +# +# The webserver has started iterating over the response body and presumably +# has started sending data over the wire. This method is always called with +# a request object and the response object. The response object is +# constructed from the rack triple that the application returned. Changes +# SHOULD NOT be made to the response object as the webserver has already +# started sending data. Any mutations will likely result in an exception. +# +# * on_finish(request, response) +# +# The webserver has closed the response, and all data has been written to +# the response socket. The request and response object should both be +# read-only at this point. The body MAY NOT be available on the response +# object as it may have been flushed to the socket. +# +# * on_error(request, response, error) +# +# An exception has occurred in the application or an `on_commit` event. +# This method will get the request, the response (if available) and the +# exception that was raised. +# +# ## Order +# +# `on_start` is called on the handlers in the order that they were passed to +# the constructor. `on_commit`, on_send`, `on_finish`, and `on_error` are +# called in the reverse order. `on_finish` handlers are called inside an +# `ensure` block, so they are guaranteed to be called even if something +# raises an exception. If something raises an exception in a `on_finish` +# method, then nothing is guaranteed. +# +# source://rack//lib/rack/events.rb#61 +class Rack::Events + # @return [Events] a new instance of Events + # + # source://rack//lib/rack/events.rb#106 + def initialize(app, handlers); end + + # source://rack//lib/rack/events.rb#111 + def call(env); end + + private + + # source://rack//lib/rack/events.rb#149 + def make_request(env); end + + # source://rack//lib/rack/events.rb#153 + def make_response(status, headers, body); end + + # source://rack//lib/rack/events.rb#137 + def on_commit(request, response); end + + # source://rack//lib/rack/events.rb#133 + def on_error(request, response, e); end + + # source://rack//lib/rack/events.rb#145 + def on_finish(request, response); end + + # source://rack//lib/rack/events.rb#141 + def on_start(request, response); end +end + +# source://rack//lib/rack/events.rb#62 +module Rack::Events::Abstract + # source://rack//lib/rack/events.rb#66 + def on_commit(req, res); end + + # source://rack//lib/rack/events.rb#75 + def on_error(req, res, e); end + + # source://rack//lib/rack/events.rb#72 + def on_finish(req, res); end + + # source://rack//lib/rack/events.rb#69 + def on_send(req, res); end + + # source://rack//lib/rack/events.rb#63 + def on_start(req, res); end +end + +# source://rack//lib/rack/events.rb#95 +class Rack::Events::BufferedResponse < ::Rack::Response::Raw + # @return [BufferedResponse] a new instance of BufferedResponse + # + # source://rack//lib/rack/events.rb#98 + def initialize(status, headers, body); end + + # Returns the value of attribute body. + # + # source://rack//lib/rack/events.rb#96 + def body; end + + # source://rack//lib/rack/events.rb#103 + def to_a; end +end + +# source://rack//lib/rack/events.rb#79 +class Rack::Events::EventedBodyProxy < ::Rack::BodyProxy + # @return [EventedBodyProxy] a new instance of EventedBodyProxy + # + # source://rack//lib/rack/events.rb#82 + def initialize(body, request, response, handlers, &block); end + + # source://rack//lib/rack/events.rb#89 + def each; end + + # Returns the value of attribute request. + # + # source://rack//lib/rack/events.rb#80 + def request; end + + # Returns the value of attribute response. + # + # source://rack//lib/rack/events.rb#80 + def response; end +end + +# source://rack//lib/rack/file.rb#8 +Rack::File = Rack::Files + +# Rack::Files serves files below the +root+ directory given, according to the +# path info of the Rack request. +# e.g. when Rack::Files.new("/etc") is used, you can access 'passwd' file +# as http://localhost:9292/passwd +# +# Handlers can detect if bodies are a Rack::Files, and use mechanisms +# like sendfile on the +path+. +# +# source://rack//lib/rack/files.rb#20 +class Rack::Files + # @return [Files] a new instance of Files + # + # source://rack//lib/rack/files.rb#27 + def initialize(root, headers = T.unsafe(nil), default_mime = T.unsafe(nil)); end + + # source://rack//lib/rack/files.rb#34 + def call(env); end + + # source://rack//lib/rack/files.rb#39 + def get(env); end + + # Returns the value of attribute root. + # + # source://rack//lib/rack/files.rb#25 + def root; end + + # source://rack//lib/rack/files.rb#68 + def serving(request, path); end + + private + + # source://rack//lib/rack/files.rb#190 + def fail(status, body, headers = T.unsafe(nil)); end + + # source://rack//lib/rack/files.rb#209 + def filesize(path); end + + # The MIME type for the contents of the file located at @path + # + # source://rack//lib/rack/files.rb#205 + def mime_type(path, default_mime); end +end + +# source://rack//lib/rack/files.rb#21 +Rack::Files::ALLOWED_VERBS = T.let(T.unsafe(nil), Array) + +# source://rack//lib/rack/files.rb#22 +Rack::Files::ALLOW_HEADER = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/files.rb#121 +class Rack::Files::BaseIterator + # @return [BaseIterator] a new instance of BaseIterator + # + # source://rack//lib/rack/files.rb#124 + def initialize(path, ranges, options); end + + # source://rack//lib/rack/files.rb#144 + def bytesize; end + + # source://rack//lib/rack/files.rb#153 + def close; end + + # source://rack//lib/rack/files.rb#130 + def each; end + + # Returns the value of attribute options. + # + # source://rack//lib/rack/files.rb#122 + def options; end + + # Returns the value of attribute path. + # + # source://rack//lib/rack/files.rb#122 + def path; end + + # Returns the value of attribute ranges. + # + # source://rack//lib/rack/files.rb#122 + def ranges; end + + private + + # source://rack//lib/rack/files.rb#171 + def each_range_part(file, range); end + + # @return [Boolean] + # + # source://rack//lib/rack/files.rb#157 + def multipart?; end + + # source://rack//lib/rack/files.rb#161 + def multipart_heading(range); end +end + +# source://rack//lib/rack/files.rb#184 +class Rack::Files::Iterator < ::Rack::Files::BaseIterator + # source://rack//lib/rack/files.rb#122 + def to_path; end +end + +# source://rack//lib/rack/files.rb#23 +Rack::Files::MULTIPART_BOUNDARY = T.let(T.unsafe(nil), String) + +# Rack::ForwardRequest gets caught by Rack::Recursive and redirects +# the current request to the app at +url+. +# +# raise ForwardRequest.new("/not-found") +# +# source://rack//lib/rack/recursive.rb#14 +class Rack::ForwardRequest < ::Exception + # @return [ForwardRequest] a new instance of ForwardRequest + # + # source://rack//lib/rack/recursive.rb#17 + def initialize(url, env = T.unsafe(nil)); end + + # Returns the value of attribute env. + # + # source://rack//lib/rack/recursive.rb#15 + def env; end + + # Returns the value of attribute url. + # + # source://rack//lib/rack/recursive.rb#15 + def url; end +end + +# HTTP method verbs +# +# source://rack//lib/rack/constants.rb#28 +Rack::GET = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#33 +Rack::HEAD = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#7 +Rack::HTTPS = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#16 +Rack::HTTP_COOKIE = T.let(T.unsafe(nil), String) + +# Request env keys +# +# source://rack//lib/rack/constants.rb#5 +Rack::HTTP_HOST = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#6 +Rack::HTTP_PORT = T.let(T.unsafe(nil), String) + +# Rack::Head returns an empty body for all HEAD requests. It leaves +# all other requests unchanged. +# +# source://rack//lib/rack/head.rb#9 +class Rack::Head + # @return [Head] a new instance of Head + # + # source://rack//lib/rack/head.rb#10 + def initialize(app); end + + # source://rack//lib/rack/head.rb#14 + def call(env); end +end + +# Rack::Headers is a Hash subclass that downcases all keys. It's designed +# to be used by rack applications that don't implement the Rack 3 SPEC +# (by using non-lowercase response header keys), automatically handling +# the downcasing of keys. +# +# source://rack//lib/rack/headers.rb#6 +class Rack::Headers < ::Hash + # source://rack//lib/rack/headers.rb#26 + def [](key); end + + # source://rack//lib/rack/headers.rb#30 + def []=(key, value); end + + # source://rack//lib/rack/headers.rb#35 + def assoc(key); end + + # @raise [TypeError] + # + # source://rack//lib/rack/headers.rb#39 + def compare_by_identity; end + + # source://rack//lib/rack/headers.rb#43 + def delete(key); end + + # source://rack//lib/rack/headers.rb#47 + def dig(key, *a); end + + # :nocov: + # + # source://rack//lib/rack/headers.rb#143 + def except(*a); end + + # source://rack//lib/rack/headers.rb#51 + def fetch(key, *default, &block); end + + # source://rack//lib/rack/headers.rb#56 + def fetch_values(*a); end + + # @return [Boolean] + # + # source://rack//lib/rack/headers.rb#60 + def has_key?(key); end + + # @return [Boolean] + # + # source://rack//lib/rack/headers.rb#60 + def include?(key); end + + # source://rack//lib/rack/headers.rb#67 + def invert; end + + # @return [Boolean] + # + # source://rack//lib/rack/headers.rb#60 + def key?(key); end + + # @return [Boolean] + # + # source://rack//lib/rack/headers.rb#60 + def member?(key); end + + # source://rack//lib/rack/headers.rb#73 + def merge(hash, &block); end + + # source://rack//lib/rack/headers.rb#102 + def merge!(hash, &block); end + + # source://rack//lib/rack/headers.rb#77 + def reject(&block); end + + # source://rack//lib/rack/headers.rb#83 + def replace(hash); end + + # source://rack//lib/rack/headers.rb#88 + def select(&block); end + + # :nocov: + # + # source://rack//lib/rack/headers.rb#121 + def slice(*a); end + + # source://rack//lib/rack/headers.rb#30 + def store(key, value); end + + # source://rack//lib/rack/headers.rb#94 + def to_proc; end + + # source://rack//lib/rack/headers.rb#127 + def transform_keys(&block); end + + # source://rack//lib/rack/headers.rb#131 + def transform_keys!; end + + # source://rack//lib/rack/headers.rb#98 + def transform_values(&block); end + + # source://rack//lib/rack/headers.rb#102 + def update(hash, &block); end + + # source://rack//lib/rack/headers.rb#114 + def values_at(*keys); end + + private + + # source://rack//lib/rack/headers.rb#150 + def downcase_key(key); end + + class << self + # source://rack//lib/rack/headers.rb#7 + def [](*items); end + end +end + +# source://rack//lib/rack/constants.rb#35 +Rack::LINK = T.let(T.unsafe(nil), String) + +# Rack::Lint validates your application and the requests and +# responses according to the Rack spec. +# +# source://rack//lib/rack/lint.rb#12 +class Rack::Lint + # @return [Lint] a new instance of Lint + # + # source://rack//lib/rack/lint.rb#13 + def initialize(app); end + + # AUTHORS: n.b. The trailing whitespace between paragraphs is important and + # should not be removed. The whitespace creates paragraphs in the RDoc + # output. + # + # This specification aims to formalize the Rack protocol. You + # can (and should) use Rack::Lint to enforce it. + # + # When you develop middleware, be sure to add a Lint before and + # after to catch all mistakes. + # + # = Rack applications + # + # A Rack application is a Ruby object (not a class) that + # responds to +call+. + # + # source://rack//lib/rack/lint.rb#34 + def call(env = T.unsafe(nil)); end +end + +# :stopdoc: +# +# source://rack//lib/rack/lint.rb#19 +class Rack::Lint::LintError < ::RuntimeError; end + +# source://rack//lib/rack/lint.rb#38 +class Rack::Lint::Wrapper + # @return [Wrapper] a new instance of Wrapper + # + # source://rack//lib/rack/lint.rb#39 + def initialize(app, env); end + + # ==== Streaming Body + # + # @raise [LintError] + # + # source://rack//lib/rack/lint.rb#855 + def call(stream); end + + # === The content-length + # + # source://rack//lib/rack/lint.rb#693 + def check_content_length(status, headers); end + + # === The content-type + # + # source://rack//lib/rack/lint.rb#677 + def check_content_type(status, headers); end + + # == The Environment + # + # @raise [LintError] + # + # source://rack//lib/rack/lint.rb#97 + def check_environment(env); end + + # === The Error Stream + # + # source://rack//lib/rack/lint.rb#491 + def check_error(error); end + + # source://rack//lib/rack/lint.rb#667 + def check_header_value(key, value); end + + # === The Headers + # + # source://rack//lib/rack/lint.rb#627 + def check_headers(headers); end + + # === Hijacking + # + # The hijacking interfaces provides a means for an application to take + # control of the HTTP connection. There are two distinct hijack + # interfaces: full hijacking where the application takes over the raw + # connection, and partial hijacking where the application takes over + # just the response body stream. In both cases, the application is + # responsible for closing the hijacked stream. + # + # Full hijacking only works with HTTP/1. Partial hijacking is functionally + # equivalent to streaming bodies, and is still optionally supported for + # backwards compatibility with older Rack versions. + # + # ==== Full Hijack + # + # Full hijack is used to completely take over an HTTP/1 connection. It + # occurs before any headers are written and causes the request to + # ignores any response generated by the application. + # + # It is intended to be used when applications need access to raw HTTP/1 + # connection. + # + # source://rack//lib/rack/lint.rb#551 + def check_hijack(env); end + + # ==== Partial Hijack + # + # Partial hijack is used for bi-directional streaming of the request and + # response body. It occurs after the status and headers are written by + # the server and causes the server to ignore the Body of the response. + # + # It is intended to be used when applications need bi-directional + # streaming. + # + # source://rack//lib/rack/lint.rb#579 + def check_hijack_response(headers, env); end + + # === The Input Stream + # + # The input stream is an IO-like object which contains the raw HTTP + # POST data. + # + # source://rack//lib/rack/lint.rb#387 + def check_input(input); end + + # == The Response + # + # === The Status + # + # source://rack//lib/rack/lint.rb#616 + def check_status(status); end + + # === The Body + # + # The Body is typically an +Array+ of +String+ instances, an enumerable + # that yields +String+ instances, a +Proc+ instance, or a File-like + # object. + # + # The Body must respond to +each+ or +call+. It may optionally respond + # to +to_path+ or +to_ary+. A Body that responds to +each+ is considered + # to be an Enumerable Body. A Body that responds to +call+ is considered + # to be a Streaming Body. + # + # A Body that responds to both +each+ and +call+ must be treated as an + # Enumerable Body, not a Streaming Body. If it responds to +each+, you + # must call +each+ and not +call+. If the Body doesn't respond to + # +each+, then you can assume it responds to +call+. + # + # The Body must either be consumed or returned. The Body is consumed by + # optionally calling either +each+ or +call+. + # Then, if the Body responds to +close+, it must be called to release + # any resources associated with the generation of the body. + # In other words, +close+ must always be called at least once; typically + # after the web server has sent the response to the client, but also in + # cases where the Rack application makes internal/virtual requests and + # discards the response. + # + # source://rack//lib/rack/lint.rb#744 + def close; end + + # ==== Enumerable Body + # + # @raise [LintError] + # + # source://rack//lib/rack/lint.rb#778 + def each; end + + # @return [Boolean] + # + # source://rack//lib/rack/lint.rb#826 + def respond_to?(name, *_arg1); end + + # @raise [LintError] + # + # source://rack//lib/rack/lint.rb#54 + def response; end + + # If the Body responds to +to_ary+, it must return an +Array+ whose + # contents are identical to that produced by calling +each+. + # Middleware may call +to_ary+ directly on the Body and return a new + # Body in its place. In other words, middleware can only process the + # Body directly if it responds to +to_ary+. If the Body responds to both + # +to_ary+ and +close+, its implementation of +to_ary+ must call + # +close+. + # + # source://rack//lib/rack/lint.rb#842 + def to_ary; end + + # source://rack//lib/rack/lint.rb#822 + def to_path; end + + # source://rack//lib/rack/lint.rb#706 + def verify_content_length(size); end + + # source://rack//lib/rack/lint.rb#760 + def verify_to_path; end +end + +# source://rack//lib/rack/lint.rb#820 +Rack::Lint::Wrapper::BODY_METHODS = T.let(T.unsafe(nil), Hash) + +# source://rack//lib/rack/lint.rb#500 +class Rack::Lint::Wrapper::ErrorWrapper + # @return [ErrorWrapper] a new instance of ErrorWrapper + # + # source://rack//lib/rack/lint.rb#501 + def initialize(error); end + + # * +close+ must never be called on the error stream. + # + # @raise [LintError] + # + # source://rack//lib/rack/lint.rb#523 + def close(*args); end + + # * +flush+ must be called without arguments and must be called + # in order to make the error appear for sure. + # + # source://rack//lib/rack/lint.rb#518 + def flush; end + + # * +puts+ must be called with a single argument that responds to +to_s+. + # + # source://rack//lib/rack/lint.rb#506 + def puts(str); end + + # * +write+ must be called with a single argument that is a String. + # + # @raise [LintError] + # + # source://rack//lib/rack/lint.rb#511 + def write(str); end +end + +# source://rack//lib/rack/lint.rb#405 +class Rack::Lint::Wrapper::InputWrapper + # @return [InputWrapper] a new instance of InputWrapper + # + # source://rack//lib/rack/lint.rb#406 + def initialize(input); end + + # * +close+ can be called on the input stream to indicate that the + # any remaining input is not needed. + # + # source://rack//lib/rack/lint.rb#483 + def close(*args); end + + # * +each+ must be called without arguments and only yield Strings. + # + # @raise [LintError] + # + # source://rack//lib/rack/lint.rb#471 + def each(*args); end + + # * +gets+ must be called without arguments and return a string, + # or +nil+ on EOF. + # + # @raise [LintError] + # + # source://rack//lib/rack/lint.rb#412 + def gets(*args); end + + # * +read+ behaves like IO#read. + # Its signature is <tt>read([length, [buffer]])</tt>. + # + # If given, +length+ must be a non-negative Integer (>= 0) or +nil+, + # and +buffer+ must be a String and may not be nil. + # + # If +length+ is given and not nil, then this method reads at most + # +length+ bytes from the input stream. + # + # If +length+ is not given or nil, then this method reads + # all data until EOF. + # + # When EOF is reached, this method returns nil if +length+ is given + # and not nil, or "" if +length+ is not given or is nil. + # + # If +buffer+ is given, then the read data will be placed + # into +buffer+ instead of a newly created String object. + # + # source://rack//lib/rack/lint.rb#438 + def read(*args); end +end + +# source://rack//lib/rack/lint.rb#875 +class Rack::Lint::Wrapper::StreamWrapper + extend ::Forwardable + + # @return [StreamWrapper] a new instance of StreamWrapper + # + # source://rack//lib/rack/lint.rb#890 + def initialize(stream); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def <<(*args, **_arg1, &block); 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 write(*args, **_arg1, &block); end +end + +# The semantics of these IO methods must be a best effort match to +# those of a normal Ruby IO or Socket object, using standard arguments +# and raising standard exceptions. Servers are encouraged to simply +# pass on real IO objects, although it is recognized that this approach +# is not directly compatible with HTTP/2. +# +# source://rack//lib/rack/lint.rb#883 +Rack::Lint::Wrapper::StreamWrapper::REQUIRED_METHODS = T.let(T.unsafe(nil), Array) + +# Rack::Lock locks every request inside a mutex, so that every request +# will effectively be executed synchronously. +# +# source://rack//lib/rack/lock.rb#8 +class Rack::Lock + # @return [Lock] a new instance of Lock + # + # source://rack//lib/rack/lock.rb#9 + def initialize(app, mutex = T.unsafe(nil)); end + + # source://rack//lib/rack/lock.rb#13 + def call(env); end + + private + + # source://rack//lib/rack/lock.rb#25 + def unlock; end +end + +# Sets up rack.logger to write to rack.errors stream +# +# source://rack//lib/rack/logger.rb#9 +class Rack::Logger + # @return [Logger] a new instance of Logger + # + # source://rack//lib/rack/logger.rb#10 + def initialize(app, level = T.unsafe(nil)); end + + # source://rack//lib/rack/logger.rb#14 + def call(env); end +end + +# Rack::MediaType parse media type and parameters out of content_type string +# +# source://rack//lib/rack/media_type.rb#6 +class Rack::MediaType + class << self + # The media type parameters provided in CONTENT_TYPE as a Hash, or + # an empty Hash if no CONTENT_TYPE or media-type parameters were + # provided. e.g., when the CONTENT_TYPE is "text/plain;charset=utf-8", + # this method responds with the following Hash: + # { 'charset' => 'utf-8' } + # + # source://rack//lib/rack/media_type.rb#26 + def params(content_type); end + + # The media type (type/subtype) portion of the CONTENT_TYPE header + # without any media type parameters. e.g., when CONTENT_TYPE is + # "text/plain;charset=utf-8", the media-type is "text/plain". + # + # For more information on the use of media types in HTTP, see: + # http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.7 + # + # source://rack//lib/rack/media_type.rb#16 + def type(content_type); end + + private + + # source://rack//lib/rack/media_type.rb#38 + def strip_doublequotes(str); end + end +end + +# source://rack//lib/rack/media_type.rb#7 +Rack::MediaType::SPLIT_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://rack//lib/rack/method_override.rb#8 +class Rack::MethodOverride + # @return [MethodOverride] a new instance of MethodOverride + # + # source://rack//lib/rack/method_override.rb#15 + def initialize(app); end + + # source://rack//lib/rack/method_override.rb#19 + def call(env); end + + # source://rack//lib/rack/method_override.rb#31 + def method_override(env); end + + private + + # source://rack//lib/rack/method_override.rb#44 + def allowed_methods; end + + # source://rack//lib/rack/method_override.rb#48 + def method_override_param(req); end +end + +# source://rack//lib/rack/method_override.rb#13 +Rack::MethodOverride::ALLOWED_METHODS = T.let(T.unsafe(nil), Array) + +# source://rack//lib/rack/method_override.rb#9 +Rack::MethodOverride::HTTP_METHODS = T.let(T.unsafe(nil), Array) + +# source://rack//lib/rack/method_override.rb#12 +Rack::MethodOverride::HTTP_METHOD_OVERRIDE_HEADER = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/method_override.rb#11 +Rack::MethodOverride::METHOD_OVERRIDE_PARAM_KEY = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/mime.rb#4 +module Rack::Mime + private + + # Returns true if the given value is a mime match for the given mime match + # specification, false otherwise. + # + # Rack::Mime.match?('text/html', 'text/*') => true + # Rack::Mime.match?('text/plain', '*') => true + # Rack::Mime.match?('text/html', 'application/json') => false + # + # @return [Boolean] + # + # source://rack//lib/rack/mime.rb#30 + def match?(value, matcher); end + + # Returns String with mime type if found, otherwise use +fallback+. + # +ext+ should be filename extension in the '.ext' format that + # File.extname(file) returns. + # +fallback+ may be any object + # + # Also see the documentation for MIME_TYPES + # + # Usage: + # Rack::Mime.mime_type('.foo') + # + # This is a shortcut for: + # Rack::Mime::MIME_TYPES.fetch('.foo', 'application/octet-stream') + # + # source://rack//lib/rack/mime.rb#18 + def mime_type(ext, fallback = T.unsafe(nil)); end + + class << self + # Returns true if the given value is a mime match for the given mime match + # specification, false otherwise. + # + # Rack::Mime.match?('text/html', 'text/*') => true + # Rack::Mime.match?('text/plain', '*') => true + # Rack::Mime.match?('text/html', 'application/json') => false + # + # @return [Boolean] + # + # source://rack//lib/rack/mime.rb#30 + def match?(value, matcher); end + + # Returns String with mime type if found, otherwise use +fallback+. + # +ext+ should be filename extension in the '.ext' format that + # File.extname(file) returns. + # +fallback+ may be any object + # + # Also see the documentation for MIME_TYPES + # + # Usage: + # Rack::Mime.mime_type('.foo') + # + # This is a shortcut for: + # Rack::Mime::MIME_TYPES.fetch('.foo', 'application/octet-stream') + # + # source://rack//lib/rack/mime.rb#18 + def mime_type(ext, fallback = T.unsafe(nil)); end + end +end + +# List of most common mime-types, selected various sources +# according to their usefulness in a webserving scope for Ruby +# users. +# +# To amend this list with your local mime.types list you can use: +# +# require 'webrick/httputils' +# list = WEBrick::HTTPUtils.load_mime_types('/etc/mime.types') +# Rack::Mime::MIME_TYPES.merge!(list) +# +# N.B. On Ubuntu the mime.types file does not include the leading period, so +# users may need to modify the data before merging into the hash. +# +# source://rack//lib/rack/mime.rb#51 +Rack::Mime::MIME_TYPES = T.let(T.unsafe(nil), Hash) + +# Rack::MockRequest helps testing your Rack application without +# actually using HTTP. +# +# After performing a request on a URL with get/post/put/patch/delete, it +# returns a MockResponse with useful helper methods for effective +# testing. +# +# You can pass a hash with additional configuration to the +# get/post/put/patch/delete. +# <tt>:input</tt>:: A String or IO-like to be used as rack.input. +# <tt>:fatal</tt>:: Raise a FatalWarning if the app writes to rack.errors. +# <tt>:lint</tt>:: If true, wrap the application in a Rack::Lint. +# +# source://rack//lib/rack/mock_request.rb#23 +class Rack::MockRequest + # @return [MockRequest] a new instance of MockRequest + # + # source://rack//lib/rack/mock_request.rb#49 + def initialize(app); end + + # Make a DELETE request and return a MockResponse. See #request. + # + # source://rack//lib/rack/mock_request.rb#62 + def delete(uri, opts = T.unsafe(nil)); end + + # Make a GET request and return a MockResponse. See #request. + # + # source://rack//lib/rack/mock_request.rb#54 + def get(uri, opts = T.unsafe(nil)); end + + # Make a HEAD request and return a MockResponse. See #request. + # + # source://rack//lib/rack/mock_request.rb#64 + def head(uri, opts = T.unsafe(nil)); end + + # Make an OPTIONS request and return a MockResponse. See #request. + # + # source://rack//lib/rack/mock_request.rb#66 + def options(uri, opts = T.unsafe(nil)); end + + # Make a PATCH request and return a MockResponse. See #request. + # + # source://rack//lib/rack/mock_request.rb#60 + def patch(uri, opts = T.unsafe(nil)); end + + # Make a POST request and return a MockResponse. See #request. + # + # source://rack//lib/rack/mock_request.rb#56 + def post(uri, opts = T.unsafe(nil)); end + + # Make a PUT request and return a MockResponse. See #request. + # + # source://rack//lib/rack/mock_request.rb#58 + def put(uri, opts = T.unsafe(nil)); end + + # Make a request using the given request method for the given + # uri to the rack application and return a MockResponse. + # Options given are passed to MockRequest.env_for. + # + # source://rack//lib/rack/mock_request.rb#71 + def request(method = T.unsafe(nil), uri = T.unsafe(nil), opts = T.unsafe(nil)); end + + class << self + # Return the Rack environment used for a request to +uri+. + # All options that are strings are added to the returned environment. + # Options: + # :fatal :: Whether to raise an exception if request outputs to rack.errors + # :input :: The rack.input to set + # :http_version :: The SERVER_PROTOCOL to set + # :method :: The HTTP request method to use + # :params :: The params to use + # :script_name :: The SCRIPT_NAME to set + # + # source://rack//lib/rack/mock_request.rb#103 + def env_for(uri = T.unsafe(nil), opts = T.unsafe(nil)); end + + # For historical reasons, we're pinning to RFC 2396. + # URI::Parser = URI::RFC2396_Parser + # + # source://rack//lib/rack/mock_request.rb#89 + def parse_uri_rfc2396(uri); end + end +end + +# source://rack//lib/rack/mock_request.rb#44 +Rack::MockRequest::DEFAULT_ENV = T.let(T.unsafe(nil), Hash) + +# source://rack//lib/rack/mock_request.rb#27 +class Rack::MockRequest::FatalWarner + # source://rack//lib/rack/mock_request.rb#36 + def flush; end + + # @raise [FatalWarning] + # + # source://rack//lib/rack/mock_request.rb#28 + def puts(warning); end + + # source://rack//lib/rack/mock_request.rb#39 + def string; end + + # @raise [FatalWarning] + # + # source://rack//lib/rack/mock_request.rb#32 + def write(warning); end +end + +# source://rack//lib/rack/mock_request.rb#24 +class Rack::MockRequest::FatalWarning < ::RuntimeError; end + +# Rack::MockResponse provides useful helpers for testing your apps. +# Usually, you don't create the MockResponse on your own, but use +# MockRequest. +# +# source://rack//lib/rack/mock_response.rb#13 +class Rack::MockResponse < ::Rack::Response + # @return [MockResponse] a new instance of MockResponse + # + # source://rack//lib/rack/mock_response.rb#24 + def initialize(status, headers, body, errors = T.unsafe(nil)); end + + # source://rack//lib/rack/mock_response.rb#39 + def =~(other); end + + # source://rack//lib/rack/mock_response.rb#47 + def body; end + + # source://rack//lib/rack/mock_response.rb#73 + def cookie(name); end + + # Headers + # + # source://rack//lib/rack/mock_response.rb#19 + def cookies; end + + # @return [Boolean] + # + # source://rack//lib/rack/mock_response.rb#69 + def empty?; end + + # Errors + # + # source://rack//lib/rack/mock_response.rb#22 + def errors; end + + # Errors + # + # source://rack//lib/rack/mock_response.rb#22 + def errors=(_arg0); end + + # source://rack//lib/rack/mock_response.rb#43 + def match(other); end + + # Headers + # + # source://rack//lib/rack/mock_response.rb#19 + def original_headers; end + + private + + # source://rack//lib/rack/mock_response.rb#102 + def identify_cookie_attributes(cookie_filling); end + + # source://rack//lib/rack/mock_response.rb#79 + def parse_cookies_from_header; end + + class << self + 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#8 +module Rack::Multipart + class << self + # source://rack//lib/rack/multipart.rb#39 + def build_multipart(params, first = T.unsafe(nil)); end + + # source://rack//lib/rack/multipart.rb#35 + def extract_multipart(request, params = T.unsafe(nil)); end + + # source://rack//lib/rack/multipart.rb#17 + def parse_multipart(env, params = T.unsafe(nil)); end + end +end + +# source://rack//lib/rack/multipart/parser.rb#32 +Rack::Multipart::ATTRIBUTE = T.let(T.unsafe(nil), Regexp) + +# Updated definitions from RFC 2231 +# +# source://rack//lib/rack/multipart/parser.rb#31 +Rack::Multipart::ATTRIBUTE_CHAR = T.let(T.unsafe(nil), Regexp) + +# source://rack//lib/rack/multipart/parser.rb#26 +Rack::Multipart::BROKEN = T.let(T.unsafe(nil), Regexp) + +# source://rack//lib/rack/multipart/parser.rb#24 +Rack::Multipart::CONDISP = T.let(T.unsafe(nil), Regexp) + +# source://rack//lib/rack/multipart/parser.rb#43 +Rack::Multipart::DISPPARM = T.let(T.unsafe(nil), Regexp) + +# source://rack//lib/rack/multipart/parser.rb#21 +Rack::Multipart::EOL = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/multipart/parser.rb#39 +Rack::Multipart::EXTENDED_INITIAL_NAME = T.let(T.unsafe(nil), Regexp) + +# source://rack//lib/rack/multipart/parser.rb#41 +Rack::Multipart::EXTENDED_INITIAL_PARAMETER = T.let(T.unsafe(nil), Regexp) + +# source://rack//lib/rack/multipart/parser.rb#40 +Rack::Multipart::EXTENDED_INITIAL_VALUE = T.let(T.unsafe(nil), Regexp) + +# source://rack//lib/rack/multipart/parser.rb#36 +Rack::Multipart::EXTENDED_OTHER_NAME = T.let(T.unsafe(nil), Regexp) + +# source://rack//lib/rack/multipart/parser.rb#38 +Rack::Multipart::EXTENDED_OTHER_PARAMETER = T.let(T.unsafe(nil), Regexp) + +# source://rack//lib/rack/multipart/parser.rb#37 +Rack::Multipart::EXTENDED_OTHER_VALUE = T.let(T.unsafe(nil), Regexp) + +# source://rack//lib/rack/multipart/parser.rb#42 +Rack::Multipart::EXTENDED_PARAMETER = T.let(T.unsafe(nil), Regexp) + +# Use specific error class when parsing multipart request +# that ends early. +# +# source://rack//lib/rack/multipart/parser.rb#15 +class Rack::Multipart::EmptyContentError < ::EOFError; end + +# Base class for multipart exceptions that do not subclass from +# other exception classes for backwards compatibility. +# +# source://rack//lib/rack/multipart/parser.rb#19 +class Rack::Multipart::Error < ::StandardError; end + +# source://rack//lib/rack/multipart/generator.rb#7 +class Rack::Multipart::Generator + # @return [Generator] a new instance of Generator + # + # source://rack//lib/rack/multipart/generator.rb#8 + def initialize(params, first = T.unsafe(nil)); end + + # source://rack//lib/rack/multipart/generator.rb#16 + def dump; end + + private + + # source://rack//lib/rack/multipart/generator.rb#89 + def content_for_other(file, name); end + + # source://rack//lib/rack/multipart/generator.rb#77 + def content_for_tempfile(io, file, name); end + + # source://rack//lib/rack/multipart/generator.rb#52 + def flattened_params; end + + # @return [Boolean] + # + # source://rack//lib/rack/multipart/generator.rb#37 + def multipart?; end +end + +# source://rack//lib/rack/multipart/parser.rb#22 +Rack::Multipart::MULTIPART = T.let(T.unsafe(nil), Regexp) + +# source://rack//lib/rack/multipart.rb#14 +Rack::Multipart::MULTIPART_BOUNDARY = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/multipart/parser.rb#28 +Rack::Multipart::MULTIPART_CONTENT_DISPOSITION = T.let(T.unsafe(nil), Regexp) + +# source://rack//lib/rack/multipart/parser.rb#29 +Rack::Multipart::MULTIPART_CONTENT_ID = T.let(T.unsafe(nil), Regexp) + +# source://rack//lib/rack/multipart/parser.rb#27 +Rack::Multipart::MULTIPART_CONTENT_TYPE = T.let(T.unsafe(nil), Regexp) + +# source://rack//lib/rack/multipart/parser.rb#9 +class Rack::Multipart::MultipartPartLimitError < ::Errno::EMFILE; end + +# source://rack//lib/rack/multipart/parser.rb#11 +class Rack::Multipart::MultipartTotalPartLimitError < ::StandardError; end + +# source://rack//lib/rack/multipart/parser.rb#46 +class Rack::Multipart::Parser + # @return [Parser] a new instance of Parser + # + # source://rack//lib/rack/multipart/parser.rb#205 + def initialize(boundary, tempfile, bufsize, query_parser); end + + # source://rack//lib/rack/multipart/parser.rb#220 + def parse(io); end + + # source://rack//lib/rack/multipart/parser.rb#243 + def result; end + + # Returns the value of attribute state. + # + # source://rack//lib/rack/multipart/parser.rb#203 + def state; end + + private + + # Scan until the we find the start or end of the boundary. + # If we find it, return the appropriate symbol for the start or + # end of the boundary. If we don't find the start or end of the + # boundary, clear the buffer and return nil. + # + # source://rack//lib/rack/multipart/parser.rb#346 + def consume_boundary; end + + # From WEBrick::HTTPUtils + # + # source://rack//lib/rack/multipart/parser.rb#255 + def dequote(str); end + + # source://rack//lib/rack/multipart/parser.rb#355 + def get_filename(head); end + + # source://rack//lib/rack/multipart/parser.rb#290 + def handle_consume_token; end + + # source://rack//lib/rack/multipart/parser.rb#427 + def handle_empty_content!(content); end + + # This handles the initial parser state. We read until we find the starting + # boundary, then we can transition to the next state. If we find the ending + # boundary, this is an invalid multipart upload, but keep scanning for opening + # boundary in that case. If no boundary found, we need to keep reading data + # and retry. It's highly unlikely the initial read will not consume the + # boundary. The client would have to deliberately craft a response + # with the opening boundary beyond the buffer size for that to happen. + # + # source://rack//lib/rack/multipart/parser.rb#274 + def handle_fast_forward; end + + # source://rack//lib/rack/multipart/parser.rb#323 + def handle_mime_body; end + + # source://rack//lib/rack/multipart/parser.rb#300 + def handle_mime_head; end + + # source://rack//lib/rack/multipart/parser.rb#261 + def read_data(io, outbuf); end + + # source://rack//lib/rack/multipart/parser.rb#393 + def tag_multipart_encoding(filename, content_type, name, body); end + + class << self + # source://rack//lib/rack/multipart/parser.rb#92 + def parse(io, content_length, content_type, tmpfile, bufsize, qp); end + + # source://rack//lib/rack/multipart/parser.rb#85 + def parse_boundary(content_type); end + end +end + +# source://rack//lib/rack/multipart/parser.rb#47 +Rack::Multipart::Parser::BUFSIZE = T.let(T.unsafe(nil), Integer) + +# source://rack//lib/rack/multipart/parser.rb#53 +class Rack::Multipart::Parser::BoundedIO + # @return [BoundedIO] a new instance of BoundedIO + # + # source://rack//lib/rack/multipart/parser.rb#54 + def initialize(io, content_length); end + + # source://rack//lib/rack/multipart/parser.rb#60 + def read(size, outbuf = T.unsafe(nil)); end +end + +# source://rack//lib/rack/multipart/parser.rb#390 +Rack::Multipart::Parser::CHARSET = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/multipart/parser.rb#112 +class Rack::Multipart::Parser::Collector + include ::Enumerable + + # @return [Collector] a new instance of Collector + # + # source://rack//lib/rack/multipart/parser.rb#148 + def initialize(tempfile); end + + # source://rack//lib/rack/multipart/parser.rb#154 + def each; end + + # source://rack//lib/rack/multipart/parser.rb#174 + def on_mime_body(mime_index, content); end + + # source://rack//lib/rack/multipart/parser.rb#178 + def on_mime_finish(mime_index); end + + # source://rack//lib/rack/multipart/parser.rb#158 + def on_mime_head(mime_index, head, filename, content_type, name); end + + private + + # source://rack//lib/rack/multipart/parser.rb#183 + def check_part_limits; end +end + +# source://rack//lib/rack/multipart/parser.rb#136 +class Rack::Multipart::Parser::Collector::BufferPart < ::Rack::Multipart::Parser::Collector::MimePart + # source://rack//lib/rack/multipart/parser.rb#138 + def close; end + + # @return [Boolean] + # + # source://rack//lib/rack/multipart/parser.rb#137 + def file?; end +end + +# source://rack//lib/rack/multipart/parser.rb#113 +class Rack::Multipart::Parser::Collector::MimePart < ::Struct + # @yield [data] + # + # source://rack//lib/rack/multipart/parser.rb#114 + def get_data; end +end + +# source://rack//lib/rack/multipart/parser.rb#141 +class Rack::Multipart::Parser::Collector::TempfilePart < ::Rack::Multipart::Parser::Collector::MimePart + # source://rack//lib/rack/multipart/parser.rb#143 + def close; end + + # @return [Boolean] + # + # source://rack//lib/rack/multipart/parser.rb#142 + def file?; end +end + +# source://rack//lib/rack/multipart/parser.rb#83 +Rack::Multipart::Parser::EMPTY = T.let(T.unsafe(nil), Rack::Multipart::Parser::MultipartInfo) + +# source://rack//lib/rack/multipart/parser.rb#82 +class Rack::Multipart::Parser::MultipartInfo < ::Struct + # Returns the value of attribute params + # + # @return [Object] the current value of params + def params; end + + # Sets the attribute params + # + # @param value [Object] the value to set the attribute params to. + # @return [Object] the newly set value + def params=(_); end + + # Returns the value of attribute tmp_files + # + # @return [Object] the current value of tmp_files + def tmp_files; end + + # Sets the attribute tmp_files + # + # @param value [Object] the value to set the attribute tmp_files to. + # @return [Object] the newly set value + def tmp_files=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://rack//lib/rack/multipart/parser.rb#49 +Rack::Multipart::Parser::TEMPFILE_FACTORY = T.let(T.unsafe(nil), Proc) + +# source://rack//lib/rack/multipart/parser.rb#48 +Rack::Multipart::Parser::TEXT_PLAIN = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/multipart/parser.rb#35 +Rack::Multipart::REGULAR_PARAMETER = T.let(T.unsafe(nil), Regexp) + +# source://rack//lib/rack/multipart/parser.rb#34 +Rack::Multipart::REGULAR_PARAMETER_NAME = T.let(T.unsafe(nil), Regexp) + +# source://rack//lib/rack/multipart/parser.rb#44 +Rack::Multipart::RFC2183 = T.let(T.unsafe(nil), Regexp) + +# source://rack//lib/rack/multipart/parser.rb#33 +Rack::Multipart::SECTION = T.let(T.unsafe(nil), Regexp) + +# source://rack//lib/rack/multipart/parser.rb#23 +Rack::Multipart::TOKEN = T.let(T.unsafe(nil), Regexp) + +# source://rack//lib/rack/multipart/uploaded_file.rb#8 +class Rack::Multipart::UploadedFile + # @return [UploadedFile] a new instance of UploadedFile + # + # source://rack//lib/rack/multipart/uploaded_file.rb#16 + def initialize(filepath = T.unsafe(nil), ct = T.unsafe(nil), bin = T.unsafe(nil), path: T.unsafe(nil), content_type: T.unsafe(nil), binary: T.unsafe(nil), filename: T.unsafe(nil), io: T.unsafe(nil)); end + + # The content type of the "uploaded" file + # + # source://rack//lib/rack/multipart/uploaded_file.rb#14 + def content_type; end + + # The content type of the "uploaded" file + # + # source://rack//lib/rack/multipart/uploaded_file.rb#14 + def content_type=(_arg0); end + + # source://rack//lib/rack/multipart/uploaded_file.rb#31 + def local_path; end + + # source://rack//lib/rack/multipart/uploaded_file.rb#40 + def method_missing(method_name, *args, &block); end + + # The filename, *not* including the path, of the "uploaded" file + # + # source://rack//lib/rack/multipart/uploaded_file.rb#11 + def original_filename; end + + # source://rack//lib/rack/multipart/uploaded_file.rb#31 + def path; end + + # @return [Boolean] + # + # source://rack//lib/rack/multipart/uploaded_file.rb#36 + def respond_to?(*args); end +end + +# source://rack//lib/rack/multipart/parser.rb#25 +Rack::Multipart::VALUE = T.let(T.unsafe(nil), Regexp) + +# source://rack//lib/rack/null_logger.rb#6 +class Rack::NullLogger + # @return [NullLogger] a new instance of NullLogger + # + # source://rack//lib/rack/null_logger.rb#7 + def initialize(app); end + + # source://rack//lib/rack/null_logger.rb#45 + def <<(msg); end + + # source://rack//lib/rack/null_logger.rb#43 + def add(severity, message = T.unsafe(nil), progname = T.unsafe(nil), &block); end + + # source://rack//lib/rack/null_logger.rb#11 + def call(env); end + + # source://rack//lib/rack/null_logger.rb#42 + def close; end + + # source://rack//lib/rack/null_logger.rb#34 + def datetime_format; end + + # source://rack//lib/rack/null_logger.rb#39 + def datetime_format=(datetime_format); end + + # source://rack//lib/rack/null_logger.rb#17 + def debug(progname = T.unsafe(nil), &block); end + + # source://rack//lib/rack/null_logger.rb#27 + def debug!; end + + # @return [Boolean] + # + # source://rack//lib/rack/null_logger.rb#23 + def debug?; end + + # source://rack//lib/rack/null_logger.rb#19 + def error(progname = T.unsafe(nil), &block); end + + # source://rack//lib/rack/null_logger.rb#28 + def error!; end + + # @return [Boolean] + # + # source://rack//lib/rack/null_logger.rb#25 + def error?; end + + # source://rack//lib/rack/null_logger.rb#20 + def fatal(progname = T.unsafe(nil), &block); end + + # source://rack//lib/rack/null_logger.rb#29 + def fatal!; end + + # @return [Boolean] + # + # source://rack//lib/rack/null_logger.rb#26 + def fatal?; end + + # source://rack//lib/rack/null_logger.rb#35 + def formatter; end + + # source://rack//lib/rack/null_logger.rb#40 + def formatter=(formatter); end + + # source://rack//lib/rack/null_logger.rb#16 + def info(progname = T.unsafe(nil), &block); end + + # source://rack//lib/rack/null_logger.rb#30 + def info!; end + + # @return [Boolean] + # + # source://rack//lib/rack/null_logger.rb#22 + def info?; end + + # source://rack//lib/rack/null_logger.rb#32 + def level; end + + # source://rack//lib/rack/null_logger.rb#37 + def level=(level); end + + # source://rack//lib/rack/null_logger.rb#44 + def log(severity, message = T.unsafe(nil), progname = T.unsafe(nil), &block); end + + # source://rack//lib/rack/null_logger.rb#33 + def progname; end + + # source://rack//lib/rack/null_logger.rb#38 + def progname=(progname); end + + # source://rack//lib/rack/null_logger.rb#46 + def reopen(logdev = T.unsafe(nil)); end + + # source://rack//lib/rack/null_logger.rb#36 + def sev_threshold; end + + # source://rack//lib/rack/null_logger.rb#41 + def sev_threshold=(sev_threshold); end + + # source://rack//lib/rack/null_logger.rb#21 + def unknown(progname = T.unsafe(nil), &block); end + + # source://rack//lib/rack/null_logger.rb#18 + def warn(progname = T.unsafe(nil), &block); end + + # source://rack//lib/rack/null_logger.rb#31 + def warn!; end + + # @return [Boolean] + # + # source://rack//lib/rack/null_logger.rb#24 + def warn?; end +end + +# source://rack//lib/rack/constants.rb#34 +Rack::OPTIONS = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#31 +Rack::PATCH = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#8 +Rack::PATH_INFO = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#29 +Rack::POST = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#30 +Rack::PUT = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#12 +Rack::QUERY_STRING = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/query_parser.rb#6 +class Rack::QueryParser + # @return [QueryParser] a new instance of QueryParser + # + # source://rack//lib/rack/query_parser.rb#33 + def initialize(params_class, _key_space_limit = T.unsafe(nil), param_depth_limit); end + + # source://rack//lib/rack/query_parser.rb#167 + def make_params; end + + # source://rack//lib/rack/query_parser.rb#171 + def new_depth_limit(param_depth_limit); end + + # normalize_params recursively expands parameters into structural types. If + # the structural types represented by two different parameter names are in + # conflict, a ParameterTypeError is raised. The depth argument is deprecated + # and should no longer be used, it is kept for backwards compatibility with + # earlier versions of rack. + # + # source://rack//lib/rack/query_parser.rb#95 + def normalize_params(params, name, v, _depth = T.unsafe(nil)); end + + # Returns the value of attribute param_depth_limit. + # + # source://rack//lib/rack/query_parser.rb#31 + def param_depth_limit; end + + # parse_nested_query expands a query string into structural types. Supported + # types are Arrays, Hashes and basic value types. It is possible to supply + # query strings with parameters of conflicting types, in this case a + # ParameterTypeError is raised. Users are encouraged to return a 400 in this + # case. + # + # source://rack//lib/rack/query_parser.rb#74 + def parse_nested_query(qs, separator = T.unsafe(nil)); end + + # Stolen from Mongrel, with some small modifications: + # Parses a query string by breaking it up at the '&'. You can also use this + # to parse cookies by changing the characters used in the second parameter + # (which defaults to '&'). + # + # source://rack//lib/rack/query_parser.rb#46 + def parse_query(qs, separator = T.unsafe(nil), &unescaper); end + + private + + # @raise [ParamsTooDeepError] + # + # source://rack//lib/rack/query_parser.rb#99 + def _normalize_params(params, name, v, depth); end + + # @return [Boolean] + # + # source://rack//lib/rack/query_parser.rb#181 + def params_hash_has_key?(hash, key); end + + # @return [Boolean] + # + # source://rack//lib/rack/query_parser.rb#177 + def params_hash_type?(obj); end + + # source://rack//lib/rack/query_parser.rb#193 + def unescape(string, encoding = T.unsafe(nil)); end + + class << self + # source://rack//lib/rack/query_parser.rb#23 + def make_default(_key_space_limit = T.unsafe(nil), param_depth_limit); end + end +end + +# source://rack//lib/rack/query_parser.rb#8 +Rack::QueryParser::COMMON_SEP = T.let(T.unsafe(nil), Hash) + +# source://rack//lib/rack/query_parser.rb#7 +Rack::QueryParser::DEFAULT_SEP = T.let(T.unsafe(nil), Regexp) + +# InvalidParameterError is the error that is raised when incoming structural +# parameters (parsed by parse_nested_query) contain invalid format or byte +# sequence. +# +# source://rack//lib/rack/query_parser.rb#17 +class Rack::QueryParser::InvalidParameterError < ::ArgumentError; end + +# ParameterTypeError is the error that is raised when incoming structural +# parameters (parsed by parse_nested_query) contain conflicting types. +# +# source://rack//lib/rack/query_parser.rb#12 +class Rack::QueryParser::ParameterTypeError < ::TypeError; end + +# source://rack//lib/rack/query_parser.rb#197 +class Rack::QueryParser::Params + # @return [Params] a new instance of Params + # + # source://rack//lib/rack/query_parser.rb#198 + def initialize; end + + # source://rack//lib/rack/query_parser.rb#203 + def [](key); end + + # source://rack//lib/rack/query_parser.rb#207 + def []=(key, value); end + + # @return [Boolean] + # + # source://rack//lib/rack/query_parser.rb#211 + def key?(key); end + + # Recursively unwraps nested `Params` objects and constructs an object + # of the same shape, but using the objects' internal representations + # (Ruby hashes) in place of the objects. The result is a hash consisting + # purely of Ruby primitives. + # + # Mutation warning! + # + # 1. This method mutates the internal representation of the `Params` + # objects in order to save object allocations. + # + # 2. The value you get back is a reference to the internal hash + # representation, not a copy. + # + # 3. Because the `Params` object's internal representation is mutable + # through the `#[]=` method, it is not thread safe. The result of + # getting the hash representation while another thread is adding a + # key to it is non-deterministic. + # + # source://rack//lib/rack/query_parser.rb#233 + def to_h; end + + # Recursively unwraps nested `Params` objects and constructs an object + # of the same shape, but using the objects' internal representations + # (Ruby hashes) in place of the objects. The result is a hash consisting + # purely of Ruby primitives. + # + # Mutation warning! + # + # 1. This method mutates the internal representation of the `Params` + # objects in order to save object allocations. + # + # 2. The value you get back is a reference to the internal hash + # representation, not a copy. + # + # 3. Because the `Params` object's internal representation is mutable + # through the `#[]=` method, it is not thread safe. The result of + # getting the hash representation while another thread is adding a + # key to it is non-deterministic. + # + # source://rack//lib/rack/query_parser.rb#233 + def to_params_hash; end +end + +# ParamsTooDeepError is the error that is raised when params are recursively +# nested over the specified limit. +# +# source://rack//lib/rack/query_parser.rb#21 +class Rack::QueryParser::ParamsTooDeepError < ::RangeError; end + +# source://rack//lib/rack/constants.rb#42 +Rack::RACK_ERRORS = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#49 +Rack::RACK_HIJACK = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#44 +Rack::RACK_INPUT = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#50 +Rack::RACK_IS_HIJACK = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#43 +Rack::RACK_LOGGER = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#63 +Rack::RACK_METHODOVERRIDE_ORIGINAL_METHOD = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#52 +Rack::RACK_MULTIPART_BUFFER_SIZE = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#53 +Rack::RACK_MULTIPART_TEMPFILE_FACTORY = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#51 +Rack::RACK_RECURSIVE_INCLUDE = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#59 +Rack::RACK_REQUEST_COOKIE_HASH = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#60 +Rack::RACK_REQUEST_COOKIE_STRING = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#58 +Rack::RACK_REQUEST_FORM_ERROR = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#56 +Rack::RACK_REQUEST_FORM_HASH = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#55 +Rack::RACK_REQUEST_FORM_INPUT = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#57 +Rack::RACK_REQUEST_FORM_VARS = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#61 +Rack::RACK_REQUEST_QUERY_HASH = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#62 +Rack::RACK_REQUEST_QUERY_STRING = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#54 +Rack::RACK_RESPONSE_FINISHED = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#45 +Rack::RACK_SESSION = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#46 +Rack::RACK_SESSION_OPTIONS = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#47 +Rack::RACK_SHOWSTATUS_DETAIL = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#41 +Rack::RACK_TEMPFILES = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#48 +Rack::RACK_URL_SCHEME = T.let(T.unsafe(nil), String) + +# Rack environment variables +# +# source://rack//lib/rack/constants.rb#40 +Rack::RACK_VERSION = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/version.rb#28 +Rack::RELEASE = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#9 +Rack::REQUEST_METHOD = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#10 +Rack::REQUEST_PATH = T.let(T.unsafe(nil), String) + +# Rack::Recursive allows applications called down the chain to +# include data from other applications (by using +# <tt>rack['rack.recursive.include'][...]</tt> or raise a +# ForwardRequest to redirect internally. +# +# source://rack//lib/rack/recursive.rb#36 +class Rack::Recursive + # @return [Recursive] a new instance of Recursive + # + # source://rack//lib/rack/recursive.rb#37 + def initialize(app); end + + # source://rack//lib/rack/recursive.rb#45 + def _call(env); end + + # source://rack//lib/rack/recursive.rb#41 + def call(env); end + + # source://rack//lib/rack/recursive.rb#52 + def include(env, path); end +end + +# High performant source reloader +# +# This class acts as Rack middleware. +# +# What makes it especially suited for use in a production environment is that +# any file will only be checked once and there will only be made one system +# call stat(2). +# +# Please note that this will not reload files in the background, it does so +# only when actively called. +# +# It is performing a check/reload cycle at the start of every request, but +# also respects a cool down time, during which nothing will be done. +# +# source://rack//lib/rack/reloader.rb#24 +class Rack::Reloader + # @return [Reloader] a new instance of Reloader + # + # source://rack//lib/rack/reloader.rb#25 + def initialize(app, cooldown = T.unsafe(nil), backend = T.unsafe(nil)); end + + # source://rack//lib/rack/reloader.rb#36 + def call(env); end + + # source://rack//lib/rack/reloader.rb#50 + def reload!(stderr = T.unsafe(nil)); end + + # A safe Kernel::load, issuing the hooks depending on the results + # + # source://rack//lib/rack/reloader.rb#58 + def safe_load(file, mtime, stderr = T.unsafe(nil)); end +end + +# source://rack//lib/rack/reloader.rb#68 +module Rack::Reloader::Stat + # Takes a relative or absolute +file+ name, a couple possible +paths+ that + # the +file+ might reside in. Returns the full path and File::Stat for the + # path. + # + # source://rack//lib/rack/reloader.rb#88 + def figure_path(file, paths); end + + # source://rack//lib/rack/reloader.rb#69 + def rotation; end + + # source://rack//lib/rack/reloader.rb#103 + def safe_stat(file); end +end + +# Rack::Request provides a convenient interface to a Rack +# environment. It is stateless, the environment +env+ passed to the +# constructor will be directly modified. +# +# req = Rack::Request.new(env) +# req.post? +# req.params["data"] +# +# source://rack//lib/rack/request.rb#16 +class Rack::Request + include ::Rack::Request::Env + include ::Rack::Request::Helpers + + # @return [Request] a new instance of Request + # + # source://rack//lib/rack/request.rb#62 + def initialize(env); end + + # source://rack//lib/rack/request.rb#76 + def delete_param(k); end + + # source://rack//lib/rack/request.rb#67 + def params; end + + # source://rack//lib/rack/request.rb#71 + def update_param(k, v); end + + class << self + # The priority when checking forwarded headers. The default + # is <tt>[:forwarded, :x_forwarded]</tt>, which means, check the + # +Forwarded+ header first, followed by the appropriate + # <tt>X-Forwarded-*</tt> header. You can revert the priority by + # reversing the priority, or remove checking of either + # or both headers by removing elements from the array. + # + # This should be set as appropriate in your environment + # based on what reverse proxies are in use. If you are not + # using reverse proxies, you should probably use an empty + # array. + # + # source://rack//lib/rack/request.rb#31 + def forwarded_priority; end + + # The priority when checking forwarded headers. The default + # is <tt>[:forwarded, :x_forwarded]</tt>, which means, check the + # +Forwarded+ header first, followed by the appropriate + # <tt>X-Forwarded-*</tt> header. You can revert the priority by + # reversing the priority, or remove checking of either + # or both headers by removing elements from the array. + # + # This should be set as appropriate in your environment + # based on what reverse proxies are in use. If you are not + # using reverse proxies, you should probably use an empty + # array. + # + # source://rack//lib/rack/request.rb#31 + def forwarded_priority=(_arg0); end + + # Returns the value of attribute ip_filter. + # + # source://rack//lib/rack/request.rb#18 + def ip_filter; end + + # Sets the attribute ip_filter + # + # @param value the value to set the attribute ip_filter to. + # + # source://rack//lib/rack/request.rb#18 + def ip_filter=(_arg0); end + + # The priority when checking either the <tt>X-Forwarded-Proto</tt> + # or <tt>X-Forwarded-Scheme</tt> header for the forwarded protocol. + # The default is <tt>[:proto, :scheme]</tt>, to try the + # <tt>X-Forwarded-Proto</tt> header before the + # <tt>X-Forwarded-Scheme</tt> header. Rack 2 had behavior + # similar to <tt>[:scheme, :proto]</tt>. You can remove either or + # both of the entries in array to ignore that respective header. + # + # source://rack//lib/rack/request.rb#40 + def x_forwarded_proto_priority; end + + # The priority when checking either the <tt>X-Forwarded-Proto</tt> + # or <tt>X-Forwarded-Scheme</tt> header for the forwarded protocol. + # The default is <tt>[:proto, :scheme]</tt>, to try the + # <tt>X-Forwarded-Proto</tt> header before the + # <tt>X-Forwarded-Scheme</tt> header. Rack 2 had behavior + # similar to <tt>[:scheme, :proto]</tt>. You can remove either or + # both of the entries in array to ignore that respective header. + # + # source://rack//lib/rack/request.rb#40 + def x_forwarded_proto_priority=(_arg0); end + end +end + +# source://rack//lib/rack/request.rb#60 +Rack::Request::ALLOWED_SCHEMES = T.let(T.unsafe(nil), Array) + +# source://rack//lib/rack/request.rb#82 +module Rack::Request::Env + # source://rack//lib/rack/request.rb#86 + def initialize(env); end + + # Add a header that may have multiple values. + # + # Example: + # request.add_header 'Accept', 'image/png' + # request.add_header 'Accept', '*/*' + # + # assert_equal 'image/png,*/*', request.get_header('Accept') + # + # http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2 + # + # source://rack//lib/rack/request.rb#129 + def add_header(key, v); end + + # Delete a request specific value for `name`. + # + # source://rack//lib/rack/request.rb#140 + def delete_header(name); end + + # Loops through each key / value pair in the request specific data. + # + # source://rack//lib/rack/request.rb#111 + def each_header(&block); end + + # The environment of the request. + # + # source://rack//lib/rack/request.rb#84 + def env; end + + # If a block is given, it yields to the block if the value hasn't been set + # on the request. + # + # source://rack//lib/rack/request.rb#106 + def fetch_header(name, &block); end + + # Get a request specific value for `name`. + # + # source://rack//lib/rack/request.rb#100 + def get_header(name); end + + # Predicate method to test to see if `name` has been set as request + # specific data + # + # @return [Boolean] + # + # source://rack//lib/rack/request.rb#95 + def has_header?(name); end + + # Set a request specific value for `name` to `v` + # + # source://rack//lib/rack/request.rb#116 + def set_header(name, v); end + + private + + # source://rack//lib/rack/request.rb#144 + def initialize_copy(other); end +end + +# source://rack//lib/rack/request.rb#149 +module Rack::Request::Helpers + # Returns the data received in the query string. + # + # source://rack//lib/rack/request.rb#484 + def GET; end + + # Returns the data received in the request body. + # + # This method support both application/x-www-form-urlencoded and + # multipart/form-data. + # + # source://rack//lib/rack/request.rb#498 + def POST; end + + # shortcut for <tt>request.params[key]</tt> + # + # source://rack//lib/rack/request.rb#609 + def [](key); end + + # shortcut for <tt>request.params[key] = value</tt> + # + # Note that modifications will not be persisted in the env. Use update_param or delete_param if you want to destructively modify params. + # + # source://rack//lib/rack/request.rb#618 + def []=(key, value); end + + # source://rack//lib/rack/request.rb#596 + def accept_encoding; end + + # source://rack//lib/rack/request.rb#600 + def accept_language; end + + # The authority of the incoming request as defined by RFC3976. + # https://tools.ietf.org/html/rfc3986#section-3.2 + # + # In HTTP/1, this is the `host` header. + # In HTTP/2, this is the `:authority` pseudo-header. + # + # source://rack//lib/rack/request.rb#266 + def authority; end + + # source://rack//lib/rack/request.rb#579 + def base_url; end + + # source://rack//lib/rack/request.rb#190 + def body; end + + # The character set of the request body if a "charset" media type + # parameter was given, or nil if no "charset" was specified. Note + # that, per RFC2616, text/* media types that specify no explicit + # charset are to be considered ISO-8859-1. + # + # source://rack//lib/rack/request.rb#458 + def content_charset; end + + # source://rack//lib/rack/request.rb#199 + def content_length; end + + # source://rack//lib/rack/request.rb#308 + def content_type; end + + # source://rack//lib/rack/request.rb#293 + def cookies; end + + # Checks the HTTP request method (or verb) to see if it was of type DELETE + # + # @return [Boolean] + # + # source://rack//lib/rack/request.rb#220 + def delete?; end + + # Destructively delete a parameter, whether it's in GET or POST. Returns the value of the deleted parameter. + # + # If the parameter is in both GET and POST, the POST value takes precedence since that's how #params works. + # + # <tt>env['rack.input']</tt> is not touched. + # + # source://rack//lib/rack/request.rb#574 + def delete_param(k); end + + # Determine whether the request body contains form-data by checking + # the request content-type for one of the media-types: + # "application/x-www-form-urlencoded" or "multipart/form-data". The + # list of form-data media types can be modified through the + # +FORM_DATA_MEDIA_TYPES+ array. + # + # A request body is also assumed to contain form-data when no + # content-type header is provided and the request_method is POST. + # + # @return [Boolean] + # + # source://rack//lib/rack/request.rb#470 + def form_data?; end + + # source://rack//lib/rack/request.rb#393 + def forwarded_authority; end + + # source://rack//lib/rack/request.rb#353 + def forwarded_for; end + + # source://rack//lib/rack/request.rb#374 + def forwarded_port; end + + # source://rack//lib/rack/request.rb#592 + def fullpath; end + + # Checks the HTTP request method (or verb) to see if it was of type GET + # + # @return [Boolean] + # + # source://rack//lib/rack/request.rb#223 + def get?; end + + # Checks the HTTP request method (or verb) to see if it was of type HEAD + # + # @return [Boolean] + # + # source://rack//lib/rack/request.rb#226 + def head?; end + + # Returns a formatted host, suitable for being used in a URI. + # + # source://rack//lib/rack/request.rb#333 + def host; end + + # The `HTTP_HOST` header. + # + # source://rack//lib/rack/request.rb#318 + def host_authority; end + + # source://rack//lib/rack/request.rb#322 + def host_with_port(authority = T.unsafe(nil)); end + + # Returns an address suitable for being to resolve to an address. + # In the case of a domain name or IPv4 address, the result is the same + # as +host+. In the case of IPv6 or future address formats, the square + # brackets are removed. + # + # source://rack//lib/rack/request.rb#341 + def hostname; end + + # source://rack//lib/rack/request.rb#414 + def ip; end + + # Checks the HTTP request method (or verb) to see if it was of type LINK + # + # @return [Boolean] + # + # source://rack//lib/rack/request.rb#232 + def link?; end + + # source://rack//lib/rack/request.rb#200 + def logger; end + + # The media type (type/subtype) portion of the CONTENT_TYPE header + # without any media type parameters. e.g., when CONTENT_TYPE is + # "text/plain;charset=utf-8", the media-type is "text/plain". + # + # For more information on the use of media types in HTTP, see: + # http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.7 + # + # source://rack//lib/rack/request.rb#441 + def media_type; end + + # The media type parameters provided in CONTENT_TYPE as a Hash, or + # an empty Hash if no CONTENT_TYPE or media-type parameters were + # provided. e.g., when the CONTENT_TYPE is "text/plain;charset=utf-8", + # this method responds with the following Hash: + # { 'charset' => 'utf-8' } + # + # source://rack//lib/rack/request.rb#450 + def media_type_params; end + + # Checks the HTTP request method (or verb) to see if it was of type OPTIONS + # + # @return [Boolean] + # + # source://rack//lib/rack/request.rb#229 + def options?; end + + # The union of GET and POST data. + # + # Note that modifications will not be persisted in the env. Use update_param or delete_param if you want to destructively modify params. + # + # source://rack//lib/rack/request.rb#545 + def params; end + + # Determine whether the request body contains data by checking + # the request media_type against registered parse-data media-types + # + # @return [Boolean] + # + # source://rack//lib/rack/request.rb#479 + def parseable_data?; end + + # Checks the HTTP request method (or verb) to see if it was of type PATCH + # + # @return [Boolean] + # + # source://rack//lib/rack/request.rb#235 + def patch?; end + + # source://rack//lib/rack/request.rb#588 + def path; end + + # source://rack//lib/rack/request.rb#194 + def path_info; end + + # source://rack//lib/rack/request.rb#195 + def path_info=(s); end + + # source://rack//lib/rack/request.rb#345 + def port; end + + # Checks the HTTP request method (or verb) to see if it was of type POST + # + # @return [Boolean] + # + # source://rack//lib/rack/request.rb#238 + def post?; end + + # Checks the HTTP request method (or verb) to see if it was of type PUT + # + # @return [Boolean] + # + # source://rack//lib/rack/request.rb#241 + def put?; end + + # source://rack//lib/rack/request.rb#198 + def query_string; end + + # the referer of the client + # + # source://rack//lib/rack/request.rb#204 + def referer; end + + # the referer of the client + # + # source://rack//lib/rack/request.rb#204 + def referrer; end + + # source://rack//lib/rack/request.rb#197 + def request_method; end + + # source://rack//lib/rack/request.rb#249 + def scheme; end + + # source://rack//lib/rack/request.rb#191 + def script_name; end + + # source://rack//lib/rack/request.rb#192 + def script_name=(s); end + + # The authority as defined by the `SERVER_NAME` and `SERVER_PORT` + # variables. + # + # source://rack//lib/rack/request.rb#272 + def server_authority; end + + # source://rack//lib/rack/request.rb#285 + def server_name; end + + # source://rack//lib/rack/request.rb#289 + def server_port; end + + # source://rack//lib/rack/request.rb#207 + def session; end + + # source://rack//lib/rack/request.rb#213 + def session_options; end + + # @return [Boolean] + # + # source://rack//lib/rack/request.rb#410 + def ssl?; end + + # Checks the HTTP request method (or verb) to see if it was of type TRACE + # + # @return [Boolean] + # + # source://rack//lib/rack/request.rb#244 + def trace?; end + + # @return [Boolean] + # + # source://rack//lib/rack/request.rb#604 + def trusted_proxy?(ip); end + + # Checks the HTTP request method (or verb) to see if it was of type UNLINK + # + # @return [Boolean] + # + # source://rack//lib/rack/request.rb#247 + def unlink?; end + + # Destructively update a parameter, whether it's in GET and/or POST. Returns nil. + # + # The parameter is updated wherever it was previous defined, so GET, POST, or both. If it wasn't previously defined, it's inserted into GET. + # + # <tt>env['rack.input']</tt> is not touched. + # + # source://rack//lib/rack/request.rb#554 + def update_param(k, v); end + + # Tries to return a remake of the original request URL as a string. + # + # source://rack//lib/rack/request.rb#584 + def url; end + + # source://rack//lib/rack/request.rb#201 + def user_agent; end + + # like Hash#values_at + # + # source://rack//lib/rack/request.rb#625 + def values_at(*keys); end + + # @return [Boolean] + # + # source://rack//lib/rack/request.rb#313 + def xhr?; end + + private + + # source://rack//lib/rack/request.rb#757 + def allowed_scheme(header); end + + # source://rack//lib/rack/request.rb#631 + def default_session; end + + # source://rack//lib/rack/request.rb#761 + def forwarded_priority; end + + # source://rack//lib/rack/request.rb#733 + def forwarded_scheme; end + + # Get an array of values set in the RFC 7239 `Forwarded` request header. + # + # source://rack//lib/rack/request.rb#659 + def get_http_forwarded(token); end + + # source://rack//lib/rack/request.rb#647 + def parse_http_accept_header(header); end + + # source://rack//lib/rack/request.rb#671 + def parse_multipart; end + + # source://rack//lib/rack/request.rb#667 + def parse_query(qs, d = T.unsafe(nil)); end + + # source://rack//lib/rack/request.rb#663 + def query_parser; end + + # source://rack//lib/rack/request.rb#724 + def reject_trusted_ip_addresses(ip_addresses); end + + # source://rack//lib/rack/request.rb#718 + def split_authority(authority); end + + # source://rack//lib/rack/request.rb#675 + def split_header(value); end + + # Assist with compatibility when processing `X-Forwarded-For`. + # + # source://rack//lib/rack/request.rb#634 + def wrap_ipv6(host); end + + # source://rack//lib/rack/request.rb#765 + def x_forwarded_proto_priority; end +end + +# source://rack//lib/rack/request.rb#703 +Rack::Request::Helpers::AUTHORITY = T.let(T.unsafe(nil), Regexp) + +# Default ports depending on scheme. Used to decide whether or not +# to include the port in a generated URI. +# +# source://rack//lib/rack/request.rb#168 +Rack::Request::Helpers::DEFAULT_PORTS = T.let(T.unsafe(nil), Hash) + +# The set of form-data media-types. Requests that do not indicate +# one of the media types present in this list will not be eligible +# for form-data / param parsing. +# +# source://rack//lib/rack/request.rb#153 +Rack::Request::Helpers::FORM_DATA_MEDIA_TYPES = T.let(T.unsafe(nil), Array) + +# source://rack//lib/rack/request.rb#728 +Rack::Request::Helpers::FORWARDED_SCHEME_HEADERS = T.let(T.unsafe(nil), Hash) + +# source://rack//lib/rack/request.rb#176 +Rack::Request::Helpers::HTTP_FORWARDED = T.let(T.unsafe(nil), String) + +# The address of the client which connected to the proxy. +# +# source://rack//lib/rack/request.rb#171 +Rack::Request::Helpers::HTTP_X_FORWARDED_FOR = T.let(T.unsafe(nil), String) + +# The contents of the host/:authority header sent to the proxy. +# +# source://rack//lib/rack/request.rb#174 +Rack::Request::Helpers::HTTP_X_FORWARDED_HOST = T.let(T.unsafe(nil), String) + +# The port used to connect to the proxy. +# +# source://rack//lib/rack/request.rb#185 +Rack::Request::Helpers::HTTP_X_FORWARDED_PORT = T.let(T.unsafe(nil), String) + +# The protocol used to connect to the proxy. +# +# source://rack//lib/rack/request.rb#182 +Rack::Request::Helpers::HTTP_X_FORWARDED_PROTO = T.let(T.unsafe(nil), String) + +# The value of the scheme sent to the proxy. +# +# source://rack//lib/rack/request.rb#179 +Rack::Request::Helpers::HTTP_X_FORWARDED_SCHEME = T.let(T.unsafe(nil), String) + +# Another way for specifying https scheme was used. +# +# source://rack//lib/rack/request.rb#188 +Rack::Request::Helpers::HTTP_X_FORWARDED_SSL = T.let(T.unsafe(nil), String) + +# The set of media-types. Requests that do not indicate +# one of the media types present in this list will not be eligible +# for param parsing like soap attachments or generic multiparts +# +# source://rack//lib/rack/request.rb#161 +Rack::Request::Helpers::PARSEABLE_DATA_MEDIA_TYPES = T.let(T.unsafe(nil), Array) + +# Rack::Response provides a convenient interface to create a Rack +# response. +# +# It allows setting of headers and cookies, and provides useful +# defaults (an OK response with empty headers and body). +# +# You can use Response#write to iteratively generate your response, +# but note that this is buffered by Rack::Response until you call +# +finish+. +finish+ however can take a block inside which calls to +# +write+ are synchronous with the Rack response. +# +# Your application's +call+ should end returning Response#finish. +# +# source://rack//lib/rack/response.rb#23 +class Rack::Response + include ::Rack::Response::Helpers + + # Initialize the response object with the specified +body+, +status+ + # and +headers+. + # + # If the +body+ is +nil+, construct an empty response object with internal + # buffering. + # + # If the +body+ responds to +to_str+, assume it's a string-like object and + # construct a buffered response object containing using that string as the + # initial contents of the buffer. + # + # Otherwise it is expected +body+ conforms to the normal requirements of a + # Rack response body, typically implementing one of +each+ (enumerable + # body) or +call+ (streaming body). + # + # The +status+ defaults to +200+ which is the "OK" HTTP status code. You + # can provide any other valid status code. + # + # The +headers+ must be a +Hash+ of key-value header pairs which conform to + # the Rack specification for response headers. The key must be a +String+ + # instance and the value can be either a +String+ or +Array+ instance. + # + # @return [Response] a new instance of Response + # @yield [_self] + # @yieldparam _self [Rack::Response] the object that the method was called on + # + # source://rack//lib/rack/response.rb#61 + def initialize(body = T.unsafe(nil), status = T.unsafe(nil), headers = T.unsafe(nil)); end + + # @raise [ArgumentError] + # + # source://rack//lib/rack/response.rb#163 + def [](key); end + + # @raise [ArgumentError] + # + # source://rack//lib/rack/response.rb#167 + def []=(key, value); end + + # Returns the value of attribute body. + # + # source://rack//lib/rack/response.rb#31 + def body; end + + # Sets the attribute body + # + # @param value the value to set the attribute body to. + # + # source://rack//lib/rack/response.rb#31 + def body=(_arg0); end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#101 + def chunked?; end + + # source://rack//lib/rack/response.rb#151 + def close; end + + # @raise [ArgumentError] + # + # source://rack//lib/rack/response.rb#171 + def delete_header(key); end + + # source://rack//lib/rack/response.rb#131 + def each(&callback); end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#155 + def empty?; end + + # Generate a response array consistent with the requirements of the SPEC. + # which is suitable to be returned from the middleware `#call(env)` method. + # + # @return [Array] a 3-tuple suitable of `[status, headers, body]` + # + # source://rack//lib/rack/response.rb#113 + def finish(&block); end + + # @raise [ArgumentError] + # + # source://rack//lib/rack/response.rb#163 + def get_header(key); end + + # @raise [ArgumentError] + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#159 + def has_header?(key); end + + # Deprecated, use headers instead. + # + # source://rack//lib/rack/response.rb#35 + def header; end + + # Returns the value of attribute headers. + # + # source://rack//lib/rack/response.rb#32 + def headers; end + + # Returns the value of attribute length. + # + # source://rack//lib/rack/response.rb#31 + def length; end + + # Sets the attribute length + # + # @param value the value to set the attribute length to. + # + # source://rack//lib/rack/response.rb#31 + def length=(_arg0); end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#105 + def no_entity_body?; end + + # source://rack//lib/rack/response.rb#96 + def redirect(target, status = T.unsafe(nil)); end + + # @raise [ArgumentError] + # + # source://rack//lib/rack/response.rb#167 + def set_header(key, value); end + + # Returns the value of attribute status. + # + # source://rack//lib/rack/response.rb#31 + def status; end + + # Sets the attribute status + # + # @param value the value to set the attribute status to. + # + # source://rack//lib/rack/response.rb#31 + def status=(_arg0); end + + # Generate a response array consistent with the requirements of the SPEC. + # which is suitable to be returned from the middleware `#call(env)` method. + # For *response + # + # @return [Array] a 3-tuple suitable of `[status, headers, body]` + # + # source://rack//lib/rack/response.rb#113 + def to_a(&block); end + + # Append to body and update content-length. + # + # NOTE: Do not mix #write and direct #body access! + # + # source://rack//lib/rack/response.rb#145 + def write(chunk); end + + class << self + # source://rack//lib/rack/response.rb#24 + def [](status, headers, body); end + end +end + +# source://rack//lib/rack/response.rb#28 +Rack::Response::CHUNKED = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/response.rb#179 +module Rack::Response::Helpers + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#190 + def accepted?; end + + # Add a header that may have multiple values. + # + # Example: + # response.add_header 'vary', 'accept-encoding' + # response.add_header 'vary', 'cookie' + # + # assert_equal 'accept-encoding,cookie', response.get_header('vary') + # + # http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2 + # + # @raise [ArgumentError] + # + # source://rack//lib/rack/response.rb#218 + def add_header(key, value); end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#193 + def bad_request?; end + + # Specify that the content should be cached. + # + # @option directive + # @param duration [Integer] The number of seconds until the cache expires. + # @param directive [Hash] a customizable set of options + # + # source://rack//lib/rack/response.rb#306 + def cache!(duration = T.unsafe(nil), directive: T.unsafe(nil)); end + + # source://rack//lib/rack/response.rb#289 + def cache_control; end + + # source://rack//lib/rack/response.rb#293 + def cache_control=(value); end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#185 + def client_error?; end + + # source://rack//lib/rack/response.rb#256 + def content_length; end + + # Get the content type of the response. + # + # source://rack//lib/rack/response.rb#239 + def content_type; end + + # Set the content type of the response. + # + # source://rack//lib/rack/response.rb#244 + def content_type=(content_type); end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#189 + def created?; end + + # source://rack//lib/rack/response.rb#273 + def delete_cookie(key, value = T.unsafe(nil)); end + + # Specifies that the content shouldn't be cached. Overrides `cache!` if already called. + # + # source://rack//lib/rack/response.rb#298 + def do_not_cache!; end + + # source://rack//lib/rack/response.rb#313 + def etag; end + + # source://rack//lib/rack/response.rb#317 + def etag=(value); end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#195 + def forbidden?; end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#205 + def include?(header); end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#182 + def informational?; end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#180 + def invalid?; end + + # source://rack//lib/rack/response.rb#261 + def location; end + + # source://rack//lib/rack/response.rb#265 + def location=(location); end + + # source://rack//lib/rack/response.rb#248 + def media_type; end + + # source://rack//lib/rack/response.rb#252 + def media_type_params; end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#197 + def method_not_allowed?; end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#192 + def moved_permanently?; end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#191 + def no_content?; end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#198 + def not_acceptable?; end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#196 + def not_found?; end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#188 + def ok?; end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#200 + def precondition_failed?; end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#203 + def redirect?; end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#184 + def redirection?; end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#199 + def request_timeout?; end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#186 + def server_error?; end + + # source://rack//lib/rack/response.rb#269 + def set_cookie(key, value); end + + # source://rack//lib/rack/response.rb#281 + def set_cookie_header; end + + # source://rack//lib/rack/response.rb#285 + def set_cookie_header=(value); end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#183 + def successful?; end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#194 + def unauthorized?; end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#201 + def unprocessable?; end + + protected + + # source://rack//lib/rack/response.rb#351 + def append(chunk); end + + # source://rack//lib/rack/response.rb#323 + def buffered_body!; end +end + +# source://rack//lib/rack/response.rb#365 +class Rack::Response::Raw + include ::Rack::Response::Helpers + + # @return [Raw] a new instance of Raw + # + # source://rack//lib/rack/response.rb#371 + def initialize(status, headers); end + + # source://rack//lib/rack/response.rb#388 + def delete_header(key); end + + # source://rack//lib/rack/response.rb#380 + def get_header(key); end + + # @return [Boolean] + # + # source://rack//lib/rack/response.rb#376 + def has_header?(key); end + + # Returns the value of attribute headers. + # + # source://rack//lib/rack/response.rb#368 + def headers; end + + # source://rack//lib/rack/response.rb#384 + def set_header(key, value); end + + # Returns the value of attribute status. + # + # source://rack//lib/rack/response.rb#369 + def status; end + + # Sets the attribute status + # + # @param value the value to set the attribute status to. + # + # source://rack//lib/rack/response.rb#369 + def status=(_arg0); end +end + +# source://rack//lib/rack/response.rb#29 +Rack::Response::STATUS_WITH_NO_ENTITY_BODY = T.let(T.unsafe(nil), Hash) + +# Class which can make any IO object rewindable, including non-rewindable ones. It does +# this by buffering the data into a tempfile, which is rewindable. +# +# Don't forget to call #close when you're done. This frees up temporary resources that +# RewindableInput uses, though it does *not* close the original IO object. +# +# source://rack//lib/rack/rewindable_input.rb#14 +class Rack::RewindableInput + # @return [RewindableInput] a new instance of RewindableInput + # + # source://rack//lib/rack/rewindable_input.rb#29 + def initialize(io); end + + # Closes this RewindableInput object without closing the originally + # wrapped IO object. Cleans up any temporary resources that this RewindableInput + # has created. + # + # This method may be called multiple times. It does nothing on subsequent calls. + # + # source://rack//lib/rack/rewindable_input.rb#65 + def close; end + + # source://rack//lib/rack/rewindable_input.rb#45 + def each(&block); end + + # source://rack//lib/rack/rewindable_input.rb#35 + def gets; end + + # source://rack//lib/rack/rewindable_input.rb#40 + def read(*args); end + + # source://rack//lib/rack/rewindable_input.rb#50 + def rewind; end + + # source://rack//lib/rack/rewindable_input.rb#55 + def size; end + + private + + # @return [Boolean] + # + # source://rack//lib/rack/rewindable_input.rb#109 + def filesystem_has_posix_semantics?; end + + # source://rack//lib/rack/rewindable_input.rb#78 + def make_rewindable; end +end + +# Makes rack.input rewindable, for compatibility with applications and middleware +# designed for earlier versions of Rack (where rack.input was required to be +# rewindable). +# +# source://rack//lib/rack/rewindable_input.rb#18 +class Rack::RewindableInput::Middleware + # @return [Middleware] a new instance of Middleware + # + # source://rack//lib/rack/rewindable_input.rb#19 + def initialize(app); end + + # source://rack//lib/rack/rewindable_input.rb#23 + def call(env); end +end + +# Sets an "x-runtime" response header, indicating the response +# time of the request, in seconds +# +# You can put it right before the application to see the processing +# time, or before all the other middlewares to include time for them, +# too. +# +# source://rack//lib/rack/runtime.rb#12 +class Rack::Runtime + # @return [Runtime] a new instance of Runtime + # + # source://rack//lib/rack/runtime.rb#16 + def initialize(app, name = T.unsafe(nil)); end + + # source://rack//lib/rack/runtime.rb#22 + def call(env); end +end + +# source://rack//lib/rack/runtime.rb#13 +Rack::Runtime::FORMAT_STRING = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/runtime.rb#14 +Rack::Runtime::HEADER_NAME = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#11 +Rack::SCRIPT_NAME = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#14 +Rack::SERVER_NAME = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#15 +Rack::SERVER_PORT = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#13 +Rack::SERVER_PROTOCOL = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#24 +Rack::SET_COOKIE = T.let(T.unsafe(nil), String) + +# = Sendfile +# +# The Sendfile middleware intercepts responses whose body is being +# served from a file and replaces it with a server specific x-sendfile +# header. The web server is then responsible for writing the file contents +# to the client. This can dramatically reduce the amount of work required +# by the Ruby backend and takes advantage of the web server's optimized file +# delivery code. +# +# In order to take advantage of this middleware, the response body must +# respond to +to_path+ and the request must include an x-sendfile-type +# header. Rack::Files and other components implement +to_path+ so there's +# rarely anything you need to do in your application. The x-sendfile-type +# header is typically set in your web servers configuration. The following +# sections attempt to document +# +# === Nginx +# +# Nginx supports the x-accel-redirect header. This is similar to x-sendfile +# but requires parts of the filesystem to be mapped into a private URL +# hierarchy. +# +# The following example shows the Nginx configuration required to create +# a private "/files/" area, enable x-accel-redirect, and pass the special +# x-sendfile-type and x-accel-mapping headers to the backend: +# +# location ~ /files/(.*) { +# internal; +# alias /var/www/$1; +# } +# +# location / { +# proxy_redirect off; +# +# proxy_set_header Host $host; +# proxy_set_header X-Real-IP $remote_addr; +# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; +# +# proxy_set_header x-sendfile-type x-accel-redirect; +# proxy_set_header x-accel-mapping /var/www/=/files/; +# +# proxy_pass http://127.0.0.1:8080/; +# } +# +# Note that the x-sendfile-type header must be set exactly as shown above. +# The x-accel-mapping header should specify the location on the file system, +# followed by an equals sign (=), followed name of the private URL pattern +# that it maps to. The middleware performs a simple substitution on the +# resulting path. +# +# See Also: https://www.nginx.com/resources/wiki/start/topics/examples/xsendfile +# +# === lighttpd +# +# Lighttpd has supported some variation of the x-sendfile header for some +# time, although only recent version support x-sendfile in a reverse proxy +# configuration. +# +# $HTTP["host"] == "example.com" { +# proxy-core.protocol = "http" +# proxy-core.balancer = "round-robin" +# proxy-core.backends = ( +# "127.0.0.1:8000", +# "127.0.0.1:8001", +# ... +# ) +# +# proxy-core.allow-x-sendfile = "enable" +# proxy-core.rewrite-request = ( +# "x-sendfile-type" => (".*" => "x-sendfile") +# ) +# } +# +# See Also: http://redmine.lighttpd.net/wiki/lighttpd/Docs:ModProxyCore +# +# === Apache +# +# x-sendfile is supported under Apache 2.x using a separate module: +# +# https://tn123.org/mod_xsendfile/ +# +# Once the module is compiled and installed, you can enable it using +# XSendFile config directive: +# +# RequestHeader Set x-sendfile-type x-sendfile +# ProxyPassReverse / http://localhost:8001/ +# XSendFile on +# +# === Mapping parameter +# +# The third parameter allows for an overriding extension of the +# x-accel-mapping header. Mappings should be provided in tuples of internal to +# external. The internal values may contain regular expression syntax, they +# will be matched with case indifference. +# +# source://rack//lib/rack/sendfile.rb#104 +class Rack::Sendfile + # @return [Sendfile] a new instance of Sendfile + # + # source://rack//lib/rack/sendfile.rb#105 + def initialize(app, variation = T.unsafe(nil), mappings = T.unsafe(nil)); end + + # source://rack//lib/rack/sendfile.rb#113 + def call(env); end + + private + + # source://rack//lib/rack/sendfile.rb#154 + def map_accel_path(env, path); end + + # source://rack//lib/rack/sendfile.rb#148 + def variation(env); end +end + +# Rack::ShowExceptions catches all exceptions raised from the app it +# wraps. It shows a useful backtrace with the sourcefile and +# clickable context, the whole Rack environment and the request +# data. +# +# Be careful when you use this on public-facing sites as it could +# reveal information helpful to attackers. +# +# source://rack//lib/rack/show_exceptions.rb#19 +class Rack::ShowExceptions + # @return [ShowExceptions] a new instance of ShowExceptions + # + # source://rack//lib/rack/show_exceptions.rb#22 + def initialize(app); end + + # source://rack//lib/rack/show_exceptions.rb#26 + def call(env); end + + # source://rack//lib/rack/show_exceptions.rb#61 + def dump_exception(exception); end + + # source://rack//lib/rack/show_exceptions.rb#112 + def h(obj); end + + # @return [Boolean] + # + # source://rack//lib/rack/show_exceptions.rb#52 + def prefers_plaintext?(env); end + + # source://rack//lib/rack/show_exceptions.rb#72 + def pretty(env, exception); end + + # source://rack//lib/rack/show_exceptions.rb#108 + def template; end + + private + + # @return [Boolean] + # + # source://rack//lib/rack/show_exceptions.rb#56 + def accepts_html?(env); end +end + +# source://rack//lib/rack/show_exceptions.rb#20 +Rack::ShowExceptions::CONTEXT = T.let(T.unsafe(nil), Integer) + +# source://rack//lib/rack/show_exceptions.rb#127 +Rack::ShowExceptions::TEMPLATE = T.let(T.unsafe(nil), ERB) + +# Rack::ShowStatus catches all empty responses and replaces them +# with a site explaining the error. +# +# Additional details can be put into <tt>rack.showstatus.detail</tt> +# and will be shown as HTML. If such details exist, the error page +# is always rendered, even if the reply was not empty. +# +# source://rack//lib/rack/show_status.rb#18 +class Rack::ShowStatus + # @return [ShowStatus] a new instance of ShowStatus + # + # source://rack//lib/rack/show_status.rb#19 + def initialize(app); end + + # source://rack//lib/rack/show_status.rb#24 + def call(env); end + + # source://rack//lib/rack/show_status.rb#54 + def h(obj); end +end + +# source://rack//lib/rack/show_status.rb#69 +Rack::ShowStatus::TEMPLATE = T.let(T.unsafe(nil), String) + +# The Rack::Static middleware intercepts requests for static files +# (javascript files, images, stylesheets, etc) based on the url prefixes or +# route mappings passed in the options, and serves them using a Rack::Files +# object. This allows a Rack stack to serve both static and dynamic content. +# +# Examples: +# +# Serve all requests beginning with /media from the "media" folder located +# in the current directory (ie media/*): +# +# use Rack::Static, :urls => ["/media"] +# +# Same as previous, but instead of returning 404 for missing files under +# /media, call the next middleware: +# +# use Rack::Static, :urls => ["/media"], :cascade => true +# +# Serve all requests beginning with /css or /images from the folder "public" +# in the current directory (ie public/css/* and public/images/*): +# +# use Rack::Static, :urls => ["/css", "/images"], :root => "public" +# +# Serve all requests to / with "index.html" from the folder "public" in the +# current directory (ie public/index.html): +# +# use Rack::Static, :urls => {"/" => 'index.html'}, :root => 'public' +# +# Serve all requests normally from the folder "public" in the current +# directory but uses index.html as default route for "/" +# +# use Rack::Static, :urls => [""], :root => 'public', :index => +# 'index.html' +# +# Set custom HTTP Headers for based on rules: +# +# use Rack::Static, :root => 'public', +# :header_rules => [ +# [rule, {header_field => content, header_field => content}], +# [rule, {header_field => content}] +# ] +# +# Rules for selecting files: +# +# 1) All files +# Provide the :all symbol +# :all => Matches every file +# +# 2) Folders +# Provide the folder path as a string +# '/folder' or '/folder/subfolder' => Matches files in a certain folder +# +# 3) File Extensions +# Provide the file extensions as an array +# ['css', 'js'] or %w(css js) => Matches files ending in .css or .js +# +# 4) Regular Expressions / Regexp +# Provide a regular expression +# %r{\.(?:css|js)\z} => Matches files ending in .css or .js +# /\.(?:eot|ttf|otf|woff2|woff|svg)\z/ => Matches files ending in +# the most common web font formats (.eot, .ttf, .otf, .woff2, .woff, .svg) +# Note: This Regexp is available as a shortcut, using the :fonts rule +# +# 5) Font Shortcut +# Provide the :fonts symbol +# :fonts => Uses the Regexp rule stated right above to match all common web font endings +# +# Rule Ordering: +# Rules are applied in the order that they are provided. +# List rather general rules above special ones. +# +# Complete example use case including HTTP header rules: +# +# use Rack::Static, :root => 'public', +# :header_rules => [ +# # Cache all static files in public caches (e.g. Rack::Cache) +# # as well as in the browser +# [:all, {'cache-control' => 'public, max-age=31536000'}], +# +# # Provide web fonts with cross-origin access-control-headers +# # Firefox requires this when serving assets using a Content Delivery Network +# [:fonts, {'access-control-allow-origin' => '*'}] +# ] +# +# source://rack//lib/rack/static.rb#92 +class Rack::Static + # @return [Static] a new instance of Static + # + # source://rack//lib/rack/static.rb#93 + def initialize(app, options = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rack//lib/rack/static.rb#109 + def add_index_root?(path); end + + # Convert HTTP header rules to HTTP headers + # + # source://rack//lib/rack/static.rb#166 + def applicable_rules(path); end + + # source://rack//lib/rack/static.rb#125 + def call(env); end + + # source://rack//lib/rack/static.rb#121 + def can_serve(path); end + + # source://rack//lib/rack/static.rb#113 + def overwrite_file_path(path); end + + # source://rack//lib/rack/static.rb#117 + def route_file(path); end +end + +# source://rack//lib/rack/constants.rb#37 +Rack::TRACE = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/constants.rb#25 +Rack::TRANSFER_ENCODING = T.let(T.unsafe(nil), String) + +# Middleware tracks and cleans Tempfiles created throughout a request (i.e. Rack::Multipart) +# Ideas/strategy based on posts by Eric Wong and Charles Oliver Nutter +# https://groups.google.com/forum/#!searchin/rack-devel/temp/rack-devel/brK8eh-MByw/sw61oJJCGRMJ +# +# source://rack//lib/rack/tempfile_reaper.rb#11 +class Rack::TempfileReaper + # @return [TempfileReaper] a new instance of TempfileReaper + # + # source://rack//lib/rack/tempfile_reaper.rb#12 + def initialize(app); end + + # source://rack//lib/rack/tempfile_reaper.rb#16 + def call(env); end +end + +# source://rack//lib/rack/constants.rb#36 +Rack::UNLINK = T.let(T.unsafe(nil), String) + +# Rack::URLMap takes a hash mapping urls or paths to apps, and +# dispatches accordingly. Support for HTTP/1.1 host names exists if +# the URLs start with <tt>http://</tt> or <tt>https://</tt>. +# +# URLMap modifies the SCRIPT_NAME and PATH_INFO such that the part +# relevant for dispatch is in the SCRIPT_NAME, and the rest in the +# PATH_INFO. This should be taken care of when you need to +# reconstruct the URL in order to create links. +# +# URLMap dispatches in such a way that the longest paths are tried +# first, since they are most specific. +# +# source://rack//lib/rack/urlmap.rb#20 +class Rack::URLMap + # @return [URLMap] a new instance of URLMap + # + # source://rack//lib/rack/urlmap.rb#21 + def initialize(map = T.unsafe(nil)); end + + # source://rack//lib/rack/urlmap.rb#48 + def call(env); end + + # source://rack//lib/rack/urlmap.rb#25 + def remap(map); end + + private + + # @return [Boolean] + # + # source://rack//lib/rack/urlmap.rb#87 + def casecmp?(v1, v2); end +end + +# Rack::Utils contains a grab-bag of useful methods for writing web +# applications adopted from all kinds of Ruby libraries. +# +# source://rack//lib/rack/utils.rb#19 +module Rack::Utils + private + + # source://rack//lib/rack/utils.rb#254 + def add_cookie_to_header(header, key, value); end + + # source://rack//lib/rack/utils.rb#389 + def add_remove_cookie_to_header(header, key, value = T.unsafe(nil)); end + + # Return best accept value to use, based on the algorithm + # in RFC 2616 Section 14. If there are multiple best + # matches (same specificity and quality), the value returned + # is arbitrary. + # + # source://rack//lib/rack/utils.rb#173 + def best_q_match(q_value_header, available_mimes); end + + # source://rack//lib/rack/utils.rb#127 + def build_nested_query(value, prefix = T.unsafe(nil)); end + + # source://rack//lib/rack/utils.rb#117 + def build_query(params); end + + # Parses the "Range:" header, if present, into an array of Range objects. + # Returns nil if the header is missing or syntactically invalid. + # Returns an empty array if none of the ranges are satisfiable. + # + # source://rack//lib/rack/utils.rb#431 + def byte_ranges(env, size); end + + # source://rack//lib/rack/utils.rb#632 + def clean_path_info(path_info); end + + # :nocov: + # + # source://rack//lib/rack/utils.rb#98 + def clock_time; end + + # source://rack//lib/rack/utils.rb#383 + def delete_cookie_header!(headers, key, value = T.unsafe(nil)); end + + # :call-seq: + # delete_set_cookie_header(key, value = {}) -> encoded string + # + # Generate an encoded string based on the given +key+ and +value+ using + # set_cookie_header for the purpose of causing the specified cookie to be + # deleted. The +value+ may be an instance of +Hash+ and can include + # attributes as outlined by set_cookie_header. The encoded cookie will have + # a +max_age+ of 0 seconds, an +expires+ date in the past and an empty + # +value+. When used with the +set-cookie+ header, it will cause the client + # to *remove* any matching cookie. + # + # delete_set_cookie_header("myname") + # # => "myname=; max-age=0; expires=Thu, 01 Jan 1970 00:00:00 GMT" + # + # source://rack//lib/rack/utils.rb#373 + def delete_set_cookie_header(key, value = T.unsafe(nil)); end + + # :call-seq: + # delete_set_cookie_header!(header, key, value = {}) -> header value + # + # Set an expired cookie in the specified headers with the given cookie + # +key+ and +value+ using delete_set_cookie_header. This causes + # the client to immediately delete the specified cookie. + # + # delete_set_cookie_header!(nil, "mycookie") + # # => "mycookie=; max-age=0; expires=Thu, 01 Jan 1970 00:00:00 GMT" + # + # If the header is non-nil, it will be modified in place. + # + # header = [] + # delete_set_cookie_header!(header, "mycookie") + # # => ["mycookie=; max-age=0; expires=Thu, 01 Jan 1970 00:00:00 GMT"] + # header + # # => ["mycookie=; max-age=0; expires=Thu, 01 Jan 1970 00:00:00 GMT"] + # + # source://rack//lib/rack/utils.rb#413 + def delete_set_cookie_header!(header, key, value = T.unsafe(nil)); end + + # URI escapes. (CGI style space to +) + # + # source://rack//lib/rack/utils.rb#38 + def escape(s); end + + # Escape ampersands, brackets and quotes to their HTML/XML entities. + # + # source://rack//lib/rack/utils.rb#198 + def escape_html(string); end + + # Like URI escaping, but with %20 instead of +. Strictly speaking this is + # true URI escaping. + # + # source://rack//lib/rack/utils.rb#44 + def escape_path(s); end + + # source://rack//lib/rack/utils.rb#156 + def forwarded_values(forwarded_header); end + + # source://rack//lib/rack/utils.rb#435 + def get_byte_ranges(http_range, size); end + + # source://rack//lib/rack/utils.rb#377 + def make_delete_cookie_header(header, key, value); end + + # :call-seq: + # parse_cookies(env) -> hash + # + # Parse cookies from the provided request environment using + # parse_cookies_header. Returns a map of cookie +key+ to cookie +value+. + # + # parse_cookies({'HTTP_COOKIE' => 'myname=myvalue'}) + # # => {'myname' => 'myvalue'} + # + # source://rack//lib/rack/utils.rb#278 + def parse_cookies(env); end + + # :call-seq: + # parse_cookies_header(value) -> hash + # + # Parse cookies from the provided header +value+ according to RFC6265. The + # syntax for cookie headers only supports semicolons. Returns a map of + # cookie +key+ to cookie +value+. + # + # parse_cookies_header('myname=myvalue; max-age=0') + # # => {"myname"=>"myvalue", "max-age"=>"0"} + # + # source://rack//lib/rack/utils.rb#244 + def parse_cookies_header(value); end + + # source://rack//lib/rack/utils.rb#113 + def parse_nested_query(qs, d = T.unsafe(nil)); end + + # source://rack//lib/rack/utils.rb#109 + def parse_query(qs, d = T.unsafe(nil), &unescaper); end + + # source://rack//lib/rack/utils.rb#145 + def q_values(q_value_header); end + + # source://rack//lib/rack/utils.rb#424 + def rfc2822(time); end + + # :nocov: + # + # source://rack//lib/rack/utils.rb#472 + def secure_compare(a, b); end + + # source://rack//lib/rack/utils.rb#202 + def select_best_encoding(available_encodings, accept_encoding); end + + # :call-seq: + # set_cookie_header(key, value) -> encoded string + # + # Generate an encoded string using the provided +key+ and +value+ suitable + # for the +set-cookie+ header according to RFC6265. The +value+ may be an + # instance of either +String+ or +Hash+. + # + # If the cookie +value+ is an instance of +Hash+, it considers the following + # cookie attribute keys: +domain+, +max_age+, +expires+ (must be instance + # of +Time+), +secure+, +http_only+, +same_site+ and +value+. For more + # details about the interpretation of these fields, consult + # [RFC6265 Section 5.2](https://datatracker.ietf.org/doc/html/rfc6265#section-5.2). + # + # An extra cookie attribute +escape_key+ can be provided to control whether + # or not the cookie key is URL encoded. If explicitly set to +false+, the + # cookie key name will not be url encoded (escaped). The default is +true+. + # + # set_cookie_header("myname", "myvalue") + # # => "myname=myvalue" + # + # set_cookie_header("myname", {value: "myvalue", max_age: 10}) + # # => "myname=myvalue; max-age=10" + # + # source://rack//lib/rack/utils.rb#305 + def set_cookie_header(key, value); end + + # :call-seq: + # set_cookie_header!(headers, key, value) -> header value + # + # Append a cookie in the specified headers with the given cookie +key+ and + # +value+ using set_cookie_header. + # + # If the headers already contains a +set-cookie+ key, it will be converted + # to an +Array+ if not already, and appended to. + # + # source://rack//lib/rack/utils.rb#347 + def set_cookie_header!(headers, key, value); end + + # source://rack//lib/rack/utils.rb#622 + def status_code(status); end + + # Unescapes a URI escaped string with +encoding+. +encoding+ will be the + # target encoding of the string returned, and it defaults to UTF-8 + # + # source://rack//lib/rack/utils.rb#56 + def unescape(s, encoding = T.unsafe(nil)); end + + # Unescapes the **path** component of a URI. See Rack::Utils.unescape for + # unescaping query parameters or form components. + # + # source://rack//lib/rack/utils.rb#50 + def unescape_path(s); end + + # source://rack//lib/rack/utils.rb#649 + def valid_path?(path); end + + class << self + # source://rack//lib/rack/utils.rb#254 + def add_cookie_to_header(header, key, value); end + + # source://rack//lib/rack/utils.rb#389 + def add_remove_cookie_to_header(header, key, value = T.unsafe(nil)); end + + # Return best accept value to use, based on the algorithm + # in RFC 2616 Section 14. If there are multiple best + # matches (same specificity and quality), the value returned + # is arbitrary. + # + # source://rack//lib/rack/utils.rb#173 + def best_q_match(q_value_header, available_mimes); end + + # source://rack//lib/rack/utils.rb#127 + def build_nested_query(value, prefix = T.unsafe(nil)); end + + # source://rack//lib/rack/utils.rb#117 + def build_query(params); end + + # Parses the "Range:" header, if present, into an array of Range objects. + # Returns nil if the header is missing or syntactically invalid. + # Returns an empty array if none of the ranges are satisfiable. + # + # source://rack//lib/rack/utils.rb#431 + def byte_ranges(env, size); end + + # source://rack//lib/rack/utils.rb#632 + def clean_path_info(path_info); end + + # source://rack//lib/rack/utils.rb#98 + def clock_time; end + + # Returns the value of attribute default_query_parser. + # + # source://rack//lib/rack/utils.rb#28 + def default_query_parser; end + + # Sets the attribute default_query_parser + # + # @param value the value to set the attribute default_query_parser to. + # + # source://rack//lib/rack/utils.rb#28 + def default_query_parser=(_arg0); end + + # source://rack//lib/rack/utils.rb#383 + def delete_cookie_header!(headers, key, value = T.unsafe(nil)); end + + # :call-seq: + # delete_set_cookie_header(key, value = {}) -> encoded string + # + # Generate an encoded string based on the given +key+ and +value+ using + # set_cookie_header for the purpose of causing the specified cookie to be + # deleted. The +value+ may be an instance of +Hash+ and can include + # attributes as outlined by set_cookie_header. The encoded cookie will have + # a +max_age+ of 0 seconds, an +expires+ date in the past and an empty + # +value+. When used with the +set-cookie+ header, it will cause the client + # to *remove* any matching cookie. + # + # delete_set_cookie_header("myname") + # # => "myname=; max-age=0; expires=Thu, 01 Jan 1970 00:00:00 GMT" + # + # source://rack//lib/rack/utils.rb#373 + def delete_set_cookie_header(key, value = T.unsafe(nil)); end + + # :call-seq: + # delete_set_cookie_header!(header, key, value = {}) -> header value + # + # Set an expired cookie in the specified headers with the given cookie + # +key+ and +value+ using delete_set_cookie_header. This causes + # the client to immediately delete the specified cookie. + # + # delete_set_cookie_header!(nil, "mycookie") + # # => "mycookie=; max-age=0; expires=Thu, 01 Jan 1970 00:00:00 GMT" + # + # If the header is non-nil, it will be modified in place. + # + # header = [] + # delete_set_cookie_header!(header, "mycookie") + # # => ["mycookie=; max-age=0; expires=Thu, 01 Jan 1970 00:00:00 GMT"] + # header + # # => ["mycookie=; max-age=0; expires=Thu, 01 Jan 1970 00:00:00 GMT"] + # + # source://rack//lib/rack/utils.rb#413 + def delete_set_cookie_header!(header, key, value = T.unsafe(nil)); end + + # URI escapes. (CGI style space to +) + # + # source://rack//lib/rack/utils.rb#38 + def escape(s); end + + # Escape ampersands, brackets and quotes to their HTML/XML entities. + # + # source://rack//lib/rack/utils.rb#198 + def escape_html(string); end + + # Like URI escaping, but with %20 instead of +. Strictly speaking this is + # true URI escaping. + # + # source://rack//lib/rack/utils.rb#44 + def escape_path(s); end + + # source://rack//lib/rack/utils.rb#156 + def forwarded_values(forwarded_header); end + + # source://rack//lib/rack/utils.rb#435 + def get_byte_ranges(http_range, size); end + + # source://rack//lib/rack/utils.rb#88 + def key_space_limit; end + + # source://rack//lib/rack/utils.rb#93 + def key_space_limit=(v); end + + # source://rack//lib/rack/utils.rb#377 + def make_delete_cookie_header(header, key, value); end + + # Returns the value of attribute multipart_file_limit. + # + # source://rack//lib/rack/utils.rb#63 + def multipart_file_limit; end + + # Sets the attribute multipart_file_limit + # + # @param value the value to set the attribute multipart_file_limit to. + # + # source://rack//lib/rack/utils.rb#63 + def multipart_file_limit=(_arg0); end + + # Returns the value of attribute multipart_file_limit. + # multipart_part_limit is the original name of multipart_file_limit, but + # the limit only counts parts with filenames. + # + # source://rack//lib/rack/utils.rb#63 + def multipart_part_limit; end + + # Sets the attribute multipart_file_limit + # + # @param value the value to set the attribute multipart_file_limit to. + # + # source://rack//lib/rack/utils.rb#63 + def multipart_part_limit=(_arg0); end + + # Returns the value of attribute multipart_total_part_limit. + # + # source://rack//lib/rack/utils.rb#61 + def multipart_total_part_limit; end + + # Sets the attribute multipart_total_part_limit + # + # @param value the value to set the attribute multipart_total_part_limit to. + # + # source://rack//lib/rack/utils.rb#61 + def multipart_total_part_limit=(_arg0); end + + # source://rack//lib/rack/utils.rb#80 + def param_depth_limit; end + + # source://rack//lib/rack/utils.rb#84 + def param_depth_limit=(v); end + + # :call-seq: + # parse_cookies(env) -> hash + # + # Parse cookies from the provided request environment using + # parse_cookies_header. Returns a map of cookie +key+ to cookie +value+. + # + # parse_cookies({'HTTP_COOKIE' => 'myname=myvalue'}) + # # => {'myname' => 'myvalue'} + # + # source://rack//lib/rack/utils.rb#278 + def parse_cookies(env); end + + # :call-seq: + # parse_cookies_header(value) -> hash + # + # Parse cookies from the provided header +value+ according to RFC6265. The + # syntax for cookie headers only supports semicolons. Returns a map of + # cookie +key+ to cookie +value+. + # + # parse_cookies_header('myname=myvalue; max-age=0') + # # => {"myname"=>"myvalue", "max-age"=>"0"} + # + # source://rack//lib/rack/utils.rb#244 + def parse_cookies_header(value); end + + # source://rack//lib/rack/utils.rb#113 + def parse_nested_query(qs, d = T.unsafe(nil)); end + + # source://rack//lib/rack/utils.rb#109 + def parse_query(qs, d = T.unsafe(nil), &unescaper); end + + # source://rack//lib/rack/utils.rb#145 + def q_values(q_value_header); end + + # source://rack//lib/rack/utils.rb#424 + def rfc2822(time); end + + # source://rack//lib/rack/utils.rb#472 + def secure_compare(a, b); end + + # source://rack//lib/rack/utils.rb#202 + def select_best_encoding(available_encodings, accept_encoding); end + + # :call-seq: + # set_cookie_header(key, value) -> encoded string + # + # Generate an encoded string using the provided +key+ and +value+ suitable + # for the +set-cookie+ header according to RFC6265. The +value+ may be an + # instance of either +String+ or +Hash+. + # + # If the cookie +value+ is an instance of +Hash+, it considers the following + # cookie attribute keys: +domain+, +max_age+, +expires+ (must be instance + # of +Time+), +secure+, +http_only+, +same_site+ and +value+. For more + # details about the interpretation of these fields, consult + # [RFC6265 Section 5.2](https://datatracker.ietf.org/doc/html/rfc6265#section-5.2). + # + # An extra cookie attribute +escape_key+ can be provided to control whether + # or not the cookie key is URL encoded. If explicitly set to +false+, the + # cookie key name will not be url encoded (escaped). The default is +true+. + # + # set_cookie_header("myname", "myvalue") + # # => "myname=myvalue" + # + # set_cookie_header("myname", {value: "myvalue", max_age: 10}) + # # => "myname=myvalue; max-age=10" + # + # source://rack//lib/rack/utils.rb#305 + def set_cookie_header(key, value); end + + # :call-seq: + # set_cookie_header!(headers, key, value) -> header value + # + # Append a cookie in the specified headers with the given cookie +key+ and + # +value+ using set_cookie_header. + # + # If the headers already contains a +set-cookie+ key, it will be converted + # to an +Array+ if not already, and appended to. + # + # source://rack//lib/rack/utils.rb#347 + def set_cookie_header!(headers, key, value); end + + # source://rack//lib/rack/utils.rb#622 + def status_code(status); end + + # Unescapes a URI escaped string with +encoding+. +encoding+ will be the + # target encoding of the string returned, and it defaults to UTF-8 + # + # source://rack//lib/rack/utils.rb#56 + def unescape(s, encoding = T.unsafe(nil)); end + + # Unescapes the **path** component of a URI. See Rack::Utils.unescape for + # unescaping query parameters or form components. + # + # source://rack//lib/rack/utils.rb#50 + def unescape_path(s); end + + # @return [Boolean] + # + # source://rack//lib/rack/utils.rb#649 + def valid_path?(path); end + end +end + +# source://rack//lib/rack/utils.rb#24 +Rack::Utils::COMMON_SEP = T.let(T.unsafe(nil), Hash) + +# Context allows the use of a compatible middleware at different points +# in a request handling stack. A compatible middleware must define +# #context which should take the arguments env and app. The first of which +# would be the request environment. The second of which would be the rack +# application that the request would be forwarded to. +# +# source://rack//lib/rack/utils.rb#495 +class Rack::Utils::Context + # @return [Context] a new instance of Context + # + # source://rack//lib/rack/utils.rb#498 + def initialize(app_f, app_r); end + + # Returns the value of attribute app. + # + # source://rack//lib/rack/utils.rb#496 + def app; end + + # source://rack//lib/rack/utils.rb#503 + def call(env); end + + # source://rack//lib/rack/utils.rb#511 + def context(env, app = T.unsafe(nil)); end + + # Returns the value of attribute for. + # + # source://rack//lib/rack/utils.rb#496 + def for; end + + # source://rack//lib/rack/utils.rb#507 + def recontext(app); end +end + +# source://rack//lib/rack/utils.rb#23 +Rack::Utils::DEFAULT_SEP = T.let(T.unsafe(nil), Regexp) + +# source://rack//lib/rack/utils.rb#186 +Rack::Utils::ESCAPE_HTML = T.let(T.unsafe(nil), Hash) + +# source://rack//lib/rack/utils.rb#195 +Rack::Utils::ESCAPE_HTML_PATTERN = T.let(T.unsafe(nil), Regexp) + +# Every standard HTTP code mapped to the appropriate message. +# Generated with: +# curl -s https://www.iana.org/assignments/http-status-codes/http-status-codes-1.csv | \ +# ruby -ne 'm = /^(\d{3}),(?!Unassigned|\(Unused\))([^,]+)/.match($_) and \ +# puts "#{m[1]} => \x27#{m[2].strip}\x27,"' +# +# source://rack//lib/rack/utils.rb#549 +Rack::Utils::HTTP_STATUS_CODES = T.let(T.unsafe(nil), Hash) + +# A wrapper around Headers +# header when set. +# +# @api private +# +# source://rack//lib/rack/utils.rb#520 +class Rack::Utils::HeaderHash < ::Hash + class << self + # @api private + # + # source://rack//lib/rack/utils.rb#521 + def [](headers); end + + # @api private + # @raise [TypeError] + # + # source://rack//lib/rack/utils.rb#539 + def allocate; end + + # @api private + # + # source://rack//lib/rack/utils.rb#532 + def new(hash = T.unsafe(nil)); end + end +end + +# source://rack//lib/rack/utils.rb#21 +Rack::Utils::InvalidParameterError = Rack::QueryParser::InvalidParameterError + +# source://rack//lib/rack/utils.rb#25 +Rack::Utils::KeySpaceConstrainedParams = Rack::QueryParser::Params + +# source://rack//lib/rack/utils.rb#647 +Rack::Utils::NULL_BYTE = T.let(T.unsafe(nil), String) + +# source://rack//lib/rack/utils.rb#630 +Rack::Utils::PATH_SEPS = T.let(T.unsafe(nil), Regexp) + +# source://rack//lib/rack/utils.rb#20 +Rack::Utils::ParameterTypeError = Rack::QueryParser::ParameterTypeError + +# source://rack//lib/rack/utils.rb#22 +Rack::Utils::ParamsTooDeepError = Rack::QueryParser::ParamsTooDeepError + +# Responses with HTTP status codes that should not have an entity body +# +# source://rack//lib/rack/utils.rb#616 +Rack::Utils::STATUS_WITH_NO_ENTITY_BODY = T.let(T.unsafe(nil), Hash) + +# source://rack//lib/rack/utils.rb#618 +Rack::Utils::SYMBOL_TO_STATUS_CODE = T.let(T.unsafe(nil), Hash) + +# The Rack protocol version number implemented. +# +# source://rack//lib/rack/version.rb#16 +Rack::VERSION = T.let(T.unsafe(nil), Array) + +# source://rack//lib/rack/version.rb#19 +Rack::VERSION_STRING = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/rubocop-capybara@2.18.0.rbi b/sorbet/rbi/gems/rubocop-capybara@2.18.0.rbi new file mode 100644 index 0000000..070d22d --- /dev/null +++ b/sorbet/rbi/gems/rubocop-capybara@2.18.0.rbi @@ -0,0 +1,8 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rubocop-capybara` gem. +# Please instead update this file by running `bin/tapioca gem rubocop-capybara`. + +# 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-dbl@1.2.0.rbi b/sorbet/rbi/gems/rubocop-dbl@1.2.0.rbi new file mode 100644 index 0000000..fe8678b --- /dev/null +++ b/sorbet/rbi/gems/rubocop-dbl@1.2.0.rbi @@ -0,0 +1,8 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rubocop-dbl` gem. +# Please instead update this file by running `bin/tapioca gem rubocop-dbl`. + +# 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-factory_bot@2.23.1.rbi b/sorbet/rbi/gems/rubocop-factory_bot@2.23.1.rbi new file mode 100644 index 0000000..ca47985 --- /dev/null +++ b/sorbet/rbi/gems/rubocop-factory_bot@2.23.1.rbi @@ -0,0 +1,8 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rubocop-factory_bot` gem. +# Please instead update this file by running `bin/tapioca gem rubocop-factory_bot`. + +# 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-packaging@0.5.2.rbi b/sorbet/rbi/gems/rubocop-packaging@0.5.2.rbi new file mode 100644 index 0000000..4f021c8 --- /dev/null +++ b/sorbet/rbi/gems/rubocop-packaging@0.5.2.rbi @@ -0,0 +1,8 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rubocop-packaging` gem. +# Please instead update this file by running `bin/tapioca gem rubocop-packaging`. + +# 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-performance@1.18.0.rbi b/sorbet/rbi/gems/rubocop-performance@1.18.0.rbi new file mode 100644 index 0000000..72f4043 --- /dev/null +++ b/sorbet/rbi/gems/rubocop-performance@1.18.0.rbi @@ -0,0 +1,8 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# 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`. + +# 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-rails@2.20.2.rbi b/sorbet/rbi/gems/rubocop-rails@2.20.2.rbi new file mode 100644 index 0000000..9d4bba4 --- /dev/null +++ b/sorbet/rbi/gems/rubocop-rails@2.20.2.rbi @@ -0,0 +1,8 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rubocop-rails` gem. +# Please instead update this file by running `bin/tapioca gem rubocop-rails`. + +# 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-rspec@2.22.0.rbi b/sorbet/rbi/gems/rubocop-rspec@2.22.0.rbi new file mode 100644 index 0000000..4c9426d --- /dev/null +++ b/sorbet/rbi/gems/rubocop-rspec@2.22.0.rbi @@ -0,0 +1,8 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rubocop-rspec` gem. +# Please instead update this file by running `bin/tapioca gem rubocop-rspec`. + +# 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.7.0.rbi b/sorbet/rbi/gems/rubocop-sorbet@0.7.0.rbi new file mode 100644 index 0000000..f5ac216 --- /dev/null +++ b/sorbet/rbi/gems/rubocop-sorbet@0.7.0.rbi @@ -0,0 +1,8 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rubocop-sorbet` gem. +# Please instead update this file by running `bin/tapioca gem rubocop-sorbet`. + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/tzinfo@2.0.6.rbi b/sorbet/rbi/gems/tzinfo@2.0.6.rbi new file mode 100644 index 0000000..04fe2db --- /dev/null +++ b/sorbet/rbi/gems/tzinfo@2.0.6.rbi @@ -0,0 +1,5917 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `tzinfo` gem. +# Please instead update this file by running `bin/tapioca gem tzinfo`. + +# The top level module for TZInfo. +# +# source://tzinfo//lib/tzinfo.rb#5 +module TZInfo + class << self + # Instructs the current {DataSource} to load all timezone and country data + # into memory (initializing the {DataSource} first if not previously + # accessed or set). + # + # This may be desirable in production environments to improve copy-on-write + # performance and to avoid flushing the constant cache every time a new + # timezone or country is loaded from {DataSources::RubyDataSource}. + # + # source://tzinfo//lib/tzinfo.rb#14 + def eager_load!; end + end +end + +# Defines transitions that occur on the zero-based nth day of the year. +# +# Day 0 is 1 January. +# +# Leap days are counted. Day 59 will be 29 February on a leap year and 1 March +# on a non-leap year. Day 365 will be 31 December on a leap year and 1 January +# the following year on a non-leap year. +# +# @private +# +# source://tzinfo//lib/tzinfo/transition_rule.rb#129 +class TZInfo::AbsoluteDayOfYearTransitionRule < ::TZInfo::DayOfYearTransitionRule + # Initializes a new {AbsoluteDayOfYearTransitionRule}. + # + # @param day [Integer] the zero-based day of the year on which the + # transition occurs (0 to 365 inclusive). + # @param transition_at [Integer] the time in seconds after midnight local + # time at which the transition occurs. + # @raise [ArgumentError] if `transition_at` is not an `Integer`. + # @raise [ArgumentError] if `day` is not an `Integer`. + # @raise [ArgumentError] if `day` is less than 0 or greater than 365. + # @return [AbsoluteDayOfYearTransitionRule] a new instance of AbsoluteDayOfYearTransitionRule + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#130 + def initialize(day, transition_at = T.unsafe(nil)); end + + # Determines if this {AbsoluteDayOfYearTransitionRule} is equal to another + # instance. + # + # @param r [Object] the instance to test for equality. + # @return [Boolean] `true` if `r` is a {AbsoluteDayOfYearTransitionRule} + # with the same {transition_at} and day as this + # {AbsoluteDayOfYearTransitionRule}, otherwise `false`. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#153 + def ==(r); end + + # Determines if this {AbsoluteDayOfYearTransitionRule} is equal to another + # instance. + # + # @param r [Object] the instance to test for equality. + # @return [Boolean] `true` if `r` is a {AbsoluteDayOfYearTransitionRule} + # with the same {transition_at} and day as this + # {AbsoluteDayOfYearTransitionRule}, otherwise `false`. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#153 + def eql?(r); end + + # @return [Boolean] `true` if the day specified by this transition is the + # first in the year (a day number of 0), otherwise `false`. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#137 + def is_always_first_day_of_year?; end + + # @return [Boolean] `false`. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#142 + def is_always_last_day_of_year?; end + + protected + + # Returns a `Time` representing midnight local time on the day specified by + # the rule for the given offset and year. + # + # @param offset [TimezoneOffset] the current offset at the time of the + # transition. + # @param year [Integer] the year in which the transition occurs. + # @return [Time] midnight local time on the day specified by the rule for + # the given offset and year. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#168 + def get_day(offset, year); end + + # @return [Array] an `Array` of parameters that will influence the output of + # {hash}. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#173 + def hash_args; end +end + +# {AmbiguousTime} is raised to indicate that a specified local time has more +# than one possible equivalent UTC time. Such ambiguities arise when the +# clocks are set back in a time zone, most commonly during the repeated hour +# when transitioning from daylight savings time to standard time. +# +# {AmbiguousTime} is raised by {Timezone#local_datetime}, +# {Timezone#local_time}, {Timezone#local_timestamp}, {Timezone#local_to_utc} +# and {Timezone#period_for_local} when using an ambiguous time and not +# specifying how to resolve the ambiguity. +# +# source://tzinfo//lib/tzinfo/timezone.rb#16 +class TZInfo::AmbiguousTime < ::StandardError; end + +# A set of rules that define when transitions occur in time zones with +# annually occurring daylight savings time. +# +# @private +# +# source://tzinfo//lib/tzinfo/annual_rules.rb#9 +class TZInfo::AnnualRules + # Initializes a new {AnnualRules} instance. + # + # @param std_offset [TimezoneOffset] the standard offset that applies when + # daylight savings time is not in force. + # @param dst_offset [TimezoneOffset] the offset that applies when daylight + # savings time is in force. + # @param dst_start_rule [TransitionRule] the rule that determines when + # daylight savings time starts. + # @param dst_end_rule [TransitionRule] the rule that determines when daylight + # savings time ends. + # @return [AnnualRules] a new instance of AnnualRules + # + # source://tzinfo//lib/tzinfo/annual_rules.rb#36 + def initialize(std_offset, dst_offset, dst_start_rule, dst_end_rule); end + + # @return [TransitionRule] the rule that determines when daylight savings + # time ends. + # + # source://tzinfo//lib/tzinfo/annual_rules.rb#24 + def dst_end_rule; end + + # @return [TimezoneOffset] the offset that applies when daylight savings + # time is in force. + # + # source://tzinfo//lib/tzinfo/annual_rules.rb#16 + def dst_offset; end + + # @return [TransitionRule] the rule that determines when daylight savings + # time starts. + # + # source://tzinfo//lib/tzinfo/annual_rules.rb#20 + def dst_start_rule; end + + # @return [TimezoneOffset] the standard offset that applies when daylight + # savings time is not in force. + # + # source://tzinfo//lib/tzinfo/annual_rules.rb#12 + def std_offset; end + + # Returns the transitions between standard and daylight savings time for a + # given year. The results are ordered by time of occurrence (earliest to + # latest). + # + # @param year [Integer] the year to calculate transitions for. + # @return [Array<TimezoneTransition>] the transitions for the year. + # + # source://tzinfo//lib/tzinfo/annual_rules.rb#49 + def transitions(year); end + + private + + # Applies a given rule between offsets on a year. + # + # @param rule [TransitionRule] the rule to apply. + # @param from_offset [TimezoneOffset] the offset the rule transitions from. + # @param to_offset [TimezoneOffset] the offset the rule transitions to. + # @param year [Integer] the year when the transition occurs. + # @return [TimezoneTransition] the transition determined by the rule. + # + # source://tzinfo//lib/tzinfo/annual_rules.rb#65 + def apply_rule(rule, from_offset, to_offset, year); end +end + +# A thread-safe version of {StringDeduper}. +# +# @private +# +# source://tzinfo//lib/tzinfo/string_deduper.rb#50 +class TZInfo::ConcurrentStringDeduper < ::TZInfo::StringDeduper + protected + + # source://tzinfo//lib/tzinfo/string_deduper.rb#53 + def create_hash(&block); end +end + +# The {Country} class represents an ISO 3166-1 country. It can be used to +# obtain a list of time zones observed by a country. For example: +# +# united_states = Country.get('US') +# united_states.zone_identifiers +# united_states.zones +# united_states.zone_info +# +# The {Country} class is thread-safe. It is safe to use class and instance +# methods of {Country} in concurrently executing threads. Instances of +# {Country} can be shared across thread boundaries. +# +# Country information available through TZInfo is intended as an aid for +# users, to help them select time zone data appropriate for their practical +# needs. It is not intended to take or endorse any position on legal or +# territorial claims. +# +# source://tzinfo//lib/tzinfo/country.rb#26 +class TZInfo::Country + include ::Comparable + + # Initializes a new {Country} based upon a {DataSources::CountryInfo} + # instance. + # + # {Country} instances should not normally be constructed directly. Use + # the {Country.get} method to obtain instances instead. + # + # @param info [DataSources::CountryInfo] the data to base the new {Country} + # instance upon. + # @return [Country] a new instance of Country + # + # source://tzinfo//lib/tzinfo/country.rb#72 + def initialize(info); end + + # Compares this {Country} with another based on their {code}. + # + # @param c [Object] an `Object` to compare this {Country} with. + # @return [Integer] -1 if `c` is less than `self`, 0 if `c` is equal to + # `self` and +1 if `c` is greater than `self`, or `nil` if `c` is not an + # instance of {Country}. + # + # source://tzinfo//lib/tzinfo/country.rb#162 + def <=>(c); end + + # Matches `regexp` against the {code} of this {Country}. + # + # @param regexp [Regexp] a `Regexp` to match against the {code} of + # this {Country}. + # @return [Integer] the position the match starts, or `nil` if there is no + # match. + # + # source://tzinfo//lib/tzinfo/country.rb#185 + def =~(regexp); end + + # Returns a serialized representation of this {Country}. This method is + # called when using `Marshal.dump` with an instance of {Country}. + # + # @param limit [Integer] the maximum depth to dump - ignored. + # @return [String] a serialized representation of this {Country}. + # + # source://tzinfo//lib/tzinfo/country.rb#194 + def _dump(limit); end + + # @return [String] the ISO 3166-1 alpha-2 country code. + # + # source://tzinfo//lib/tzinfo/country.rb#77 + def code; end + + # @param c [Object] an `Object` to compare this {Country} with. + # @return [Boolean] `true` if `c` is an instance of {Country} and has the + # same code as `self`, otherwise `false`. + # + # source://tzinfo//lib/tzinfo/country.rb#170 + def eql?(c); end + + # @return [Integer] a hash based on the {code}. + # + # source://tzinfo//lib/tzinfo/country.rb#175 + def hash; end + + # @return [String] the internal object state as a programmer-readable + # `String`. + # + # source://tzinfo//lib/tzinfo/country.rb#94 + def inspect; end + + # @return [String] the name of the country. + # + # source://tzinfo//lib/tzinfo/country.rb#82 + def name; end + + # @return [String] a `String` representation of this {Country} (the name of + # the country). + # + # source://tzinfo//lib/tzinfo/country.rb#88 + def to_s; end + + # Returns an `Array` containing the identifier for each time zone observed + # by the country. These are in an order that + # + # 1. makes some geographical sense, and + # 2. puts the most populous zones first, where that does not contradict 1. + # + # Returned zone identifiers may refer to cities and regions outside of the + # country. This will occur if the zone covers multiple countries. Any zones + # referring to a city or region in a different country will be listed after + # those relating to this country. + # + # @return [Array<String>] an `Array` containing the identifier for each time + # zone observed by the country + # + # source://tzinfo//lib/tzinfo/country.rb#111 + def zone_identifiers; end + + # Returns a frozen `Array` containing a {CountryTimezone} instance for each + # time zone observed by the country. These are in an order that + # + # 1. makes some geographical sense, and + # 2. puts the most populous zones first, where that does not contradict 1. + # + # The {CountryTimezone} instances can be used to obtain the location and + # descriptions of the observed time zones. + # + # Identifiers and descriptions of the time zones returned may refer to + # cities and regions outside of the country. This will occur if the time + # zone covers multiple countries. Any zones referring to a city or region in + # a different country will be listed after those relating to this country. + # + # @return [Array<CountryTimezone>] a frozen `Array` containing a + # {CountryTimezone} instance for each time zone observed by the country. + # + # source://tzinfo//lib/tzinfo/country.rb#152 + def zone_info; end + + # Returns an `Array` containing the identifier for each time zone observed + # by the country. These are in an order that + # + # 1. makes some geographical sense, and + # 2. puts the most populous zones first, where that does not contradict 1. + # + # Returned zone identifiers may refer to cities and regions outside of the + # country. This will occur if the zone covers multiple countries. Any zones + # referring to a city or region in a different country will be listed after + # those relating to this country. + # + # @return [Array<String>] an `Array` containing the identifier for each time + # zone observed by the country + # + # source://tzinfo//lib/tzinfo/country.rb#111 + def zone_names; end + + # Returns An `Array` containing a {Timezone} instance for each time zone + # observed by the country. These are in an order that + # + # 1. makes some geographical sense, and + # 2. puts the most populous zones first, where that does not contradict 1. + # + # The identifiers of the time zones returned may refer to cities and regions + # outside of the country. This will occur if the time zone covers multiple + # countries. Any zones referring to a city or region in a different country + # will be listed after those relating to this country. + # + # The results are actually instances of {TimezoneProxy} in order to defer + # loading of the time zone transition data until it is first needed. + # + # @return [Array<Timezone>] an `Array` containing a {Timezone} instance for + # each time zone observed by the country. + # + # source://tzinfo//lib/tzinfo/country.rb#132 + def zones; end + + class << self + # Loads a {Country} from the serialized representation returned by {_dump}. + # This is method is called when using `Marshal.load` or `Marshal.restore` + # to restore a serialized {Country}. + # + # @param data [String] a serialized representation of a {Country}. + # @return [Country] the result of converting `data` back into a {Country}. + # + # source://tzinfo//lib/tzinfo/country.rb#204 + def _load(data); end + + # @return [Array<Country>] an `Array` containing one {Country} instance + # for each defined country. + # + # source://tzinfo//lib/tzinfo/country.rb#52 + def all; end + + # @return [Array<String>] an `Array` containing all the valid ISO 3166-1 + # alpha-2 country codes. + # + # source://tzinfo//lib/tzinfo/country.rb#46 + def all_codes; end + + # Gets a {Country} by its ISO 3166-1 alpha-2 code. + # + # The {Country.all_codes} method can be used to obtain a list of valid ISO + # 3166-1 alpha-2 codes. + # + # @param code [String] An ISO 3166-1 alpha-2 code. + # @raise [InvalidCountryCode] If {code} is not a valid ISO 3166-1 alpha-2 + # code it couldn't be found. + # @return [Country] a {Country} instance representing the ISO-3166-1 + # country identified by the `code` parameter. + # + # source://tzinfo//lib/tzinfo/country.rb#40 + def get(code); end + + private + + # @return [DataSource] the current DataSource. + # + # source://tzinfo//lib/tzinfo/country.rb#59 + def data_source; end + end +end + +# Alias used by TZInfo::Data format1 releases. +# +# @private +# +# source://tzinfo//lib/tzinfo/format1/country_index_definition.rb#62 +TZInfo::CountryIndexDefinition = TZInfo::Format1::CountryIndexDefinition + +# Information about a time zone used by a {Country}. +# +# source://tzinfo//lib/tzinfo/country_timezone.rb#5 +class TZInfo::CountryTimezone + # Creates a new {CountryTimezone}. + # + # The passed in identifier and description instances will be frozen. + # + # {CountryTimezone} instances should normally only be constructed + # by implementations of {DataSource}. + # + # @param identifier [String] the {Timezone} identifier. + # @param latitude [Rational] the latitude of the time zone. + # @param longitude [Rational] the longitude of the time zone. + # @param description [String] an optional description of the time zone. + # @return [CountryTimezone] a new instance of CountryTimezone + # + # source://tzinfo//lib/tzinfo/country_timezone.rb#44 + def initialize(identifier, latitude, longitude, description = T.unsafe(nil)); end + + # Tests if the given object is equal to the current instance (has the same + # identifier, latitude, longitude and description). + # + # @param ct [Object] the object to be compared. + # @return [TrueClass] `true` if `ct` is equal to the current instance. + # + # source://tzinfo//lib/tzinfo/country_timezone.rb#72 + def ==(ct); end + + # A description of this time zone in relation to the country, e.g. "Eastern + # Time". This is usually `nil` for countries that have a single time zone. + # + # @return [String] an optional description of the time zone. + # + # source://tzinfo//lib/tzinfo/country_timezone.rb#31 + def description; end + + # @return [String] the {description} if present, otherwise a human-readable + # representation of the identifier (using {Timezone#friendly_identifier}). + # + # source://tzinfo//lib/tzinfo/country_timezone.rb#63 + def description_or_friendly_identifier; end + + # Tests if the given object is equal to the current instance (has the same + # identifier, latitude, longitude and description). + # + # @param ct [Object] the object to be compared. + # @return [Boolean] `true` if `ct` is equal to the current instance. + # + # source://tzinfo//lib/tzinfo/country_timezone.rb#83 + def eql?(ct); end + + # {longitude} and {description}. + # + # @return [Integer] a hash based on the {identifier}, {latitude}, + # + # source://tzinfo//lib/tzinfo/country_timezone.rb#89 + def hash; end + + # @return [String] the identifier of the {Timezone} being described. + # + # source://tzinfo//lib/tzinfo/country_timezone.rb#7 + def identifier; end + + # The latitude of this time zone in degrees. Positive numbers are degrees + # north and negative numbers are degrees south. + # + # Note that depending on the data source, the position given by {#latitude} + # and {#longitude} may not be within the country. + # + # @return [Rational] the latitude in degrees. + # + # source://tzinfo//lib/tzinfo/country_timezone.rb#16 + def latitude; end + + # The longitude of this time zone in degrees. Positive numbers are degrees + # east and negative numbers are degrees west. + # + # Note that depending on the data source, the position given by {#latitude} + # and {#longitude} may not be within the country. + # + # @return [Rational] the longitude in degrees. + # + # source://tzinfo//lib/tzinfo/country_timezone.rb#25 + def longitude; end + + # Returns the associated {Timezone}. + # + # The result is actually an instance of {TimezoneProxy} in order to defer + # loading of the time zone transition data until it is first needed. + # + # @return [Timezone] the associated {Timezone}. + # + # source://tzinfo//lib/tzinfo/country_timezone.rb#57 + def timezone; end +end + +# TZInfo can be used with different data sources for time zone and country +# data. Each source of data is implemented as a subclass of {DataSource}. +# +# To choose a data source and override the default selection, use the +# {DataSource.set} method. +# +# @abstract To create a custom data source, create a subclass of {DataSource} +# and implement the {load_timezone_info}, {data_timezone_identifiers}, +# {linked_timezone_identifiers}, {load_country_info} and {country_codes} +# methods. +# +# source://tzinfo//lib/tzinfo/data_source.rb#29 +class TZInfo::DataSource + # Initializes a new {DataSource} instance. Typically only called via + # subclasses of {DataSource}. + # + # @return [DataSource] a new instance of DataSource + # + # source://tzinfo//lib/tzinfo/data_source.rb#166 + def initialize; end + + # Returns a frozen `Array` of all the available ISO 3166-1 alpha-2 country + # codes. The identifiers are sorted according to `String#<=>`. + # + # @return [Array<String>] a frozen `Array` of all the available ISO 3166-1 + # alpha-2 country codes. + # + # source://tzinfo//lib/tzinfo/data_source.rb#246 + def country_codes; end + + # Returns a frozen `Array` of all the available time zone identifiers for + # data time zones (i.e. those that actually contain definitions). The + # identifiers are sorted according to `String#<=>`. + # + # @return [Array<String>] a frozen `Array` of all the available time zone + # identifiers for data time zones. + # + # source://tzinfo//lib/tzinfo/data_source.rb#218 + def data_timezone_identifiers; end + + # Loads all timezone and country data into memory. + # + # This may be desirable in production environments to improve copy-on-write + # performance and to avoid flushing the constant cache every time a new + # timezone or country is loaded from {DataSources::RubyDataSource}. + # + # source://tzinfo//lib/tzinfo/data_source.rb#255 + def eager_load!; end + + # @param code [String] an ISO 3166-1 alpha-2 country code. + # @raise [InvalidCountryCode] if the country could not be found or the code + # is invalid. + # @return [DataSources::CountryInfo] a {DataSources::CountryInfo} instance + # for the given ISO 3166-1 alpha-2 country code. + # + # source://tzinfo//lib/tzinfo/data_source.rb#237 + def get_country_info(code); end + + # Returns a {DataSources::TimezoneInfo} instance for the given identifier. + # The result will derive from either {DataSources::DataTimezoneInfo} for + # time zones that define their own data or {DataSources::LinkedTimezoneInfo} + # for links or aliases to other time zones. + # + # {get_timezone_info} calls {load_timezone_info} to create the + # {DataSources::TimezoneInfo} instance. The returned instance is cached and + # returned in subsequent calls to {get_timezone_info} for the identifier. + # + # @param identifier [String] A time zone identifier. + # @raise [InvalidTimezoneIdentifier] if the time zone is not found or the + # identifier is invalid. + # @return [DataSources::TimezoneInfo] a {DataSources::TimezoneInfo} instance + # for a given identifier. + # + # source://tzinfo//lib/tzinfo/data_source.rb#184 + def get_timezone_info(identifier); end + + # @return [String] the internal object state as a programmer-readable + # `String`. + # + # source://tzinfo//lib/tzinfo/data_source.rb#268 + def inspect; end + + # Returns a frozen `Array` of all the available time zone identifiers that + # are links to other time zones. The identifiers are sorted according to + # `String#<=>`. + # + # @return [Array<String>] a frozen `Array` of all the available time zone + # identifiers that are links to other time zones. + # + # source://tzinfo//lib/tzinfo/data_source.rb#228 + def linked_timezone_identifiers; end + + # @return [Array<String>] a frozen `Array`` of all the available time zone + # identifiers. The identifiers are sorted according to `String#<=>`. + # + # source://tzinfo//lib/tzinfo/data_source.rb#204 + def timezone_identifiers; end + + # @return [String] a description of the {DataSource}. + # + # source://tzinfo//lib/tzinfo/data_source.rb#262 + def to_s; end + + protected + + # @param code [String] an ISO 3166-1 alpha-2 country code. + # @raise [InvalidCountryCode] if the country could not be found or the code + # is invalid. + # @return [DataSources::CountryInfo] a {DataSources::CountryInfo} instance + # for the given ISO 3166-1 alpha-2 country code. + # + # source://tzinfo//lib/tzinfo/data_source.rb#294 + def load_country_info(code); end + + # Returns a {DataSources::TimezoneInfo} instance for the given time zone + # identifier. The result should derive from either + # {DataSources::DataTimezoneInfo} for time zones that define their own data + # or {DataSources::LinkedTimezoneInfo} for links to or aliases for other + # time zones. + # + # @param identifier [String] A time zone identifier. + # @raise [InvalidTimezoneIdentifier] if the time zone is not found or the + # identifier is invalid. + # @return [DataSources::TimezoneInfo] a {DataSources::TimezoneInfo} instance + # for the given time zone identifier. + # + # source://tzinfo//lib/tzinfo/data_source.rb#285 + def load_timezone_info(identifier); end + + # Looks up a given code in the given hash of code to + # {DataSources::CountryInfo} mappings. If the code is found the + # {DataSources::CountryInfo} is returned. Otherwise an {InvalidCountryCode} + # exception is raised. + # + # @param hash [String, DataSources::CountryInfo] a mapping from ISO 3166-1 + # alpha-2 country codes to {DataSources::CountryInfo} instances. + # @param code [String] a country code to lookup. + # @param encoding [Encoding] the encoding used for the country codes in + # `hash`. + # @raise [InvalidCountryCode] if `code` was not found in `hash`. + # @return [DataSources::CountryInfo] the {DataSources::CountryInfo} instance + # corresponding to `code`. + # + # source://tzinfo//lib/tzinfo/data_source.rb#337 + def lookup_country_info(hash, code, encoding = T.unsafe(nil)); end + + # @return [Encoding] the `Encoding` used by the `String` instances returned + # by {data_timezone_identifiers} and {linked_timezone_identifiers}. + # + # source://tzinfo//lib/tzinfo/data_source.rb#300 + def timezone_identifier_encoding; end + + # Checks that the given identifier is a valid time zone identifier (can be + # found in the {timezone_identifiers} `Array`). If the identifier is valid, + # the `String` instance representing that identifier from + # `timezone_identifiers` is returned. Otherwise an + # {InvalidTimezoneIdentifier} exception is raised. + # + # @param identifier [String] a time zone identifier to be validated. + # @raise [InvalidTimezoneIdentifier] if `identifier` was not found in + # {timezone_identifiers}. + # @return [String] the `String` instance equivalent to `identifier` from + # {timezone_identifiers}. + # + # source://tzinfo//lib/tzinfo/data_source.rb#315 + def validate_timezone_identifier(identifier); end + + private + + # Combines {data_timezone_identifiers} and {linked_timezone_identifiers} + # to create an `Array` containing all valid time zone identifiers. If + # {linked_timezone_identifiers} is empty, the {data_timezone_identifiers} + # instance is returned. + # + # The returned `Array` is frozen. The identifiers are sorted according to + # `String#<=>`. + # + # @return [Array<String>] an `Array` containing all valid time zone + # identifiers. + # + # source://tzinfo//lib/tzinfo/data_source.rb#366 + def build_timezone_identifiers; end + + # If the given `identifier` is contained within the {timezone_identifiers} + # `Array`, the `String` instance representing that identifier from + # {timezone_identifiers} is returned. Otherwise, `nil` is returned. + # + # :nocov_array_bsearch: + # + # @param identifier [String] A time zone identifier to search for. + # @return [String] the `String` instance representing `identifier` from + # {timezone_identifiers} if found, or `nil` if not found. + # + # source://tzinfo//lib/tzinfo/data_source.rb#382 + def find_timezone_identifier(identifier); end + + # Raises {InvalidDataSource} to indicate that a method has not been + # overridden by a particular data source implementation. + # + # @raise [InvalidDataSource] always. + # + # source://tzinfo//lib/tzinfo/data_source.rb#352 + def raise_invalid_data_source(method_name); end + + # Tries an operation using `string` directly. If the operation fails, the + # string is copied and encoded with `encoding` and the operation is tried + # again. + # + # fails and `string` is already encoded with `encoding`. + # + # @param string [String] The `String` to perform the operation on. + # @param encoding [Encoding] The `Encoding` to use if the initial attempt + # fails. + # @return [Object] the result of the operation or `nil` if the first attempt + # @yield [s] the caller will be yielded to once or twice to attempt the + # operation. + # @yieldparam s [String] either `string` or an encoded copy of `string`. + # @yieldreturn [Object] The result of the operation. Must be truthy if + # successful. + # + # source://tzinfo//lib/tzinfo/data_source.rb#436 + def try_with_encoding(string, encoding); end + + class << self + # @return [DataSource] the currently selected source of data. + # + # source://tzinfo//lib/tzinfo/data_source.rb#42 + def get; end + + # Sets the currently selected data source for time zone and country data. + # + # This should usually be set to one of the two standard data source types: + # + # * `:ruby` - read data from the Ruby modules included in the TZInfo::Data + # library (tzinfo-data gem). + # * `:zoneinfo` - read data from the zoneinfo files included with most + # Unix-like operating systems (e.g. in /usr/share/zoneinfo). + # + # To set TZInfo to use one of the standard data source types, call + # `TZInfo::DataSource.set`` in one of the following ways: + # + # TZInfo::DataSource.set(:ruby) + # TZInfo::DataSource.set(:zoneinfo) + # TZInfo::DataSource.set(:zoneinfo, zoneinfo_dir) + # TZInfo::DataSource.set(:zoneinfo, zoneinfo_dir, iso3166_tab_file) + # + # `DataSource.set(:zoneinfo)` will automatically search for the zoneinfo + # directory by checking the paths specified in + # {DataSources::ZoneinfoDataSource.search_path}. + # {DataSources::ZoneinfoDirectoryNotFound} will be raised if no valid + # zoneinfo directory could be found. + # + # `DataSource.set(:zoneinfo, zoneinfo_dir)` uses the specified + # `zoneinfo_dir` directory as the data source. If the directory is not a + # valid zoneinfo directory, a {DataSources::InvalidZoneinfoDirectory} + # exception will be raised. + # + # `DataSource.set(:zoneinfo, zoneinfo_dir, iso3166_tab_file)` uses the + # specified `zoneinfo_dir` directory as the data source, but loads the + # `iso3166.tab` file from the path given by `iso3166_tab_file`. If the + # directory is not a valid zoneinfo directory, a + # {DataSources::InvalidZoneinfoDirectory} exception will be raised. + # + # Custom data sources can be created by subclassing TZInfo::DataSource and + # implementing the following methods: + # + # * {load_timezone_info} + # * {data_timezone_identifiers} + # * {linked_timezone_identifiers} + # * {load_country_info} + # * {country_codes} + # + # To have TZInfo use the custom data source, call {DataSource.set}, + # passing an instance of the custom data source implementation as follows: + # + # TZInfo::DataSource.set(CustomDataSource.new) + # + # Calling {DataSource.set} will only affect instances of {Timezone} and + # {Country} obtained with {Timezone.get} and {Country.get} subsequent to + # the {DataSource.set} call. Existing {Timezone} and {Country} instances + # will be unaffected. + # + # If {DataSource.set} is not called, TZInfo will by default attempt to use + # TZInfo::Data as the data source. If TZInfo::Data is not available (i.e. + # if `require 'tzinfo/data'` fails), then TZInfo will search for a + # zoneinfo directory instead (using the search path specified by + # {DataSources::ZoneinfoDataSource.search_path}). + # + # @param data_source_or_type [Object] either `:ruby`, `:zoneinfo` or an + # instance of a {DataSource}. + # @param args [Array<Object>] when `data_source_or_type` is a symbol, + # optional arguments to use when initializing the data source. + # @raise [ArgumentError] if `data_source_or_type` is not `:ruby`, + # `:zoneinfo` or an instance of {DataSource}. + # + # source://tzinfo//lib/tzinfo/data_source.rb#127 + def set(data_source_or_type, *args); end + + private + + # Creates a {DataSource} instance for use as the default. Used if no + # preference has been specified manually. + # + # @return [DataSource] the newly created default {DataSource} instance. + # + # source://tzinfo//lib/tzinfo/data_source.rb#145 + def create_default_data_source; end + end +end + +# {DataSourceNotFound} is raised if no data source could be found (i.e. if +# `'tzinfo/data'` cannot be found on the load path and no valid zoneinfo +# directory can be found on the system). +# +# source://tzinfo//lib/tzinfo/data_source.rb#16 +class TZInfo::DataSourceNotFound < ::StandardError; end + +# {DataSource} implementations and classes used by {DataSource} +# implementations. +# +# source://tzinfo//lib/tzinfo/data_sources.rb#6 +module TZInfo::DataSources; end + +# Represents a data time zone defined by a constantly observed offset. +# +# source://tzinfo//lib/tzinfo/data_sources/constant_offset_data_timezone_info.rb#7 +class TZInfo::DataSources::ConstantOffsetDataTimezoneInfo < ::TZInfo::DataSources::DataTimezoneInfo + # Initializes a new {ConstantOffsetDataTimezoneInfo}. + # + # The passed in `identifier` instance will be frozen. A reference to the + # passed in {TimezoneOffset} will be retained. + # + # @param identifier [String] the identifier of the time zone. + # @param constant_offset [TimezoneOffset] the constantly observed offset. + # @raise [ArgumentError] if `identifier` or `constant_offset` is `nil`. + # @return [ConstantOffsetDataTimezoneInfo] a new instance of ConstantOffsetDataTimezoneInfo + # + # source://tzinfo//lib/tzinfo/data_sources/constant_offset_data_timezone_info.rb#19 + def initialize(identifier, constant_offset); end + + # @return [TimezoneOffset] the offset that is constantly observed. + # + # source://tzinfo//lib/tzinfo/data_sources/constant_offset_data_timezone_info.rb#9 + def constant_offset; end + + # @param timestamp [Timestamp] ignored. + # @return [TimezonePeriod] an unbounded {TimezonePeriod} for the time + # zone's constantly observed offset. + # + # source://tzinfo//lib/tzinfo/data_sources/constant_offset_data_timezone_info.rb#28 + def period_for(timestamp); end + + # @param local_timestamp [Timestamp] ignored. + # @return [Array<TimezonePeriod>] an `Array` containing a single unbounded + # {TimezonePeriod} for the time zone's constantly observed offset. + # + # source://tzinfo//lib/tzinfo/data_sources/constant_offset_data_timezone_info.rb#35 + def periods_for_local(local_timestamp); end + + # @param to_timestamp [Timestamp] ignored. + # @param from_timestamp [Timestamp] ignored. + # @return [Array] an empty `Array`, since there are no transitions in time + # zones that observe a constant offset. + # + # source://tzinfo//lib/tzinfo/data_sources/constant_offset_data_timezone_info.rb#43 + def transitions_up_to(to_timestamp, from_timestamp = T.unsafe(nil)); end + + private + + # @return [TimezonePeriod] an unbounded {TimezonePeriod} with the constant + # offset of this timezone. + # + # source://tzinfo//lib/tzinfo/data_sources/constant_offset_data_timezone_info.rb#51 + def constant_period; end +end + +# Represents a country and references to its time zones as returned by a +# {DataSource}. +# +# source://tzinfo//lib/tzinfo/data_sources/country_info.rb#8 +class TZInfo::DataSources::CountryInfo + # Initializes a new {CountryInfo}. The passed in `code`, `name` and + # `zones` instances will be frozen. + # + # @param code [String] an ISO 3166-1 alpha-2 country code. + # @param name [String] the name of the country. + # @param zones [Array<CountryTimezone>] the time zones observed in the + # country. + # @raise [ArgumentError] if `code`, `name` or `zones` is `nil`. + # @return [CountryInfo] a new instance of CountryInfo + # + # source://tzinfo//lib/tzinfo/data_sources/country_info.rb#26 + def initialize(code, name, zones); end + + # @return [String] the ISO 3166-1 alpha-2 country code. + # + # source://tzinfo//lib/tzinfo/data_sources/country_info.rb#10 + def code; end + + # @return [String] the internal object state as a programmer-readable + # `String`. + # + # source://tzinfo//lib/tzinfo/data_sources/country_info.rb#37 + def inspect; end + + # @return [String] the name of the country. + # + # source://tzinfo//lib/tzinfo/data_sources/country_info.rb#13 + def name; end + + # @return [Array<CountryTimezone>] the time zones observed in the country. + # + # source://tzinfo//lib/tzinfo/data_sources/country_info.rb#16 + def zones; end +end + +# The base class for time zones defined as either a series of transitions +# ({TransitionsDataTimezoneInfo}) or a constantly observed offset +# ({ConstantOffsetDataTimezoneInfo}). +# +# @abstract Data sources return instances of {DataTimezoneInfo} subclasses. +# +# source://tzinfo//lib/tzinfo/data_sources/data_timezone_info.rb#11 +class TZInfo::DataSources::DataTimezoneInfo < ::TZInfo::DataSources::TimezoneInfo + # @return [DataTimezone] a new {DataTimezone} instance for the time zone + # represented by this {DataTimezoneInfo}. + # + # source://tzinfo//lib/tzinfo/data_sources/data_timezone_info.rb#76 + def create_timezone; end + + # @param timestamp [Timestamp] a {Timestamp} with a specified + # {Timestamp#utc_offset utc_offset}. + # @raise [ArgumentError] may be raised if `timestamp` is `nil` or does not + # have a specified {Timestamp#utc_offset utc_offset}. + # @return [TimezonePeriod] the {TimezonePeriod} observed at the time + # specified by `timestamp`. + # + # source://tzinfo//lib/tzinfo/data_sources/data_timezone_info.rb#18 + def period_for(timestamp); end + + # Returns an `Array` containing the {TimezonePeriod TimezonePeriods} that + # could be observed at the local time specified by `local_timestamp`. The + # results are are ordered by increasing UTC start date. An empty `Array` + # is returned if no periods are found for the given local time. + # + # @param local_timestamp [Timestamp] a {Timestamp} representing a local + # time - must have an unspecified {Timestamp#utc_offset utc_offset}. + # @raise [ArgumentError] may be raised if `local_timestamp` is `nil`, or + # has a specified {Timestamp#utc_offset utc_offset}. + # @return [Array<TimezonePeriod>] an `Array` containing the + # {TimezonePeriod TimezonePeriods} that could be observed at the local + # time specified by `local_timestamp`. + # + # source://tzinfo//lib/tzinfo/data_sources/data_timezone_info.rb#34 + def periods_for_local(local_timestamp); end + + # Returns an `Array` of {TimezoneTransition} instances representing the + # times where the UTC offset of the time zone changes. + # + # Transitions are returned up to a given {Timestamp} (`to_timestamp`). + # + # A from {Timestamp} may also be supplied using the `from_timestamp` + # parameter. If `from_timestamp` is specified, only transitions from that + # time onwards will be returned. + # + # Comparisons with `to_timestamp` are exclusive. Comparisons with + # `from_timestamp` are inclusive. If a transition falls precisely on + # `to_timestamp`, it will be excluded. If a transition falls on + # `from_timestamp`, it will be included. + # + # Transitions returned are ordered by when they occur, from earliest to + # latest. + # + # @param to_timestamp [Timestamp] a {Timestamp} with a specified + # {Timestamp#utc_offset utc_offset}. Transitions are returned if they + # occur before this time. + # @param from_timestamp [Timestamp] an optional {Timestamp} with a + # specified {Timestamp#utc_offset utc_offset}. If specified, transitions + # are returned if they occur at or after this time. + # @raise [ArgumentError] may be raised if `to_timestamp` is `nil` or does + # not have a specified {Timestamp#utc_offset utc_offset}. + # @raise [ArgumentError] may be raised if `from_timestamp` is specified + # but does not have a specified {Timestamp#utc_offset utc_offset}. + # @raise [ArgumentError] may be raised if `from_timestamp` is specified + # but is not earlier than or at the same time as `to_timestamp`. + # @return [Array<TimezoneTransition>] an `Array` of {TimezoneTransition} + # instances representing the times where the UTC offset of the time zone + # changes. + # + # source://tzinfo//lib/tzinfo/data_sources/data_timezone_info.rb#70 + def transitions_up_to(to_timestamp, from_timestamp = T.unsafe(nil)); end + + private + + # Raises a {NotImplementedError} to indicate that the base class is + # incorrectly being used directly. + # + # raise [NotImplementedError] always. + # + # @raise [NotImplementedError] + # + # source://tzinfo//lib/tzinfo/data_sources/data_timezone_info.rb#86 + def raise_not_implemented(method_name); end +end + +# An {InvalidPosixTimeZone} exception is raised if an invalid POSIX-style +# time zone string is encountered. +# +# @private +# +# source://tzinfo//lib/tzinfo/data_sources/posix_time_zone_parser.rb#12 +class TZInfo::DataSources::InvalidPosixTimeZone < ::StandardError; end + +# An {InvalidZoneinfoDirectory} exception is raised if {ZoneinfoDataSource} +# is initialized with a specific zoneinfo path that is not a valid zoneinfo +# directory. A valid zoneinfo directory is one that contains time zone +# files, a country code index file named iso3166.tab and a time zone index +# file named zone1970.tab or zone.tab. +# +# source://tzinfo//lib/tzinfo/data_sources/zoneinfo_data_source.rb#11 +class TZInfo::DataSources::InvalidZoneinfoDirectory < ::StandardError; end + +# An {InvalidZoneinfoFile} exception is raised if an attempt is made to load +# an invalid zoneinfo file. +# +# source://tzinfo//lib/tzinfo/data_sources/zoneinfo_reader.rb#8 +class TZInfo::DataSources::InvalidZoneinfoFile < ::StandardError; end + +# Represents a time zone that is defined as a link to or alias of another +# zone. +# +# source://tzinfo//lib/tzinfo/data_sources/linked_timezone_info.rb#7 +class TZInfo::DataSources::LinkedTimezoneInfo < ::TZInfo::DataSources::TimezoneInfo + # Initializes a new {LinkedTimezoneInfo}. The passed in `identifier` and + # `link_to_identifier` instances will be frozen. + # + # `nil`. + # + # @param identifier [String] the identifier of the time zone. + # @param link_to_identifier [String] the identifier of the time zone that + # this zone link to. + # @raise [ArgumentError] if `identifier` or `link_to_identifier` are + # @return [LinkedTimezoneInfo] a new instance of LinkedTimezoneInfo + # + # source://tzinfo//lib/tzinfo/data_sources/linked_timezone_info.rb#20 + def initialize(identifier, link_to_identifier); end + + # @return [LinkedTimezone] a new {LinkedTimezone} instance for the time + # zone represented by this {LinkedTimezoneInfo}. + # + # source://tzinfo//lib/tzinfo/data_sources/linked_timezone_info.rb#28 + def create_timezone; end + + # (that this zone links to or is an alias for). + # + # @return [String] the identifier of the time zone that provides the data + # + # source://tzinfo//lib/tzinfo/data_sources/linked_timezone_info.rb#10 + def link_to_identifier; end +end + +# A parser for POSIX-style TZ strings used in zoneinfo files and specified +# by tzfile.5 and tzset.3. +# +# @private +# +# source://tzinfo//lib/tzinfo/data_sources/posix_time_zone_parser.rb#20 +class TZInfo::DataSources::PosixTimeZoneParser + # Initializes a new {PosixTimeZoneParser}. + # + # @param string_deduper [StringDeduper] a {StringDeduper} instance to use + # to dedupe abbreviations. + # @return [PosixTimeZoneParser] a new instance of PosixTimeZoneParser + # + # source://tzinfo//lib/tzinfo/data_sources/posix_time_zone_parser.rb#25 + def initialize(string_deduper); end + + # Parses a POSIX-style TZ string. + # + # @param tz_string [String] the string to parse. + # @raise [InvalidPosixTimeZone] if `tz_string` is not a `String`. + # @raise [InvalidPosixTimeZone] if `tz_string` is is not valid. + # @return [Object] either a {TimezoneOffset} for a constantly applied + # offset or an {AnnualRules} instance representing the rules. + # + # source://tzinfo//lib/tzinfo/data_sources/posix_time_zone_parser.rb#36 + def parse(tz_string); end + + private + + # Scans for a pattern and raises an exception if the pattern does not + # match the input. + # + # @param s [StringScanner] the `StringScanner` to scan. + # @param pattern [Regexp] the pattern to match. + # @raise [InvalidPosixTimeZone] if the pattern does not match the input. + # @return [String] the result of the scan. + # + # source://tzinfo//lib/tzinfo/data_sources/posix_time_zone_parser.rb#169 + def check_scan(s, pattern); end + + # Returns an offset in seconds from hh:mm:ss values. The value can be + # negative. -02:33:12 would represent 2 hours, 33 minutes and 12 seconds + # ahead of UTC. + # + # @param h [String] the hours. + # @param m [String] the minutes. + # @param s [String] the seconds. + # @raise [InvalidPosixTimeZone] if the mm and ss values are greater than + # 59. + # @return [Integer] the offset. + # + # source://tzinfo//lib/tzinfo/data_sources/posix_time_zone_parser.rb#132 + def get_offset_from_hms(h, m, s); end + + # Returns the seconds from midnight from hh:mm:ss values. Hours can exceed + # 24 for a time on the following day. Hours can be negative to subtract + # hours from midnight on the given day. -02:33:12 represents 22:33:12 on + # the prior day. + # + # @param h [String] the hour. + # @param m [String] the minutes past the hour. + # @param s [String] the seconds past the minute. + # @raise [InvalidPosixTimeZone] if the mm and ss values are greater than + # 59. + # @return [Integer] the number of seconds after midnight. + # + # source://tzinfo//lib/tzinfo/data_sources/posix_time_zone_parser.rb#153 + def get_seconds_after_midnight_from_hms(h, m, s); end + + # Parses a rule. + # + # @param s [StringScanner] the `StringScanner` to read the rule from. + # @param type [String] the type of rule (either `'start'` or `'end'`). + # @raise [InvalidPosixTimeZone] if the rule is not valid. + # @return [TransitionRule] the parsed rule. + # + # source://tzinfo//lib/tzinfo/data_sources/posix_time_zone_parser.rb#92 + def parse_rule(s, type); end +end + +# A DataSource implementation that loads data from the set of Ruby modules +# included in the tzinfo-data gem. +# +# TZInfo will use {RubyDataSource} by default if the tzinfo-data gem +# is available on the load path. It can also be selected by calling +# {DataSource.set} as follows: +# +# TZInfo::DataSource.set(:ruby) +# +# source://tzinfo//lib/tzinfo/data_sources/ruby_data_source.rb#20 +class TZInfo::DataSources::RubyDataSource < ::TZInfo::DataSource + # Initializes a new {RubyDataSource} instance. + # + # @raise [TZInfoDataNotFound] if the tzinfo-data gem could not be found + # (i.e. `require 'tzinfo/data'` failed). + # @return [RubyDataSource] a new instance of RubyDataSource + # + # source://tzinfo//lib/tzinfo/data_sources/ruby_data_source.rb#34 + def initialize; end + + # Returns a frozen `Array` of all the available ISO 3166-1 alpha-2 country + # codes. The identifiers are sorted according to `String#<=>`. + # + # @return [Array<String>] a frozen `Array` of all the available ISO 3166-1 + # alpha-2 country codes. + # + # source://tzinfo//lib/tzinfo/data_sources/ruby_data_source.rb#28 + def country_codes; end + + # Returns a frozen `Array` of all the available time zone identifiers for + # data time zones (i.e. those that actually contain definitions). The + # identifiers are sorted according to `String#<=>`. + # + # @return [Array<String>] a frozen `Array` of all the available time zone + # identifiers for data time zones. + # + # source://tzinfo//lib/tzinfo/data_sources/ruby_data_source.rb#22 + def data_timezone_identifiers; end + + # @return [String] the internal object state as a programmer-readable + # `String`. + # + # source://tzinfo//lib/tzinfo/data_sources/ruby_data_source.rb#72 + def inspect; end + + # Returns a frozen `Array` of all the available time zone identifiers that + # are links to other time zones. The identifiers are sorted according to + # `String#<=>`. + # + # @return [Array<String>] a frozen `Array` of all the available time zone + # identifiers that are links to other time zones. + # + # source://tzinfo//lib/tzinfo/data_sources/ruby_data_source.rb#25 + def linked_timezone_identifiers; end + + # @return [String] a description of the {DataSource}. + # + # source://tzinfo//lib/tzinfo/data_sources/ruby_data_source.rb#67 + def to_s; end + + protected + + # @param code [String] an ISO 3166-1 alpha-2 country code. + # @raise [InvalidCountryCode] if the country could not be found or the code + # is invalid. + # @return [DataSources::CountryInfo] a {DataSources::CountryInfo} instance + # for the given ISO 3166-1 alpha-2 country code. + # + # source://tzinfo//lib/tzinfo/data_sources/ruby_data_source.rb#104 + def load_country_info(code); end + + # Returns a {TimezoneInfo} instance for the given time zone identifier. + # The result will either be a {ConstantOffsetDataTimezoneInfo}, a + # {TransitionsDataTimezoneInfo} or a {LinkedTimezoneInfo} depending on the + # type of time zone. + # + # @param identifier [String] A time zone identifier. + # @raise [InvalidTimezoneIdentifier] if the time zone is not found or the + # identifier is invalid. + # @return [TimezoneInfo] a {TimezoneInfo} instance for the given time zone + # identifier. + # + # source://tzinfo//lib/tzinfo/data_sources/ruby_data_source.rb#88 + def load_timezone_info(identifier); end + + private + + # Requires a file from tzinfo/data. + # + # @param file [Array<String>] a relative path to a file to be required. + # + # source://tzinfo//lib/tzinfo/data_sources/ruby_data_source.rb#128 + def require_data(*file); end + + # Requires a zone definition by its identifier (split on /). + # + # @param identifier [Array<string>] the component parts of a time zone + # identifier (split on /). This must have already been validated. + # + # source://tzinfo//lib/tzinfo/data_sources/ruby_data_source.rb#114 + def require_definition(identifier); end + + # Requires an index by its name. + # + # @param name [String] an index name. + # + # source://tzinfo//lib/tzinfo/data_sources/ruby_data_source.rb#121 + def require_index(name); end + + # @return [String] a `String` containing TZInfo::Data version infomation + # for inclusion in the #to_s and #inspect output. + # + # source://tzinfo//lib/tzinfo/data_sources/ruby_data_source.rb#134 + def version_info; end +end + +# A {TZInfoDataNotFound} exception is raised if the tzinfo-data gem could +# not be found (i.e. `require 'tzinfo/data'` failed) when selecting the Ruby +# data source. +# +# source://tzinfo//lib/tzinfo/data_sources/ruby_data_source.rb#9 +class TZInfo::DataSources::TZInfoDataNotFound < ::StandardError; end + +# Represents a time zone defined by a data source. +# +# @abstract Data sources return instances of {TimezoneInfo} subclasses. +# +# source://tzinfo//lib/tzinfo/data_sources/timezone_info.rb#9 +class TZInfo::DataSources::TimezoneInfo + # Initializes a new TimezoneInfo. The passed in `identifier` instance will + # be frozen. + # + # @param identifier [String] the identifier of the time zone. + # @raise [ArgumentError] if `identifier` is `nil`. + # @return [TimezoneInfo] a new instance of TimezoneInfo + # + # source://tzinfo//lib/tzinfo/data_sources/timezone_info.rb#18 + def initialize(identifier); end + + # @return [Timezone] a new {Timezone} instance for the time zone + # represented by this {TimezoneInfo}. + # + # source://tzinfo//lib/tzinfo/data_sources/timezone_info.rb#31 + def create_timezone; end + + # @return [String] the identifier of the time zone. + # + # source://tzinfo//lib/tzinfo/data_sources/timezone_info.rb#11 + def identifier; end + + # @return [String] the internal object state as a programmer-readable + # `String`. + # + # source://tzinfo//lib/tzinfo/data_sources/timezone_info.rb#25 + def inspect; end + + private + + # Raises a {NotImplementedError}. + # + # @param method_name [String] the name of the method that must be + # overridden. + # @raise NotImplementedError always. + # + # source://tzinfo//lib/tzinfo/data_sources/timezone_info.rb#42 + def raise_not_implemented(method_name); end +end + +# Represents a data time zone defined by a list of transitions that change +# the locally observed time. +# +# source://tzinfo//lib/tzinfo/data_sources/transitions_data_timezone_info.rb#8 +class TZInfo::DataSources::TransitionsDataTimezoneInfo < ::TZInfo::DataSources::DataTimezoneInfo + # Initializes a new {TransitionsDataTimezoneInfo}. + # + # The passed in `identifier` instance will be frozen. A reference to the + # passed in `Array` will be retained. + # + # The `transitions` `Array` must be sorted in order of ascending + # timestamp. Each transition must have a + # {TimezoneTransition#timestamp_value timestamp_value} that is greater + # than the {TimezoneTransition#timestamp_value timestamp_value} of the + # prior transition. + # + # @param identifier [String] the identifier of the time zone. + # @param transitions [Array<TimezoneTransitions>] an `Array` of + # transitions that each indicate when a change occurs in the locally + # observed time. + # @raise [ArgumentError] if `identifier` is `nil`. + # @raise [ArgumentError] if `transitions` is `nil`. + # @raise [ArgumentError] if `transitions` is an empty `Array`. + # @return [TransitionsDataTimezoneInfo] a new instance of TransitionsDataTimezoneInfo + # + # source://tzinfo//lib/tzinfo/data_sources/transitions_data_timezone_info.rb#31 + def initialize(identifier, transitions); end + + # @param timestamp [Timestamp] a {Timestamp} with a specified + # {Timestamp#utc_offset utc_offset}. + # @raise [ArgumentError] may be raised if `timestamp` is `nil` or does not + # have a specified {Timestamp#utc_offset utc_offset}. + # @return [TimezonePeriod] the {TimezonePeriod} observed at the time + # specified by `timestamp`. + # + # source://tzinfo//lib/tzinfo/data_sources/transitions_data_timezone_info.rb#39 + def period_for(timestamp); end + + # Returns an `Array` containing the {TimezonePeriod TimezonePeriods} that + # could be observed at the local time specified by `local_timestamp`. The + # results are are ordered by increasing UTC start date. An empty `Array` + # is returned if no periods are found for the given local time. + # + # @param local_timestamp [Timestamp] a {Timestamp} representing a local + # time - must have an unspecified {Timestamp#utc_offset utc_offset}. + # @raise [ArgumentError] may be raised if `local_timestamp` is `nil`, or + # has a specified {Timestamp#utc_offset utc_offset}. + # @return [Array<TimezonePeriod>] an `Array` containing the + # {TimezonePeriod TimezonePeriods} that could be observed at the local + # time specified by `local_timestamp`. + # + # source://tzinfo//lib/tzinfo/data_sources/transitions_data_timezone_info.rb#70 + def periods_for_local(local_timestamp); end + + # @return [Array<TimezoneTransition>] the transitions that define this + # time zone in order of ascending timestamp. + # + # source://tzinfo//lib/tzinfo/data_sources/transitions_data_timezone_info.rb#11 + def transitions; end + + # Returns an `Array` of {TimezoneTransition} instances representing the + # times where the UTC offset of the time zone changes. + # + # Transitions are returned up to a given {Timestamp} (`to_timestamp`). + # + # A from {Timestamp} may also be supplied using the `from_timestamp` + # parameter. If `from_timestamp` is specified, only transitions from that + # time onwards will be returned. + # + # Comparisons with `to_timestamp` are exclusive. Comparisons with + # `from_timestamp` are inclusive. If a transition falls precisely on + # `to_timestamp`, it will be excluded. If a transition falls on + # `from_timestamp`, it will be included. + # + # Transitions returned are ordered by when they occur, from earliest to + # latest. + # + # @param to_timestamp [Timestamp] a {Timestamp} with a specified + # {Timestamp#utc_offset utc_offset}. Transitions are returned if they + # occur before this time. + # @param from_timestamp [Timestamp] an optional {Timestamp} with a + # specified {Timestamp#utc_offset utc_offset}. If specified, transitions + # are returned if they occur at or after this time. + # @raise [ArgumentError] may be raised if `to_timestamp` is `nil` or does + # not have a specified {Timestamp#utc_offset utc_offset}. + # @raise [ArgumentError] may be raised if `from_timestamp` is specified + # but does not have a specified {Timestamp#utc_offset utc_offset}. + # @raise [ArgumentError] may be raised if `from_timestamp` is specified + # but is not earlier than or at the same time as `to_timestamp`. + # @return [Array<TimezoneTransition>] an `Array` of {TimezoneTransition} + # instances representing the times where the UTC offset of the time zone + # changes. + # + # source://tzinfo//lib/tzinfo/data_sources/transitions_data_timezone_info.rb#111 + def transitions_up_to(to_timestamp, from_timestamp = T.unsafe(nil)); end + + private + + # Performs a binary search on {transitions} to find the index of the + # earliest transition satisfying a condition. + # + # :nocov_array_bsearch_index: + # + # @return [Integer] the index of the earliest transition safisfying + # the condition or `nil` if there are no such transitions. + # @yield [transition] the caller will be yielded to to test the search + # condition. + # @yieldparam transition [TimezoneTransition] a {TimezoneTransition} + # instance from {transitions}. + # @yieldreturn [Boolean] `true` for the earliest transition that + # satisfies the condition and return `true` for all subsequent + # transitions. In all other cases, the result of the block must be + # `false`. + # + # source://tzinfo//lib/tzinfo/data_sources/transitions_data_timezone_info.rb#159 + def find_minimum_transition(&block); end + + # Determines if a transition occurs at or after a given {Timestamp}, + # taking the {Timestamp#sub_second sub_second} into consideration. + # + # @param transition [TimezoneTransition] the transition to compare. + # @param timestamp [Timestamp] the timestamp to compare. + # @return [Boolean] `true` if `transition` occurs at or after `timestamp`, + # otherwise `false`. + # + # source://tzinfo//lib/tzinfo/data_sources/transitions_data_timezone_info.rb#207 + def transition_on_or_after_timestamp?(transition, timestamp); end +end + +# A DataSource implementation that loads data from a 'zoneinfo' directory +# containing compiled "TZif" version 3 (or earlier) files in addition to +# iso3166.tab and zone1970.tab or zone.tab index files. +# +# To have TZInfo load the system zoneinfo files, call +# {TZInfo::DataSource.set} as follows: +# +# TZInfo::DataSource.set(:zoneinfo) +# +# To load zoneinfo files from a particular directory, pass the directory to +# {TZInfo::DataSource.set}: +# +# TZInfo::DataSource.set(:zoneinfo, directory) +# +# To load zoneinfo files from a particular directory, but load the +# iso3166.tab index file from a separate location, pass the directory and +# path to the iso3166.tab file to {TZInfo::DataSource.set}: +# +# TZInfo::DataSource.set(:zoneinfo, directory, iso3166_path) +# +# Please note that versions of the 'zic' tool (used to build zoneinfo files) +# that were released prior to February 2006 created zoneinfo files that used +# 32-bit integers for transition timestamps. Later versions of zic produce +# zoneinfo files that use 64-bit integers. If you have 32-bit zoneinfo files +# on your system, then any queries falling outside of the range 1901-12-13 +# 20:45:52 to 2038-01-19 03:14:07 may be inaccurate. +# +# Most modern platforms include 64-bit zoneinfo files. However, Mac OS X (up +# to at least 10.8.4) still uses 32-bit zoneinfo files. +# +# To check whether your zoneinfo files contain 32-bit or 64-bit transition +# data, you can run the following code (substituting the identifier of the +# zone you want to test for `zone_identifier`): +# +# TZInfo::DataSource.set(:zoneinfo) +# dir = TZInfo::DataSource.get.zoneinfo_dir +# File.open(File.join(dir, zone_identifier), 'r') {|f| f.read(5) } +# +# If the last line returns `"TZif\\x00"`, then you have a 32-bit zoneinfo +# file. If it returns `"TZif2"` or `"TZif3"` then you have a 64-bit zoneinfo +# file. +# +# It is also worth noting that as of the 2017c release of the IANA Time Zone +# Database, 64-bit zoneinfo files only include future transitions up to +# 2038-01-19 03:14:07. Any queries falling after this time may be +# inaccurate. +# +# source://tzinfo//lib/tzinfo/data_sources/zoneinfo_data_source.rb#68 +class TZInfo::DataSources::ZoneinfoDataSource < ::TZInfo::DataSource + # Initializes a new {ZoneinfoDataSource}. + # + # If `zoneinfo_dir` is specified, it will be checked and used as the + # source of zoneinfo files. + # + # The directory must contain a file named iso3166.tab and a file named + # either zone1970.tab or zone.tab. These may either be included in the + # root of the directory or in a 'tab' sub-directory and named country.tab + # and zone_sun.tab respectively (as is the case on Solaris). + # + # Additionally, the path to iso3166.tab can be overridden using the + # `alternate_iso3166_tab_path` parameter. + # + # If `zoneinfo_dir` is not specified or `nil`, the paths referenced in + # {search_path} are searched in order to find a valid zoneinfo directory + # (one that contains zone1970.tab or zone.tab and iso3166.tab files as + # above). + # + # The paths referenced in {alternate_iso3166_tab_search_path} are also + # searched to find an iso3166.tab file if one of the searched zoneinfo + # directories doesn't contain an iso3166.tab file. + # + # @param zoneinfo_dir [String] an optional path to a directory to use as + # the source of zoneinfo files. + # @param alternate_iso3166_tab_path [String] an optional path to the + # iso3166.tab file. + # @raise [InvalidZoneinfoDirectory] if the iso3166.tab and zone1970.tab or + # zone.tab files cannot be found using the `zoneinfo_dir` and + # `alternate_iso3166_tab_path` parameters. + # @raise [ZoneinfoDirectoryNotFound] if no valid directory can be found + # by searching. + # @return [ZoneinfoDataSource] a new instance of ZoneinfoDataSource + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_data_source.rb#237 + def initialize(zoneinfo_dir = T.unsafe(nil), alternate_iso3166_tab_path = T.unsafe(nil)); end + + # Returns a frozen `Array` of all the available ISO 3166-1 alpha-2 country + # codes. The identifiers are sorted according to `String#<=>`. + # + # @return [Array<String>] a frozen `Array` of all the available ISO 3166-1 + # alpha-2 country codes. + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_data_source.rb#204 + def country_codes; end + + # Returns a frozen `Array` of all the available time zone identifiers. The + # identifiers are sorted according to `String#<=>`. + # + # @return [Array<String>] a frozen `Array` of all the available time zone + # identifiers. + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_data_source.rb#271 + def data_timezone_identifiers; end + + # @return [String] the internal object state as a programmer-readable + # `String`. + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_data_source.rb#290 + def inspect; end + + # Returns an empty `Array`. There is no information about linked/aliased + # time zones in the zoneinfo files. When using {ZoneinfoDataSource}, every + # time zone will be returned as a {DataTimezone}. + # + # @return [Array<String>] an empty `Array`. + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_data_source.rb#280 + def linked_timezone_identifiers; end + + # @return [String] a description of the {DataSource}. + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_data_source.rb#285 + def to_s; end + + # @return [String] the zoneinfo directory being used. + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_data_source.rb#201 + def zoneinfo_dir; end + + protected + + # @param code [String] an ISO 3166-1 alpha-2 country code. + # @raise [InvalidCountryCode] if the country could not be found or the code + # is invalid. + # @return [DataSources::CountryInfo] a {DataSources::CountryInfo} instance + # for the given ISO 3166-1 alpha-2 country code. + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_data_source.rb#326 + def load_country_info(code); end + + # Returns a {TimezoneInfo} instance for the given time zone identifier. + # The result will either be a {ConstantOffsetDataTimezoneInfo} or a + # {TransitionsDataTimezoneInfo}. + # + # @param identifier [String] A time zone identifier. + # @raise [InvalidTimezoneIdentifier] if the time zone is not found, the + # identifier is invalid, the zoneinfo file cannot be opened or the + # zoneinfo file is not valid. + # @return [TimezoneInfo] a {TimezoneInfo} instance for the given time zone + # identifier. + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_data_source.rb#306 + def load_timezone_info(identifier); end + + private + + # Converts degrees, minutes and seconds to a Rational. + # + # @param sign [String] `'-'` or `'+'`. + # @param degrees [String] the number of degrees. + # @param minutes [String] the number of minutes. + # @param seconds [String] the number of seconds (optional). + # @return [Rational] the result of converting from degrees, minutes and + # seconds to a `Rational`. + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_data_source.rb#579 + def dms_to_rational(sign, degrees, minutes, seconds = T.unsafe(nil)); end + + # Recursively enumerate a directory of time zones. + # + # @param dir [Array<String>] the directory to enumerate as an `Array` of + # path components. + # @param exclude [Array<String>] file names to exclude when scanning + # `dir`. + # @yield [path] the path of each time zone file found is passed to + # the block. + # @yieldparam path [Array<String>] the path of a time zone file as an + # `Array` of path components. + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_data_source.rb#434 + def enum_timezones(dir, exclude = T.unsafe(nil), &block); end + + # Finds a zoneinfo directory using {search_path} and + # {alternate_iso3166_tab_search_path}. + # + # @return [Array<String>] an `Array` containing the iso3166.tab and + # zone.tab paths if a zoneinfo directory was found, otherwise `nil`. + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_data_source.rb#389 + def find_zoneinfo_dir; end + + # Uses the iso3166.tab and zone1970.tab or zone.tab files to return a Hash + # mapping country codes to CountryInfo instances. + # + # @param iso3166_tab_path [String] the path to the iso3166.tab file. + # @param zone_tab_path [String] the path to the zone.tab file. + # @return [Hash<String, CountryInfo>] a mapping from ISO 3166-1 alpha-2 + # country codes to {CountryInfo} instances. + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_data_source.rb#463 + def load_countries(iso3166_tab_path, zone_tab_path); end + + # Scans @zoneinfo_dir and returns an `Array` of available time zone + # identifiers. The result is sorted according to `String#<=>`. + # + # @return [Array<String>] an `Array` containing all the time zone + # identifiers found. + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_data_source.rb#414 + def load_timezone_identifiers; end + + # Attempts to resolve the path to a tab file given its standard names and + # tab sub-directory name (as used on Solaris). + # + # @param zoneinfo_path [String] the path to a zoneinfo directory. + # @param standard_names [Array<String>] the standard names for the tab + # file. + # @param tab_name [String] the alternate name for the tab file to check in + # the tab sub-directory. + # @return [String] the path to the tab file. + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_data_source.rb#372 + def resolve_tab_path(zoneinfo_path, standard_names, tab_name); end + + # Validates a zoneinfo directory and returns the paths to the iso3166.tab + # and zone1970.tab or zone.tab files if valid. If the directory is not + # valid, returns `nil`. + # + # The path to the iso3166.tab file may be overridden by passing in a path. + # This is treated as either absolute or relative to the current working + # directory. + # + # @param path [String] the path to a possible zoneinfo directory. + # @param iso3166_tab_path [String] an optional path to an external + # iso3166.tab file. + # @return [Array<String>] an `Array` containing the iso3166.tab and + # zone.tab paths if the directory is valid, otherwise `nil`. + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_data_source.rb#345 + def validate_zoneinfo_dir(path, iso3166_tab_path = T.unsafe(nil)); end + + class << self + # An `Array` of paths that will be checked to find an alternate + # iso3166.tab file if one was not included in the zoneinfo directory + # (for example, on FreeBSD and OpenBSD systems). + # + # Paths are checked in the order they appear in the `Array`. + # + # The default value is `['/usr/share/misc/iso3166.tab', + # '/usr/share/misc/iso3166']`. + # + # @return [Array<String>] an `Array` of paths to check in order to + # locate an iso3166.tab file. + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_data_source.rb#156 + def alternate_iso3166_tab_search_path; end + + # Sets the paths to check to locate an alternate iso3166.tab file if one + # was not included in the zoneinfo directory. + # + # Can be set to an `Array` of paths or a `String` containing paths + # separated with `File::PATH_SEPARATOR`. + # + # Paths are checked in the order they appear in the array. + # + # Set to `nil` to revert to the default paths. + # + # @param alternate_iso3166_tab_search_path [Object] either `nil` or a + # list of paths to check as either an `Array` of `String` or a + # `File::PATH_SEPARATOR` separated `String`. + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_data_source.rb#173 + def alternate_iso3166_tab_search_path=(alternate_iso3166_tab_search_path); end + + # An `Array` of directories that will be checked to find the system + # zoneinfo directory. + # + # Directories are checked in the order they appear in the `Array`. + # + # The default value is `['/usr/share/zoneinfo', + # '/usr/share/lib/zoneinfo', '/etc/zoneinfo']`. + # + # @return [Array<String>] an `Array` of directories to check in order to + # find the system zoneinfo directory. + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_data_source.rb#123 + def search_path; end + + # Sets the directories to be checked when locating the system zoneinfo + # directory. + # + # Can be set to an `Array` of directories or a `String` containing + # directories separated with `File::PATH_SEPARATOR`. + # + # Directories are checked in the order they appear in the `Array` or + # `String`. + # + # Set to `nil` to revert to the default paths. + # + # @param search_path [Object] either `nil` or a list of directories to + # check as either an `Array` of `String` or a `File::PATH_SEPARATOR` + # separated `String`. + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_data_source.rb#141 + def search_path=(search_path); end + + private + + # Processes a path for use as the {search_path} or + # {alternate_iso3166_tab_search_path}. + # + # @param path [Object] either `nil` or a list of paths to check as + # either an `Array` of `String` or a `File::PATH_SEPARATOR` separated + # `String`. + # @param default [Array<String>] the default value. + # @return [Array<String>] the processed path. + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_data_source.rb#187 + def process_search_path(path, default); end + end +end + +# The default value of {ZoneinfoDataSource.alternate_iso3166_tab_search_path}. +# +# source://tzinfo//lib/tzinfo/data_sources/zoneinfo_data_source.rb#74 +TZInfo::DataSources::ZoneinfoDataSource::DEFAULT_ALTERNATE_ISO3166_TAB_SEARCH_PATH = T.let(T.unsafe(nil), Array) + +# The default value of {ZoneinfoDataSource.search_path}. +# +# source://tzinfo//lib/tzinfo/data_sources/zoneinfo_data_source.rb#70 +TZInfo::DataSources::ZoneinfoDataSource::DEFAULT_SEARCH_PATH = T.let(T.unsafe(nil), Array) + +# Files and directories in the top level zoneinfo directory that will be +# excluded from the list of available time zones: +# +# - +VERSION is included on Mac OS X. +# - leapseconds is a list of leap seconds. +# - localtime is the current local timezone (may be a link). +# - posix, posixrules and right are directories containing other +# versions of the zoneinfo files. +# - SECURITY is included in the Arch Linux tzdata package. +# - src is a directory containing the tzdata source included on Solaris. +# - timeconfig is a symlink included on Slackware. +# +# source://tzinfo//lib/tzinfo/data_sources/zoneinfo_data_source.rb#88 +TZInfo::DataSources::ZoneinfoDataSource::EXCLUDED_FILENAMES = T.let(T.unsafe(nil), Array) + +# A {ZoneinfoDirectoryNotFound} exception is raised if no valid zoneinfo +# directory could be found when checking the paths listed in +# {ZoneinfoDataSource.search_path}. A valid zoneinfo directory is one that +# contains time zone files, a country code index file named iso3166.tab and +# a time zone index file named zone1970.tab or zone.tab. +# +# source://tzinfo//lib/tzinfo/data_sources/zoneinfo_data_source.rb#19 +class TZInfo::DataSources::ZoneinfoDirectoryNotFound < ::StandardError; end + +# Reads compiled zoneinfo TZif (\0, 2 or 3) files. +# +# source://tzinfo//lib/tzinfo/data_sources/zoneinfo_reader.rb#12 +class TZInfo::DataSources::ZoneinfoReader + # Initializes a new {ZoneinfoReader}. + # + # @param posix_tz_parser [PosixTimeZoneParser] a {PosixTimeZoneParser} + # instance to use to parse POSIX-style TZ strings. + # @param string_deduper [StringDeduper] a {StringDeduper} instance to use + # to dedupe abbreviations. + # @return [ZoneinfoReader] a new instance of ZoneinfoReader + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_reader.rb#25 + def initialize(posix_tz_parser, string_deduper); end + + # Reads a zoneinfo structure from the given path. Returns either a + # {TimezoneOffset} that is constantly observed or an `Array` + # {TimezoneTransition}s. + # + # @param file_path [String] the path of a zoneinfo file. + # @raise [SecurityError] if safe mode is enabled and `file_path` is + # tainted. + # @raise [InvalidZoneinfoFile] if `file_path`` does not refer to a valid + # zoneinfo file. + # @return [Object] either a {TimezoneOffset} or an `Array` of + # {TimezoneTransition}s. + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_reader.rb#41 + def read(file_path); end + + private + + # Apply the rules from the TZ string when there were defined + # transitions. Checks for a matching offset with the last transition. + # Redefines the last transition if required and if the rules don't + # specific a constant offset, generates transitions until 100 years into + # the future (at the time of loading zoneinfo_reader.rb). + # + # @param file [IO] the file being processed. + # @param transitions [Array<TimezoneTransition>] the defined transitions. + # @param offsets [Array<TimezoneOffset>] the offsets used by the defined + # transitions. + # @param rules [Object] a {TimezoneOffset} specifying a constant offset or + # {AnnualRules} instance specfying transitions. + # @raise [InvalidZoneinfoFile] if the first offset does not match the + # rules. + # @raise [InvalidZoneinfoFile] if the previous offset of the first + # generated transition does not match the offset of the last defined + # transition. + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_reader.rb#311 + def apply_rules_with_transitions(file, transitions, offsets, rules); end + + # Apply the rules from the TZ string when there were no defined + # transitions. Checks for a matching offset. Returns the rules-based + # constant offset or generates transitions from 1970 until 100 years into + # the future (at the time of loading zoneinfo_reader.rb). + # + # @param file [IO] the file being processed. + # @param first_offset [TimezoneOffset] the first offset included in the + # file that would normally apply without the rules. + # @param rules [Object] a {TimezoneOffset} specifying a constant offset or + # {AnnualRules} instance specfying transitions. + # @raise [InvalidZoneinfoFile] if the first offset does not match the + # rules. + # @return [Object] either a {TimezoneOffset} or an `Array` of + # {TimezoneTransition}s. + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_reader.rb#199 + def apply_rules_without_transitions(file, first_offset, rules); end + + # Reads the given number of bytes from the given file and checks that the + # correct number of bytes could be read. + # + # @param file [IO] the file to read from. + # @param bytes [Integer] the number of bytes to read. + # @raise [InvalidZoneinfoFile] if the number of bytes available didn't + # match the number requested. + # @return [String] the bytes that were read. + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_reader.rb#76 + def check_read(file, bytes); end + + # Zoneinfo files don't include the offset from standard time (std_offset) + # for DST periods. Derive the base offset (base_utc_offset) where DST is + # observed from either the previous or next non-DST period. + # + # @param transitions [Array<Hash>] an `Array` of transition hashes. + # @param offsets [Array<Hash>] an `Array` of offset hashes. + # @return [Integer] the index of the offset to be used prior to the first + # transition. + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_reader.rb#94 + def derive_offsets(transitions, offsets); end + + # Finds an offset that is equivalent to the one specified in the given + # `Array`. Matching is performed with {TimezoneOffset#==}. + # + # @param offsets [Array<TimezoneOffset>] an `Array` to search. + # @param offset [TimezoneOffset] the offset to search for. + # @return [TimezoneOffset] the matching offset from `offsets` or `nil` + # if not found. + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_reader.rb#233 + def find_existing_offset(offsets, offset); end + + # Translates an unsigned 32-bit integer (as returned by unpack) to signed + # 32-bit. + # + # @param long [Integer] an unsigned 32-bit integer. + # @return [Integer] {long} translated to signed 32-bit. + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_reader.rb#52 + def make_signed_int32(long); end + + # Translates a pair of unsigned 32-bit integers (as returned by unpack, + # most significant first) to a signed 64-bit integer. + # + # @param high [Integer] the most significant 32-bits. + # @param low [Integer] the least significant 32-bits. + # @return [Integer] {high} and {low} combined and translated to signed + # 64-bit. + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_reader.rb#63 + def make_signed_int64(high, low); end + + # Determines if the offset from a transition matches the offset from a + # rule. This is a looser match than equality, not requiring that the + # base_utc_offset and std_offset both match (which have to be derived for + # transitions, but are known for rules. + # + # @param offset [TimezoneOffset] an offset from a transition. + # @param rule_offset [TimezoneOffset] an offset from a rule. + # @return [Boolean] whether the offsets match. + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_reader.rb#179 + def offset_matches_rule?(offset, rule_offset); end + + # Parses a zoneinfo file and returns either a {TimezoneOffset} that is + # constantly observed or an `Array` of {TimezoneTransition}s. + # + # @param file [IO] the file to be read. + # @raise [InvalidZoneinfoFile] if the file is not a valid zoneinfo file. + # @return [Object] either a {TimezoneOffset} or an `Array` of + # {TimezoneTransition}s. + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_reader.rb#343 + def parse(file); end + + # Returns a new AnnualRules instance with standard and daylight savings + # offsets replaced with equivalents from an array. This reduces the memory + # requirement for loaded time zones by reusing offsets for rule-generated + # transitions. + # + # @param offsets [Array<TimezoneOffset>] an `Array` to search for + # equivalent offsets. + # @param annual_rules [AnnualRules] the {AnnualRules} instance to check. + # @return [AnnualRules] either a new {AnnualRules} instance with either + # the {AnnualRules#std_offset std_offset} or {AnnualRules#dst_offset + # dst_offset} replaced, or the original instance if no equivalent for + # either {AnnualRules#std_offset std_offset} or {AnnualRules#dst_offset + # dst_offset} could be found. + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_reader.rb#250 + def replace_with_existing_offsets(offsets, annual_rules); end + + # Validates the offset indicated to be observed by the rules before the + # first generated transition against the offset of the last defined + # transition. + # + # Fix the last defined transition if it differ on just base/std offsets + # (which are derived). Raise an error if the observed UTC offset or + # abbreviations differ. + # + # @param file [IO] the file being processed. + # @param last_defined [TimezoneTransition] the last defined transition in + # the file. + # @param first_rule_offset [TimezoneOffset] the offset the rules indicate + # is observed prior to the first rules generated transition. + # @raise [InvalidZoneinfoFile] if the offset of {last_defined} and + # {first_rule_offset} do not match. + # @return [TimezoneTransition] the last defined transition (either the + # original instance or a replacement). + # + # source://tzinfo//lib/tzinfo/data_sources/zoneinfo_reader.rb#278 + def validate_and_fix_last_defined_transition_offset(file, last_defined, first_rule_offset); end +end + +# The year to generate transitions up to. +# +# @private +# +# source://tzinfo//lib/tzinfo/data_sources/zoneinfo_reader.rb#16 +TZInfo::DataSources::ZoneinfoReader::GENERATE_UP_TO = T.let(T.unsafe(nil), Integer) + +# Represents time zones that are defined by rules that set out when +# transitions occur. +# +# source://tzinfo//lib/tzinfo/data_timezone.rb#7 +class TZInfo::DataTimezone < ::TZInfo::InfoTimezone + # Returns the canonical {Timezone} instance for this {DataTimezone}. + # + # For a {DataTimezone}, this is always `self`. + # + # @return [Timezone] `self`. + # + # source://tzinfo//lib/tzinfo/data_timezone.rb#40 + def canonical_zone; end + + # Returns the {TimezonePeriod} that is valid at a given time. + # + # Unlike {period_for_local} and {period_for_utc}, the UTC offset of the + # `time` parameter is taken into consideration. + # + # @param time [Object] a `Time`, `DateTime` or {Timestamp}. + # @raise [ArgumentError] if `time` is `nil`. + # @raise [ArgumentError] if `time` is a {Timestamp} with an unspecified + # offset. + # @return [TimezonePeriod] the {TimezonePeriod} that is valid at `time`. + # + # source://tzinfo//lib/tzinfo/data_timezone.rb#9 + def period_for(time); end + + # Returns the set of {TimezonePeriod}s that are valid for the given + # local time as an `Array`. + # + # The UTC offset of the `local_time` parameter is ignored (it is treated as + # a time in the time zone represented by `self`). + # + # This will typically return an `Array` containing a single + # {TimezonePeriod}. More than one {TimezonePeriod} will be returned when the + # local time is ambiguous (for example, when daylight savings time ends). An + # empty `Array` will be returned when the local time is not valid (for + # example, when daylight savings time begins). + # + # To obtain just a single {TimezonePeriod} in all cases, use + # {period_for_local} instead and specify how ambiguities should be resolved. + # + # @param local_time [Object] a `Time`, `DateTime` or {Timestamp}. + # @raise [ArgumentError] if `local_time` is `nil`. + # @return [Array<TimezonePeriod>] the set of {TimezonePeriod}s that are + # valid at `local_time`. + # + # source://tzinfo//lib/tzinfo/data_timezone.rb#17 + def periods_for_local(local_time); end + + # Returns an `Array` of {TimezoneTransition} instances representing the + # times where the UTC offset of the timezone changes. + # + # Transitions are returned up to a given time (`to`). + # + # A from time may also be supplied using the `from` parameter. If from is + # not `nil`, only transitions from that time onwards will be returned. + # + # Comparisons with `to` are exclusive. Comparisons with `from` are + # inclusive. If a transition falls precisely on `to`, it will be excluded. + # If a transition falls on `from`, it will be included. + # + # @param to [Object] a `Time`, `DateTime` or {Timestamp} specifying the + # latest (exclusive) transition to return. + # @param from [Object] an optional `Time`, `DateTime` or {Timestamp} + # specifying the earliest (inclusive) transition to return. + # @raise [ArgumentError] if `from` is specified and `to` is not greater than + # `from`. + # @raise [ArgumentError] is raised if `to` is `nil`. + # @raise [ArgumentError] if either `to` or `from` is a {Timestamp} with an + # unspecified offset. + # @return [Array<TimezoneTransition>] the transitions that are earlier than + # `to` and, if specified, at or later than `from`. Transitions are ordered + # by when they occur, from earliest to latest. + # + # source://tzinfo//lib/tzinfo/data_timezone.rb#23 + def transitions_up_to(to, from = T.unsafe(nil)); end +end + +# A subclass of `DateTime` used to represent local times. {DateTimeWithOffset} +# holds a reference to the related {TimezoneOffset} and overrides various +# methods to return results appropriate for the {TimezoneOffset}. Certain +# operations will clear the associated {TimezoneOffset} (if the +# {TimezoneOffset} would not necessarily be valid for the result). Once the +# {TimezoneOffset} has been cleared, {DateTimeWithOffset} behaves identically +# to `DateTime`. +# +# Arithmetic performed on {DateTimeWithOffset} instances is _not_ time +# zone-aware. Regardless of whether transitions in the time zone are crossed, +# results of arithmetic operations will always maintain the same offset from +# UTC (`offset`). The associated {TimezoneOffset} will aways be cleared. +# +# source://tzinfo//lib/tzinfo/datetime_with_offset.rb#19 +class TZInfo::DateTimeWithOffset < ::DateTime + include ::TZInfo::WithOffset + + # An overridden version of `DateTime#downto` that clears the associated + # {TimezoneOffset} of the returned or yielded instances. + # + # source://tzinfo//lib/tzinfo/datetime_with_offset.rb#61 + def downto(min); end + + # An overridden version of `DateTime#england` that preserves the associated + # {TimezoneOffset}. + # + # @return [DateTime] + # + # source://tzinfo//lib/tzinfo/datetime_with_offset.rb#75 + def england; end + + # An overridden version of `DateTime#gregorian` that preserves the + # associated {TimezoneOffset}. + # + # @return [DateTime] + # + # source://tzinfo//lib/tzinfo/datetime_with_offset.rb#85 + def gregorian; end + + # An overridden version of `DateTime#italy` that preserves the associated + # {TimezoneOffset}. + # + # @return [DateTime] + # + # source://tzinfo//lib/tzinfo/datetime_with_offset.rb#95 + def italy; end + + # An overridden version of `DateTime#julian` that preserves the associated + # {TimezoneOffset}. + # + # @return [DateTime] + # + # source://tzinfo//lib/tzinfo/datetime_with_offset.rb#105 + def julian; end + + # An overridden version of `DateTime#new_start` that preserves the + # associated {TimezoneOffset}. + # + # @return [DateTime] + # + # source://tzinfo//lib/tzinfo/datetime_with_offset.rb#115 + def new_start(start = T.unsafe(nil)); end + + # Sets the associated {TimezoneOffset}. + # + # @param timezone_offset [TimezoneOffset] a {TimezoneOffset} valid at the + # time and for the offset of this {DateTimeWithOffset}. + # @raise [ArgumentError] if `timezone_offset` is `nil`. + # @raise [ArgumentError] if `timezone_offset.observed_utc_offset` does not + # equal `self.offset * 86400`. + # @return [DateTimeWithOffset] `self`. + # + # source://tzinfo//lib/tzinfo/datetime_with_offset.rb#34 + def set_timezone_offset(timezone_offset); end + + # An overridden version of `DateTime#step` that clears the associated + # {TimezoneOffset} of the returned or yielded instances. + # + # source://tzinfo//lib/tzinfo/datetime_with_offset.rb#121 + def step(limit, step = T.unsafe(nil)); end + + # @return [TimezoneOffset] the {TimezoneOffset} associated with this + # instance. + # + # source://tzinfo//lib/tzinfo/datetime_with_offset.rb#24 + def timezone_offset; end + + # An overridden version of `DateTime#to_time` that, if there is an + # associated {TimezoneOffset}, returns a {DateTimeWithOffset} with that + # offset. + # + # @return [Time] if there is an associated {TimezoneOffset}, a + # {TimeWithOffset} representation of this {DateTimeWithOffset}, otherwise + # a `Time` representation. + # + # source://tzinfo//lib/tzinfo/datetime_with_offset.rb#48 + def to_time; end + + # An overridden version of `DateTime#upto` that clears the associated + # {TimezoneOffset} of the returned or yielded instances. + # + # source://tzinfo//lib/tzinfo/datetime_with_offset.rb#133 + def upto(max); end + + protected + + # Clears the associated {TimezoneOffset}. + # + # @return [DateTimeWithOffset] `self`. + # + # source://tzinfo//lib/tzinfo/datetime_with_offset.rb#148 + def clear_timezone_offset; end +end + +# A rule that transitions on the nth occurrence of a particular day of week +# of a calendar month. +# +# @private +# +# source://tzinfo//lib/tzinfo/transition_rule.rb#339 +class TZInfo::DayOfMonthTransitionRule < ::TZInfo::DayOfWeekTransitionRule + # Initializes a new {DayOfMonthTransitionRule}. + # + # @param transition_at [Integer] the time in seconds after midnight local + # time at which the transition occurs. + # @param week [Integer] the week of the month when the transition occurs (1 + # to 4). + # @param day_of_week [Integer] the day of the week when the transition + # occurs. 0 is Sunday, 6 is Saturday. + # @param month [Integer] the month of the year when the transition occurs. + # @raise [ArgumentError] if `week` is less than 1 or greater than 4. + # @raise [ArgumentError] if `day_of_week` is not an `Integer`. + # @raise [ArgumentError] if `day_of_week` is less than 0 or greater than 6. + # @raise [ArgumentError] if `month` is less than 1 or greater than 12. + # @raise [ArgumentError] if `transition_at` is not an `Integer`. + # @raise [ArgumentError] if `month` is not an `Integer`. + # @raise [ArgumentError] if `week` is not an `Integer`. + # @return [DayOfMonthTransitionRule] a new instance of DayOfMonthTransitionRule + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#340 + def initialize(month, week, day_of_week, transition_at = T.unsafe(nil)); end + + # Determines if this {DayOfMonthTransitionRule} is equal to another + # instance. + # + # @param r [Object] the instance to test for equality. + # @return [Boolean] `true` if `r` is a {DayOfMonthTransitionRule} with the + # same {transition_at}, month, week and day of week as this + # {DayOfMonthTransitionRule}, otherwise `false`. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#353 + def ==(r); end + + # Determines if this {DayOfMonthTransitionRule} is equal to another + # instance. + # + # @param r [Object] the instance to test for equality. + # @return [Boolean] `true` if `r` is a {DayOfMonthTransitionRule} with the + # same {transition_at}, month, week and day of week as this + # {DayOfMonthTransitionRule}, otherwise `false`. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#353 + def eql?(r); end + + protected + + # Returns a `Time` representing midnight local time on the day specified by + # the rule for the given offset and year. + # + # @param offset [TimezoneOffset] the current offset at the time of the + # transition. + # @param year [Integer] the year in which the transition occurs. + # @return [Time] midnight local time on the day specified by the rule for + # the given offset and year. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#372 + def get_day(offset, year); end + + # @return [Array] an `Array` of parameters that will influence the output of + # {hash}. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#386 + def hash_args; end + + # @return [Integer] the day the week starts on for a month starting on a + # Sunday. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#362 + def offset_start; end +end + +# A base class for rules that transition on a particular day of week of a +# given week (subclasses specify which week of the month). +# +# @abstract +# @private +# +# source://tzinfo//lib/tzinfo/transition_rule.rb#273 +class TZInfo::DayOfWeekTransitionRule < ::TZInfo::TransitionRule + # Initializes a new {DayOfWeekTransitionRule}. + # + # @param transition_at [Integer] the time in seconds after midnight local + # time at which the transition occurs. + # @param day_of_week [Integer] the day of the week when the transition + # occurs. 0 is Sunday, 6 is Saturday. + # @param month [Integer] the month of the year when the transition occurs. + # @raise [ArgumentError] if `day_of_week` is not an `Integer`. + # @raise [ArgumentError] if `day_of_week` is less than 0 or greater than 6. + # @raise [ArgumentError] if `month` is not an `Integer`. + # @raise [ArgumentError] if `transition_at` is not an `Integer`. + # @raise [ArgumentError] if `month` is less than 1 or greater than 12. + # @return [DayOfWeekTransitionRule] a new instance of DayOfWeekTransitionRule + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#274 + def initialize(month, day_of_week, transition_at); end + + # Determines if this {DayOfWeekTransitionRule} is equal to another + # instance. + # + # @param r [Object] the instance to test for equality. + # @return [Boolean] `true` if `r` is a {DayOfWeekTransitionRule} with the + # same {transition_at}, month and day of week as this + # {DayOfWeekTransitionRule}, otherwise `false`. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#299 + def ==(r); end + + # Determines if this {DayOfWeekTransitionRule} is equal to another + # instance. + # + # @param r [Object] the instance to test for equality. + # @return [Boolean] `true` if `r` is a {DayOfWeekTransitionRule} with the + # same {transition_at}, month and day of week as this + # {DayOfWeekTransitionRule}, otherwise `false`. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#299 + def eql?(r); end + + # @return [Boolean] `false`. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#283 + def is_always_first_day_of_year?; end + + # @return [Boolean] `false`. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#288 + def is_always_last_day_of_year?; end + + protected + + # @return [Integer] the day of the week (0 to 6 for Sunday to Monday). + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#310 + def day_of_week; end + + # @return [Array] an `Array` of parameters that will influence the output of + # {hash}. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#313 + def hash_args; end + + # @return [Integer] the month of the year (1 to 12). + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#307 + def month; end +end + +# A base class for transition rules that activate based on an integer day of +# the year. +# +# @abstract +# @private +# +# source://tzinfo//lib/tzinfo/transition_rule.rb#81 +class TZInfo::DayOfYearTransitionRule < ::TZInfo::TransitionRule + # Initializes a new {DayOfYearTransitionRule}. + # + # @param day [Integer] the day of the year on which the transition occurs. + # The precise meaning is defined by subclasses. + # @param transition_at [Integer] the time in seconds after midnight local + # time at which the transition occurs. + # @raise [ArgumentError] if `transition_at` is not an `Integer`. + # @raise [ArgumentError] if `day` is not an `Integer`. + # @return [DayOfYearTransitionRule] a new instance of DayOfYearTransitionRule + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#82 + def initialize(day, transition_at); end + + # Determines if this {DayOfYearTransitionRule} is equal to another instance. + # + # @param r [Object] the instance to test for equality. + # @return [Boolean] `true` if `r` is a {DayOfYearTransitionRule} with the + # same {transition_at} and day as this {DayOfYearTransitionRule}, + # otherwise `false`. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#94 + def ==(r); end + + # Determines if this {DayOfYearTransitionRule} is equal to another instance. + # + # @param r [Object] the instance to test for equality. + # @return [Boolean] `true` if `r` is a {DayOfYearTransitionRule} with the + # same {transition_at} and day as this {DayOfYearTransitionRule}, + # otherwise `false`. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#94 + def eql?(r); end + + protected + + # @return [Array] an `Array` of parameters that will influence the output of + # {hash}. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#105 + def hash_args; end + + # @return [Integer] the day multipled by the number of seconds in a day. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#102 + def seconds; end +end + +# Modules and classes used by the format 1 version of TZInfo::Data. +# +# @private +# +# source://tzinfo//lib/tzinfo/format1.rb#7 +module TZInfo::Format1; end + +# Instances of {Format1::CountryDefiner} are yielded to the format 1 version +# of `TZInfo::Data::Indexes::Countries` by {CountryIndexDefinition} to allow +# the zones of a country to be specified. +# +# @private +# +# source://tzinfo//lib/tzinfo/format1/country_definer.rb#11 +class TZInfo::Format1::CountryDefiner < ::TZInfo::Format2::CountryDefiner + # Initializes a new {CountryDefiner}. + # + # @return [CountryDefiner] a new instance of CountryDefiner + # + # source://tzinfo//lib/tzinfo/format1/country_definer.rb#12 + def initialize(identifier_deduper, description_deduper); end +end + +# The format 1 TZInfo::Data country index file includes +# {Format1::CountryIndexDefinition}, which provides a +# {CountryIndexDefinition::ClassMethods#country country} method used to +# define each country in the index. +# +# @private +# +# source://tzinfo//lib/tzinfo/format1/country_index_definition.rb#11 +module TZInfo::Format1::CountryIndexDefinition + mixes_in_class_methods ::TZInfo::Format1::CountryIndexDefinition::ClassMethods + + class << self + # Adds class methods to the includee and initializes class instance + # variables. + # + # @param base [Module] the includee. + # + # source://tzinfo//lib/tzinfo/format1/country_index_definition.rb#16 + def append_features(base); end + end +end + +# Class methods for inclusion. +# +# @private +# +# source://tzinfo//lib/tzinfo/format1/country_index_definition.rb#25 +module TZInfo::Format1::CountryIndexDefinition::ClassMethods + # @return [Hash<String, DataSources::CountryInfo>] a frozen `Hash` + # of all the countries that have been defined in the index keyed by + # their codes. + # + # source://tzinfo//lib/tzinfo/format1/country_index_definition.rb#29 + def countries; end + + private + + # Defines a country with an ISO 3166-1 alpha-2 country code and name. + # + # @param code [String] the ISO 3166-1 alpha-2 country code. + # @param name [String] the name of the country. + # @yield [definer] (optional) to obtain the time zones for the country. + # @yieldparam definer [CountryDefiner] a {CountryDefiner} instance. + # + # source://tzinfo//lib/tzinfo/format1/country_index_definition.rb#42 + def country(code, name); end +end + +# Instances of {Format1::TimezoneDefiner} are yielded to TZInfo::Data +# format 1 modules by {TimezoneDefinition} to allow the offsets and +# transitions of the time zone to be specified. +# +# @private +# +# source://tzinfo//lib/tzinfo/format1/timezone_definer.rb#11 +class TZInfo::Format1::TimezoneDefiner < ::TZInfo::Format2::TimezoneDefiner + # Defines an offset. + # + # @param id [Symbol] an arbitrary value used identify the offset in + # subsequent calls to transition. It must be unique. + # @param utc_offset [Integer] the base offset from UTC of the zone in + # seconds. This does not include daylight savings time. + # @param std_offset [Integer] the daylight savings offset from the base + # offset in seconds. Typically either 0 or 3600. + # @param abbreviation [Symbol] an abbreviation for the offset, for + # example, `:EST` or `:EDT`. + # @raise [ArgumentError] if another offset has already been defined with + # the given id. + # + # source://tzinfo//lib/tzinfo/format1/timezone_definer.rb#26 + def offset(id, utc_offset, std_offset, abbreviation); end + + # Defines a transition to a given offset. + # + # Transitions must be defined in increasing time order. + # + # @param year [Integer] the UTC year in which the transition occurs. Used + # in earlier versions of TZInfo, but now ignored. + # @param month [Integer] the UTC month in which the transition occurs. + # Used in earlier versions of TZInfo, but now ignored. + # @param offset_id [Symbol] references the id of a previously defined + # offset (see #offset). + # @param timestamp_value [Integer] the time the transition occurs as an + # Integer number of seconds since 1970-01-01 00:00:00 UTC ignoring leap + # seconds (i.e. each day is treated as if it were 86,400 seconds long). + # @param datetime_numerator [Integer] the time of the transition as the + # numerator of the `Rational` returned by `DateTime#ajd`. Used in + # earlier versions of TZInfo, but now ignored. + # @param datetime_denominator [Integer] the time of the transition as the + # denominator of the `Rational` returned by `DateTime#ajd`. Used in + # earlier versions of TZInfo, but now ignored. + # @raise [ArgumentError] if `offset_id` does not reference a defined + # offset. + # @raise [ArgumentError] if `timestamp_value` is not greater than the + # `timestamp_value` of the previously defined transition. + # @raise [ArgumentError] if `datetime_numerator` is specified, but + # `datetime_denominator` is not. In older versions of TZInfo, it was + # possible to define a transition with the `DateTime` numerator as the + # 4th parameter and the denominator as the 5th parameter. This style of + # definition is not used in released versions of TZInfo::Data. + # + # source://tzinfo//lib/tzinfo/format1/timezone_definer.rb#58 + def transition(year, month, offset_id, timestamp_value, datetime_numerator = T.unsafe(nil), datetime_denominator = T.unsafe(nil)); end +end + +# {Format1::TimezoneDefinition} is included into format 1 time zone +# definition modules and provides the methods for defining time zones. +# +# @private +# +# source://tzinfo//lib/tzinfo/format1/timezone_definition.rb#9 +module TZInfo::Format1::TimezoneDefinition + mixes_in_class_methods ::TZInfo::Format2::TimezoneDefinition::ClassMethods + mixes_in_class_methods ::TZInfo::Format1::TimezoneDefinition::ClassMethods + + class << self + # Adds class methods to the includee. + # + # @param base [Module] the includee. + # + # source://tzinfo//lib/tzinfo/format1/timezone_definition.rb#13 + def append_features(base); end + end +end + +# Class methods for inclusion. +# +# @private +# +# source://tzinfo//lib/tzinfo/format1/timezone_definition.rb#22 +module TZInfo::Format1::TimezoneDefinition::ClassMethods + private + + # {Format2::TimezoneDefinition::ClassMethods#timezone}. + # + # @return the class to be instantiated and yielded by + # + # source://tzinfo//lib/tzinfo/format1/timezone_definition.rb#27 + def timezone_definer_class; end +end + +# The format 1 TZInfo::Data time zone index file includes +# {Format1::TimezoneIndexDefinition}, which provides methods used to define +# time zones in the index. +# +# @private +# +# source://tzinfo//lib/tzinfo/format1/timezone_index_definition.rb#10 +module TZInfo::Format1::TimezoneIndexDefinition + mixes_in_class_methods ::TZInfo::Format1::TimezoneIndexDefinition::ClassMethods + + class << self + # Adds class methods to the includee and initializes class instance + # variables. + # + # @param base [Module] the includee. + # + # source://tzinfo//lib/tzinfo/format1/timezone_index_definition.rb#15 + def append_features(base); end + end +end + +# Class methods for inclusion. +# +# @private +# +# source://tzinfo//lib/tzinfo/format1/timezone_index_definition.rb#28 +module TZInfo::Format1::TimezoneIndexDefinition::ClassMethods + # @return [Array<String>] a frozen `Array` containing the identifiers of + # all data time zones. Identifiers are sorted according to + # `String#<=>`. + # + # source://tzinfo//lib/tzinfo/format1/timezone_index_definition.rb#32 + def data_timezones; end + + # @return [Array<String>] a frozen `Array` containing the identifiers of + # all linked time zones. Identifiers are sorted according to + # `String#<=>`. + # + # source://tzinfo//lib/tzinfo/format1/timezone_index_definition.rb#42 + def linked_timezones; end + + private + + # Adds a linked time zone to the index. + # + # @param identifier [String] the time zone identifier. + # + # source://tzinfo//lib/tzinfo/format1/timezone_index_definition.rb#63 + def linked_timezone(identifier); end + + # Adds a data time zone to the index. + # + # @param identifier [String] the time zone identifier. + # + # source://tzinfo//lib/tzinfo/format1/timezone_index_definition.rb#54 + def timezone(identifier); end +end + +# Modules and classes used by the format 2 version of TZInfo::Data. +# +# @private +# +# source://tzinfo//lib/tzinfo/format2.rb#7 +module TZInfo::Format2; end + +# Instances of {Format2::CountryDefiner} are yielded to the format 2 version +# of `TZInfo::Data::Indexes::Countries` by {CountryIndexDefiner} to allow +# the zones of a country to be specified. +# +# @private +# +# source://tzinfo//lib/tzinfo/format2/country_definer.rb#11 +class TZInfo::Format2::CountryDefiner + # Initializes a new {CountryDefiner}. + # + # @param shared_timezones [Hash<Symbol, CountryTimezone>] a `Hash` + # containing time zones shared by more than one country, keyed by a + # unique reference. + # @param identifier_deduper [StringDeduper] a {StringDeduper} instance to + # use when deduping time zone identifiers. + # @param description_deduper [StringDeduper] a {StringDeduper} instance to + # use when deduping time zone descriptions. + # @return [CountryDefiner] a new instance of CountryDefiner + # + # source://tzinfo//lib/tzinfo/format2/country_definer.rb#24 + def initialize(shared_timezones, identifier_deduper, description_deduper); end + + # @overload timezone + # @overload timezone + # + # source://tzinfo//lib/tzinfo/format2/country_definer.rb#46 + def timezone(identifier_or_reference, latitude_numerator = T.unsafe(nil), latitude_denominator = T.unsafe(nil), longitude_numerator = T.unsafe(nil), longitude_denominator = T.unsafe(nil), description = T.unsafe(nil)); end + + # @return [Array<CountryTimezone>] the time zones observed in the country. + # + # source://tzinfo//lib/tzinfo/format2/country_definer.rb#13 + def timezones; end +end + +# Instances of {Format2::CountryIndexDefiner} are yielded to the format 2 +# version of `TZInfo::Data::Indexes::Countries` by {CountryIndexDefinition} +# to allow countries and their time zones to be specified. +# +# @private +# +# source://tzinfo//lib/tzinfo/format2/country_index_definer.rb#10 +class TZInfo::Format2::CountryIndexDefiner + # Initializes a new {CountryIndexDefiner}. + # + # @param identifier_deduper [StringDeduper] a {StringDeduper} instance to + # use when deduping time zone identifiers. + # @param description_deduper [StringDeduper] a {StringDeduper} instance to + # use when deduping time zone descriptions. + # @return [CountryIndexDefiner] a new instance of CountryIndexDefiner + # + # source://tzinfo//lib/tzinfo/format2/country_index_definer.rb#21 + def initialize(identifier_deduper, description_deduper); end + + # @return [Hash<String, CountryInfo>] a `Hash` of all the countries that + # have been defined in the index keyed by their codes. + # + # source://tzinfo//lib/tzinfo/format2/country_index_definer.rb#13 + def countries; end + + # Defines a country. + # + # @param code [String] The ISO 3166-1 alpha-2 code of the country. + # @param name [String] Then name of the country. + # @yield [definer] yields (optional) to obtain the time zones for the + # country. + # @yieldparam definer [CountryDefiner] a {CountryDefiner} + # instance that should be used to specify the time zones of the country. + # + # source://tzinfo//lib/tzinfo/format2/country_index_definer.rb#56 + def country(code, name); end + + # Defines a time zone shared by many countries with an reference for + # subsequent use in country definitions. The latitude and longitude are + # given as the numerator and denominator of a `Rational`. + # + # @param reference [Symbol] a unique reference for the time zone. + # @param identifier [String] the time zone identifier. + # @param latitude_numerator [Integer] the numerator of the latitude. + # @param latitude_denominator [Integer] the denominator of the latitude. + # @param longitude_numerator [Integer] the numerator of the longitude. + # @param longitude_denominator [Integer] the denominator of the longitude. + # @param description [String] an optional description for the time zone. + # + # source://tzinfo//lib/tzinfo/format2/country_index_definer.rb#39 + def timezone(reference, identifier, latitude_numerator, latitude_denominator, longitude_numerator, longitude_denominator, description = T.unsafe(nil)); end +end + +# The format 2 country index file includes +# {Format2::CountryIndexDefinition}, which provides a +# {CountryIndexDefinition::ClassMethods#country_index country_index} method +# used to define the country index. +# +# @private +# +# source://tzinfo//lib/tzinfo/format2/country_index_definition.rb#11 +module TZInfo::Format2::CountryIndexDefinition + mixes_in_class_methods ::TZInfo::Format2::CountryIndexDefinition::ClassMethods + + class << self + # Adds class methods to the includee and initializes class instance + # variables. + # + # @param base [Module] the includee. + # + # source://tzinfo//lib/tzinfo/format2/country_index_definition.rb#16 + def append_features(base); end + end +end + +# Class methods for inclusion. +# +# @private +# +# source://tzinfo//lib/tzinfo/format2/country_index_definition.rb#25 +module TZInfo::Format2::CountryIndexDefinition::ClassMethods + # @return [Hash<String, DataSources::CountryInfo>] a frozen `Hash` + # of all the countries that have been defined in the index keyed by + # their codes. + # + # source://tzinfo//lib/tzinfo/format2/country_index_definition.rb#29 + def countries; end + + private + + # Defines the index. + # + # @yield [definer] yields to allow the index to be defined. + # @yieldparam definer [CountryIndexDefiner] a {CountryIndexDefiner} + # instance that should be used to define the index. + # + # source://tzinfo//lib/tzinfo/format2/country_index_definition.rb#38 + def country_index; end +end + +# Instances of {TimezoneDefiner} are yielded to TZInfo::Data modules by +# {TimezoneDefinition} to allow the offsets and transitions of the time zone +# to be specified. +# +# @private +# +# source://tzinfo//lib/tzinfo/format2/timezone_definer.rb#11 +class TZInfo::Format2::TimezoneDefiner + # Initializes a new TimezoneDefiner. + # + # @param string_deduper [StringDeduper] a {StringDeduper} instance to use + # when deduping abbreviations. + # @return [TimezoneDefiner] a new instance of TimezoneDefiner + # + # source://tzinfo//lib/tzinfo/format2/timezone_definer.rb#20 + def initialize(string_deduper); end + + # Returns the first offset to be defined or `nil` if no offsets have been + # defined. The first offset is observed before the time of the first + # transition. + # + # @return [TimezoneOffset] the first offset to be defined or `nil` if no + # offsets have been defined. + # + # source://tzinfo//lib/tzinfo/format2/timezone_definer.rb#32 + def first_offset; end + + # Defines an offset. + # + # @param id [Symbol] an arbitrary value used identify the offset in + # subsequent calls to transition. It must be unique. + # @param base_utc_offset [Integer] the base offset from UTC of the zone in + # seconds. This does not include daylight savings time. + # @param std_offset [Integer] the daylight savings offset from the base + # offset in seconds. Typically either 0 or 3600. + # @param abbreviation [String] an abbreviation for the offset, for + # example, EST or EDT. + # @raise [ArgumentError] if another offset has already been defined with + # the given id. + # + # source://tzinfo//lib/tzinfo/format2/timezone_definer.rb#49 + def offset(id, base_utc_offset, std_offset, abbreviation); end + + # Defines the rules that will be used for handling instants after the last + # transition. + # + # This method is currently just a placeholder for forward compatibility + # that accepts and ignores any arguments passed. + # + # Support for subsequent rules will be added in a future version of TZInfo + # and the rules will be included in format 2 releases of TZInfo::Data. + # + # source://tzinfo//lib/tzinfo/format2/timezone_definer.rb#90 + def subsequent_rules(*args); end + + # Defines a transition to a given offset. + # + # Transitions must be defined in increasing time order. + # + # @param offset_id [Symbol] references the id of a previously defined + # offset. + # @param timestamp_value [Integer] the time the transition occurs as a + # number of seconds since 1970-01-01 00:00:00 UTC ignoring leap seconds + # (i.e. each day is treated as if it were 86,400 seconds long). + # @raise [ArgumentError] if `offset_id` does not reference a defined + # offset. + # @raise [ArgumentError] if `timestamp_value` is not greater than the + # `timestamp_value` of the previously defined transition. + # + # source://tzinfo//lib/tzinfo/format2/timezone_definer.rb#74 + def transition(offset_id, timestamp_value); end + + # @return [Array<TimezoneTransition>] the defined transitions of the time + # zone. + # + # source://tzinfo//lib/tzinfo/format2/timezone_definer.rb#14 + def transitions; end +end + +# {Format2::TimezoneDefinition} is included into format 2 time zone +# definition modules and provides methods for defining time zones. +# +# @private +# +# source://tzinfo//lib/tzinfo/format2/timezone_definition.rb#9 +module TZInfo::Format2::TimezoneDefinition + mixes_in_class_methods ::TZInfo::Format2::TimezoneDefinition::ClassMethods + + class << self + # Adds class methods to the includee. + # + # @param base [Module] the includee. + # + # source://tzinfo//lib/tzinfo/format2/timezone_definition.rb#13 + def append_features(base); end + end +end + +# Class methods for inclusion. +# +# @private +# +# source://tzinfo//lib/tzinfo/format2/timezone_definition.rb#21 +module TZInfo::Format2::TimezoneDefinition::ClassMethods + # @return [TimezoneInfo] the last time zone to be defined. + # + # source://tzinfo//lib/tzinfo/format2/timezone_definition.rb#23 + def get; end + + private + + # Defines a linked time zone. + # + # @param identifier [String] the identifier of the time zone being + # defined. + # @param link_to_identifier [String] the identifier the new time zone + # links to (is an alias for). + # + # source://tzinfo//lib/tzinfo/format2/timezone_definition.rb#64 + def linked_timezone(identifier, link_to_identifier); end + + # Defines a data time zone. + # + # @param identifier [String] the identifier of the time zone. + # @yield [definer] yields to the caller to define the time zone. + # @yieldparam definer [Object] an instance of the class returned by + # {#timezone_definer_class}, typically {TimezoneDefiner}. + # + # source://tzinfo//lib/tzinfo/format2/timezone_definition.rb#41 + def timezone(identifier); end + + # @return [Class] the class to be instantiated and yielded by + # {#timezone}. + # + # source://tzinfo//lib/tzinfo/format2/timezone_definition.rb#31 + def timezone_definer_class; end +end + +# Instances of {TimezoneIndexDefiner} are yielded by +# {TimezoneIndexDefinition} to allow the time zone index to be defined. +# +# @private +# +# source://tzinfo//lib/tzinfo/format2/timezone_index_definer.rb#9 +class TZInfo::Format2::TimezoneIndexDefiner + # Initializes a new TimezoneDefiner. + # + # @param string_deduper [StringDeduper] a {StringDeduper} instance to use + # when deduping identifiers. + # @return [TimezoneIndexDefiner] a new instance of TimezoneIndexDefiner + # + # source://tzinfo//lib/tzinfo/format2/timezone_index_definer.rb#20 + def initialize(string_deduper); end + + # Adds a data time zone to the index. + # + # @param identifier [String] the time zone identifier. + # + # source://tzinfo//lib/tzinfo/format2/timezone_index_definer.rb#29 + def data_timezone(identifier); end + + # @return [Array<String>] the identifiers of all data time zones. + # + # source://tzinfo//lib/tzinfo/format2/timezone_index_definer.rb#11 + def data_timezones; end + + # Adds a linked time zone to the index. + # + # @param identifier [String] the time zone identifier. + # + # source://tzinfo//lib/tzinfo/format2/timezone_index_definer.rb#38 + def linked_timezone(identifier); end + + # @return [Array<String>] the identifiers of all linked time zones. + # + # source://tzinfo//lib/tzinfo/format2/timezone_index_definer.rb#14 + def linked_timezones; end +end + +# The format 2 time zone index file includes {TimezoneIndexDefinition}, +# which provides the {TimezoneIndexDefinition::ClassMethods#timezone_index +# timezone_index} method used to define the index. +# +# @private +# +# source://tzinfo//lib/tzinfo/format2/timezone_index_definition.rb#10 +module TZInfo::Format2::TimezoneIndexDefinition + mixes_in_class_methods ::TZInfo::Format2::TimezoneIndexDefinition::ClassMethods + + class << self + # Adds class methods to the includee and initializes class instance + # variables. + # + # @param base [Module] the includee. + # + # source://tzinfo//lib/tzinfo/format2/timezone_index_definition.rb#15 + def append_features(base); end + end +end + +# Class methods for inclusion. +# +# @private +# +# source://tzinfo//lib/tzinfo/format2/timezone_index_definition.rb#29 +module TZInfo::Format2::TimezoneIndexDefinition::ClassMethods + # @return [Array<String>] a frozen `Array` containing the identifiers of + # all data time zones. Identifiers are sorted according to + # `String#<=>`. + # + # source://tzinfo//lib/tzinfo/format2/timezone_index_definition.rb#33 + def data_timezones; end + + # @return [Array<String>] a frozen `Array` containing the identifiers of + # all linked time zones. Identifiers are sorted according to + # `String#<=>`. + # + # source://tzinfo//lib/tzinfo/format2/timezone_index_definition.rb#38 + def linked_timezones; end + + # Defines the index. + # + # @yield [definer] yields to the caller to allow the index to be + # defined. + # @yieldparam definer [TimezoneIndexDefiner] a {TimezoneIndexDefiner} + # instance that should be used to define the index. + # + # source://tzinfo//lib/tzinfo/format2/timezone_index_definition.rb#46 + def timezone_index; end +end + +# A {Timezone} based on a {DataSources::TimezoneInfo}. +# +# @abstract +# +# source://tzinfo//lib/tzinfo/info_timezone.rb#8 +class TZInfo::InfoTimezone < ::TZInfo::Timezone + # Initializes a new {InfoTimezone}. + # + # {InfoTimezone} instances should not normally be created directly. Use + # the {Timezone.get} method to obtain {Timezone} instances. + # + # @param info [DataSources::TimezoneInfo] a {DataSources::TimezoneInfo} + # instance supplied by a {DataSource} that will be used as the source of + # data for this {InfoTimezone}. + # @return [InfoTimezone] a new instance of InfoTimezone + # + # source://tzinfo//lib/tzinfo/info_timezone.rb#17 + def initialize(info); end + + # @return [String] the identifier of the time zone, for example, + # `"Europe/Paris"`. + # + # source://tzinfo//lib/tzinfo/info_timezone.rb#23 + def identifier; end + + protected + + # @return [DataSources::TimezoneInfo] the {DataSources::TimezoneInfo} this + # {InfoTimezone} is based on. + # + # source://tzinfo//lib/tzinfo/info_timezone.rb#31 + def info; end +end + +# {InvalidCountryCode} is raised by {Country#get} if the code given is not a +# valid ISO 3166-1 alpha-2 code. +# +# source://tzinfo//lib/tzinfo/country.rb#7 +class TZInfo::InvalidCountryCode < ::StandardError; end + +# {InvalidDataSource} is raised if the selected {DataSource} doesn't implement +# one of the required methods. +# +# source://tzinfo//lib/tzinfo/data_source.rb#10 +class TZInfo::InvalidDataSource < ::StandardError; end + +# {InvalidTimezoneIdentifier} is raised by {Timezone.get} if the identifier +# given is not valid. +# +# source://tzinfo//lib/tzinfo/timezone.rb#26 +class TZInfo::InvalidTimezoneIdentifier < ::StandardError; end + +# Defines transitions that occur on the one-based nth Julian day of the year. +# +# Leap days are not counted. Day 1 is 1 January. Day 60 is always 1 March. +# Day 365 is always 31 December. +# +# @private +# +# source://tzinfo//lib/tzinfo/transition_rule.rb#185 +class TZInfo::JulianDayOfYearTransitionRule < ::TZInfo::DayOfYearTransitionRule + # Initializes a new {JulianDayOfYearTransitionRule}. + # + # @param day [Integer] the one-based Julian day of the year on which the + # transition occurs (1 to 365 inclusive). + # @param transition_at [Integer] the time in seconds after midnight local + # time at which the transition occurs. + # @raise [ArgumentError] if `transition_at` is not an `Integer`. + # @raise [ArgumentError] if `day` is not an `Integer`. + # @raise [ArgumentError] if `day` is less than 1 or greater than 365. + # @return [JulianDayOfYearTransitionRule] a new instance of JulianDayOfYearTransitionRule + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#202 + def initialize(day, transition_at = T.unsafe(nil)); end + + # Determines if this {JulianDayOfYearTransitionRule} is equal to another + # instance. + # + # @param r [Object] the instance to test for equality. + # @return [Boolean] `true` if `r` is a {JulianDayOfYearTransitionRule} with + # the same {transition_at} and day as this + # {JulianDayOfYearTransitionRule}, otherwise `false`. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#226 + def ==(r); end + + # Determines if this {JulianDayOfYearTransitionRule} is equal to another + # instance. + # + # @param r [Object] the instance to test for equality. + # @return [Boolean] `true` if `r` is a {JulianDayOfYearTransitionRule} with + # the same {transition_at} and day as this + # {JulianDayOfYearTransitionRule}, otherwise `false`. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#226 + def eql?(r); end + + # @return [Boolean] `true` if the day specified by this transition is the + # first in the year (a day number of 1), otherwise `false`. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#209 + def is_always_first_day_of_year?; end + + # @return [Boolean] `true` if the day specified by this transition is the + # last in the year (a day number of 365), otherwise `false`. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#215 + def is_always_last_day_of_year?; end + + protected + + # Returns a `Time` representing midnight local time on the day specified by + # the rule for the given offset and year. + # + # @param offset [TimezoneOffset] the current offset at the time of the + # transition. + # @param year [Integer] the year in which the transition occurs. + # @return [Time] midnight local time on the day specified by the rule for + # the given offset and year. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#241 + def get_day(offset, year); end + + # @return [Array] an `Array` of parameters that will influence the output of + # {hash}. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#250 + def hash_args; end +end + +# The 60 days in seconds. +# +# source://tzinfo//lib/tzinfo/transition_rule.rb#186 +TZInfo::JulianDayOfYearTransitionRule::LEAP = T.let(T.unsafe(nil), Integer) + +# The length of a non-leap year in seconds. +# +# source://tzinfo//lib/tzinfo/transition_rule.rb#190 +TZInfo::JulianDayOfYearTransitionRule::YEAR = T.let(T.unsafe(nil), Integer) + +# A rule that transitions on the last occurrence of a particular day of week +# of a calendar month. +# +# @private +# +# source://tzinfo//lib/tzinfo/transition_rule.rb#408 +class TZInfo::LastDayOfMonthTransitionRule < ::TZInfo::DayOfWeekTransitionRule + # Initializes a new {LastDayOfMonthTransitionRule}. + # + # @param transition_at [Integer] the time in seconds after midnight local + # time at which the transition occurs. + # @param day_of_week [Integer] the day of the week when the transition + # occurs. 0 is Sunday, 6 is Saturday. + # @param month [Integer] the month of the year when the transition occurs. + # @raise [ArgumentError] if `day_of_week` is not an `Integer`. + # @raise [ArgumentError] if `day_of_week` is less than 0 or greater than 6. + # @raise [ArgumentError] if `month` is not an `Integer`. + # @raise [ArgumentError] if `transition_at` is not an `Integer`. + # @raise [ArgumentError] if `month` is less than 1 or greater than 12. + # @return [LastDayOfMonthTransitionRule] a new instance of LastDayOfMonthTransitionRule + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#409 + def initialize(month, day_of_week, transition_at = T.unsafe(nil)); end + + # Determines if this {LastDayOfMonthTransitionRule} is equal to another + # instance. + # + # @param r [Object] the instance to test for equality. + # @return [Boolean] `true` if `r` is a {LastDayOfMonthTransitionRule} with + # the same {transition_at}, month and day of week as this + # {LastDayOfMonthTransitionRule}, otherwise `false`. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#420 + def ==(r); end + + # Determines if this {LastDayOfMonthTransitionRule} is equal to another + # instance. + # + # @param r [Object] the instance to test for equality. + # @return [Boolean] `true` if `r` is a {LastDayOfMonthTransitionRule} with + # the same {transition_at}, month and day of week as this + # {LastDayOfMonthTransitionRule}, otherwise `false`. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#420 + def eql?(r); end + + protected + + # Returns a `Time` representing midnight local time on the day specified by + # the rule for the given offset and year. + # + # @param offset [TimezoneOffset] the current offset at the time of the + # transition. + # @param year [Integer] the year in which the transition occurs. + # @return [Time] midnight local time on the day specified by the rule for + # the given offset and year. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#435 + def get_day(offset, year); end +end + +# Represents time zones that are defined as a link to or alias for another +# time zone. +# +# source://tzinfo//lib/tzinfo/linked_timezone.rb#6 +class TZInfo::LinkedTimezone < ::TZInfo::InfoTimezone + # Initializes a new {LinkedTimezone}. + # + # {LinkedTimezone} instances should not normally be created directly. Use + # the {Timezone.get} method to obtain {Timezone} instances. + # + # @param info [DataSources::LinkedTimezoneInfo] a + # {DataSources::LinkedTimezoneInfo} instance supplied by a {DataSource} + # that will be used as the source of data for this {LinkedTimezone}. + # @return [LinkedTimezone] a new instance of LinkedTimezone + # + # source://tzinfo//lib/tzinfo/linked_timezone.rb#15 + def initialize(info); end + + # Returns the canonical {Timezone} instance for this {LinkedTimezone}. + # + # For a {LinkedTimezone}, this is the canonical zone of the link target. + # + # @return [Timezone] the canonical {Timezone} instance for this {Timezone}. + # + # source://tzinfo//lib/tzinfo/linked_timezone.rb#40 + def canonical_zone; end + + # Returns the {TimezonePeriod} that is valid at a given time. + # + # Unlike {period_for_local} and {period_for_utc}, the UTC offset of the + # `time` parameter is taken into consideration. + # + # @param time [Object] a `Time`, `DateTime` or {Timestamp}. + # @raise [ArgumentError] if `time` is `nil`. + # @raise [ArgumentError] if `time` is a {Timestamp} with an unspecified + # offset. + # @return [TimezonePeriod] the {TimezonePeriod} that is valid at `time`. + # + # source://tzinfo//lib/tzinfo/linked_timezone.rb#21 + def period_for(time); end + + # Returns the set of {TimezonePeriod}s that are valid for the given + # local time as an `Array`. + # + # The UTC offset of the `local_time` parameter is ignored (it is treated as + # a time in the time zone represented by `self`). + # + # This will typically return an `Array` containing a single + # {TimezonePeriod}. More than one {TimezonePeriod} will be returned when the + # local time is ambiguous (for example, when daylight savings time ends). An + # empty `Array` will be returned when the local time is not valid (for + # example, when daylight savings time begins). + # + # To obtain just a single {TimezonePeriod} in all cases, use + # {period_for_local} instead and specify how ambiguities should be resolved. + # + # @param local_time [Object] a `Time`, `DateTime` or {Timestamp}. + # @raise [ArgumentError] if `local_time` is `nil`. + # @return [Array<TimezonePeriod>] the set of {TimezonePeriod}s that are + # valid at `local_time`. + # + # source://tzinfo//lib/tzinfo/linked_timezone.rb#26 + def periods_for_local(local_time); end + + # Returns an `Array` of {TimezoneTransition} instances representing the + # times where the UTC offset of the timezone changes. + # + # Transitions are returned up to a given time (`to`). + # + # A from time may also be supplied using the `from` parameter. If from is + # not `nil`, only transitions from that time onwards will be returned. + # + # Comparisons with `to` are exclusive. Comparisons with `from` are + # inclusive. If a transition falls precisely on `to`, it will be excluded. + # If a transition falls on `from`, it will be included. + # + # @param to [Object] a `Time`, `DateTime` or {Timestamp} specifying the + # latest (exclusive) transition to return. + # @param from [Object] an optional `Time`, `DateTime` or {Timestamp} + # specifying the earliest (inclusive) transition to return. + # @raise [ArgumentError] if `from` is specified and `to` is not greater than + # `from`. + # @raise [ArgumentError] is raised if `to` is `nil`. + # @raise [ArgumentError] if either `to` or `from` is a {Timestamp} with an + # unspecified offset. + # @return [Array<TimezoneTransition>] the transitions that are earlier than + # `to` and, if specified, at or later than `from`. Transitions are ordered + # by when they occur, from earliest to latest. + # + # source://tzinfo//lib/tzinfo/linked_timezone.rb#31 + def transitions_up_to(to, from = T.unsafe(nil)); end +end + +# Represents the infinite period of time in a time zone that constantly +# observes the same offset from UTC (has an unbounded start and end). +# +# source://tzinfo//lib/tzinfo/offset_timezone_period.rb#6 +class TZInfo::OffsetTimezonePeriod < ::TZInfo::TimezonePeriod + # Initializes an {OffsetTimezonePeriod}. + # + # @param offset [TimezoneOffset] the offset that is constantly observed. + # @raise [ArgumentError] if `offset` is `nil`. + # @return [OffsetTimezonePeriod] a new instance of OffsetTimezonePeriod + # + # source://tzinfo//lib/tzinfo/offset_timezone_period.rb#11 + def initialize(offset); end + + # Determines if this {OffsetTimezonePeriod} is equal to another instance. + # + # @param p [Object] the instance to test for equality. + # @return [Boolean] `true` if `p` is a {OffsetTimezonePeriod} with the same + # {offset}, otherwise `false`. + # + # source://tzinfo//lib/tzinfo/offset_timezone_period.rb#32 + def ==(p); end + + # @return [TimezoneTransition] the transition that defines the end of this + # {TimezonePeriod}, always `nil` for {OffsetTimezonePeriod}. + # + # source://tzinfo//lib/tzinfo/offset_timezone_period.rb#23 + def end_transition; end + + # Determines if this {OffsetTimezonePeriod} is equal to another instance. + # + # @param p [Object] the instance to test for equality. + # @return [Boolean] `true` if `p` is a {OffsetTimezonePeriod} with the same + # {offset}, otherwise `false`. + # + # source://tzinfo//lib/tzinfo/offset_timezone_period.rb#32 + def eql?(p); end + + # @return [Integer] a hash based on {offset}. + # + # source://tzinfo//lib/tzinfo/offset_timezone_period.rb#38 + def hash; end + + # @return [TimezoneTransition] the transition that defines the start of this + # {TimezonePeriod}, always `nil` for {OffsetTimezonePeriod}. + # + # source://tzinfo//lib/tzinfo/offset_timezone_period.rb#17 + def start_transition; end +end + +# {PeriodNotFound} is raised to indicate that no {TimezonePeriod} matching a +# given time could be found. +# +# source://tzinfo//lib/tzinfo/timezone.rb#21 +class TZInfo::PeriodNotFound < ::StandardError; end + +# Methods to support different versions of Ruby. +# +# @private +# +# source://tzinfo//lib/tzinfo/ruby_core_support.rb#6 +module TZInfo::RubyCoreSupport + class << self + # source://tzinfo//lib/tzinfo/ruby_core_support.rb#17 + def untaint(o); end + end +end + +# Maintains a pool of `String` instances. The {#dedupe} method will return +# either a pooled copy of a given `String` or add the instance to the pool. +# +# @private +# +# source://tzinfo//lib/tzinfo/string_deduper.rb#11 +class TZInfo::StringDeduper + # Initializes a new {StringDeduper}. + # + # @return [StringDeduper] a new instance of StringDeduper + # + # source://tzinfo//lib/tzinfo/string_deduper.rb#20 + def initialize; end + + # @param string [String] the string to deduplicate. + # @return [bool] `string` if it is frozen, otherwise a frozen, possibly + # pre-existing copy of `string`. + # + # source://tzinfo//lib/tzinfo/string_deduper.rb#30 + def dedupe(string); end + + protected + + # Creates a `Hash` to store pooled `String` instances. + # + # @param block [Proc] Default value block to be passed to `Hash.new`. + # @return [Hash] a `Hash` to store pooled `String` instances. + # + # source://tzinfo//lib/tzinfo/string_deduper.rb#41 + def create_hash(&block); end + + class << self + # @return [StringDeduper] a globally available singleton instance of + # {StringDeduper}. This instance is safe for use in concurrently + # executing threads. + # + # source://tzinfo//lib/tzinfo/string_deduper.rb#16 + def global; end + end +end + +# A subclass of `Time` used to represent local times. {TimeWithOffset} holds a +# reference to the related {TimezoneOffset} and overrides various methods to +# return results appropriate for the {TimezoneOffset}. Certain operations will +# clear the associated {TimezoneOffset} (if the {TimezoneOffset} would not +# necessarily be valid for the result). Once the {TimezoneOffset} has been +# cleared, {TimeWithOffset} behaves identically to `Time`. +# +# Arithmetic performed on {TimeWithOffset} instances is _not_ time zone-aware. +# Regardless of whether transitions in the time zone are crossed, results of +# arithmetic operations will always maintain the same offset from UTC +# (`utc_offset`). The associated {TimezoneOffset} will aways be cleared. +# +# source://tzinfo//lib/tzinfo/time_with_offset.rb#16 +class TZInfo::TimeWithOffset < ::Time + include ::TZInfo::WithOffset + + # An overridden version of `Time#dst?` that, if there is an associated + # {TimezoneOffset}, returns the result of calling {TimezoneOffset#dst? dst?} + # on that offset. + # + # @return [Boolean] `true` if daylight savings time is being observed, + # otherwise `false`. + # + # source://tzinfo//lib/tzinfo/time_with_offset.rb#43 + def dst?; end + + # An overridden version of `Time#getlocal` that clears the associated + # {TimezoneOffset} if the base implementation of `getlocal` returns a + # {TimeWithOffset}. + # + # @return [Time] a representation of the {TimeWithOffset} using either the + # local time zone or the given offset. + # + # source://tzinfo//lib/tzinfo/time_with_offset.rb#55 + def getlocal(*args); end + + # An overridden version of `Time#gmtime` that clears the associated + # {TimezoneOffset}. + # + # @return [TimeWithOffset] `self`. + # + # source://tzinfo//lib/tzinfo/time_with_offset.rb#69 + def gmtime; end + + # An overridden version of `Time#dst?` that, if there is an associated + # {TimezoneOffset}, returns the result of calling {TimezoneOffset#dst? dst?} + # on that offset. + # + # @return [Boolean] `true` if daylight savings time is being observed, + # otherwise `false`. + # + # source://tzinfo//lib/tzinfo/time_with_offset.rb#43 + def isdst; end + + # An overridden version of `Time#localtime` that clears the associated + # {TimezoneOffset}. + # + # @return [TimeWithOffset] `self`. + # + # source://tzinfo//lib/tzinfo/time_with_offset.rb#79 + def localtime(*args); end + + # An overridden version of `Time#round` that, if there is an associated + # {TimezoneOffset}, returns a {TimeWithOffset} preserving that offset. + # + # @return [Time] the rounded time. + # + # source://tzinfo//lib/tzinfo/time_with_offset.rb#89 + def round(ndigits = T.unsafe(nil)); end + + # Marks this {TimeWithOffset} as a local time with the UTC offset of a given + # {TimezoneOffset} and sets the associated {TimezoneOffset}. + # + # @param timezone_offset [TimezoneOffset] the {TimezoneOffset} to use to set + # the offset of this {TimeWithOffset}. + # @raise [ArgumentError] if `timezone_offset` is `nil`. + # @return [TimeWithOffset] `self`. + # + # source://tzinfo//lib/tzinfo/time_with_offset.rb#30 + def set_timezone_offset(timezone_offset); end + + # @return [TimezoneOffset] the {TimezoneOffset} associated with this + # instance. + # + # source://tzinfo//lib/tzinfo/time_with_offset.rb#21 + def timezone_offset; end + + # An overridden version of `Time#to_a`. The `isdst` (index 8) and `zone` + # (index 9) elements of the array are set according to the associated + # {TimezoneOffset}. + # + # @return [Array] an `Array` representation of the {TimeWithOffset}. + # + # source://tzinfo//lib/tzinfo/time_with_offset.rb#98 + def to_a; end + + # An overridden version of `Time#to_datetime` that, if there is an + # associated {TimezoneOffset}, returns a {DateTimeWithOffset} with that + # offset. + # + # @return [DateTime] if there is an associated {TimezoneOffset}, a + # {DateTimeWithOffset} representation of this {TimeWithOffset}, otherwise + # a `Time` representation. + # + # source://tzinfo//lib/tzinfo/time_with_offset.rb#135 + def to_datetime; end + + # An overridden version of `Time#utc` that clears the associated + # {TimezoneOffset}. + # + # @return [TimeWithOffset] `self`. + # + # source://tzinfo//lib/tzinfo/time_with_offset.rb#110 + def utc; end + + # An overridden version of `Time#zone` that, if there is an associated + # {TimezoneOffset}, returns the {TimezoneOffset#abbreviation abbreviation} + # of that offset. + # + # @return [String] the {TimezoneOffset#abbreviation abbreviation} of the + # associated {TimezoneOffset}, or the result from `Time#zone` if there is + # no such offset. + # + # source://tzinfo//lib/tzinfo/time_with_offset.rb#123 + def zone; end + + protected + + # Clears the associated {TimezoneOffset}. + # + # @return [TimeWithOffset] `self`. + # + # source://tzinfo//lib/tzinfo/time_with_offset.rb#149 + def clear_timezone_offset; end +end + +# A time represented as an `Integer` number of seconds since 1970-01-01 +# 00:00:00 UTC (ignoring leap seconds and using the proleptic Gregorian +# calendar), the fraction through the second (sub_second as a `Rational`) and +# an optional UTC offset. Like Ruby's `Time` class, {Timestamp} can +# distinguish between a local time with a zero offset and a time specified +# explicitly as UTC. +# +# source://tzinfo//lib/tzinfo/timestamp.rb#11 +class TZInfo::Timestamp + include ::Comparable + + # Initializes a new {Timestamp}. + # + # @param value [Integer] the number of seconds since 1970-01-01 00:00:00 UTC + # ignoring leap seconds. + # @param utc_offset [Object] either `nil` for a {Timestamp} without a + # specified offset, an offset from UTC specified as an `Integer` number of + # seconds or the `Symbol` `:utc`). + # @param sub_second [Numeric] the fractional part of the second as either a + # `Rational` that is greater than or equal to 0 and less than 1, or + # the `Integer` 0. + # @raise [ArgumentError] if `utc_offset` is not `nil`, not an `Integer` and + # not the `Symbol` `:utc`. + # @raise [ArgumentError] if `sub_second` is not a `Rational`, or the + # `Integer` 0. + # @raise [ArgumentError] if `value` is not an `Integer`. + # @raise [RangeError] if `sub_second` is a `Rational` but that is less + # than 0 or greater than or equal to 1. + # @return [Timestamp] a new instance of Timestamp + # + # source://tzinfo//lib/tzinfo/timestamp.rb#344 + def initialize(value, sub_second = T.unsafe(nil), utc_offset = T.unsafe(nil)); end + + # Compares this {Timestamp} with another. + # + # {Timestamp} instances without a defined UTC offset are not comparable with + # {Timestamp} instances that have a defined UTC offset. + # + # @param t [Timestamp] the {Timestamp} to compare this instance with. + # @return [Integer] -1, 0 or 1 depending if this instance is earlier, equal + # or later than `t` respectively. Returns `nil` when comparing a + # {Timestamp} that does not have a defined UTC offset with a {Timestamp} + # that does have a defined UTC offset. Returns `nil` if `t` is not a + # {Timestamp}. + # + # source://tzinfo//lib/tzinfo/timestamp.rb#454 + def <=>(t); end + + # Adds a number of seconds to the {Timestamp} value, setting the UTC offset + # of the result. + # + # @param seconds [Integer] the number of seconds to be added. + # @param utc_offset [Object] either `nil` for a {Timestamp} without a + # specified offset, an offset from UTC specified as an `Integer` number of + # seconds or the `Symbol` `:utc`). + # @raise [ArgumentError] if `seconds` is not an `Integer`. + # @raise [ArgumentError] if `utc_offset` is not `nil`, not an `Integer` and + # not the `Symbol` `:utc`. + # @return [Timestamp] the result of adding `seconds` to the + # {Timestamp} value as a new {Timestamp} instance with the chosen + # `utc_offset`. + # + # source://tzinfo//lib/tzinfo/timestamp.rb#372 + def add_and_set_utc_offset(seconds, utc_offset); end + + def eql?(_arg0); end + + # @return [Integer] a hash based on the value, sub-second and whether there + # is a defined UTC offset. + # + # source://tzinfo//lib/tzinfo/timestamp.rb#468 + def hash; end + + # @return [String] the internal object state as a programmer-readable + # `String`. + # + # source://tzinfo//lib/tzinfo/timestamp.rb#474 + def inspect; end + + # Formats this {Timestamp} according to the directives in the given format + # string. + # + # @param format [String] the format string. Please refer to `Time#strftime` + # for a list of supported format directives. + # @raise [ArgumentError] if `format` is not specified. + # @return [String] the formatted {Timestamp}. + # + # source://tzinfo//lib/tzinfo/timestamp.rb#426 + def strftime(format); end + + # @return [Numeric] the fraction of a second elapsed since timestamp as + # either a `Rational` or the `Integer` 0. Always greater than or equal to + # 0 and less than 1. + # + # source://tzinfo//lib/tzinfo/timestamp.rb#321 + def sub_second; end + + # Converts this {Timestamp} to a Gregorian `DateTime`. + # + # @return [DateTime] a Gregorian `DateTime` representation of this + # {Timestamp}. If the UTC offset of this {Timestamp} is not specified, a + # UTC `DateTime` will be returned. + # + # source://tzinfo//lib/tzinfo/timestamp.rb#406 + def to_datetime; end + + # Converts this {Timestamp} to an `Integer` number of seconds since + # 1970-01-01 00:00:00 UTC (ignoring leap seconds). + # + # @return [Integer] an `Integer` representation of this {Timestamp} (the + # number of seconds since 1970-01-01 00:00:00 UTC ignoring leap seconds). + # + # source://tzinfo//lib/tzinfo/timestamp.rb#415 + def to_i; end + + # @return [String] a `String` representation of this {Timestamp}. + # + # source://tzinfo//lib/tzinfo/timestamp.rb#432 + def to_s; end + + # Converts this {Timestamp} to a `Time`. + # + # @return [Time] a `Time` representation of this {Timestamp}. If the UTC + # offset of this {Timestamp} is not specified, a UTC `Time` will be + # returned. + # + # source://tzinfo//lib/tzinfo/timestamp.rb#391 + def to_time; end + + # @return [Timestamp] a UTC {Timestamp} equivalent to this instance. Returns + # `self` if {#utc? self.utc?} is `true`. + # + # source://tzinfo//lib/tzinfo/timestamp.rb#381 + def utc; end + + # @return [Boolean] `true` if this {Timestamp} represents UTC, `false` if + # the {Timestamp} wasn't specified as UTC or `nil` if the {Timestamp} has + # no specified offset. + # + # source://tzinfo//lib/tzinfo/timestamp.rb#355 + def utc?; end + + # @return [Integer] the offset from UTC in seconds or `nil` if the + # {Timestamp} doesn't have a specified offset. + # + # source://tzinfo//lib/tzinfo/timestamp.rb#325 + def utc_offset; end + + # @return [Integer] the number of seconds since 1970-01-01 00:00:00 UTC + # ignoring leap seconds (i.e. each day is treated as if it were 86,400 + # seconds long). + # + # source://tzinfo//lib/tzinfo/timestamp.rb#316 + def value; end + + protected + + # Constructs a new instance of a `DateTime` or `DateTime`-like class with + # the same {value}, {sub_second} and {utc_offset} as this {Timestamp}. + # + # @param klass [Class] the class to instantiate. + # @private + # + # source://tzinfo//lib/tzinfo/timestamp.rb#496 + def new_datetime(klass = T.unsafe(nil)); end + + # Creates a new instance of a `Time` or `Time`-like class matching the + # {value} and {sub_second} of this {Timestamp}, but not setting the offset. + # + # @param klass [Class] the class to instantiate. + # @private + # + # source://tzinfo//lib/tzinfo/timestamp.rb#486 + def new_time(klass = T.unsafe(nil)); end + + private + + # Initializes a new {Timestamp} without validating the parameters. This + # method is used internally within {Timestamp} to avoid the overhead of + # checking parameters. + # + # @param value [Integer] the number of seconds since 1970-01-01 00:00:00 UTC + # ignoring leap seconds. + # @param sub_second [Numeric] the fractional part of the second as either a + # `Rational` that is greater than or equal to 0 and less than 1, or the + # `Integer` 0. + # @param utc_offset [Object] either `nil` for a {Timestamp} without a + # specified offset, an offset from UTC specified as an `Integer` number of + # seconds or the `Symbol` `:utc`). + # + # source://tzinfo//lib/tzinfo/timestamp.rb#538 + def initialize!(value, sub_second = T.unsafe(nil), utc_offset = T.unsafe(nil)); end + + # Converts the {sub_second} value to a `String` suitable for appending to + # the `String` representation of a {Timestamp}. + # + # @return [String] a `String` representation of {sub_second}. + # + # source://tzinfo//lib/tzinfo/timestamp.rb#518 + def sub_second_to_s; end + + # Converts the value and sub-seconds to a `String`, adding on the given + # offset. + # + # @param offset [Integer] the offset to add to the value. + # @return [String] the value and sub-seconds. + # + # source://tzinfo//lib/tzinfo/timestamp.rb#510 + def value_and_sub_second_to_s(offset = T.unsafe(nil)); end + + class << self + # Returns a new {Timestamp} representing the (proleptic Gregorian + # calendar) date and time specified by the supplied parameters. + # + # If `utc_offset` is `nil`, `:utc` or 0, the date and time parameters will + # be interpreted as representing a UTC date and time. Otherwise the date + # and time parameters will be interpreted as a local date and time with + # the given offset. + # + # @param month [Integer] the month (1-12). + # @param day [Integer] the day of the month (1-31). + # @param hour [Integer] the hour (0-23). + # @param minute [Integer] the minute (0-59). + # @param second [Integer] the second (0-59). + # @param sub_second [Numeric] the fractional part of the second as either + # a `Rational` that is greater than or equal to 0 and less than 1, or + # the `Integer` 0. + # @param utc_offset [Object] either `nil` for a {Timestamp} without a + # specified offset, an offset from UTC specified as an `Integer` number + # of seconds or the `Symbol` `:utc`). + # @param year [Integer] the year. + # @raise [RangeError] if `sub_second` is a `Rational` but that is less + # than 0 or greater than or equal to 1. + # @raise [ArgumentError] if `sub_second` is not a `Rational`, or the + # `Integer` 0. + # @raise [ArgumentError] if either of `year`, `month`, `day`, `hour`, + # `minute`, or `second` is not an `Integer`. + # @raise [ArgumentError] if `utc_offset` is not `nil`, not an `Integer` + # and not the `Symbol` `:utc`. + # @raise [RangeError] if `month` is not between 1 and 12. + # @raise [RangeError] if `day` is not between 1 and 31. + # @raise [RangeError] if `hour` is not between 0 and 23. + # @raise [RangeError] if `minute` is not between 0 and 59. + # @raise [RangeError] if `second` is not between 0 and 59. + # @return [Timestamp] a new {Timestamp} representing the specified + # (proleptic Gregorian calendar) date and time. + # + # source://tzinfo//lib/tzinfo/timestamp.rb#55 + def create(year, month = T.unsafe(nil), day = T.unsafe(nil), hour = T.unsafe(nil), minute = T.unsafe(nil), second = T.unsafe(nil), sub_second = T.unsafe(nil), utc_offset = T.unsafe(nil)); end + + # When used without a block, returns a {Timestamp} representation of a + # given `Time`, `DateTime` or {Timestamp}. + # + # When called with a block, the {Timestamp} representation of `value` is + # passed to the block. The block must then return a {Timestamp}, which + # will be converted back to the type of the initial value. If the initial + # value was a {Timestamp}, the block result will be returned. If the + # initial value was a `DateTime`, a Gregorian `DateTime` will be returned. + # + # The UTC offset of `value` can either be preserved (the {Timestamp} + # representation will have the same UTC offset as `value`), ignored (the + # {Timestamp} representation will have no defined UTC offset), or treated + # as though it were UTC (the {Timestamp} representation will have a + # {utc_offset} of 0 and {utc?} will return `true`). + # + # @param value [Object] a `Time`, `DateTime` or {Timestamp}. + # @param offset [Symbol] either `:preserve` to preserve the offset of + # `value`, `:ignore` to ignore the offset of `value` and create a + # {Timestamp} with an unspecified offset, or `:treat_as_utc` to treat + # the offset of `value` as though it were UTC and create a UTC + # {Timestamp}. + # @raise [ArgumentError] + # @return [Object] if called without a block, the {Timestamp} + # representation of `value`, otherwise the result of the block, + # converted back to the type of `value`. + # @yield [timestamp] if a block is provided, the {Timestamp} + # representation is passed to the block. + # @yieldparam timestamp [Timestamp] the {Timestamp} representation of + # `value`. + # @yieldreturn [Timestamp] a {Timestamp} to be converted back to the type + # of `value`. + # + # source://tzinfo//lib/tzinfo/timestamp.rb#112 + def for(value, offset = T.unsafe(nil)); end + + # Creates a new UTC {Timestamp}. + # + # @param value [Integer] the number of seconds since 1970-01-01 00:00:00 + # UTC ignoring leap seconds. + # @param sub_second [Numeric] the fractional part of the second as either + # a `Rational` that is greater than or equal to 0 and less than 1, or + # the `Integer` 0. + # @raise [ArgumentError] if `value` is not an `Integer`. + # @raise [ArgumentError] if `sub_second` is not a `Rational`, or the + # `Integer` 0. + # @raise [RangeError] if `sub_second` is a `Rational` but that is less + # than 0 or greater than or equal to 1. + # + # source://tzinfo//lib/tzinfo/timestamp.rb#172 + def utc(value, sub_second = T.unsafe(nil)); end + + private + + # Creates a {Timestamp} that represents a given `DateTime`, optionally + # ignoring the offset. + # + # @param datetime [DateTime] a `DateTime`. + # @param ignore_offset [Boolean] whether to ignore the offset of + # `datetime`. + # @param target_utc_offset [Object] if `ignore_offset` is `true`, the UTC + # offset of the result (`:utc`, `nil` or an `Integer`). + # @return [Timestamp] the {Timestamp} representation of `datetime`. + # + # source://tzinfo//lib/tzinfo/timestamp.rb#231 + def for_datetime(datetime, ignore_offset, target_utc_offset); end + + # Creates a {Timestamp} that represents a given `Time`, optionally + # ignoring the offset. + # + # @param time [Time] a `Time`. + # @param ignore_offset [Boolean] whether to ignore the offset of `time`. + # @param target_utc_offset [Object] if `ignore_offset` is `true`, the UTC + # offset of the result (`:utc`, `nil` or an `Integer`). + # @return [Timestamp] the {Timestamp} representation of `time`. + # + # source://tzinfo//lib/tzinfo/timestamp.rb#206 + def for_time(time, ignore_offset, target_utc_offset); end + + # Creates a {Timestamp} that represents a given `Time`-like object, + # optionally ignoring the offset (if the `time_like` responds to + # `utc_offset`). + # + # @param time_like [Object] a `Time`-like object. + # @param ignore_offset [Boolean] whether to ignore the offset of `time`. + # @param target_utc_offset [Object] if `ignore_offset` is `true`, the UTC + # offset of the result (`:utc`, `nil` or an `Integer`). + # @return [Timestamp] the {Timestamp} representation of `time_like`. + # + # source://tzinfo//lib/tzinfo/timestamp.rb#296 + def for_time_like(time_like, ignore_offset, target_utc_offset); end + + # Returns a {Timestamp} that represents another {Timestamp}, optionally + # ignoring the offset. If the result would be identical to `value`, the + # same instance is returned. If the passed in value is an instance of a + # subclass of {Timestamp}, then a new {Timestamp} will always be returned. + # + # @param timestamp [Timestamp] a {Timestamp}. + # @param ignore_offset [Boolean] whether to ignore the offset of + # `timestamp`. + # @param target_utc_offset [Object] if `ignore_offset` is `true`, the UTC + # offset of the result (`:utc`, `nil` or an `Integer`). + # @return [Timestamp] a [Timestamp] representation of `timestamp`. + # + # source://tzinfo//lib/tzinfo/timestamp.rb#256 + def for_timestamp(timestamp, ignore_offset, target_utc_offset); end + + # Determines if an object is like a `Time` (for the purposes of converting + # to a {Timestamp} with {for}), responding to `to_i` and `subsec`. + # + # @param value [Object] an object to test. + # @return [Boolean] `true` if the object is `Time`-like, otherwise + # `false`. + # + # source://tzinfo//lib/tzinfo/timestamp.rb#283 + def is_time_like?(value); end + + # Constructs a new instance of `self` (i.e. {Timestamp} or a subclass of + # {Timestamp}) without validating the parameters. This method is used + # internally within {Timestamp} to avoid the overhead of checking + # parameters. + # + # @param value [Integer] the number of seconds since 1970-01-01 00:00:00 + # UTC ignoring leap seconds. + # @param sub_second [Numeric] the fractional part of the second as either + # a `Rational` that is greater than or equal to 0 and less than 1, or + # the `Integer` 0. + # @param utc_offset [Object] either `nil` for a {Timestamp} without a + # specified offset, an offset from UTC specified as an `Integer` number + # of seconds or the `Symbol` `:utc`). + # @return [Timestamp] a new instance of `self`. + # + # source://tzinfo//lib/tzinfo/timestamp.rb#192 + def new!(value, sub_second = T.unsafe(nil), utc_offset = T.unsafe(nil)); end + end +end + +# The Unix epoch (1970-01-01 00:00:00 UTC) as a chronological Julian day +# number. +# +# source://tzinfo//lib/tzinfo/timestamp.rb#16 +TZInfo::Timestamp::JD_EPOCH = T.let(T.unsafe(nil), Integer) + +# A subclass of {Timestamp} used to represent local times. +# {TimestampWithOffset} holds a reference to the related {TimezoneOffset} and +# overrides various methods to return results appropriate for the +# {TimezoneOffset}. Certain operations will clear the associated +# {TimezoneOffset} (if the {TimezoneOffset} would not necessarily be valid for +# the result). Once the {TimezoneOffset} has been cleared, +# {TimestampWithOffset} behaves identically to {Timestamp}. +# +# source://tzinfo//lib/tzinfo/timestamp_with_offset.rb#12 +class TZInfo::TimestampWithOffset < ::TZInfo::Timestamp + include ::TZInfo::WithOffset + + # Sets the associated {TimezoneOffset} of this {TimestampWithOffset}. + # + # @param timezone_offset [TimezoneOffset] a {TimezoneOffset} valid at the time + # and for the offset of this {TimestampWithOffset}. + # @raise [ArgumentError] if `timezone_offset` is `nil`. + # @raise [ArgumentError] if {utc? self.utc?} is `true`. + # @raise [ArgumentError] if `timezone_offset.observed_utc_offset` does not equal + # `self.utc_offset`. + # @return [TimestampWithOffset] `self`. + # + # source://tzinfo//lib/tzinfo/timestamp_with_offset.rb#47 + def set_timezone_offset(timezone_offset); end + + # @return [TimezoneOffset] the {TimezoneOffset} associated with this + # instance. + # + # source://tzinfo//lib/tzinfo/timestamp_with_offset.rb#17 + def timezone_offset; end + + # An overridden version of {Timestamp#to_datetime}, if there is an + # associated {TimezoneOffset}, returns a {DateTimeWithOffset} with that + # offset. + # + # @return [DateTime] if there is an associated {TimezoneOffset}, a + # {DateTimeWithOffset} representation of this {TimestampWithOffset}, + # otherwise a `DateTime` representation. + # + # source://tzinfo//lib/tzinfo/timestamp_with_offset.rb#76 + def to_datetime; end + + # An overridden version of {Timestamp#to_time} that, if there is an + # associated {TimezoneOffset}, returns a {TimeWithOffset} with that offset. + # + # @return [Time] if there is an associated {TimezoneOffset}, a + # {TimeWithOffset} representation of this {TimestampWithOffset}, otherwise + # a `Time` representation. + # + # source://tzinfo//lib/tzinfo/timestamp_with_offset.rb#60 + def to_time; end + + class << self + # Creates a new {TimestampWithOffset} from a given {Timestamp} and + # {TimezoneOffset}. + # + # time of `timestamp`. + # + # @param timestamp [Timestamp] a {Timestamp}. + # @param timezone_offset [TimezoneOffset] a {TimezoneOffset} valid at the + # @raise [ArgumentError] if `timestamp` or `timezone_offset` is `nil`. + # @return [TimestampWithOffset] a {TimestampWithOffset} that has the same + # {value value} and {sub_second sub_second} as the `timestamp` parameter, + # a {utc_offset utc_offset} equal to the + # {TimezoneOffset#observed_utc_offset observed_utc_offset} of the + # `timezone_offset` parameter and {timezone_offset timezone_offset} set to + # the `timezone_offset` parameter. + # + # source://tzinfo//lib/tzinfo/timestamp_with_offset.rb#32 + def set_timezone_offset(timestamp, timezone_offset); end + end +end + +# The {Timezone} class represents a time zone. It provides a factory method, +# {get}, to retrieve {Timezone} instances by their identifier. +# +# The {Timezone#to_local} method can be used to convert `Time` and `DateTime` +# instances to the local time for the zone. For example: +# +# tz = TZInfo::Timezone.get('America/New_York') +# local_time = tz.to_local(Time.utc(2005,8,29,15,35,0)) +# local_datetime = tz.to_local(DateTime.new(2005,8,29,15,35,0)) +# +# Local `Time` and `DateTime` instances returned by `Timezone` have the +# correct local offset. +# +# The {Timezone#local_to_utc} method can by used to convert local `Time` and +# `DateTime` instances to UTC. {Timezone#local_to_utc} ignores the UTC offset +# of the supplied value and treats if it is a local time for the zone. For +# example: +# +# tz = TZInfo::Timezone.get('America/New_York') +# utc_time = tz.local_to_utc(Time.new(2005,8,29,11,35,0)) +# utc_datetime = tz.local_to_utc(DateTime.new(2005,8,29,11,35,0)) +# +# Each time zone is treated as sequence of periods of time ({TimezonePeriod}) +# that observe the same offset ({TimezoneOffset}). Transitions +# ({TimezoneTransition}) denote the end of one period and the start of the +# next. The {Timezone} class has methods that allow the periods, offsets and +# transitions of a time zone to be interrogated. +# +# All methods that take `Time` objects as parameters can be used with +# arbitrary `Time`-like objects that respond to both `to_i` and `subsec` and +# optionally `utc_offset`. +# +# The {Timezone} class is thread-safe. It is safe to use class and instance +# methods of {Timezone} in concurrently executing threads. Instances of +# {Timezone} can be shared across thread boundaries. +# +# The IANA Time Zone Database maintainers recommend that time zone identifiers +# are not made visible to end-users (see [Names of +# timezones](https://data.iana.org/time-zones/theory.html#naming)). The +# {Country} class can be used to obtain lists of time zones by country, +# including user-friendly descriptions and approximate locations. +# +# @abstract The {get} method returns an instance of either {DataTimezone} or +# {LinkedTimezone}. The {get_proxy} method and other methods returning +# collections of time zones return instances of {TimezoneProxy}. +# +# source://tzinfo//lib/tzinfo/timezone.rb#80 +class TZInfo::Timezone + include ::Comparable + + # Compares this {Timezone} with another based on the {identifier}. + # + # @param tz [Object] an `Object` to compare this {Timezone} with. + # @return [Integer] -1 if `tz` is less than `self`, 0 if `tz` is equal to + # `self` and +1 if `tz` is greater than `self`, or `nil` if `tz` is not an + # instance of {Timezone}. + # + # source://tzinfo//lib/tzinfo/timezone.rb#1105 + def <=>(tz); end + + # Matches `regexp` against the {identifier} of this {Timezone}. + # + # @param regexp [Regexp] a `Regexp` to match against the {identifier} of + # this {Timezone}. + # @return [Integer] the position the match starts, or `nil` if there is no + # match. + # + # source://tzinfo//lib/tzinfo/timezone.rb#1128 + def =~(regexp); end + + # Returns a serialized representation of this {Timezone}. This method is + # called when using `Marshal.dump` with an instance of {Timezone}. + # + # @param limit [Integer] the maximum depth to dump - ignored. + # @return [String] a serialized representation of this {Timezone}. + # + # source://tzinfo//lib/tzinfo/timezone.rb#1137 + def _dump(limit); end + + # @param time [Object] a `Time`, `DateTime` or `Timestamp`. + # @raise [ArgumentError] if `time` is `nil`. + # @raise [ArgumentError] if `time` is a {Timestamp} with an unspecified UTC + # offset. + # @return [String] the abbreviation of this {Timezone} at the given time. + # + # source://tzinfo//lib/tzinfo/timezone.rb#1048 + def abbr(time = T.unsafe(nil)); end + + # @param time [Object] a `Time`, `DateTime` or `Timestamp`. + # @raise [ArgumentError] if `time` is `nil`. + # @raise [ArgumentError] if `time` is a {Timestamp} with an unspecified UTC + # offset. + # @return [String] the abbreviation of this {Timezone} at the given time. + # + # source://tzinfo//lib/tzinfo/timezone.rb#1048 + def abbreviation(time = T.unsafe(nil)); end + + # Returns the base offset from UTC in seconds at the given time. This does + # not include any adjustment made for daylight savings time and will + # typically remain constant throughout the year. + # + # To obtain the observed offset from UTC, including the effect of daylight + # savings time, use {observed_utc_offset} instead. + # + # If you require accurate {base_utc_offset} values, you should install the + # tzinfo-data gem and set {DataSources::RubyDataSource} as the {DataSource}. + # When using {DataSources::ZoneinfoDataSource}, the value of + # {base_utc_offset} has to be derived from changes to the observed UTC + # offset and DST status since it is not included in zoneinfo files. + # + # @param time [Object] a `Time`, `DateTime` or `Timestamp`. + # @raise [ArgumentError] if `time` is `nil`. + # @raise [ArgumentError] if `time` is a {Timestamp} with an unspecified UTC + # offset. + # @return [Integer] the base offset from UTC in seconds at the given time. + # + # source://tzinfo//lib/tzinfo/timezone.rb#1081 + def base_utc_offset(time = T.unsafe(nil)); end + + # Returns the canonical identifier of this time zone. + # + # This is a shortcut for calling `canonical_zone.identifier`. Please refer + # to the {canonical_zone} documentation for further information. + # + # @return [String] the canonical identifier of this time zone. + # + # source://tzinfo//lib/tzinfo/timezone.rb#987 + def canonical_identifier; end + + # Returns the canonical {Timezone} instance for this {Timezone}. + # + # The IANA Time Zone database contains two types of definition: Zones and + # Links. Zones are defined by rules that set out when transitions occur. + # Links are just references to fully defined Zone, creating an alias for + # that Zone. + # + # Links are commonly used where a time zone has been renamed in a release of + # the Time Zone database. For example, the US/Eastern Zone was renamed as + # America/New_York. A US/Eastern Link was added in its place, linking to + # (and creating an alias for) America/New_York. + # + # Links are also used for time zones that are currently identical to a full + # Zone, but that are administered separately. For example, Europe/Vatican is + # a Link to (and alias for) Europe/Rome. + # + # For a full Zone (implemented by {DataTimezone}), {canonical_zone} returns + # self. + # + # For a Link (implemented by {LinkedTimezone}), {canonical_zone} returns a + # {Timezone} instance representing the full Zone that the link targets. + # + # TZInfo can be used with different data sources (see the documentation for + # {TZInfo::DataSource}). Some DataSource implementations may not support + # distinguishing between full Zones and Links and will treat all time zones + # as full Zones. In this case, {canonical_zone} will always return `self`. + # + # There are two built-in DataSource implementations. + # {DataSources::RubyDataSource} (which will be used if the tzinfo-data gem + # is available) supports Link zones. {DataSources::ZoneinfoDataSource} + # returns Link zones as if they were full Zones. If the {canonical_zone} or + # {canonical_identifier} methods are needed, the tzinfo-data gem should be + # installed. + # + # The {TZInfo::DataSource.get} method can be used to check which DataSource + # implementation is being used. + # + # @return [Timezone] the canonical {Timezone} instance for this {Timezone}. + # + # source://tzinfo//lib/tzinfo/timezone.rb#412 + def canonical_zone; end + + # @return [TimezonePeriod] the current {TimezonePeriod} for the time zone. + # + # source://tzinfo//lib/tzinfo/timezone.rb#997 + def current_period; end + + # Returns the current local time and {TimezonePeriod} for the time zone as + # an `Array`. The first element is the time as a {TimeWithOffset}. The + # second element is the period. + # + # @return [Array] an `Array` containing the current {TimeWithOffset} for the + # time zone as the first element and the current {TimezonePeriod} for the + # time zone as the second element. + # + # source://tzinfo//lib/tzinfo/timezone.rb#1008 + def current_period_and_time; end + + # Returns the current local time and {TimezonePeriod} for the time zone as + # an `Array`. The first element is the time as a {TimeWithOffset}. The + # second element is the period. + # + # @return [Array] an `Array` containing the current {TimeWithOffset} for the + # time zone as the first element and the current {TimezonePeriod} for the + # time zone as the second element. + # + # source://tzinfo//lib/tzinfo/timezone.rb#1008 + def current_time_and_period; end + + # @param time [Object] a `Time`, `DateTime` or `Timestamp`. + # @raise [ArgumentError] if `time` is `nil`. + # @raise [ArgumentError] if `time` is a {Timestamp} with an unspecified UTC + # offset. + # @return [Boolean] whether daylight savings time is in effect at the given + # time. + # + # source://tzinfo//lib/tzinfo/timezone.rb#1059 + def dst?(time = T.unsafe(nil)); end + + # @param tz [Object] an `Object` to compare this {Timezone} with. + # @return [Boolean] `true` if `tz` is an instance of {Timezone} and has the + # same {identifier} as `self`, otherwise `false`. + # + # source://tzinfo//lib/tzinfo/timezone.rb#1113 + def eql?(tz); end + + # Returns {identifier}, modified to make it more readable. Set + # `skip_first_part` to omit the first part of the identifier (typically a + # region name) where there is more than one part. + # + # For example: + # + # TZInfo::Timezone.get('Europe/Paris').friendly_identifier(false) #=> "Europe - Paris" + # TZInfo::Timezone.get('Europe/Paris').friendly_identifier(true) #=> "Paris" + # TZInfo::Timezone.get('America/Indiana/Knox').friendly_identifier(false) #=> "America - Knox, Indiana" + # TZInfo::Timezone.get('America/Indiana/Knox').friendly_identifier(true) #=> "Knox, Indiana" + # + # @param skip_first_part [Boolean] whether the first part of the identifier + # (typically a region name) should be omitted. + # @return [String] the modified identifier. + # + # source://tzinfo//lib/tzinfo/timezone.rb#277 + def friendly_identifier(skip_first_part = T.unsafe(nil)); end + + # @return [Integer] a hash based on the {identifier}. + # + # source://tzinfo//lib/tzinfo/timezone.rb#1118 + def hash; end + + # @return [String] the identifier of the time zone, for example, + # `"Europe/Paris"`. + # + # source://tzinfo//lib/tzinfo/timezone.rb#241 + def identifier; end + + # @return [String] the internal object state as a programmer-readable + # `String`. + # + # source://tzinfo//lib/tzinfo/timezone.rb#259 + def inspect; end + + # Creates a `DateTime` object based on the given (Gregorian calendar) date + # and time parameters. The parameters are interpreted as a local time in the + # time zone. The result has the appropriate `offset` and + # {DateTimeWithOffset#timezone_offset timezone_offset}. + # + # _Warning:_ There are time values that are not valid as local times in a + # time zone (for example, during the transition from standard time to + # daylight savings time). There are also time values that are ambiguous, + # occurring more than once with different offsets to UTC (for example, + # during the transition from daylight savings time to standard time). + # + # In the first case (an invalid local time), a {PeriodNotFound} exception + # will be raised. + # + # In the second case (more than one occurrence), an {AmbiguousTime} + # exception will be raised unless the optional `dst` parameter or block + # handles the ambiguity. + # + # If the ambiguity is due to a transition from daylight savings time to + # standard time, the `dst` parameter can be used to select whether the + # daylight savings time or local time is used. For example, the following + # code would raise an {AmbiguousTime} exception: + # + # tz = TZInfo::Timezone.get('America/New_York') + # tz.local_datetime(2004,10,31,1,30,0,0) + # + # Specifying `dst = true` would return a `Time` with a UTC offset of -4 + # hours and abbreviation EDT (Eastern Daylight Time). Specifying `dst = + # false` would return a `Time` with a UTC offset of -5 hours and + # abbreviation EST (Eastern Standard Time). + # + # The `dst` parameter will not be able to resolve an ambiguity resulting + # from the clocks being set back without changing from daylight savings time + # to standard time. In this case, if a block is specified, it will be called + # to resolve the ambiguity. The block must take a single parameter - an + # `Array` of {TimezonePeriod}s that need to be resolved. The block can + # select and return a single {TimezonePeriod} or return `nil` or an empty + # `Array` to cause an {AmbiguousTime} exception to be raised. + # + # The default value of the `dst` parameter can be specified using + # {Timezone.default_dst=}. + # + # values, interpreted as a local time in the time zone. + # + # @param hour [Integer] the hour (0-23). + # @param minute [Integer] the minute (0-59). + # @param second [Integer] the second (0-59). + # @param sub_second [Numeric] the fractional part of the second as either + # a `Rational` that is greater than or equal to 0 and less than 1, or + # the `Integer` 0. + # @param dst [Boolean] whether to resolve ambiguous local times by always + # selecting the period observing daylight savings time (`true`), always + # selecting the period observing standard time (`false`), or leaving the + # ambiguity unresolved (`nil`). + # @param month [Integer] the month (1-12). + # @param day [Integer] the day of the month (1-31). + # @param year [Integer] the year. + # @raise [RangeError] if `sub_second` is a `Rational` but that is less + # than 0 or greater than or equal to 1. + # @raise [PeriodNotFound] if the date and time parameters do not specify a + # valid local time in the time zone. + # @raise [AmbiguousTime] if the date and time parameters are ambiguous for + # the time zone and the `dst` parameter or block did not resolve the + # ambiguity. + # @raise [RangeError] if `month` is not between 1 and 12. + # @raise [ArgumentError] if either of `year`, `month`, `day`, `hour`, + # `minute`, or `second` is not an `Integer`. + # @raise [ArgumentError] if `sub_second` is not a `Rational`, or the + # `Integer` 0. + # @raise [ArgumentError] if `utc_offset` is not `nil`, not an `Integer` + # and not the `Symbol` `:utc`. + # @raise [RangeError] if `day` is not between 1 and 31. + # @raise [RangeError] if `hour` is not between 0 and 23. + # @raise [RangeError] if `minute` is not between 0 and 59. + # @raise [RangeError] if `second` is not between 0 and 59. + # @return [DateTimeWithOffset] a new `DateTime` object based on the given + # @yield [periods] if the `dst` parameter did not resolve an ambiguity, an + # optional block is yielded to. + # @yieldparam periods [Array<TimezonePeriod>] an `Array` containing all + # the {TimezonePeriod}s that still match `local_time` after applying the + # `dst` parameter. + # @yieldreturn [Object] to resolve the ambiguity: a chosen {TimezonePeriod} + # or an `Array` containing a chosen {TimezonePeriod}; to leave the + # ambiguity unresolved: an empty `Array`, an `Array` containing more than + # one {TimezonePeriod}, or `nil`. + # + # source://tzinfo//lib/tzinfo/timezone.rb#831 + def local_datetime(year, month = T.unsafe(nil), day = T.unsafe(nil), hour = T.unsafe(nil), minute = T.unsafe(nil), second = T.unsafe(nil), sub_second = T.unsafe(nil), dst = T.unsafe(nil), &block); end + + # Creates a `Time` object based on the given (Gregorian calendar) date and + # time parameters. The parameters are interpreted as a local time in the + # time zone. The result has the appropriate `utc_offset`, `zone` and + # {TimeWithOffset#timezone_offset timezone_offset}. + # + # _Warning:_ There are time values that are not valid as local times in a + # time zone (for example, during the transition from standard time to + # daylight savings time). There are also time values that are ambiguous, + # occurring more than once with different offsets to UTC (for example, + # during the transition from daylight savings time to standard time). + # + # In the first case (an invalid local time), a {PeriodNotFound} exception + # will be raised. + # + # In the second case (more than one occurrence), an {AmbiguousTime} + # exception will be raised unless the optional `dst` parameter or block + # handles the ambiguity. + # + # If the ambiguity is due to a transition from daylight savings time to + # standard time, the `dst` parameter can be used to select whether the + # daylight savings time or local time is used. For example, the following + # code would raise an {AmbiguousTime} exception: + # + # tz = TZInfo::Timezone.get('America/New_York') + # tz.local_time(2004,10,31,1,30,0,0) + # + # Specifying `dst = true` would return a `Time` with a UTC offset of -4 + # hours and abbreviation EDT (Eastern Daylight Time). Specifying `dst = + # false` would return a `Time` with a UTC offset of -5 hours and + # abbreviation EST (Eastern Standard Time). + # + # The `dst` parameter will not be able to resolve an ambiguity resulting + # from the clocks being set back without changing from daylight savings time + # to standard time. In this case, if a block is specified, it will be called + # to resolve the ambiguity. The block must take a single parameter - an + # `Array` of {TimezonePeriod}s that need to be resolved. The block can + # select and return a single {TimezonePeriod} or return `nil` or an empty + # `Array` to cause an {AmbiguousTime} exception to be raised. + # + # The default value of the `dst` parameter can be specified using + # {Timezone.default_dst=}. + # + # @param hour [Integer] the hour (0-23). + # @param minute [Integer] the minute (0-59). + # @param second [Integer] the second (0-59). + # @param sub_second [Numeric] the fractional part of the second as either + # a `Rational` that is greater than or equal to 0 and less than 1, or + # the `Integer` 0. + # @param dst [Boolean] whether to resolve ambiguous local times by always + # selecting the period observing daylight savings time (`true`), always + # selecting the period observing standard time (`false`), or leaving the + # ambiguity unresolved (`nil`). + # @param month [Integer] the month (1-12). + # @param day [Integer] the day of the month (1-31). + # @param year [Integer] the year. + # @raise [RangeError] if `sub_second` is a `Rational` but that is less + # than 0 or greater than or equal to 1. + # @raise [PeriodNotFound] if the date and time parameters do not specify a + # valid local time in the time zone. + # @raise [AmbiguousTime] if the date and time parameters are ambiguous for + # the time zone and the `dst` parameter or block did not resolve the + # ambiguity. + # @raise [RangeError] if `month` is not between 1 and 12. + # @raise [ArgumentError] if either of `year`, `month`, `day`, `hour`, + # `minute`, or `second` is not an `Integer`. + # @raise [ArgumentError] if `sub_second` is not a `Rational`, or the + # `Integer` 0. + # @raise [ArgumentError] if `utc_offset` is not `nil`, not an `Integer` + # and not the `Symbol` `:utc`. + # @raise [RangeError] if `day` is not between 1 and 31. + # @raise [RangeError] if `hour` is not between 0 and 23. + # @raise [RangeError] if `minute` is not between 0 and 59. + # @raise [RangeError] if `second` is not between 0 and 59. + # @return [TimeWithOffset] a new `Time` object based on the given values, + # interpreted as a local time in the time zone. + # @yield [periods] if the `dst` parameter did not resolve an ambiguity, an + # optional block is yielded to. + # @yieldparam periods [Array<TimezonePeriod>] an `Array` containing all + # the {TimezonePeriod}s that still match `local_time` after applying the + # `dst` parameter. + # @yieldreturn [Object] to resolve the ambiguity: a chosen {TimezonePeriod} + # or an `Array` containing a chosen {TimezonePeriod}; to leave the + # ambiguity unresolved: an empty `Array`, an `Array` containing more than + # one {TimezonePeriod}, or `nil`. + # + # source://tzinfo//lib/tzinfo/timezone.rb#743 + def local_time(year, month = T.unsafe(nil), day = T.unsafe(nil), hour = T.unsafe(nil), minute = T.unsafe(nil), second = T.unsafe(nil), sub_second = T.unsafe(nil), dst = T.unsafe(nil), &block); end + + # Creates a {Timestamp} object based on the given (Gregorian calendar) date + # and time parameters. The parameters are interpreted as a local time in the + # time zone. The result has the appropriate {Timestamp#utc_offset + # utc_offset} and {TimestampWithOffset#timezone_offset timezone_offset}. + # + # _Warning:_ There are time values that are not valid as local times in a + # time zone (for example, during the transition from standard time to + # daylight savings time). There are also time values that are ambiguous, + # occurring more than once with different offsets to UTC (for example, + # during the transition from daylight savings time to standard time). + # + # In the first case (an invalid local time), a {PeriodNotFound} exception + # will be raised. + # + # In the second case (more than one occurrence), an {AmbiguousTime} + # exception will be raised unless the optional `dst` parameter or block + # handles the ambiguity. + # + # If the ambiguity is due to a transition from daylight savings time to + # standard time, the `dst` parameter can be used to select whether the + # daylight savings time or local time is used. For example, the following + # code would raise an {AmbiguousTime} exception: + # + # tz = TZInfo::Timezone.get('America/New_York') + # tz.local_timestamp(2004,10,31,1,30,0,0) + # + # Specifying `dst = true` would return a `Time` with a UTC offset of -4 + # hours and abbreviation EDT (Eastern Daylight Time). Specifying `dst = + # false` would return a `Time` with a UTC offset of -5 hours and + # abbreviation EST (Eastern Standard Time). + # + # The `dst` parameter will not be able to resolve an ambiguity resulting + # from the clocks being set back without changing from daylight savings time + # to standard time. In this case, if a block is specified, it will be called + # to resolve the ambiguity. The block must take a single parameter - an + # `Array` of {TimezonePeriod}s that need to be resolved. The block can + # select and return a single {TimezonePeriod} or return `nil` or an empty + # `Array` to cause an {AmbiguousTime} exception to be raised. + # + # The default value of the `dst` parameter can be specified using + # {Timezone.default_dst=}. + # + # @param hour [Integer] the hour (0-23). + # @param minute [Integer] the minute (0-59). + # @param second [Integer] the second (0-59). + # @param sub_second [Numeric] the fractional part of the second as either + # a `Rational` that is greater than or equal to 0 and less than 1, or + # the `Integer` 0. + # @param dst [Boolean] whether to resolve ambiguous local times by always + # selecting the period observing daylight savings time (`true`), always + # selecting the period observing standard time (`false`), or leaving the + # ambiguity unresolved (`nil`). + # @param month [Integer] the month (1-12). + # @param day [Integer] the day of the month (1-31). + # @param year [Integer] the year. + # @raise [RangeError] if `sub_second` is a `Rational` but that is less + # than 0 or greater than or equal to 1. + # @raise [PeriodNotFound] if the date and time parameters do not specify a + # valid local time in the time zone. + # @raise [AmbiguousTime] if the date and time parameters are ambiguous for + # the time zone and the `dst` parameter or block did not resolve the + # ambiguity. + # @raise [RangeError] if `month` is not between 1 and 12. + # @raise [ArgumentError] if either of `year`, `month`, `day`, `hour`, + # `minute`, or `second` is not an `Integer`. + # @raise [ArgumentError] if `sub_second` is not a `Rational`, or the + # `Integer` 0. + # @raise [ArgumentError] if `utc_offset` is not `nil`, not an `Integer` + # and not the `Symbol` `:utc`. + # @raise [RangeError] if `day` is not between 1 and 31. + # @raise [RangeError] if `hour` is not between 0 and 23. + # @raise [RangeError] if `minute` is not between 0 and 59. + # @raise [RangeError] if `second` is not between 0 and 59. + # @return [TimestampWithOffset] a new {Timestamp} object based on the given + # values, interpreted as a local time in the time zone. + # @yield [periods] if the `dst` parameter did not resolve an ambiguity, an + # optional block is yielded to. + # @yieldparam periods [Array<TimezonePeriod>] an `Array` containing all + # the {TimezonePeriod}s that still match `local_time` after applying the + # `dst` parameter. + # @yieldreturn [Object] to resolve the ambiguity: a chosen {TimezonePeriod} + # or an `Array` containing a chosen {TimezonePeriod}; to leave the + # ambiguity unresolved: an empty `Array`, an `Array` containing more than + # one {TimezonePeriod}, or `nil`. + # + # source://tzinfo//lib/tzinfo/timezone.rb#919 + def local_timestamp(year, month = T.unsafe(nil), day = T.unsafe(nil), hour = T.unsafe(nil), minute = T.unsafe(nil), second = T.unsafe(nil), sub_second = T.unsafe(nil), dst = T.unsafe(nil), &block); end + + # Converts a local time for the time zone to UTC. + # + # The result will either be a `Time`, `DateTime` or {Timestamp} according to + # the type of the `local_time` parameter. + # + # The UTC offset of the `local_time` parameter is ignored (it is treated as + # a time in the time zone represented by `self`). + # + # _Warning:_ There are local times that have no equivalent UTC times (for + # example, during the transition from standard time to daylight savings + # time). There are also local times that have more than one UTC equivalent + # (for example, during the transition from daylight savings time to standard + # time). + # + # In the first case (no equivalent UTC time), a {PeriodNotFound} exception + # will be raised. + # + # In the second case (more than one equivalent UTC time), an {AmbiguousTime} + # exception will be raised unless the optional `dst` parameter or block + # handles the ambiguity. + # + # If the ambiguity is due to a transition from daylight savings time to + # standard time, the `dst` parameter can be used to select whether the + # daylight savings time or local time is used. For example, the following + # code would raise an {AmbiguousTime} exception: + # + # tz = TZInfo::Timezone.get('America/New_York') + # tz.period_for_local(Time.new(2004,10,31,1,30,0)) + # + # Specifying `dst = true` would select the daylight savings period from + # April to October 2004. Specifying `dst = false` would return the + # standard time period from October 2004 to April 2005. + # + # The `dst` parameter will not be able to resolve an ambiguity resulting + # from the clocks being set back without changing from daylight savings time + # to standard time. In this case, if a block is specified, it will be called + # to resolve the ambiguity. The block must take a single parameter - an + # `Array` of {TimezonePeriod}s that need to be resolved. The block can + # select and return a single {TimezonePeriod} or return `nil` or an empty + # `Array` to cause an {AmbiguousTime} exception to be raised. + # + # The default value of the `dst` parameter can be specified using + # {Timezone.default_dst=}. + # + # @param dst [Boolean] whether to resolve ambiguous local times by always + # selecting the period observing daylight savings time (`true`), always + # selecting the period observing standard time (`false`), or leaving the + # ambiguity unresolved (`nil`). + # @param local_time [Object] a `Time`, `DateTime` or {Timestamp}. + # @raise [PeriodNotFound] if `local_time` is not valid for the time zone + # (there is no equivalent UTC time). + # @raise [AmbiguousTime] if `local_time` was ambiguous for the time zone and + # the `dst` parameter or block did not resolve the ambiguity. + # @raise [ArgumentError] if `local_time` is `nil`. + # @return [Object] the UTC equivalent of `local_time` as a `Time`, + # `DateTime` or {Timestamp}. + # @yield [periods] if the `dst` parameter did not resolve an ambiguity, an + # optional block is yielded to. + # @yieldparam periods [Array<TimezonePeriod>] an `Array` containing all + # the {TimezonePeriod}s that still match `local_time` after applying the + # `dst` parameter. + # @yieldreturn [Object] to resolve the ambiguity: a chosen {TimezonePeriod} + # or an `Array` containing a chosen {TimezonePeriod}; to leave the + # ambiguity unresolved: an empty `Array`, an `Array` containing more than + # one {TimezonePeriod}, or `nil`. + # + # source://tzinfo//lib/tzinfo/timezone.rb#645 + def local_to_utc(local_time, dst = T.unsafe(nil)); end + + # @return [String] the identifier of the time zone, for example, + # `"Europe/Paris"`. + # + # source://tzinfo//lib/tzinfo/timezone.rb#247 + def name; end + + # @return [TimeWithOffset] the current local time in the time zone. + # + # source://tzinfo//lib/tzinfo/timezone.rb#992 + def now; end + + # Returns the observed offset from UTC in seconds at the given time. This + # includes adjustments made for daylight savings time. + # + # @param time [Object] a `Time`, `DateTime` or `Timestamp`. + # @raise [ArgumentError] if `time` is `nil`. + # @raise [ArgumentError] if `time` is a {Timestamp} with an unspecified UTC + # offset. + # @return [Integer] the observed offset from UTC in seconds at the given + # time. + # + # source://tzinfo//lib/tzinfo/timezone.rb#1094 + def observed_utc_offset(time = T.unsafe(nil)); end + + # Returns the unique offsets used by the time zone up to a given time (`to`) + # as an `Array` of {TimezoneOffset} instances. + # + # A from time may also be supplied using the `from` parameter. If from is + # not `nil`, only offsets used from that time onwards will be returned. + # + # Comparisons with `to` are exclusive. Comparisons with `from` are + # inclusive. + # + # @param to [Object] a `Time`, `DateTime` or {Timestamp} specifying the + # latest (exclusive) offset to return. + # @param from [Object] an optional `Time`, `DateTime` or {Timestamp} + # specifying the earliest (inclusive) offset to return. + # @raise [ArgumentError] if `from` is specified and `to` is not greater than + # `from`. + # @raise [ArgumentError] is raised if `to` is `nil`. + # @raise [ArgumentError] if either `to` or `from` is a {Timestamp} with an + # unspecified offset. + # @return [Array<TimezoneOffsets>] the offsets that are used earlier than + # `to` and, if specified, at or later than `from`. Offsets may be returned + # in any order. + # + # source://tzinfo//lib/tzinfo/timezone.rb#947 + def offsets_up_to(to, from = T.unsafe(nil)); end + + # Returns the {TimezonePeriod} that is valid at a given time. + # + # Unlike {period_for_local} and {period_for_utc}, the UTC offset of the + # `time` parameter is taken into consideration. + # + # @param time [Object] a `Time`, `DateTime` or {Timestamp}. + # @raise [ArgumentError] if `time` is `nil`. + # @raise [ArgumentError] if `time` is a {Timestamp} with an unspecified + # offset. + # @return [TimezonePeriod] the {TimezonePeriod} that is valid at `time`. + # + # source://tzinfo//lib/tzinfo/timezone.rb#319 + def period_for(time); end + + # Returns the {TimezonePeriod} that is valid at the given local time. + # + # The UTC offset of the `local_time` parameter is ignored (it is treated as + # a time in the time zone represented by `self`). Use the {period_for} + # method instead if the the UTC offset of the time needs to be taken into + # consideration. + # + # _Warning:_ There are local times that have no equivalent UTC times (for + # example, during the transition from standard time to daylight savings + # time). There are also local times that have more than one UTC equivalent + # (for example, during the transition from daylight savings time to standard + # time). + # + # In the first case (no equivalent UTC time), a {PeriodNotFound} exception + # will be raised. + # + # In the second case (more than one equivalent UTC time), an {AmbiguousTime} + # exception will be raised unless the optional `dst` parameter or block + # handles the ambiguity. + # + # If the ambiguity is due to a transition from daylight savings time to + # standard time, the `dst` parameter can be used to select whether the + # daylight savings time or local time is used. For example, the following + # code would raise an {AmbiguousTime} exception: + # + # tz = TZInfo::Timezone.get('America/New_York') + # tz.period_for_local(Time.new(2004,10,31,1,30,0)) + # + # Specifying `dst = true` would select the daylight savings period from + # April to October 2004. Specifying `dst = false` would return the + # standard time period from October 2004 to April 2005. + # + # The `dst` parameter will not be able to resolve an ambiguity resulting + # from the clocks being set back without changing from daylight savings time + # to standard time. In this case, if a block is specified, it will be called + # to resolve the ambiguity. The block must take a single parameter - an + # `Array` of {TimezonePeriod}s that need to be resolved. The block can + # select and return a single {TimezonePeriod} or return `nil` or an empty + # `Array` to cause an {AmbiguousTime} exception to be raised. + # + # The default value of the `dst` parameter can be specified using + # {Timezone.default_dst=}. + # + # @param dst [Boolean] whether to resolve ambiguous local times by always + # selecting the period observing daylight savings time (`true`), always + # selecting the period observing standard time (`false`), or leaving the + # ambiguity unresolved (`nil`). + # @param local_time [Object] a `Time`, `DateTime` or {Timestamp}. + # @raise [PeriodNotFound] if `local_time` is not valid for the time zone + # (there is no equivalent UTC time). + # @raise [AmbiguousTime] if `local_time` was ambiguous for the time zone and + # the `dst` parameter or block did not resolve the ambiguity. + # @raise [ArgumentError] if `local_time` is `nil`. + # @return [TimezonePeriod] the {TimezonePeriod} that is valid at + # `local_time`. + # @yield [periods] if the `dst` parameter did not resolve an ambiguity, an + # optional block is yielded to. + # @yieldparam periods [Array<TimezonePeriod>] an `Array` containing all + # the {TimezonePeriod}s that still match `local_time` after applying the + # `dst` parameter. + # @yieldreturn [Object] to resolve the ambiguity: a chosen {TimezonePeriod} + # or an `Array` containing a chosen {TimezonePeriod}; to leave the + # ambiguity unresolved: an empty `Array`, an `Array` containing more than + # one {TimezonePeriod}, or `nil`. + # + # source://tzinfo//lib/tzinfo/timezone.rb#494 + def period_for_local(local_time, dst = T.unsafe(nil)); end + + # Returns the {TimezonePeriod} that is valid at a given time. + # + # The UTC offset of the `utc_time` parameter is ignored (it is treated as a + # UTC time). Use the {period_for} method instead if the UTC offset of the + # time needs to be taken into consideration. + # + # @param utc_time [Object] a `Time`, `DateTime` or {Timestamp}. + # @raise [ArgumentError] if `utc_time` is `nil`. + # @return [TimezonePeriod] the {TimezonePeriod} that is valid at `utc_time`. + # + # source://tzinfo//lib/tzinfo/timezone.rb#425 + def period_for_utc(utc_time); end + + # Returns the set of {TimezonePeriod}s that are valid for the given + # local time as an `Array`. + # + # The UTC offset of the `local_time` parameter is ignored (it is treated as + # a time in the time zone represented by `self`). + # + # This will typically return an `Array` containing a single + # {TimezonePeriod}. More than one {TimezonePeriod} will be returned when the + # local time is ambiguous (for example, when daylight savings time ends). An + # empty `Array` will be returned when the local time is not valid (for + # example, when daylight savings time begins). + # + # To obtain just a single {TimezonePeriod} in all cases, use + # {period_for_local} instead and specify how ambiguities should be resolved. + # + # @param local_time [Object] a `Time`, `DateTime` or {Timestamp}. + # @raise [ArgumentError] if `local_time` is `nil`. + # @return [Array<TimezonePeriod>] the set of {TimezonePeriod}s that are + # valid at `local_time`. + # + # source://tzinfo//lib/tzinfo/timezone.rb#342 + def periods_for_local(local_time); end + + # Converts a time to local time for the time zone and returns a `String` + # representation of the local time according to the given format. + # + # `Timezone#strftime` first expands any occurrences of `%Z` in the format + # string to the time zone abbreviation for the local time (for example, EST + # or EDT). Depending on the type of `time` parameter, the result of the + # expansion is then passed to either `Time#strftime`, `DateTime#strftime` or + # `Timestamp#strftime` to handle any other format directives. + # + # This method is equivalent to the following: + # + # time_zone.to_local(time).strftime(format) + # + # @param format [String] the format string. + # @param time [Object] a `Time`, `DateTime` or `Timestamp`. + # @raise [ArgumentError] if `format` or `time` is `nil`. + # @raise [ArgumentError] if `time` is a {Timestamp} with an unspecified UTC + # offset. + # @return [String] the formatted local time. + # + # source://tzinfo//lib/tzinfo/timezone.rb#1039 + def strftime(format, time = T.unsafe(nil)); end + + # Converts a time to the local time for the time zone. + # + # The result will be of type {TimeWithOffset} (if passed a `Time`), + # {DateTimeWithOffset} (if passed a `DateTime`) or {TimestampWithOffset} (if + # passed a {Timestamp}). {TimeWithOffset}, {DateTimeWithOffset} and + # {TimestampWithOffset} are subclasses of `Time`, `DateTime` and {Timestamp} + # that provide additional information about the local result. + # + # Unlike {utc_to_local}, {to_local} takes the UTC offset of the given time + # into consideration. + # + # @param time [Object] a `Time`, `DateTime` or {Timestamp}. + # @raise [ArgumentError] if `time` is `nil`. + # @raise [ArgumentError] if `time` is a {Timestamp} that does not have a + # specified UTC offset. + # @return [Object] the local equivalent of `time` as a {TimeWithOffset}, + # {DateTimeWithOffset} or {TimestampWithOffset}. + # + # source://tzinfo//lib/tzinfo/timezone.rb#548 + def to_local(time); end + + # @return [String] {identifier}, modified to make it more readable. + # + # source://tzinfo//lib/tzinfo/timezone.rb#253 + def to_s; end + + # Returns an `Array` of {TimezoneTransition} instances representing the + # times where the UTC offset of the timezone changes. + # + # Transitions are returned up to a given time (`to`). + # + # A from time may also be supplied using the `from` parameter. If from is + # not `nil`, only transitions from that time onwards will be returned. + # + # Comparisons with `to` are exclusive. Comparisons with `from` are + # inclusive. If a transition falls precisely on `to`, it will be excluded. + # If a transition falls on `from`, it will be included. + # + # @param to [Object] a `Time`, `DateTime` or {Timestamp} specifying the + # latest (exclusive) transition to return. + # @param from [Object] an optional `Time`, `DateTime` or {Timestamp} + # specifying the earliest (inclusive) transition to return. + # @raise [ArgumentError] if `from` is specified and `to` is not greater than + # `from`. + # @raise [ArgumentError] is raised if `to` is `nil`. + # @raise [ArgumentError] if either `to` or `from` is a {Timestamp} with an + # unspecified offset. + # @return [Array<TimezoneTransition>] the transitions that are earlier than + # `to` and, if specified, at or later than `from`. Transitions are ordered + # by when they occur, from earliest to latest. + # + # source://tzinfo//lib/tzinfo/timezone.rb#370 + def transitions_up_to(to, from = T.unsafe(nil)); end + + # Returns the observed offset from UTC in seconds at the given time. This + # includes adjustments made for daylight savings time. + # + # @param time [Object] a `Time`, `DateTime` or `Timestamp`. + # @raise [ArgumentError] if `time` is `nil`. + # @raise [ArgumentError] if `time` is a {Timestamp} with an unspecified UTC + # offset. + # @return [Integer] the observed offset from UTC in seconds at the given + # time. + # + # source://tzinfo//lib/tzinfo/timezone.rb#1094 + def utc_offset(time = T.unsafe(nil)); end + + # Converts a time in UTC to the local time for the time zone. + # + # The result will be of type {TimeWithOffset} (if passed a `Time`), + # {DateTimeWithOffset} (if passed a `DateTime`) or {TimestampWithOffset} (if + # passed a {Timestamp}). {TimeWithOffset}, {DateTimeWithOffset} and + # {TimestampWithOffset} are subclasses of `Time`, `DateTime` and {Timestamp} + # that provide additional information about the local result. + # + # The UTC offset of the `utc_time` parameter is ignored (it is treated as a + # UTC time). Use the {to_local} method instead if the the UTC offset of the + # time needs to be taken into consideration. + # + # @param utc_time [Object] a `Time`, `DateTime` or {Timestamp}. + # @raise [ArgumentError] if `utc_time` is `nil`. + # @return [Object] the local equivalent of `utc_time` as a {TimeWithOffset}, + # {DateTimeWithOffset} or {TimestampWithOffset}. + # + # source://tzinfo//lib/tzinfo/timezone.rb#572 + def utc_to_local(utc_time); end + + private + + # Raises an {UnknownTimezone} exception. + # + # @raise [UnknownTimezone] always. + # + # source://tzinfo//lib/tzinfo/timezone.rb#1156 + def raise_unknown_timezone; end + + class << self + # Loads a {Timezone} from the serialized representation returned by {_dump}. + # This is method is called when using `Marshal.load` or `Marshal.restore` + # to restore a serialized {Timezone}. + # + # @param data [String] a serialized representation of a {Timezone}. + # @return [Timezone] the result of converting `data` back into a {Timezone}. + # + # source://tzinfo//lib/tzinfo/timezone.rb#1147 + def _load(data); end + + # Returns an `Array` of all the available time zones. + # + # {TimezoneProxy} instances are returned to avoid the overhead of loading + # time zone data until it is first needed. + # + # @return [Array<Timezone>] all available time zones. + # + # source://tzinfo//lib/tzinfo/timezone.rb#151 + def all; end + + # Returns an `Array` of the identifiers of all the time zones that are + # observed by at least one {Country}. This is not the complete set of time + # zone identifiers as some are not country specific (e.g. `'Etc/GMT'`). + # + # {TimezoneProxy} instances are returned to avoid the overhead of loading + # time zone data until it is first needed. + # + # zones that are observed by at least one {Country}. + # + # @return [Array<String>] an `Array` of the identifiers of all the time + # + # source://tzinfo//lib/tzinfo/timezone.rb#219 + def all_country_zone_identifiers; end + + # Returns an `Array` of all the time zones that are observed by at least + # one {Country}. This is not the complete set of time zones as some are + # not country specific (e.g. `'Etc/GMT'`). + # + # {TimezoneProxy} instances are returned to avoid the overhead of loading + # time zone data until it is first needed. + # + # @return [Array<Timezone>] an `Array` of all the time zones that are + # observed by at least one {Country}. + # + # source://tzinfo//lib/tzinfo/timezone.rb#206 + def all_country_zones; end + + # time zones that are defined by offsets and transitions. + # + # @return [Array<String>] an `Array` of the identifiers of all available + # + # source://tzinfo//lib/tzinfo/timezone.rb#175 + def all_data_zone_identifiers; end + + # Returns an `Array` of all the available time zones that are + # defined by offsets and transitions. + # + # {TimezoneProxy} instances are returned to avoid the overhead of loading + # time zone data until it is first needed. + # + # @return [Array<Timezone>] an `Array` of all the available time zones + # that are defined by offsets and transitions. + # + # source://tzinfo//lib/tzinfo/timezone.rb#169 + def all_data_zones; end + + # @return [Array<String>] an `Array` containing the identifiers of all the + # available time zones. + # + # source://tzinfo//lib/tzinfo/timezone.rb#157 + def all_identifiers; end + + # time zones that are defined as links to / aliases for other time zones. + # + # @return [Array<String>] an `Array` of the identifiers of all available + # + # source://tzinfo//lib/tzinfo/timezone.rb#193 + def all_linked_zone_identifiers; end + + # Returns an `Array` of all the available time zones that are + # defined as links to / aliases for other time zones. + # + # {TimezoneProxy} instances are returned to avoid the overhead of loading + # time zone data until it is first needed. + # + # @return [Array<Timezone>] an `Array` of all the available time zones + # that are defined as links to / aliases for other time zones. + # + # source://tzinfo//lib/tzinfo/timezone.rb#187 + def all_linked_zones; end + + # Returns the default value of the optional `dst` parameter of the + # {local_time}, {local_datetime} and {local_timestamp}, {local_to_utc} + # and {period_for_local} methods (`nil`, `true` or `false`). + # + # {default_dst} defaults to `nil` unless changed with {default_dst=}. + # + # @return [Boolean] the default value of the optional `dst` parameter of + # the {local_time}, {local_datetime} and {local_timestamp}, + # {local_to_utc} and {period_for_local} methods (`nil`, `true` or + # `false`). + # + # source://tzinfo//lib/tzinfo/timezone.rb#110 + def default_dst; end + + # Sets the default value of the optional `dst` parameter of the + # {local_datetime}, {local_time}, {local_timestamp}, {local_to_utc} and + # {period_for_local} methods. Can be set to `nil`, `true` or `false`. + # + # @param value [Boolean] `nil`, `true` or `false`. + # + # source://tzinfo//lib/tzinfo/timezone.rb#96 + def default_dst=(value); end + + # Returns a time zone by its IANA Time Zone Database identifier (e.g. + # `"Europe/London"` or `"America/Chicago"`). Call {all_identifiers} for a + # list of all the valid identifiers. + # + # The {get} method will return a subclass of {Timezone}, either a + # {DataTimezone} (for a time zone defined by rules that set out when + # transitions occur) or a {LinkedTimezone} (for a time zone that is just a + # link to or alias for a another time zone). + # + # @param identifier [String] an IANA Time Zone Database time zone + # identifier. + # @raise [InvalidTimezoneIdentifier] if the `identifier` is not valid. + # @return [Timezone] the {Timezone} with the given `identifier`. + # + # source://tzinfo//lib/tzinfo/timezone.rb#127 + def get(identifier); end + + # Returns a proxy for the time zone with the given identifier. This allows + # loading of the time zone data to be deferred until it is first needed. + # + # The identifier will not be validated. If an invalid identifier is + # specified, no exception will be raised until the proxy is used. + # + # @param identifier [String] an IANA Time Zone Database time zone + # identifier. + # @return [TimezoneProxy] a proxy for the time zone with the given + # `identifier`. + # + # source://tzinfo//lib/tzinfo/timezone.rb#141 + def get_proxy(identifier); end + + private + + # @return [DataSource] the current DataSource. + # + # source://tzinfo//lib/tzinfo/timezone.rb#234 + def data_source; end + + # @param identifiers [Enumerable<String>] an `Enumerable` of time zone + # identifiers. + # @return [Array<TimezoneProxy>] an `Array` of {TimezoneProxy} + # instances corresponding to the given identifiers. + # + # source://tzinfo//lib/tzinfo/timezone.rb#229 + def get_proxies(identifiers); end + end +end + +# Alias used by TZInfo::Data format1 releases. +# +# @private +# +# source://tzinfo//lib/tzinfo/format1/timezone_definition.rb#37 +TZInfo::TimezoneDefinition = TZInfo::Format1::TimezoneDefinition + +# Alias used by TZInfo::Data format 1 releases. +# +# @private +# +# source://tzinfo//lib/tzinfo/format1/timezone_index_definition.rb#75 +TZInfo::TimezoneIndexDefinition = TZInfo::Format1::TimezoneIndexDefinition + +# Represents an offset from UTC observed by a time zone. +# +# source://tzinfo//lib/tzinfo/timezone_offset.rb#6 +class TZInfo::TimezoneOffset + # Initializes a new {TimezoneOffset}. + # + # {TimezoneOffset} instances should not normally be constructed manually. + # + # The passed in `abbreviation` instance will be frozen. + # + # @param base_utc_offset [Integer] the base offset from UTC in seconds. + # @param std_offset [Integer] the offset from standard time in seconds. + # @param abbreviation [String] the abbreviation identifying the offset. + # @return [TimezoneOffset] a new instance of TimezoneOffset + # + # source://tzinfo//lib/tzinfo/timezone_offset.rb#62 + def initialize(base_utc_offset, std_offset, abbreviation); end + + # Determines if this {TimezoneOffset} is equal to another instance. + # + # @param toi [Object] the instance to test for equality. + # @return [Boolean] `true` if `toi` is a {TimezoneOffset} with the same + # {utc_offset}, {std_offset} and {abbreviation} as this {TimezoneOffset}, + # otherwise `false`. + # + # source://tzinfo//lib/tzinfo/timezone_offset.rb#84 + def ==(toi); end + + # The abbreviation that identifies this offset. For example GMT + # (Greenwich Mean Time) or BST (British Summer Time) for Europe/London. + # + # @return [String] the abbreviation that identifies this offset. + # + # source://tzinfo//lib/tzinfo/timezone_offset.rb#50 + def abbr; end + + # The abbreviation that identifies this offset. For example GMT + # (Greenwich Mean Time) or BST (British Summer Time) for Europe/London. + # + # @return [String] the abbreviation that identifies this offset. + # + # source://tzinfo//lib/tzinfo/timezone_offset.rb#50 + def abbreviation; end + + # Returns the base offset from UTC in seconds (`observed_utc_offset - + # std_offset`). This does not include any adjustment made for daylight + # savings time and will typically remain constant throughout the year. + # + # To obtain the currently observed offset from UTC, including the effect of + # daylight savings time, use {observed_utc_offset} instead. + # + # If you require accurate {base_utc_offset} values, you should install the + # tzinfo-data gem and set {DataSources::RubyDataSource} as the {DataSource}. + # When using {DataSources::ZoneinfoDataSource}, the value of + # {base_utc_offset} has to be derived from changes to the observed UTC + # offset and DST status since it is not included in zoneinfo files. + # + # @return [Integer] the base offset from UTC in seconds. + # + # source://tzinfo//lib/tzinfo/timezone_offset.rb#21 + def base_utc_offset; end + + # Determines if daylight savings is in effect (i.e. if {std_offset} is + # non-zero). + # + # @return [Boolean] `true` if {std_offset} is non-zero, otherwise `false`. + # + # source://tzinfo//lib/tzinfo/timezone_offset.rb#74 + def dst?; end + + # Determines if this {TimezoneOffset} is equal to another instance. + # + # @param toi [Object] the instance to test for equality. + # @return [Boolean] `true` if `toi` is a {TimezoneOffset} with the same + # {utc_offset}, {std_offset} and {abbreviation} as this {TimezoneOffset}, + # otherwise `false`. + # + # source://tzinfo//lib/tzinfo/timezone_offset.rb#95 + def eql?(toi); end + + # @return [Integer] a hash based on {utc_offset}, {std_offset} and + # {abbreviation}. + # + # source://tzinfo//lib/tzinfo/timezone_offset.rb#101 + def hash; end + + # @return [String] the internal object state as a programmer-readable + # `String`. + # + # source://tzinfo//lib/tzinfo/timezone_offset.rb#107 + def inspect; end + + # Returns the observed offset from UTC in seconds (`base_utc_offset + + # std_offset`). This includes adjustments made for daylight savings time. + # + # @return [Integer] the observed offset from UTC in seconds. + # + # source://tzinfo//lib/tzinfo/timezone_offset.rb#43 + def observed_utc_offset; end + + # Returns the offset from the time zone's standard time in seconds + # (`observed_utc_offset - base_utc_offset`). Zero when daylight savings time + # is not in effect. Non-zero (usually 3600 = 1 hour) if daylight savings is + # being observed. + # + # If you require accurate {std_offset} values, you should install the + # tzinfo-data gem and set {DataSources::RubyDataSource} as the {DataSource}. + # When using {DataSources::ZoneinfoDataSource}, the value of {std_offset} + # has to be derived from changes to the observed UTC offset and DST status + # since it is not included in zoneinfo files. + # + # @return [Integer] the offset from the time zone's standard time in + # seconds. + # + # source://tzinfo//lib/tzinfo/timezone_offset.rb#37 + def std_offset; end + + # Returns the base offset from UTC in seconds (`observed_utc_offset - + # std_offset`). This does not include any adjustment made for daylight + # savings time and will typically remain constant throughout the year. + # + # To obtain the currently observed offset from UTC, including the effect of + # daylight savings time, use {observed_utc_offset} instead. + # + # If you require accurate {base_utc_offset} values, you should install the + # tzinfo-data gem and set {DataSources::RubyDataSource} as the {DataSource}. + # When using {DataSources::ZoneinfoDataSource}, the value of + # {base_utc_offset} has to be derived from changes to the observed UTC + # offset and DST status since it is not included in zoneinfo files. + # + # @return [Integer] the base offset from UTC in seconds. + # + # source://tzinfo//lib/tzinfo/timezone_offset.rb#21 + def utc_offset; end + + # Returns the observed offset from UTC in seconds (`base_utc_offset + + # std_offset`). This includes adjustments made for daylight savings time. + # + # @return [Integer] the observed offset from UTC in seconds. + # + # source://tzinfo//lib/tzinfo/timezone_offset.rb#43 + def utc_total_offset; end +end + +# {TimezonePeriod} represents a period of time for a time zone where the same +# offset from UTC applies. It provides access to the observed offset, time +# zone abbreviation, start time and end time. +# +# The period of time can be unbounded at the start, end, or both the start +# and end. +# +# @abstract Time zone period data will returned as an instance of one of the +# subclasses of {TimezonePeriod}. +# +# source://tzinfo//lib/tzinfo/timezone_period.rb#14 +class TZInfo::TimezonePeriod + # Initializes a {TimezonePeriod}. + # + # @param offset [TimezoneOffset] the offset that is observed for the period + # of time. + # @raise [ArgumentError] if `offset` is `nil`. + # @return [TimezonePeriod] a new instance of TimezonePeriod + # + # source://tzinfo//lib/tzinfo/timezone_period.rb#23 + def initialize(offset); end + + # The abbreviation that identifies this offset. For example GMT + # (Greenwich Mean Time) or BST (British Summer Time) for Europe/London. + # + # @return [String] the abbreviation that identifies this offset. + # + # source://tzinfo//lib/tzinfo/timezone_period.rb#80 + def abbr; end + + # The abbreviation that identifies this offset. For example GMT + # (Greenwich Mean Time) or BST (British Summer Time) for Europe/London. + # + # @return [String] the abbreviation that identifies this offset. + # + # source://tzinfo//lib/tzinfo/timezone_period.rb#80 + def abbreviation; end + + # Returns the base offset from UTC in seconds (`observed_utc_offset - + # std_offset`). This does not include any adjustment made for daylight + # savings time and will typically remain constant throughout the year. + # + # To obtain the currently observed offset from UTC, including the effect of + # daylight savings time, use {observed_utc_offset} instead. + # + # If you require accurate {base_utc_offset} values, you should install the + # tzinfo-data gem and set {DataSources::RubyDataSource} as the {DataSource}. + # When using {DataSources::ZoneinfoDataSource}, the value of + # {base_utc_offset} has to be derived from changes to the observed UTC + # offset and DST status since it is not included in zoneinfo files. + # + # @return [Integer] the base offset from UTC in seconds. + # + # source://tzinfo//lib/tzinfo/timezone_period.rb#54 + def base_utc_offset; end + + # Determines if daylight savings is in effect (i.e. if {std_offset} is + # non-zero). + # + # @return [Boolean] `true` if {std_offset} is non-zero, otherwise `false`. + # + # source://tzinfo//lib/tzinfo/timezone_period.rb#99 + def dst?; end + + # @return [TimezoneTransition] the transition that defines the end of this + # {TimezonePeriod} (`nil` if the end is unbounded). + # + # source://tzinfo//lib/tzinfo/timezone_period.rb#36 + def end_transition; end + + # Returns the UTC end time of the period or `nil` if the end of the period + # is unbounded. + # + # The result is returned as a {Timestamp}. To obtain the end time as a + # `Time` or `DateTime`, call either {Timestamp#to_time to_time} or + # {Timestamp#to_datetime to_datetime} on the result. + # + # @return [Timestamp] the UTC end time of the period or `nil` if the end of + # the period is unbounded. + # + # source://tzinfo//lib/tzinfo/timezone_period.rb#125 + def ends_at; end + + # Returns the local end time of the period or `nil` if the end of the period + # is unbounded. + # + # The result is returned as a {TimestampWithOffset}. To obtain the end time + # as a `Time` or `DateTime`, call either {TimestampWithOffset#to_time + # to_time} or {TimestampWithOffset#to_datetime to_datetime} on the result. + # + # @return [TimestampWithOffset] the local end time of the period or `nil` if + # the end of the period is unbounded. + # + # source://tzinfo//lib/tzinfo/timezone_period.rb#151 + def local_ends_at; end + + # Returns the local start time of the period or `nil` if the start of the + # period is unbounded. + # + # The result is returned as a {TimestampWithOffset}. To obtain the start + # time as a `Time` or `DateTime`, call either {TimestampWithOffset#to_time + # to_time} or {TimestampWithOffset#to_datetime to_datetime} on the result. + # + # @return [TimestampWithOffset] the local start time of the period or `nil` + # if the start of the period is unbounded. + # + # source://tzinfo//lib/tzinfo/timezone_period.rb#138 + def local_starts_at; end + + # Returns the observed offset from UTC in seconds (`base_utc_offset + + # std_offset`). This includes adjustments made for daylight savings time. + # + # @return [Integer] the observed offset from UTC in seconds. + # + # source://tzinfo//lib/tzinfo/timezone_period.rb#90 + def observed_utc_offset; end + + # @return [TimezoneOffset] the offset that applies in the period of time. + # + # source://tzinfo//lib/tzinfo/timezone_period.rb#16 + def offset; end + + # @return [TimezoneTransition] the transition that defines the start of this + # {TimezonePeriod} (`nil` if the start is unbounded). + # + # source://tzinfo//lib/tzinfo/timezone_period.rb#30 + def start_transition; end + + # Returns the UTC start time of the period or `nil` if the start of the + # period is unbounded. + # + # The result is returned as a {Timestamp}. To obtain the start time as a + # `Time` or `DateTime`, call either {Timestamp#to_time to_time} or + # {Timestamp#to_datetime to_datetime} on the result. + # + # @return [Timestamp] the UTC start time of the period or `nil` if the start + # of the period is unbounded. + # + # source://tzinfo//lib/tzinfo/timezone_period.rb#112 + def starts_at; end + + # Returns the offset from the time zone's standard time in seconds + # (`observed_utc_offset - base_utc_offset`). Zero when daylight savings time + # is not in effect. Non-zero (usually 3600 = 1 hour) if daylight savings is + # being observed. + # + # If you require accurate {std_offset} values, you should install the + # tzinfo-data gem and set {DataSources::RubyDataSource} as the {DataSource}. + # When using {DataSources::ZoneinfoDataSource}, the value of {std_offset} + # has to be derived from changes to the observed UTC offset and DST status + # since it is not included in zoneinfo files. + # + # @return [Integer] the offset from the time zone's standard time in + # seconds. + # + # source://tzinfo//lib/tzinfo/timezone_period.rb#72 + def std_offset; end + + # Returns the base offset from UTC in seconds (`observed_utc_offset - + # std_offset`). This does not include any adjustment made for daylight + # savings time and will typically remain constant throughout the year. + # + # To obtain the currently observed offset from UTC, including the effect of + # daylight savings time, use {observed_utc_offset} instead. + # + # If you require accurate {base_utc_offset} values, you should install the + # tzinfo-data gem and set {DataSources::RubyDataSource} as the {DataSource}. + # When using {DataSources::ZoneinfoDataSource}, the value of + # {base_utc_offset} has to be derived from changes to the observed UTC + # offset and DST status since it is not included in zoneinfo files. + # + # @return [Integer] the base offset from UTC in seconds. + # + # source://tzinfo//lib/tzinfo/timezone_period.rb#54 + def utc_offset; end + + # Returns the observed offset from UTC in seconds (`base_utc_offset + + # std_offset`). This includes adjustments made for daylight savings time. + # + # @return [Integer] the observed offset from UTC in seconds. + # + # source://tzinfo//lib/tzinfo/timezone_period.rb#90 + def utc_total_offset; end + + # The abbreviation that identifies this offset. For example GMT + # (Greenwich Mean Time) or BST (British Summer Time) for Europe/London. + # + # @return [String] the abbreviation that identifies this offset. + # + # source://tzinfo//lib/tzinfo/timezone_period.rb#80 + def zone_identifier; end + + private + + # Raises a {NotImplementedError} to indicate that subclasses should override + # a method. + # + # @raise [NotImplementedError] always. + # + # source://tzinfo//lib/tzinfo/timezone_period.rb#161 + def raise_not_implemented(method_name); end + + # @param transition [TimezoneTransition] a transition or `nil`. + # @return [Timestamp] the {Timestamp} representing when a transition occurs, + # or `nil` if `transition` is `nil`. + # + # source://tzinfo//lib/tzinfo/timezone_period.rb#168 + def timestamp(transition); end + + # @param transition [TimezoneTransition] a transition or `nil`. + # @return [TimestampWithOffset] a {Timestamp} representing when a transition + # occurs with offset set to {#offset}, or `nil` if `transition` is `nil`. + # + # source://tzinfo//lib/tzinfo/timezone_period.rb#175 + def timestamp_with_offset(transition); end +end + +# A proxy class standing in for a {Timezone} with a given identifier. +# {TimezoneProxy} inherits from {Timezone} and can be treated identically to +# {Timezone} instances loaded with {Timezone.get}. +# +# {TimezoneProxy} instances are used to avoid the performance overhead of +# loading time zone data into memory, for example, by {Timezone.all}. +# +# The first time an attempt is made to access the data for the time zone, the +# real {Timezone} will be loaded is loaded. If the proxy's identifier was not +# valid, then an exception will be raised at this point. +# +# source://tzinfo//lib/tzinfo/timezone_proxy.rb#15 +class TZInfo::TimezoneProxy < ::TZInfo::Timezone + # Initializes a new {TimezoneProxy}. + # + # The `identifier` parameter is not checked when initializing the proxy. It + # will be validated when the real {Timezone} instance is loaded. + # + # @param identifier [String] an IANA Time Zone Database time zone + # identifier. + # @return [TimezoneProxy] a new instance of TimezoneProxy + # + # source://tzinfo//lib/tzinfo/timezone_proxy.rb#23 + def initialize(identifier); end + + # Returns a serialized representation of this {TimezoneProxy}. This method + # is called when using `Marshal.dump` with an instance of {TimezoneProxy}. + # + # @param limit [Integer] the maximum depth to dump - ignored. @return + # [String] a serialized representation of this {TimezoneProxy}. + # @return [String] a serialized representation of this {TimezoneProxy}. + # + # source://tzinfo//lib/tzinfo/timezone_proxy.rb#60 + def _dump(limit); end + + # Returns the canonical {Timezone} instance for this {Timezone}. + # + # The IANA Time Zone database contains two types of definition: Zones and + # Links. Zones are defined by rules that set out when transitions occur. + # Links are just references to fully defined Zone, creating an alias for + # that Zone. + # + # Links are commonly used where a time zone has been renamed in a release of + # the Time Zone database. For example, the US/Eastern Zone was renamed as + # America/New_York. A US/Eastern Link was added in its place, linking to + # (and creating an alias for) America/New_York. + # + # Links are also used for time zones that are currently identical to a full + # Zone, but that are administered separately. For example, Europe/Vatican is + # a Link to (and alias for) Europe/Rome. + # + # For a full Zone (implemented by {DataTimezone}), {canonical_zone} returns + # self. + # + # For a Link (implemented by {LinkedTimezone}), {canonical_zone} returns a + # {Timezone} instance representing the full Zone that the link targets. + # + # TZInfo can be used with different data sources (see the documentation for + # {TZInfo::DataSource}). Some DataSource implementations may not support + # distinguishing between full Zones and Links and will treat all time zones + # as full Zones. In this case, {canonical_zone} will always return `self`. + # + # There are two built-in DataSource implementations. + # {DataSources::RubyDataSource} (which will be used if the tzinfo-data gem + # is available) supports Link zones. {DataSources::ZoneinfoDataSource} + # returns Link zones as if they were full Zones. If the {canonical_zone} or + # {canonical_identifier} methods are needed, the tzinfo-data gem should be + # installed. + # + # The {TZInfo::DataSource.get} method can be used to check which DataSource + # implementation is being used. + # + # @return [Timezone] the canonical {Timezone} instance for this {Timezone}. + # + # source://tzinfo//lib/tzinfo/timezone_proxy.rb#50 + def canonical_zone; end + + # @return [String] the identifier of the time zone, for example, + # `"Europe/Paris"`. + # + # source://tzinfo//lib/tzinfo/timezone_proxy.rb#30 + def identifier; end + + # Returns the {TimezonePeriod} that is valid at a given time. + # + # Unlike {period_for_local} and {period_for_utc}, the UTC offset of the + # `time` parameter is taken into consideration. + # + # @param time [Object] a `Time`, `DateTime` or {Timestamp}. + # @raise [ArgumentError] if `time` is `nil`. + # @raise [ArgumentError] if `time` is a {Timestamp} with an unspecified + # offset. + # @return [TimezonePeriod] the {TimezonePeriod} that is valid at `time`. + # + # source://tzinfo//lib/tzinfo/timezone_proxy.rb#35 + def period_for(time); end + + # Returns the set of {TimezonePeriod}s that are valid for the given + # local time as an `Array`. + # + # The UTC offset of the `local_time` parameter is ignored (it is treated as + # a time in the time zone represented by `self`). + # + # This will typically return an `Array` containing a single + # {TimezonePeriod}. More than one {TimezonePeriod} will be returned when the + # local time is ambiguous (for example, when daylight savings time ends). An + # empty `Array` will be returned when the local time is not valid (for + # example, when daylight savings time begins). + # + # To obtain just a single {TimezonePeriod} in all cases, use + # {period_for_local} instead and specify how ambiguities should be resolved. + # + # @param local_time [Object] a `Time`, `DateTime` or {Timestamp}. + # @raise [ArgumentError] if `local_time` is `nil`. + # @return [Array<TimezonePeriod>] the set of {TimezonePeriod}s that are + # valid at `local_time`. + # + # source://tzinfo//lib/tzinfo/timezone_proxy.rb#40 + def periods_for_local(local_time); end + + # Returns an `Array` of {TimezoneTransition} instances representing the + # times where the UTC offset of the timezone changes. + # + # Transitions are returned up to a given time (`to`). + # + # A from time may also be supplied using the `from` parameter. If from is + # not `nil`, only transitions from that time onwards will be returned. + # + # Comparisons with `to` are exclusive. Comparisons with `from` are + # inclusive. If a transition falls precisely on `to`, it will be excluded. + # If a transition falls on `from`, it will be included. + # + # @param to [Object] a `Time`, `DateTime` or {Timestamp} specifying the + # latest (exclusive) transition to return. + # @param from [Object] an optional `Time`, `DateTime` or {Timestamp} + # specifying the earliest (inclusive) transition to return. + # @raise [ArgumentError] if `from` is specified and `to` is not greater than + # `from`. + # @raise [ArgumentError] is raised if `to` is `nil`. + # @raise [ArgumentError] if either `to` or `from` is a {Timestamp} with an + # unspecified offset. + # @return [Array<TimezoneTransition>] the transitions that are earlier than + # `to` and, if specified, at or later than `from`. Transitions are ordered + # by when they occur, from earliest to latest. + # + # source://tzinfo//lib/tzinfo/timezone_proxy.rb#45 + def transitions_up_to(to, from = T.unsafe(nil)); end + + private + + # Returns the real {Timezone} instance being proxied. + # + # The real {Timezone} is loaded using {Timezone.get} on the first access. + # + # @return [Timezone] the real {Timezone} instance being proxied. + # + # source://tzinfo//lib/tzinfo/timezone_proxy.rb#82 + def real_timezone; end + + class << self + # Loads a {TimezoneProxy} from the serialized representation returned by + # {_dump}. This is method is called when using `Marshal.load` or + # `Marshal.restore` to restore a serialized {Timezone}. + # + # @param data [String] a serialized representation of a {TimezoneProxy}. + # @return [TimezoneProxy] the result of converting `data` back into a + # {TimezoneProxy}. + # + # source://tzinfo//lib/tzinfo/timezone_proxy.rb#71 + def _load(data); end + end +end + +# Represents a transition from one observed UTC offset ({TimezoneOffset} to +# another for a time zone. +# +# source://tzinfo//lib/tzinfo/timezone_transition.rb#7 +class TZInfo::TimezoneTransition + # Initializes a new {TimezoneTransition}. + # + # {TimezoneTransition} instances should not normally be constructed + # manually. + # + # @param offset [TimezoneOffset] the offset the transition changes to. + # @param previous_offset [TimezoneOffset] the offset the transition changes + # from. + # @param timestamp_value [Integer] when the transition occurs as a + # number of seconds since 1970-01-01 00:00:00 UTC ignoring leap seconds + # (i.e. each day is treated as if it were 86,400 seconds long). + # @return [TimezoneTransition] a new instance of TimezoneTransition + # + # source://tzinfo//lib/tzinfo/timezone_transition.rb#34 + def initialize(offset, previous_offset, timestamp_value); end + + # Determines if this {TimezoneTransition} is equal to another instance. + # + # @param tti [Object] the instance to test for equality. + # @return [Boolean] `true` if `tti` is a {TimezoneTransition} with the same + # {offset}, {previous_offset} and {timestamp_value} as this + # {TimezoneTransition}, otherwise `false`. + # + # source://tzinfo//lib/tzinfo/timezone_transition.rb#86 + def ==(tti); end + + # Returns a {Timestamp} instance representing the UTC time when this + # transition occurs. + # + # To obtain the result as a `Time` or `DateTime`, call either + # {Timestamp#to_time to_time} or {Timestamp#to_datetime to_datetime} on the + # {Timestamp} instance that is returned. + # + # @return [Timestamp] the UTC time when this transition occurs. + # + # source://tzinfo//lib/tzinfo/timezone_transition.rb#48 + def at; end + + # Determines if this {TimezoneTransition} is equal to another instance. + # + # @param tti [Object] the instance to test for equality. + # @return [Boolean] `true` if `tti` is a {TimezoneTransition} with the same + # {offset}, {previous_offset} and {timestamp_value} as this + # {TimezoneTransition}, otherwise `false`. + # + # source://tzinfo//lib/tzinfo/timezone_transition.rb#86 + def eql?(tti); end + + # @return [Integer] a hash based on {offset}, {previous_offset} and + # {timestamp_value}. + # + # source://tzinfo//lib/tzinfo/timezone_transition.rb#94 + def hash; end + + # Returns a {TimestampWithOffset} instance representing the local time when + # this transition causes the previous observance to end (calculated from + # {at} using {previous_offset}). + # + # To obtain the result as a `Time` or `DateTime`, call either + # {TimestampWithOffset#to_time to_time} or {TimestampWithOffset#to_datetime + # to_datetime} on the {TimestampWithOffset} instance that is returned. + # + # @return [TimestampWithOffset] the local time when this transition causes + # the previous observance to end. + # + # source://tzinfo//lib/tzinfo/timezone_transition.rb#62 + def local_end_at; end + + # Returns a {TimestampWithOffset} instance representing the local time when + # this transition causes the next observance to start (calculated from {at} + # using {offset}). + # + # To obtain the result as a `Time` or `DateTime`, call either + # {TimestampWithOffset#to_time to_time} or {TimestampWithOffset#to_datetime + # to_datetime} on the {TimestampWithOffset} instance that is returned. + # + # @return [TimestampWithOffset] the local time when this transition causes + # the next observance to start. + # + # source://tzinfo//lib/tzinfo/timezone_transition.rb#76 + def local_start_at; end + + # @return [TimezoneOffset] the offset this transition changes to. + # + # source://tzinfo//lib/tzinfo/timezone_transition.rb#9 + def offset; end + + # @return [TimezoneOffset] the offset this transition changes from. + # + # source://tzinfo//lib/tzinfo/timezone_transition.rb#12 + def previous_offset; end + + # When this transition occurs as an `Integer` number of seconds since + # 1970-01-01 00:00:00 UTC ignoring leap seconds (i.e. each day is treated as + # if it were 86,400 seconds long). Equivalent to the result of calling the + # {Timestamp#value value} method on the {Timestamp} returned by {at}. + # + # @return [Integer] when this transition occurs as a number of seconds since + # 1970-01-01 00:00:00 UTC ignoring leap seconds. + # + # source://tzinfo//lib/tzinfo/timezone_transition.rb#21 + def timestamp_value; end +end + +# Base class for rules definining the transition between standard and daylight +# savings time. +# +# @abstract +# @private +# +# source://tzinfo//lib/tzinfo/transition_rule.rb#10 +class TZInfo::TransitionRule + # Initializes a new {TransitionRule}. + # + # @param transition_at [Integer] the time in seconds after midnight local + # time at which the transition occurs. + # @raise [ArgumentError] if `transition_at` is not an `Integer`. + # @return [TransitionRule] a new instance of TransitionRule + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#25 + def initialize(transition_at); end + + # Determines if this {TransitionRule} is equal to another instance. + # + # @param r [Object] the instance to test for equality. + # @return [Boolean] `true` if `r` is a {TransitionRule} with the same + # {transition_at} as this {TransitionRule}, otherwise `false`. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#47 + def ==(r); end + + # Calculates the time of the transition from a given offset on a given year. + # + # @param offset [TimezoneOffset] the current offset at the time the rule + # will transition. + # @param year [Integer] the year in which the transition occurs (local + # time). + # @return [TimestampWithOffset] the time at which the transition occurs. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#37 + def at(offset, year); end + + # Determines if this {TransitionRule} is equal to another instance. + # + # @param r [Object] the instance to test for equality. + # @return [Boolean] `true` if `r` is a {TransitionRule} with the same + # {transition_at} as this {TransitionRule}, otherwise `false`. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#47 + def eql?(r); end + + # @return [Integer] a hash based on {hash_args} (defaulting to + # {transition_at}). + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#54 + def hash; end + + # Returns the number of seconds after midnight local time on the day + # identified by the rule at which the transition occurs. Can be negative to + # denote a time on the prior day. Can be greater than or equal to 86,400 to + # denote a time of the following day. + # + # @return [Integer] the time in seconds after midnight local time at which + # the transition occurs. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#18 + def transition_at; end + + protected + + # @return [Array] an `Array` of parameters that will influence the output of + # {hash}. + # + # source://tzinfo//lib/tzinfo/transition_rule.rb#62 + def hash_args; end +end + +# Represents a period of time in a time zone where the same offset from UTC +# applies. The period of time is bounded at at least one end, either having a +# start transition, end transition or both start and end transitions. +# +# source://tzinfo//lib/tzinfo/transitions_timezone_period.rb#8 +class TZInfo::TransitionsTimezonePeriod < ::TZInfo::TimezonePeriod + # Initializes a {TransitionsTimezonePeriod}. + # + # At least one of `start_transition` and `end_transition` must be specified. + # + # @param start_transition [TimezoneTransition] the transition that defines + # the start of the period, or `nil` if the start is unbounded. + # @param end_transition [TimezoneTransition] the transition that defines the + # end of the period, or `nil` if the end is unbounded. + # @raise [ArgumentError] if both `start_transition` and `end_transition` are + # `nil`. + # @return [TransitionsTimezonePeriod] a new instance of TransitionsTimezonePeriod + # + # source://tzinfo//lib/tzinfo/transitions_timezone_period.rb#27 + def initialize(start_transition, end_transition); end + + # Determines if this {TransitionsTimezonePeriod} is equal to another + # instance. + # + # @param p [Object] the instance to test for equality. + # @return [Boolean] `true` if `p` is a {TransitionsTimezonePeriod} with the + # same {offset}, {start_transition} and {end_transition}, otherwise + # `false`. + # + # source://tzinfo//lib/tzinfo/transitions_timezone_period.rb#47 + def ==(p); end + + # @return [TimezoneTransition] the transition that defines the end of this + # {TimezonePeriod} (`nil` if the end is unbounded). + # + # source://tzinfo//lib/tzinfo/transitions_timezone_period.rb#15 + def end_transition; end + + # Determines if this {TransitionsTimezonePeriod} is equal to another + # instance. + # + # @param p [Object] the instance to test for equality. + # @return [Boolean] `true` if `p` is a {TransitionsTimezonePeriod} with the + # same {offset}, {start_transition} and {end_transition}, otherwise + # `false`. + # + # source://tzinfo//lib/tzinfo/transitions_timezone_period.rb#47 + def eql?(p); end + + # @return [Integer] a hash based on {start_transition} and {end_transition}. + # + # source://tzinfo//lib/tzinfo/transitions_timezone_period.rb#53 + def hash; end + + # @return [String] the internal object state as a programmer-readable + # `String`. + # + # source://tzinfo//lib/tzinfo/transitions_timezone_period.rb#59 + def inspect; end + + # @return [TimezoneTransition] the transition that defines the start of this + # {TimezonePeriod} (`nil` if the start is unbounded). + # + # source://tzinfo//lib/tzinfo/transitions_timezone_period.rb#11 + def start_transition; end +end + +# An implementation of {StringDeduper} using the `String#-@` method where +# that method performs deduplication (Ruby 2.5 and later). +# +# Note that this is slightly different to the plain {StringDeduper} +# implementation. In this implementation, frozen literal strings are already +# in the pool and are candidates for being returned, even when passed +# another equal frozen non-literal string. {StringDeduper} will always +# return frozen strings. +# +# There are also differences in encoding handling. This implementation will +# treat strings with different encodings as different strings. +# {StringDeduper} will treat strings with the compatible encodings as the +# same string. +# +# @private +# +# source://tzinfo//lib/tzinfo/string_deduper.rb#90 +class TZInfo::UnaryMinusGlobalStringDeduper + # @param string [String] the string to deduplicate. + # @return [bool] `string` if it is frozen, otherwise a frozen, possibly + # pre-existing copy of `string`. + # + # source://tzinfo//lib/tzinfo/string_deduper.rb#94 + def dedupe(string); end +end + +# {UnknownTimezone} is raised when calling methods on an instance of +# {Timezone} that was created directly. To obtain {Timezone} instances the +# {Timezone.get} method should be used instead. +# +# source://tzinfo//lib/tzinfo/timezone.rb#32 +class TZInfo::UnknownTimezone < ::StandardError; end + +# The TZInfo version number. +# +# source://tzinfo//lib/tzinfo/version.rb#6 +TZInfo::VERSION = T.let(T.unsafe(nil), String) + +# The {WithOffset} module is included in {TimeWithOffset}, +# {DateTimeWithOffset} and {TimestampWithOffset}. It provides an override for +# the {strftime} method that handles expanding the `%Z` directive according to +# the {TimezoneOffset#abbreviation abbreviation} of the {TimezoneOffset} +# associated with a local time. +# +# source://tzinfo//lib/tzinfo/with_offset.rb#10 +module TZInfo::WithOffset + # Overrides the `Time`, `DateTime` or {Timestamp} version of `strftime`, + # replacing `%Z` with the {TimezoneOffset#abbreviation abbreviation} of the + # associated {TimezoneOffset}. If there is no associated offset, `%Z` is + # expanded by the base class instead. + # + # All the format directives handled by the base class are supported. + # + # @param format [String] the format string. + # @raise [ArgumentError] if `format` is `nil`. + # @return [String] the formatted time. + # + # source://tzinfo//lib/tzinfo/with_offset.rb#21 + def strftime(format); end + + protected + + # Performs a calculation if there is an associated {TimezoneOffset}. + # + # @param result [Object] a result value that can be manipulated by the block + # if there is an associated {TimezoneOffset}. + # @private + # @return [Object] the result of the block if there is an associated + # {TimezoneOffset}, otherwise the `result` parameter. + # @yield [period, result] if there is an associated {TimezoneOffset}, the + # block is yielded to in order to calculate the method result. + # @yieldparam period [TimezoneOffset] the associated {TimezoneOffset}. + # @yieldparam result [Object] the `result` parameter. + # @yieldreturn [Object] the result of the calculation performed if there is + # an associated {TimezoneOffset}. + # + # source://tzinfo//lib/tzinfo/with_offset.rb#56 + def if_timezone_offset(result = T.unsafe(nil)); end +end diff --git a/sorbet/rbi/shims/money/distributed/fetcher/base.rbi b/sorbet/rbi/shims/money/distributed/fetcher/base.rbi new file mode 100644 index 0000000..ebd7bc9 --- /dev/null +++ b/sorbet/rbi/shims/money/distributed/fetcher/base.rbi @@ -0,0 +1,5 @@ +# typed: true + +module Money::Distributed::Fetcher::Base + include Kernel +end diff --git a/spec/fetcher/file_spec.rb b/spec/money/distributed/fetcher/file_spec.rb similarity index 90% rename from spec/fetcher/file_spec.rb rename to spec/money/distributed/fetcher/file_spec.rb index 31d452c..9c1016b 100644 --- a/spec/fetcher/file_spec.rb +++ b/spec/money/distributed/fetcher/file_spec.rb @@ -1,13 +1,14 @@ +# typed: false # frozen_string_literal: true require 'spec_helper' describe Money::Distributed::Fetcher::File do - let(:file_path) { File.expand_path('../fixtures/rates.txt', __dir__) } - let(:bank) { double(add_rate: true) } - subject { described_class.new(file_path, bank) } + let(:file_path) { File.expand_path('../../../fixtures/rates.txt', __dir__) } + let(:bank) { double(add_rate: true) } + it 'fetches rates from the file' do subject.fetch diff --git a/spec/redis_spec.rb b/spec/money/distributed/redis_spec.rb similarity index 98% rename from spec/redis_spec.rb rename to spec/money/distributed/redis_spec.rb index 20a2f2b..d08f4da 100644 --- a/spec/redis_spec.rb +++ b/spec/money/distributed/redis_spec.rb @@ -1,3 +1,4 @@ +# typed: false # frozen_string_literal: true require 'spec_helper' diff --git a/spec/storage_spec.rb b/spec/money/distributed/storage_spec.rb similarity index 98% rename from spec/storage_spec.rb rename to spec/money/distributed/storage_spec.rb index e1a28bb..299b808 100644 --- a/spec/storage_spec.rb +++ b/spec/money/distributed/storage_spec.rb @@ -1,13 +1,14 @@ +# typed: false # frozen_string_literal: true require 'spec_helper' describe Money::Distributed::Storage do + subject { described_class.new(redis, ttl) } + let(:redis) { Redis.new } let(:ttl) { 3600 } - subject { described_class.new(redis, ttl) } - it 'stores rates in redis' do subject.add_rate 'USD', 'RUB', 60.123 expect(redis.hget(described_class::REDIS_KEY, 'USD_TO_RUB')).to eq '60.123' diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 9237808..c8d4c5f 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,8 +1,9 @@ +# typed: false # frozen_string_literal: true require 'rspec' require 'timecop' -require 'money-distributed' +require 'money_distributed' RSpec.configure do |c| c.order = :random From ac1facd3abb0131bd05846fa0d6962e0f9036891 Mon Sep 17 00:00:00 2001 From: Lud <lud@reinmiedl.com> Date: Mon, 17 Jul 2023 18:38:33 +0200 Subject: [PATCH 5/6] invalidate github ci cache --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 72e0c2f..ce96edc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,7 +31,7 @@ jobs: - uses: actions/cache@v3 with: path: vendor/bundle - key: ${{ runner.os }}-${{ matrix.ruby }}-${{ matrix.redis-version }}-gems-${{ hashFiles('**/Gemfile.lock') }} + key: ${{ runner.os }}-${{ matrix.ruby }}-${{ matrix.redis-version }}-gems-${{ hashFiles('**/Gemfile.lock') }}-v2 restore-keys: | ${{ runner.os }}-gems- @@ -60,7 +60,7 @@ jobs: - uses: actions/cache@v3 with: path: vendor/bundle - key: ${{ runner.os }}-3.2-gems-${{ hashFiles('**/Gemfile.lock') }} + key: ${{ runner.os }}-3.2-gems-${{ hashFiles('**/Gemfile.lock') }}-v2 restore-keys: | ${{ runner.os }}-gems- @@ -71,4 +71,4 @@ jobs: bundle install -j $(getconf _NPROCESSORS_ONLN) --retry 3 - name: Run Rubocop - run: bundle exec rubocop --ignore-unrecognized-cops + run: bundle exec rubocop --parallel From da50a983475fe02af4a24e63946c95836781baca Mon Sep 17 00:00:00 2001 From: Lud <lud@reinmiedl.com> Date: Mon, 17 Jul 2023 18:41:16 +0200 Subject: [PATCH 6/6] ignore vendor rubocop gems --- .rubocop.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.rubocop.yml b/.rubocop.yml index b6e67f8..9df849f 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -9,6 +9,7 @@ AllCops: Exclude: - 'sorbet/**/*' - 'bin/*' + - 'vendor/**/*' Layout/LineLength: Max: 120