` element with the given class.
-#
-# source://haml//lib/haml/parser.rb#18
-Haml::Parser::DIV_CLASS = T.let(T.unsafe(nil), String)
-
-# Designates a `
` element with the given id.
-#
-# source://haml//lib/haml/parser.rb#21
-Haml::Parser::DIV_ID = T.let(T.unsafe(nil), String)
-
-# Designates an XHTML doctype or script that is never HTML-escaped.
-#
-# source://haml//lib/haml/parser.rb#27
-Haml::Parser::DOCTYPE = T.let(T.unsafe(nil), String)
-
-# The Regex that matches a Doctype command.
-#
-# source://haml//lib/haml/parser.rb#88
-Haml::Parser::DOCTYPE_REGEX = T.let(T.unsafe(nil), Regexp)
-
-# @param new [String] - Hash literal including dynamic values.
-# @param old [String] - Hash literal including dynamic values or Ruby literal of multiple Hashes which MUST be interpreted as method's last arguments.
-#
-# source://haml//lib/haml/parser.rb#236
-class Haml::Parser::DynamicAttributes < ::Struct
- # Returns the value of attribute new
- #
- # @return [Object] the current value of new
- def new; end
-
- # Sets the attribute new
- #
- # @param value [Object] the value to set the attribute new to.
- # @return [Object] the newly set value
- def new=(_); end
-
- # Returns the value of attribute old
- #
- # @return [Object] the current value of old
- def old; end
-
- # Sets the attribute old
- #
- # @param value [Object] the value to set the attribute old to.
- # @return [Object] the newly set value
- #
- # source://haml//lib/haml/parser.rb#238
- def old=(value); end
-
- # This will be a literal for Haml::HamlBuffer#attributes's last argument, `attributes_hashes`.
- #
- # source://haml//lib/haml/parser.rb#246
- def to_literal; end
-
- private
-
- # For `%foo{ { foo: 1 }, bar: 2 }`, :old is "{ { foo: 1 }, bar: 2 }" and this method returns " { foo: 1 }, bar: 2 " for last argument.
- #
- # source://haml//lib/haml/parser.rb#253
- def stripped_old; end
-
- class << self
- def [](*_arg0); end
- def inspect; end
- def keyword_init?; end
- def members; end
- def new(*_arg0); end
- end
-end
-
-# Designates an XHTML/XML element.
-#
-# source://haml//lib/haml/parser.rb#15
-Haml::Parser::ELEMENT = T.let(T.unsafe(nil), String)
-
-# Designates a non-parsed line.
-#
-# source://haml//lib/haml/parser.rb#45
-Haml::Parser::ESCAPE = T.let(T.unsafe(nil), String)
-
-# Designates a block of filtered text.
-#
-# source://haml//lib/haml/parser.rb#48
-Haml::Parser::FILTER = T.let(T.unsafe(nil), String)
-
-# Designates script, the result of which is flattened and output.
-#
-# source://haml//lib/haml/parser.rb#36
-Haml::Parser::FLAT_SCRIPT = T.let(T.unsafe(nil), String)
-
-# source://haml//lib/haml/parser.rb#93
-Haml::Parser::ID_KEY = T.let(T.unsafe(nil), String)
-
-# The Regex that matches a literal string or symbol value
-#
-# source://haml//lib/haml/parser.rb#91
-Haml::Parser::LITERAL_VALUE_REGEX = T.let(T.unsafe(nil), Regexp)
-
-# @private
-#
-# source://haml//lib/haml/parser.rb#207
-class Haml::Parser::Line < ::Struct
- # Returns the value of attribute eod
- #
- # @return [Object] the current value of eod
- def eod; end
-
- # Sets the attribute eod
- #
- # @param value [Object] the value to set the attribute eod to.
- # @return [Object] the newly set value
- def eod=(_); end
-
- # Returns the value of attribute eod
- #
- # @return [Object] the current value of eod
- def eod?; end
-
- # Returns the value of attribute full
- #
- # @return [Object] the current value of full
- def full; end
-
- # Sets the attribute full
- #
- # @param value [Object] the value to set the attribute full to.
- # @return [Object] the newly set value
- def full=(_); end
-
- # Returns the value of attribute index
- #
- # @return [Object] the current value of index
- def index; end
-
- # Sets the attribute index
- #
- # @param value [Object] the value to set the attribute index to.
- # @return [Object] the newly set value
- def index=(_); end
-
- # Returns the value of attribute parser
- #
- # @return [Object] the current value of parser
- def parser; end
-
- # Sets the attribute parser
- #
- # @param value [Object] the value to set the attribute parser to.
- # @return [Object] the newly set value
- def parser=(_); end
-
- # source://haml//lib/haml/parser.rb#215
- def strip!(from); end
-
- # @private
- #
- # source://haml//lib/haml/parser.rb#211
- def tabs; end
-
- # Returns the value of attribute text
- #
- # @return [Object] the current value of text
- def text; end
-
- # Sets the attribute text
- #
- # @param value [Object] the value to set the attribute text to.
- # @return [Object] the newly set value
- def text=(_); end
-
- # Returns the value of attribute whitespace
- #
- # @return [Object] the current value of whitespace
- def whitespace; end
-
- # Sets the attribute whitespace
- #
- # @param value [Object] the value to set the attribute whitespace to.
- # @return [Object] the newly set value
- def whitespace=(_); end
-
- class << self
- def [](*_arg0); end
- def inspect; end
- def keyword_init?; end
- def members; end
- def new(*_arg0); end
- end
-end
-
-# Used for scanning old attributes, substituting the first '{'
-#
-# source://haml//lib/haml/parser.rb#97
-Haml::Parser::METHOD_CALL_PREFIX = T.let(T.unsafe(nil), String)
-
-# source://haml//lib/haml/parser.rb#81
-Haml::Parser::MID_BLOCK_KEYWORDS = T.let(T.unsafe(nil), Array)
-
-# The value of the character that designates that a line is part
-# of a multiline string.
-#
-# source://haml//lib/haml/parser.rb#71
-Haml::Parser::MULTILINE_CHAR_VALUE = T.let(T.unsafe(nil), String)
-
-# Designates a non-parsed line. Not actually a character.
-#
-# source://haml//lib/haml/parser.rb#51
-Haml::Parser::PLAIN_TEXT = T.let(T.unsafe(nil), Integer)
-
-# @private
-#
-# source://haml//lib/haml/parser.rb#223
-class Haml::Parser::ParseNode < ::Struct
- # @return [ParseNode] a new instance of ParseNode
- #
- # source://haml//lib/haml/parser.rb#224
- def initialize(*args); end
-
- # source://syntax_tree-haml/3.0.0/lib/syntax_tree/haml.rb#60
- def accept(visitor); end
-
- # Returns the value of attribute children
- #
- # @return [Object] the current value of children
- def children; end
-
- # Sets the attribute children
- #
- # @param value [Object] the value to set the attribute children to.
- # @return [Object] the newly set value
- def children=(_); end
-
- # source://syntax_tree-haml/3.0.0/lib/syntax_tree/haml.rb#85
- def format(q); end
-
- # source://haml//lib/haml/parser.rb#229
- def inspect; end
-
- # Returns the value of attribute line
- #
- # @return [Object] the current value of line
- def line; end
-
- # Sets the attribute line
- #
- # @param value [Object] the value to set the attribute line to.
- # @return [Object] the newly set value
- def line=(_); end
-
- # Returns the value of attribute parent
- #
- # @return [Object] the current value of parent
- def parent; end
-
- # Sets the attribute parent
- #
- # @param value [Object] the value to set the attribute parent to.
- # @return [Object] the newly set value
- def parent=(_); end
-
- # source://syntax_tree-haml/3.0.0/lib/syntax_tree/haml.rb#89
- def pretty_print(q); end
-
- # Returns the value of attribute type
- #
- # @return [Object] the current value of type
- def type; end
-
- # Sets the attribute type
- #
- # @param value [Object] the value to set the attribute type to.
- # @return [Object] the newly set value
- def type=(_); end
-
- # Returns the value of attribute value
- #
- # @return [Object] the current value of value
- def value; end
-
- # Sets the attribute value
- #
- # @param value [Object] the value to set the attribute value to.
- # @return [Object] the newly set value
- def value=(_); end
-
- class << self
- def [](*_arg0); end
- def inspect; end
- def keyword_init?; end
- def members; end
- def new(*_arg0); end
- end
-end
-
-# source://haml//lib/haml/parser.rb#952
-class Haml::Parser::ParserOptions
- # @return [ParserOptions] a new instance of ParserOptions
- #
- # source://haml//lib/haml/parser.rb#980
- def initialize(values = T.unsafe(nil)); end
-
- # source://haml//lib/haml/parser.rb#964
- def autoclose; end
-
- # source://haml//lib/haml/parser.rb#964
- def escape_html; end
-
- # source://haml//lib/haml/parser.rb#964
- def filename; end
-
- # source://haml//lib/haml/parser.rb#964
- def line; end
-
- # source://haml//lib/haml/parser.rb#964
- def mime_type; end
-
- # source://haml//lib/haml/parser.rb#964
- def preserve; end
-
- # source://haml//lib/haml/parser.rb#964
- def remove_whitespace; end
-
- # source://haml//lib/haml/parser.rb#964
- def suppress_eval; end
-end
-
-# A list of options that are actually used in the parser
-#
-# source://haml//lib/haml/parser.rb#954
-Haml::Parser::ParserOptions::AVAILABLE_OPTIONS = T.let(T.unsafe(nil), Array)
-
-# source://haml//lib/haml/parser.rb#967
-Haml::Parser::ParserOptions::DEFAULTS = T.let(T.unsafe(nil), Hash)
-
-# Designates script that is always HTML-escaped.
-#
-# source://haml//lib/haml/parser.rb#33
-Haml::Parser::SANITIZE = T.let(T.unsafe(nil), String)
-
-# Designates script, the result of which is output.
-#
-# source://haml//lib/haml/parser.rb#30
-Haml::Parser::SCRIPT = T.let(T.unsafe(nil), String)
-
-# When following SILENT_SCRIPT, designates a comment that is not output.
-#
-# source://haml//lib/haml/parser.rb#42
-Haml::Parser::SILENT_COMMENT = T.let(T.unsafe(nil), String)
-
-# Designates script which is run but not output.
-#
-# source://haml//lib/haml/parser.rb#39
-Haml::Parser::SILENT_SCRIPT = T.let(T.unsafe(nil), String)
-
-# Keeps track of the ASCII values of the characters that begin a
-# specially-interpreted line.
-#
-# source://haml//lib/haml/parser.rb#55
-Haml::Parser::SPECIAL_CHARACTERS = T.let(T.unsafe(nil), Array)
-
-# source://haml//lib/haml/parser.rb#82
-Haml::Parser::START_BLOCK_KEYWORDS = T.let(T.unsafe(nil), Array)
-
-# Try to parse assignments to block starters as best as possible
-#
-# source://haml//lib/haml/parser.rb#84
-Haml::Parser::START_BLOCK_KEYWORD_REGEX = T.let(T.unsafe(nil), Regexp)
-
-# source://haml//lib/haml/ruby_expression.rb#5
-class Haml::RubyExpression < ::Ripper
- private
-
- # @raise [ParseError]
- #
- # source://haml//lib/haml/ruby_expression.rb#28
- def on_parse_error(*_arg0); end
-
- class << self
- # @return [Boolean]
- #
- # source://haml//lib/haml/ruby_expression.rb#15
- def string_literal?(code); end
-
- # @return [Boolean]
- #
- # source://haml//lib/haml/ruby_expression.rb#8
- def syntax_error?(code); end
- end
-end
-
-# source://haml//lib/haml/ruby_expression.rb#6
-class Haml::RubyExpression::ParseError < ::StandardError; end
-
-# Compile [:dynamic, "foo#{bar}"] to [:multi, [:static, 'foo'], [:dynamic, 'bar']]
-#
-# source://haml//lib/haml/string_splitter.rb#9
-class Haml::StringSplitter < ::Temple::Filter
- # source://haml//lib/haml/string_splitter.rb#88
- def on_dynamic(code); end
-
- private
-
- # @return [Boolean]
- #
- # source://haml//lib/haml/string_splitter.rb#106
- def string_literal?(code); end
-
- class << self
- # `code` param must be valid string literal
- #
- # source://haml//lib/haml/string_splitter.rb#13
- def compile(code); end
-
- private
-
- # source://haml//lib/haml/string_splitter.rb#41
- def compile_tokens!(exps, tokens); end
-
- # Some quotes are split-unsafe. Replace such quotes with null characters.
- #
- # source://haml//lib/haml/string_splitter.rb#59
- def escape_quotes(beg_str, end_str); end
-
- # source://haml//lib/haml/string_splitter.rb#68
- def shift_balanced_embexpr(tokens); end
-
- # source://haml//lib/haml/string_splitter.rb#27
- def strip_quotes!(tokens); end
- end
-end
-
-# source://haml//lib/haml/string_splitter.rb#117
-class Haml::StringSplitter::SyntaxChecker < ::Ripper
- private
-
- # @raise [ParseError]
- #
- # source://haml//lib/haml/string_splitter.rb#129
- def on_parse_error(*_arg0); end
-
- class << self
- # @return [Boolean]
- #
- # source://haml//lib/haml/string_splitter.rb#120
- def syntax_error?(code); end
- end
-end
-
-# source://haml//lib/haml/string_splitter.rb#118
-class Haml::StringSplitter::SyntaxChecker::ParseError < ::StandardError; end
-
-# SyntaxError is the type of exception raised when Haml encounters an
-# ill-formatted document.
-# It's not particularly interesting,
-# except in that it's a subclass of {Haml::Error}.
-#
-# source://haml//lib/haml/error.rb#59
-class Haml::SyntaxError < ::Haml::Error; end
-
-# source://haml//lib/haml/template.rb#0
-class Haml::Template < ::Temple::Templates::Tilt
- extend ::Haml::TemplateExtension
-end
-
-# source://haml//lib/haml/template.rb#12
-module Haml::TemplateExtension
- # Activate Haml::Helpers for tilt templates.
- # https://github.com/judofyr/temple/blob/v0.7.6/lib/temple/mixins/template.rb#L7-L11
- #
- # source://haml//lib/haml/template.rb#15
- def compile(*_arg0); end
-end
-
-# For backward compatibility of Tilt integration. TODO: We should deprecate this
-# and let Tilt have a native support of Haml 6. At least it generates warnings now.
-#
-# source://haml//lib/haml/engine.rb#50
-class Haml::TempleEngine < ::Haml::Engine
- # source://haml//lib/haml/engine.rb#51
- def compile(template); end
-
- # source://haml//lib/haml/engine.rb#55
- def precompiled_with_ambles(_local_names, after_preamble:); end
-end
-
-# A module to count lines of expected code. This would be faster than actual code generation
-# and counting newlines in it.
-#
-# source://haml//lib/haml/temple_line_counter.rb#5
-module Haml::TempleLineCounter
- class << self
- # source://haml//lib/haml/temple_line_counter.rb#8
- def count_lines(exp); end
- end
-end
-
-# source://haml//lib/haml/temple_line_counter.rb#6
-class Haml::TempleLineCounter::UnexpectedExpression < ::StandardError; end
-
-# A module containing various useful functions.
-#
-# source://haml//lib/haml/util.rb#14
-module Haml::Util
- extend ::Haml::Util
-
- # Moves a scanner through a balanced pair of characters.
- # For example:
- #
- # Foo (Bar (Baz bang) bop) (Bang (bop bip))
- # ^ ^
- # from to
- #
- # @param scanner [StringScanner] The string scanner to move
- # @param start [String] The character opening the balanced pair.
- # @param finish [String] The character closing the balanced pair.
- # @param count [Fixnum] The number of opening characters matched
- # before calling this method
- # @return [(String, String)] The string matched within the balanced pair
- # and the rest of the string.
- # `["Foo (Bar (Baz bang) bop)", " (Bang (bop bip))"]` in the example above.
- #
- # source://haml//lib/haml/util.rb#171
- def balance(scanner, start, finish, count = T.unsafe(nil)); end
-
- # Checks that the encoding of a string is valid
- # and cleans up potential encoding gotchas like the UTF-8 BOM.
- # If it's not, yields an error string describing the invalid character
- # and the line on which it occurs.
- #
- # @param str [String] The string of which to check the encoding
- # @return [String] `str`, potentially with encoding gotchas like BOMs removed
- # @yield [msg] A block in which an encoding error can be raised.
- # Only yields if there is an encoding error
- # @yieldparam msg [String] The error message to be raised
- #
- # source://haml//lib/haml/util.rb#65
- def check_encoding(str); end
-
- # Like {\#check\_encoding}, but also checks for a Ruby-style `-# coding:` comment
- # at the beginning of the template and uses that encoding if it exists.
- #
- # The Haml encoding rules are simple.
- # If a `-# coding:` comment exists,
- # we assume that that's the original encoding of the document.
- # Otherwise, we use whatever encoding Ruby has.
- #
- # Haml uses the same rules for parsing coding comments as Ruby.
- # This means that it can understand Emacs-style comments
- # and also that it cannot understand non-ASCII-compatible encodings
- # such as `UTF-16` and `UTF-32`.
- #
- # @param str [String] The Haml template of which to check the encoding
- # @raise [ArgumentError] if the document declares an unknown encoding
- # @return [String] The original string encoded properly
- # @yield [msg] A block in which an encoding error can be raised.
- # Only yields if there is an encoding error
- # @yieldparam msg [String] The error message to be raised
- #
- # source://haml//lib/haml/util.rb#112
- def check_haml_encoding(str, &block); end
-
- # @return [Boolean]
- #
- # source://haml//lib/haml/util.rb#200
- def contains_interpolation?(str); end
-
- # Scans through a string looking for the interoplation-opening `#{`
- # and, when it's found, yields the scanner to the calling code
- # so it can handle it properly.
- #
- # The scanner will have any backslashes immediately in front of the `#{`
- # as the second capture group (`scan[2]`),
- # and the text prior to that as the first (`scan[1]`).
- #
- # @return [String] The text remaining in the scanner after all `#{`s have been processed
- # @yieldparam scan [StringScanner] The scanner scanning through the string
- #
- # source://haml//lib/haml/util.rb#150
- def handle_interpolation(str); end
-
- # Formats a string for use in error messages about indentation.
- #
- # @param indentation [String] The string used for indentation
- # @return [String] The name of the indentation (e.g. `"12 spaces"`, `"1 tab"`)
- #
- # source://haml//lib/haml/util.rb#187
- def human_indentation(indentation); end
-
- # Like `Object#inspect`, but preserves non-ASCII characters rather than escaping them.
- # This is necessary so that the precompiled Haml template can be `#encode`d into `@options[:encoding]`
- # before being evaluated.
- #
- # @param obj [Object]
- # @return [String]
- #
- # source://haml//lib/haml/util.rb#129
- def inspect_obj(obj); end
-
- # Whether or not ActionView's XSS protection is available and enabled,
- # as is the default for Rails 3.0+, and optional for version 2.3.5+.
- # Overridden in haml/template.rb if this is the case.
- #
- # @return [Boolean]
- #
- # source://haml//lib/haml/util.rb#51
- def rails_xss_safe?; end
-
- # Silence all output to STDERR within a block.
- #
- # @yield A block in which no output will be printed to STDERR
- #
- # source://haml//lib/haml/util.rb#37
- def silence_warnings; end
-
- # source://haml//lib/haml/util.rb#204
- def unescape_interpolation(str, escape_html = T.unsafe(nil)); end
-
- private
-
- # Parses a magic comment at the beginning of a Haml file.
- # The parsing rules are basically the same as Ruby's.
- #
- # @return [(Boolean, String or nil)] Whether the document begins with a UTF-8 BOM,
- # and the declared encoding of the document (or nil if none is declared)
- #
- # source://haml//lib/haml/util.rb#236
- def parse_haml_magic_comment(str); end
-
- # source://haml//lib/haml/util.rb#248
- def try_parse_haml_emacs_magic_comment(scanner); end
-
- class << self
- def escape_html(_arg0); end
-
- # TODO: Remove unescape_interpolation's workaround and get rid of `respond_to?`.
- #
- # source://haml//lib/haml/util.rb#29
- def escape_html_safe(html); end
- end
-end
-
-# source://haml//lib/haml/version.rb#3
-Haml::VERSION = T.let(T.unsafe(nil), String)
-
-# source://haml//lib/haml/whitespace.rb#3
-class Haml::Whitespace < ::Temple::Filter
- # source://haml//lib/haml/whitespace.rb#4
- def on_whitespace; end
-end
-
-class Temple::Filter
- include ::Temple::Mixins::CompiledDispatcher
- include ::Temple::Mixins::CoreDispatcher
- include ::Temple::Mixins::EscapeDispatcher
- include ::Temple::Mixins::ControlFlowDispatcher
- include ::Haml::EscapeanyDispathcer
- include ::Haml::FescapeDispathcer
-end
diff --git a/sorbet/rbi/gems/image_size@3.2.0.rbi b/sorbet/rbi/gems/image_size@3.2.0.rbi
deleted file mode 100644
index 6d5775e1..00000000
--- a/sorbet/rbi/gems/image_size@3.2.0.rbi
+++ /dev/null
@@ -1,287 +0,0 @@
-# typed: true
-
-# DO NOT EDIT MANUALLY
-# This is an autogenerated file for types exported from the `image_size` gem.
-# Please instead update this file by running `bin/tapioca gem image_size`.
-
-# Determine image format and size
-#
-# source://image_size//lib/image_size/reader.rb#6
-class ImageSize
- # Given image as any class responding to read and eof? or data as String, finds its format and dimensions
- #
- # @return [ImageSize] a new instance of ImageSize
- #
- # source://image_size//lib/image_size.rb#49
- def initialize(data); end
-
- # Image format
- #
- # source://image_size//lib/image_size.rb#57
- def format; end
-
- # Image height
- #
- # source://image_size//lib/image_size.rb#64
- def h; end
-
- # Image height
- #
- # source://image_size//lib/image_size.rb#64
- def height; end
-
- # get image width and height as an array which to_s method returns "#{width}x#{height}"
- #
- # source://image_size//lib/image_size.rb#68
- def size; end
-
- # Image width
- #
- # source://image_size//lib/image_size.rb#60
- def w; end
-
- # Image width
- #
- # source://image_size//lib/image_size.rb#60
- def width; end
-
- private
-
- # source://image_size//lib/image_size.rb#76
- def detect_format(ir); end
-
- # source://image_size//lib/image_size.rb#124
- def detect_jpeg2000_type(ir); end
-
- # source://image_size//lib/image_size.rb#102
- def detect_png_type(ir); end
-
- # source://image_size//lib/image_size.rb#115
- def detect_pnm_type(ir); end
-
- # source://image_size//lib/image_size.rb#147
- def size_of_apng(ir); end
-
- # source://image_size//lib/image_size.rb#181
- def size_of_bmp(ir); end
-
- # source://image_size//lib/image_size.rb#321
- def size_of_cur(ir); end
-
- # source://image_size//lib/image_size.rb#382
- def size_of_emf(ir); end
-
- # source://image_size//lib/image_size.rb#135
- def size_of_gif(ir); end
-
- # source://image_size//lib/image_size.rb#321
- def size_of_ico(ir); end
-
- # source://image_size//lib/image_size.rb#375
- def size_of_j2c(ir); end
-
- # source://image_size//lib/image_size.rb#339
- def size_of_jp2(ir); end
-
- # source://image_size//lib/image_size.rb#162
- def size_of_jpeg(ir); end
-
- # source://image_size//lib/image_size.rb#339
- def size_of_jpx(ir); end
-
- # source://image_size//lib/image_size.rb#139
- def size_of_mng(ir); end
-
- # source://image_size//lib/image_size.rb#205
- def size_of_pam(ir); end
-
- # source://image_size//lib/image_size.rb#196
- def size_of_pbm(ir); end
-
- # source://image_size//lib/image_size.rb#284
- def size_of_pcx(ir); end
-
- # source://image_size//lib/image_size.rb#196
- def size_of_pgm(ir); end
-
- # source://image_size//lib/image_size.rb#147
- def size_of_png(ir); end
-
- # source://image_size//lib/image_size.rb#196
- def size_of_ppm(ir); end
-
- # source://image_size//lib/image_size.rb#249
- def size_of_psd(ir); end
-
- # source://image_size//lib/image_size.rb#298
- def size_of_svg(ir); end
-
- # source://image_size//lib/image_size.rb#289
- def size_of_swf(ir); end
-
- # source://image_size//lib/image_size.rb#253
- def size_of_tiff(ir); end
-
- # source://image_size//lib/image_size.rb#326
- def size_of_webp(ir); end
-
- # source://image_size//lib/image_size.rb#232
- def size_of_xbm(ir); end
-
- # source://image_size//lib/image_size.rb#237
- def size_of_xpm(ir); end
-
- class << self
- # Used for svg
- #
- # source://image_size//lib/image_size.rb#39
- def dpi; end
-
- # Used for svg
- #
- # source://image_size//lib/image_size.rb#44
- def dpi=(dpi); end
-
- # Given path to image finds its format, width and height
- #
- # source://image_size//lib/image_size.rb#34
- def path(path); end
- end
-end
-
-# source://image_size//lib/image_size/chunky_reader.rb#6
-module ImageSize::ChunkyReader
- include ::ImageSize::Reader
-
- # Including class should define method chunk that accepts the chunk number
- # and returns a string of chunk_size length or shorter for last chunk, or
- # nil for further chunks.
- # Determines required chunks, takes parts of them to construct desired
- # substring, behaves same as str[start, length] except start can't be
- # negative.
- #
- # @raise [ArgumentError]
- #
- # source://image_size//lib/image_size/chunky_reader.rb#20
- def [](offset, length); end
-
- # Size of a chunk in which to read
- #
- # source://image_size//lib/image_size/chunky_reader.rb#10
- def chunk_size; end
-end
-
-# source://image_size//lib/image_size.rb#380
-ImageSize::EMF_SMAX = T.let(T.unsafe(nil), Integer)
-
-# source://image_size//lib/image_size.rb#379
-ImageSize::EMF_UMAX = T.let(T.unsafe(nil), Integer)
-
-# source://image_size//lib/image_size.rb#11
-class ImageSize::FormatError < ::StandardError; end
-
-# source://image_size//lib/image_size.rb#156
-ImageSize::JPEG_CODE_CHECK = T.let(T.unsafe(nil), Array)
-
-# source://image_size//lib/image_size/reader.rb#7
-module ImageSize::Reader
- # source://image_size//lib/image_size/reader.rb#40
- def fetch(offset, length); end
-
- # source://image_size//lib/image_size/reader.rb#50
- def unpack(offset, length, format); end
-
- # source://image_size//lib/image_size/reader.rb#55
- def unpack1(offset, length, format); end
-
- class << self
- # source://image_size//lib/image_size/reader.rb#9
- def open(input); end
-
- private
-
- # source://image_size//lib/image_size/reader.rb#26
- def for_io(io); end
- end
-end
-
-# source://image_size//lib/image_size.rb#74
-ImageSize::SVG_R = T.let(T.unsafe(nil), Regexp)
-
-# source://image_size//lib/image_size/seekable_io_reader.rb#6
-class ImageSize::SeekableIOReader
- include ::ImageSize::Reader
- include ::ImageSize::ChunkyReader
-
- # @return [SeekableIOReader] a new instance of SeekableIOReader
- #
- # source://image_size//lib/image_size/seekable_io_reader.rb#9
- def initialize(io); end
-
- private
-
- # source://image_size//lib/image_size/seekable_io_reader.rb#17
- def chunk(i); end
-end
-
-# Array joining with 'x'
-#
-# source://image_size//lib/image_size.rb#14
-class ImageSize::Size < ::Array
- # get second element
- #
- # source://image_size//lib/image_size.rb#27
- def h; end
-
- # get second element
- #
- # source://image_size//lib/image_size.rb#27
- def height; end
-
- # join using 'x'
- #
- # source://image_size//lib/image_size.rb#16
- def to_s; end
-
- # get first element
- #
- # source://image_size//lib/image_size.rb#21
- def w; end
-
- # get first element
- #
- # source://image_size//lib/image_size.rb#21
- def width; end
-end
-
-# source://image_size//lib/image_size/stream_io_reader.rb#6
-class ImageSize::StreamIOReader
- include ::ImageSize::Reader
- include ::ImageSize::ChunkyReader
-
- # @return [StreamIOReader] a new instance of StreamIOReader
- #
- # source://image_size//lib/image_size/stream_io_reader.rb#9
- def initialize(io); end
-
- private
-
- # source://image_size//lib/image_size/stream_io_reader.rb#16
- def chunk(i); end
-end
-
-# source://image_size//lib/image_size/string_reader.rb#6
-class ImageSize::StringReader
- include ::ImageSize::Reader
-
- # @return [StringReader] a new instance of StringReader
- #
- # source://image_size//lib/image_size/string_reader.rb#9
- def initialize(string); end
-
- # source://image_size//lib/image_size/string_reader.rb#17
- def [](offset, length); end
-end
-
-# source://image_size//lib/image_size.rb#75
-ImageSize::XML_R = T.let(T.unsafe(nil), Regexp)
diff --git a/sorbet/rbi/gems/io-event@1.2.2.rbi b/sorbet/rbi/gems/io-event@1.2.2.rbi
deleted file mode 100644
index 4bc29a27..00000000
--- a/sorbet/rbi/gems/io-event@1.2.2.rbi
+++ /dev/null
@@ -1,441 +0,0 @@
-# typed: true
-
-# DO NOT EDIT MANUALLY
-# This is an autogenerated file for types exported from the `io-event` gem.
-# Please instead update this file by running `bin/tapioca gem io-event`.
-
-# source://io-event//lib/io/event/version.rb#6
-class IO
- include ::Enumerable
- include ::File::Constants
-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
-
-# source://io-event//lib/io/event/version.rb#7
-module IO::Event; end
-
-# source://io-event//lib/io/event/debug/selector.rb#9
-module IO::Event::Debug; end
-
-# Enforces the selector interface and delegates operations to a wrapped selector instance.
-#
-# source://io-event//lib/io/event/debug/selector.rb#11
-class IO::Event::Debug::Selector
- # @return [Selector] a new instance of Selector
- #
- # source://io-event//lib/io/event/debug/selector.rb#12
- def initialize(selector); end
-
- # source://io-event//lib/io/event/debug/selector.rb#28
- def close; end
-
- # source://io-event//lib/io/event/debug/selector.rb#70
- def io_read(*_arg0, **_arg1, &_arg2); end
-
- # source://io-event//lib/io/event/debug/selector.rb#66
- def io_wait(fiber, io, events); end
-
- # source://io-event//lib/io/event/debug/selector.rb#74
- def io_write(*_arg0, **_arg1, &_arg2); end
-
- # source://io-event//lib/io/event/debug/selector.rb#62
- def process_wait(*arguments); end
-
- # source://io-event//lib/io/event/debug/selector.rb#50
- def push(fiber); end
-
- # source://io-event//lib/io/event/debug/selector.rb#54
- def raise(fiber, *arguments); end
-
- # @return [Boolean]
- #
- # source://io-event//lib/io/event/debug/selector.rb#58
- def ready?; end
-
- # @return [Boolean]
- #
- # source://io-event//lib/io/event/debug/selector.rb#78
- def respond_to?(name, include_private = T.unsafe(nil)); end
-
- # source://io-event//lib/io/event/debug/selector.rb#42
- def resume(*arguments); end
-
- # source://io-event//lib/io/event/debug/selector.rb#82
- def select(duration = T.unsafe(nil)); end
-
- # Transfer from the calling fiber to the event loop.
- #
- # source://io-event//lib/io/event/debug/selector.rb#38
- def transfer; end
-
- # source://io-event//lib/io/event/debug/selector.rb#24
- def wakeup; end
-
- # source://io-event//lib/io/event/debug/selector.rb#46
- def yield; end
-end
-
-# A thread safe synchronisation primative.
-#
-# source://io-event//lib/io/event/interrupt.rb#8
-class IO::Event::Interrupt
- # @return [Interrupt] a new instance of Interrupt
- #
- # source://io-event//lib/io/event/interrupt.rb#13
- def initialize(selector); end
-
- # source://io-event//lib/io/event/interrupt.rb#36
- def close; end
-
- # Send a sigle byte interrupt.
- #
- # source://io-event//lib/io/event/interrupt.rb#29
- def signal; end
-
- class << self
- # source://io-event//lib/io/event/interrupt.rb#9
- def attach(selector); end
- end
-end
-
-# source://io-event//lib/io/event/selector/select.rb#10
-module IO::Event::Selector
- class << self
- # source://io-event//lib/io/event/selector.rb#12
- def default(env = T.unsafe(nil)); end
-
- # source://io-event//lib/io/event/selector.rb#32
- def new(loop, env = T.unsafe(nil)); end
-
- def nonblock(_arg0); end
- end
-end
-
-class IO::Event::Selector::KQueue
- def initialize(_arg0); end
-
- def close; end
- def io_read(*_arg0); end
- def io_wait(_arg0, _arg1, _arg2); end
- def io_write(*_arg0); end
- def loop; end
- def process_wait(_arg0, _arg1, _arg2); end
- def push(_arg0); end
- def raise(*_arg0); end
- def ready?; end
- def resume(*_arg0); end
- def select(_arg0); end
- def transfer; end
- def wakeup; end
- def yield; end
-end
-
-# source://io-event//lib/io/event/selector/select.rb#11
-class IO::Event::Selector::Select
- # @return [Select] a new instance of Select
- #
- # source://io-event//lib/io/event/selector/select.rb#12
- def initialize(loop); end
-
- # @return [Boolean]
- #
- # source://io-event//lib/io/event/selector/select.rb#146
- def again?(errno); end
-
- # source://io-event//lib/io/event/selector/select.rb#36
- def close; end
-
- # source://io-event//lib/io/event/selector/select.rb#151
- def io_read(fiber, io, buffer, length, offset = T.unsafe(nil)); end
-
- # source://io-event//lib/io/event/selector/select.rb#137
- def io_select(readable, writable, priority, timeout); end
-
- # source://io-event//lib/io/event/selector/select.rb#129
- def io_wait(fiber, io, events); end
-
- # source://io-event//lib/io/event/selector/select.rb#178
- def io_write(fiber, io, buffer, length, offset = T.unsafe(nil)); end
-
- # Returns the value of attribute loop.
- #
- # source://io-event//lib/io/event/selector/select.rb#23
- def loop; end
-
- # source://io-event//lib/io/event/selector/select.rb#287
- def process_wait(fiber, pid, flags); end
-
- # Append the given fiber into the ready list.
- #
- # source://io-event//lib/io/event/selector/select.rb#83
- def push(fiber); end
-
- # Transfer to the given fiber and raise an exception. Put the current fiber into the ready list.
- #
- # source://io-event//lib/io/event/selector/select.rb#88
- def raise(fiber, *arguments); end
-
- # @return [Boolean]
- #
- # source://io-event//lib/io/event/selector/select.rb#97
- def ready?; end
-
- # Transfer from the current fiber to the specified fiber. Put the current fiber into the ready list.
- #
- # source://io-event//lib/io/event/selector/select.rb#63
- def resume(fiber, *arguments); end
-
- # source://io-event//lib/io/event/selector/select.rb#306
- def select(duration = T.unsafe(nil)); end
-
- # Transfer from the current fiber to the event loop.
- #
- # source://io-event//lib/io/event/selector/select.rb#58
- def transfer; end
-
- # If the event loop is currently sleeping, wake it up.
- #
- # source://io-event//lib/io/event/selector/select.rb#26
- def wakeup; end
-
- # Yield from the current fiber back to the event loop. Put the current fiber into the ready list.
- #
- # source://io-event//lib/io/event/selector/select.rb#73
- def yield; end
-
- private
-
- # source://io-event//lib/io/event/selector/select.rb#293
- def pop_ready; end
-end
-
-# source://io-event//lib/io/event/selector/select.rb#143
-IO::Event::Selector::Select::EAGAIN = T.let(T.unsafe(nil), Integer)
-
-# source://io-event//lib/io/event/selector/select.rb#144
-IO::Event::Selector::Select::EWOULDBLOCK = T.let(T.unsafe(nil), Integer)
-
-# source://io-event//lib/io/event/selector/select.rb#43
-class IO::Event::Selector::Select::Optional < ::Struct
- # @return [Boolean]
- #
- # source://io-event//lib/io/event/selector/select.rb#48
- def alive?; end
-
- # Returns the value of attribute fiber
- #
- # @return [Object] the current value of fiber
- def fiber; end
-
- # Sets the attribute fiber
- #
- # @param value [Object] the value to set the attribute fiber to.
- # @return [Object] the newly set value
- def fiber=(_); end
-
- # source://io-event//lib/io/event/selector/select.rb#52
- def nullify; end
-
- # source://io-event//lib/io/event/selector/select.rb#44
- def transfer(*arguments); end
-
- class << self
- def [](*_arg0); end
- def inspect; end
- def keyword_init?; end
- def members; end
- def new(*_arg0); end
- end
-end
-
-# source://io-event//lib/io/event/selector/select.rb#101
-class IO::Event::Selector::Select::Waiter < ::Struct
- # @return [Boolean]
- #
- # source://io-event//lib/io/event/selector/select.rb#102
- def alive?; end
-
- # source://io-event//lib/io/event/selector/select.rb#120
- def each(&block); end
-
- # Returns the value of attribute events
- #
- # @return [Object] the current value of events
- def events; end
-
- # Sets the attribute events
- #
- # @param value [Object] the value to set the attribute events to.
- # @return [Object] the newly set value
- def events=(_); end
-
- # Returns the value of attribute fiber
- #
- # @return [Object] the current value of fiber
- def fiber; end
-
- # Sets the attribute fiber
- #
- # @param value [Object] the value to set the attribute fiber to.
- # @return [Object] the newly set value
- def fiber=(_); end
-
- # source://io-event//lib/io/event/selector/select.rb#116
- def invalidate; end
-
- # Returns the value of attribute tail
- #
- # @return [Object] the current value of tail
- def tail; end
-
- # Sets the attribute tail
- #
- # @param value [Object] the value to set the attribute tail to.
- # @return [Object] the newly set value
- def tail=(_); end
-
- # source://io-event//lib/io/event/selector/select.rb#106
- def transfer(events); end
-
- class << self
- def [](*_arg0); end
- def inspect; end
- def keyword_init?; end
- def members; end
- def new(*_arg0); end
- end
-end
-
-# source://io-event//lib/io/event/support.rb#8
-module IO::Event::Support
- class << self
- # @return [Boolean]
- #
- # source://io-event//lib/io/event/support.rb#9
- def buffer?; end
-
- # @return [Boolean]
- #
- # source://io-event//lib/io/event/support.rb#13
- def fiber_scheduler_v1?; end
-
- # @return [Boolean]
- #
- # source://io-event//lib/io/event/support.rb#17
- def fiber_scheduler_v2?; end
- end
-end
-
-# source://io-event//lib/io/event/version.rb#8
-IO::Event::VERSION = T.let(T.unsafe(nil), String)
-
-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)
diff --git a/sorbet/rbi/gems/json@2.6.3.rbi b/sorbet/rbi/gems/json@2.6.3.rbi
deleted file mode 100644
index 259116aa..00000000
--- a/sorbet/rbi/gems/json@2.6.3.rbi
+++ /dev/null
@@ -1,1533 +0,0 @@
-# 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/kramdown@2.4.0.rbi b/sorbet/rbi/gems/kramdown@2.4.0.rbi
deleted file mode 100644
index 9b2edd52..00000000
--- a/sorbet/rbi/gems/kramdown@2.4.0.rbi
+++ /dev/null
@@ -1,3271 +0,0 @@
-# typed: true
-
-# DO NOT EDIT MANUALLY
-# This is an autogenerated file for types exported from the `kramdown` gem.
-# Please instead update this file by running `bin/tapioca gem kramdown`.
-
-# source://kramdown//lib/kramdown/version.rb#10
-module Kramdown
- class << self
- # Return the data directory for kramdown.
- #
- # source://kramdown//lib/kramdown/document.rb#49
- def data_dir; end
- end
-end
-
-# This module contains all available converters, i.e. classes that take a root Element and convert
-# it to a specific output format. The result is normally a string. For example, the
-# Converter::Html module converts an element tree into valid HTML.
-#
-# Converters use the Base class for common functionality (like applying a template to the output)
-# \- see its API documentation for how to create a custom converter class.
-#
-# source://kramdown//lib/kramdown/converter.rb#20
-module Kramdown::Converter
- extend ::Kramdown::Utils::Configurable
-
- class << self
- # source://kramdown//lib/kramdown/utils/configurable.rb#37
- def add_math_engine(data, *args, &block); end
-
- # source://kramdown//lib/kramdown/utils/configurable.rb#37
- def add_syntax_highlighter(data, *args, &block); end
-
- # source://kramdown//lib/kramdown/utils/configurable.rb#30
- def configurables; end
-
- # source://kramdown//lib/kramdown/utils/configurable.rb#34
- def math_engine(data); end
-
- # source://kramdown//lib/kramdown/utils/configurable.rb#34
- def syntax_highlighter(data); end
- end
-end
-
-# == \Base class for converters
-#
-# This class serves as base class for all converters. It provides methods that can/should be
-# used by all converters (like #generate_id) as well as common functionality that is
-# automatically applied to the result (for example, embedding the output into a template).
-#
-# A converter object is used as a throw-away object, i.e. it is only used for storing the needed
-# state information during conversion. Therefore one can't instantiate a converter object
-# directly but only use the Base::convert method.
-#
-# == Implementing a converter
-#
-# Implementing a new converter is rather easy: just derive a new class from this class and put
-# it in the Kramdown::Converter module (the latter is only needed if auto-detection should work
-# properly). Then you need to implement the #convert method which has to contain the conversion
-# code for converting an element and has to return the conversion result.
-#
-# The actual transformation of the document tree can be done in any way. However, writing one
-# method per element type is a straight forward way to do it - this is how the Html and Latex
-# converters do the transformation.
-#
-# Have a look at the Base::convert method for additional information!
-#
-# source://kramdown//lib/kramdown/converter/base.rb#40
-class Kramdown::Converter::Base
- # Initialize the converter with the given +root+ element and +options+ hash.
- #
- # @return [Base] a new instance of Base
- #
- # source://kramdown//lib/kramdown/converter/base.rb#55
- def initialize(root, options); end
-
- # Returns whether the template should be applied after the conversion of the tree.
- #
- # Defaults to true.
- #
- # @return [Boolean]
- #
- # source://kramdown//lib/kramdown/converter/base.rb#73
- def apply_template_after?; end
-
- # Returns whether the template should be applied before the conversion of the tree.
- #
- # Defaults to false.
- #
- # @return [Boolean]
- #
- # source://kramdown//lib/kramdown/converter/base.rb#66
- def apply_template_before?; end
-
- # The basic version of the ID generator, without any special provisions for empty or unique
- # IDs.
- #
- # source://kramdown//lib/kramdown/converter/base.rb#237
- def basic_generate_id(str); end
-
- # Convert the element +el+ and return the resulting object.
- #
- # This is the only method that has to be implemented by sub-classes!
- #
- # @raise [NotImplementedError]
- #
- # source://kramdown//lib/kramdown/converter/base.rb#122
- def convert(_el); end
-
- # Can be used by a converter for storing arbitrary information during the conversion process.
- #
- # source://kramdown//lib/kramdown/converter/base.rb#43
- def data; end
-
- # Extract the code block/span language from the attributes.
- #
- # source://kramdown//lib/kramdown/converter/base.rb#174
- def extract_code_language(attr); end
-
- # See #extract_code_language
- #
- # *Warning*: This version will modify the given attributes if a language is present.
- #
- # source://kramdown//lib/kramdown/converter/base.rb#183
- def extract_code_language!(attr); end
-
- # Format the given math element with the math engine configured through the option
- # 'math_engine'.
- #
- # source://kramdown//lib/kramdown/converter/base.rb#206
- def format_math(el, opts = T.unsafe(nil)); end
-
- # Generate an unique alpha-numeric ID from the the string +str+ for use as a header ID.
- #
- # Uses the option +auto_id_prefix+: the value of this option is prepended to every generated
- # ID.
- #
- # source://kramdown//lib/kramdown/converter/base.rb#222
- def generate_id(str); end
-
- # Highlight the given +text+ in the language +lang+ with the syntax highlighter configured
- # through the option 'syntax_highlighter'.
- #
- # source://kramdown//lib/kramdown/converter/base.rb#192
- def highlight_code(text, lang, type, opts = T.unsafe(nil)); end
-
- # Return +true+ if the header element +el+ should be used for the table of contents (as
- # specified by the +toc_levels+ option).
- #
- # @return [Boolean]
- #
- # source://kramdown//lib/kramdown/converter/base.rb#162
- def in_toc?(el); end
-
- # The hash with the conversion options.
- #
- # source://kramdown//lib/kramdown/converter/base.rb#46
- def options; end
-
- # Return the output header level given a level.
- #
- # Uses the +header_offset+ option for adjusting the header level.
- #
- # source://kramdown//lib/kramdown/converter/base.rb#169
- def output_header_level(level); end
-
- # The root element that is converted.
- #
- # source://kramdown//lib/kramdown/converter/base.rb#49
- def root; end
-
- # Return the entity that represents the given smart_quote element.
- #
- # source://kramdown//lib/kramdown/converter/base.rb#248
- def smart_quote_entity(el); end
-
- # Add the given warning +text+ to the warning array.
- #
- # source://kramdown//lib/kramdown/converter/base.rb#156
- def warning(text); end
-
- # The warnings array.
- #
- # source://kramdown//lib/kramdown/converter/base.rb#52
- def warnings; end
-
- class << self
- # Apply the +template+ using +body+ as the body string.
- #
- # The template is evaluated using ERB and the body is available in the @body instance variable
- # and the converter object in the @converter instance variable.
- #
- # source://kramdown//lib/kramdown/converter/base.rb#130
- def apply_template(converter, body); end
-
- # Convert the element tree +tree+ and return the resulting conversion object (normally a
- # string) and an array with warning messages. The parameter +options+ specifies the conversion
- # options that should be used.
- #
- # Initializes a new instance of the calling class and then calls the #convert method with
- # +tree+ as parameter.
- #
- # If the +template+ option is specified and non-empty, the template is evaluate with ERB
- # before and/or after the tree conversion depending on the result of #apply_template_before?
- # and #apply_template_after?. If the template is evaluated before, an empty string is used for
- # the body; if evaluated after, the result is used as body. See ::apply_template.
- #
- # The template resolution is done in the following way (for the converter ConverterName):
- #
- # 1. Look in the current working directory for the template.
- #
- # 2. Append +.converter_name+ (e.g. +.html+) to the template name and look for the resulting
- # file in the current working directory (the form +.convertername+ is deprecated).
- #
- # 3. Append +.converter_name+ to the template name and look for it in the kramdown data
- # directory (the form +.convertername+ is deprecated).
- #
- # 4. Check if the template name starts with 'string://' and if so, strip this prefix away and
- # use the rest as template.
- #
- # source://kramdown//lib/kramdown/converter/base.rb#101
- def convert(tree, options = T.unsafe(nil)); end
-
- # Return the template specified by +template+.
- #
- # source://kramdown//lib/kramdown/converter/base.rb#139
- def get_template(template); end
-
- private
-
- def allocate; end
- def new(*_arg0); end
- end
-end
-
-# source://kramdown//lib/kramdown/converter/base.rb#245
-Kramdown::Converter::Base::SMART_QUOTE_INDICES = T.let(T.unsafe(nil), Hash)
-
-# Converts a Kramdown::Document to a nested hash for further processing or debug output.
-#
-# source://kramdown//lib/kramdown/converter/hash_ast.rb#19
-class Kramdown::Converter::HashAST < ::Kramdown::Converter::Base
- # source://kramdown//lib/kramdown/converter/hash_ast.rb#21
- def convert(el); end
-end
-
-# source://kramdown//lib/kramdown/converter/hash_ast.rb#35
-Kramdown::Converter::HashAst = Kramdown::Converter::HashAST
-
-# Converts a Kramdown::Document to HTML.
-#
-# You can customize the HTML converter by sub-classing it and overriding the +convert_NAME+
-# methods. Each such method takes the following parameters:
-#
-# [+el+] The element of type +NAME+ to be converted.
-#
-# [+indent+] A number representing the current amount of spaces for indent (only used for
-# block-level elements).
-#
-# The return value of such a method has to be a string containing the element +el+ formatted as
-# HTML element.
-#
-# source://kramdown//lib/kramdown/converter/html.rb#30
-class Kramdown::Converter::Html < ::Kramdown::Converter::Base
- include ::Kramdown::Utils::Html
- include ::Kramdown::Parser::Html::Constants
-
- # Initialize the HTML converter with the given Kramdown document +doc+.
- #
- # @return [Html] a new instance of Html
- #
- # source://kramdown//lib/kramdown/converter/html.rb#39
- def initialize(root, options); end
-
- # Add the syntax highlighter name to the 'class' attribute of the given attribute hash. And
- # overwrites or add a "language-LANG" part using the +lang+ parameter if +lang+ is not nil.
- #
- # source://kramdown//lib/kramdown/converter/html.rb#409
- def add_syntax_highlighter_to_class_attr(attr, lang = T.unsafe(nil)); end
-
- # Dispatch the conversion of the element +el+ to a +convert_TYPE+ method using the +type+ of
- # the element.
- #
- # source://kramdown//lib/kramdown/converter/html.rb#57
- def convert(el, indent = T.unsafe(nil)); end
-
- # source://kramdown//lib/kramdown/converter/html.rb#272
- def convert_a(el, indent); end
-
- # source://kramdown//lib/kramdown/converter/html.rb#365
- def convert_abbreviation(el, _indent); end
-
- # source://kramdown//lib/kramdown/converter/html.rb#77
- def convert_blank(_el, _indent); end
-
- # source://kramdown//lib/kramdown/converter/html.rb#141
- def convert_blockquote(el, indent); end
-
- # source://kramdown//lib/kramdown/converter/html.rb#268
- def convert_br(_el, _indent); end
-
- # source://kramdown//lib/kramdown/converter/html.rb#111
- def convert_codeblock(el, indent); end
-
- # source://kramdown//lib/kramdown/converter/html.rb#280
- def convert_codespan(el, _indent); end
-
- # source://kramdown//lib/kramdown/converter/html.rb#260
- def convert_comment(el, indent); end
-
- # source://kramdown//lib/kramdown/converter/html.rb#178
- def convert_dd(el, indent); end
-
- # source://kramdown//lib/kramdown/converter/html.rb#174
- def convert_dl(el, indent); end
-
- # source://kramdown//lib/kramdown/converter/html.rb#190
- def convert_dt(el, indent); end
-
- # source://kramdown//lib/kramdown/converter/html.rb#319
- def convert_em(el, indent); end
-
- # source://kramdown//lib/kramdown/converter/html.rb#324
- def convert_entity(el, _indent); end
-
- # source://kramdown//lib/kramdown/converter/html.rb#294
- def convert_footnote(el, _indent); end
-
- # source://kramdown//lib/kramdown/converter/html.rb#145
- def convert_header(el, indent); end
-
- # source://kramdown//lib/kramdown/converter/html.rb#155
- def convert_hr(el, indent); end
-
- # source://kramdown//lib/kramdown/converter/html.rb#201
- def convert_html_element(el, indent); end
-
- # source://kramdown//lib/kramdown/converter/html.rb#276
- def convert_img(el, _indent); end
-
- # source://kramdown//lib/kramdown/converter/html.rb#178
- def convert_li(el, indent); end
-
- # source://kramdown//lib/kramdown/converter/html.rb#351
- def convert_math(el, indent); end
-
- # source://kramdown//lib/kramdown/converter/html.rb#162
- def convert_ol(el, indent); end
-
- # source://kramdown//lib/kramdown/converter/html.rb#86
- def convert_p(el, indent); end
-
- # source://kramdown//lib/kramdown/converter/html.rb#311
- def convert_raw(el, _indent); end
-
- # source://kramdown//lib/kramdown/converter/html.rb#372
- def convert_root(el, indent); end
-
- # source://kramdown//lib/kramdown/converter/html.rb#347
- def convert_smart_quote(el, _indent); end
-
- # Helper method used by +convert_p+ to convert a paragraph that only contains a single :img
- # element.
- #
- # source://kramdown//lib/kramdown/converter/html.rb#99
- def convert_standalone_image(el, indent); end
-
- # source://kramdown//lib/kramdown/converter/html.rb#319
- def convert_strong(el, indent); end
-
- # source://kramdown//lib/kramdown/converter/html.rb#238
- def convert_table(el, indent); end
-
- # source://kramdown//lib/kramdown/converter/html.rb#238
- def convert_tbody(el, indent); end
-
- # source://kramdown//lib/kramdown/converter/html.rb#248
- def convert_td(el, indent); end
-
- # source://kramdown//lib/kramdown/converter/html.rb#81
- def convert_text(el, _indent); end
-
- # source://kramdown//lib/kramdown/converter/html.rb#238
- def convert_tfoot(el, indent); end
-
- # source://kramdown//lib/kramdown/converter/html.rb#238
- def convert_thead(el, indent); end
-
- # source://kramdown//lib/kramdown/converter/html.rb#238
- def convert_tr(el, indent); end
-
- # source://kramdown//lib/kramdown/converter/html.rb#339
- def convert_typographic_sym(el, _indent); end
-
- # source://kramdown//lib/kramdown/converter/html.rb#162
- def convert_ul(el, indent); end
-
- # source://kramdown//lib/kramdown/converter/html.rb#228
- def convert_xml_comment(el, indent); end
-
- # source://kramdown//lib/kramdown/converter/html.rb#228
- def convert_xml_pi(el, indent); end
-
- # Fixes the elements for use in a TOC entry.
- #
- # source://kramdown//lib/kramdown/converter/html.rb#453
- def fix_for_toc_entry(elements); end
-
- # Return an HTML ordered list with the footnote content for the used footnotes.
- #
- # source://kramdown//lib/kramdown/converter/html.rb#488
- def footnote_content; end
-
- # Format the given element as block HTML.
- #
- # source://kramdown//lib/kramdown/converter/html.rb#397
- def format_as_block_html(name, attr, body, indent); end
-
- # Format the given element as block HTML with a newline after the start tag and indentation
- # before the end tag.
- #
- # source://kramdown//lib/kramdown/converter/html.rb#403
- def format_as_indented_block_html(name, attr, body, indent); end
-
- # Format the given element as span HTML.
- #
- # source://kramdown//lib/kramdown/converter/html.rb#392
- def format_as_span_html(name, attr, body); end
-
- # Generate and return an element tree for the table of contents.
- #
- # source://kramdown//lib/kramdown/converter/html.rb#415
- def generate_toc_tree(toc, type, attr); end
-
- # The amount of indentation used when nesting HTML tags.
- #
- # source://kramdown//lib/kramdown/converter/html.rb#36
- def indent; end
-
- # The amount of indentation used when nesting HTML tags.
- #
- # source://kramdown//lib/kramdown/converter/html.rb#36
- def indent=(_arg0); end
-
- # Return the converted content of the children of +el+ as a string. The parameter +indent+ has
- # to be the amount of indentation used for the element +el+.
- #
- # Pushes +el+ onto the @stack before converting the child elements and pops it from the stack
- # afterwards.
- #
- # source://kramdown//lib/kramdown/converter/html.rb#66
- def inner(el, indent); end
-
- # Obfuscate the +text+ by using HTML entities.
- #
- # source://kramdown//lib/kramdown/converter/html.rb#476
- def obfuscate(text); end
-
- # Remove all footnotes from the given elements.
- #
- # source://kramdown//lib/kramdown/converter/html.rb#468
- def remove_footnotes(elements); end
-
- # Remove all link elements by unwrapping them.
- #
- # source://kramdown//lib/kramdown/converter/html.rb#460
- def unwrap_links(elements); end
-end
-
-# source://kramdown//lib/kramdown/converter/html.rb#246
-Kramdown::Converter::Html::ENTITY_NBSP = T.let(T.unsafe(nil), Kramdown::Utils::Entities::Entity)
-
-# source://kramdown//lib/kramdown/converter/html.rb#485
-Kramdown::Converter::Html::FOOTNOTE_BACKLINK_FMT = T.let(T.unsafe(nil), String)
-
-# source://kramdown//lib/kramdown/converter/html.rb#328
-Kramdown::Converter::Html::TYPOGRAPHIC_SYMS = T.let(T.unsafe(nil), Hash)
-
-# source://kramdown//lib/kramdown/converter/html.rb#159
-Kramdown::Converter::Html::ZERO_TO_ONETWENTYEIGHT = T.let(T.unsafe(nil), Array)
-
-# Converts an element tree to the kramdown format.
-#
-# source://kramdown//lib/kramdown/converter/kramdown.rb#18
-class Kramdown::Converter::Kramdown < ::Kramdown::Converter::Base
- include ::Kramdown::Utils::Html
-
- # @return [Kramdown] a new instance of Kramdown
- #
- # source://kramdown//lib/kramdown/converter/kramdown.rb#24
- def initialize(root, options); end
-
- # source://kramdown//lib/kramdown/converter/kramdown.rb#34
- def convert(el, opts = T.unsafe(nil)); end
-
- # source://kramdown//lib/kramdown/converter/kramdown.rb#291
- def convert_a(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/kramdown.rb#377
- def convert_abbreviation(el, _opts); end
-
- # source://kramdown//lib/kramdown/converter/kramdown.rb#70
- def convert_blank(_el, _opts); end
-
- # source://kramdown//lib/kramdown/converter/kramdown.rb#107
- def convert_blockquote(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/kramdown.rb#287
- def convert_br(_el, _opts); end
-
- # source://kramdown//lib/kramdown/converter/kramdown.rb#103
- def convert_codeblock(el, _opts); end
-
- # source://kramdown//lib/kramdown/converter/kramdown.rb#324
- def convert_codespan(el, _opts); end
-
- # source://kramdown//lib/kramdown/converter/kramdown.rb#279
- def convert_comment(el, _opts); end
-
- # source://kramdown//lib/kramdown/converter/kramdown.rb#158
- def convert_dd(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/kramdown.rb#124
- def convert_dl(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/kramdown.rb#182
- def convert_dt(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/kramdown.rb#346
- def convert_em(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/kramdown.rb#356
- def convert_entity(el, _opts); end
-
- # source://kramdown//lib/kramdown/converter/kramdown.rb#329
- def convert_footnote(el, _opts); end
-
- # source://kramdown//lib/kramdown/converter/kramdown.rb#112
- def convert_header(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/kramdown.rb#120
- def convert_hr(_el, _opts); end
-
- # source://kramdown//lib/kramdown/converter/kramdown.rb#195
- def convert_html_element(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/kramdown.rb#308
- def convert_img(el, _opts); end
-
- # source://kramdown//lib/kramdown/converter/kramdown.rb#130
- def convert_li(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/kramdown.rb#373
- def convert_math(el, _opts); end
-
- # source://kramdown//lib/kramdown/converter/kramdown.rb#124
- def convert_ol(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/kramdown.rb#88
- def convert_p(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/kramdown.rb#334
- def convert_raw(el, _opts); end
-
- # source://kramdown//lib/kramdown/converter/kramdown.rb#381
- def convert_root(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/kramdown.rb#369
- def convert_smart_quote(el, _opts); end
-
- # source://kramdown//lib/kramdown/converter/kramdown.rb#351
- def convert_strong(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/kramdown.rb#239
- def convert_table(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/kramdown.rb#260
- def convert_tbody(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/kramdown.rb#275
- def convert_td(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/kramdown.rb#76
- def convert_text(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/kramdown.rb#267
- def convert_tfoot(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/kramdown.rb#244
- def convert_thead(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/kramdown.rb#271
- def convert_tr(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/kramdown.rb#365
- def convert_typographic_sym(el, _opts); end
-
- # source://kramdown//lib/kramdown/converter/kramdown.rb#124
- def convert_ul(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/kramdown.rb#229
- def convert_xml_comment(el, _opts); end
-
- # source://kramdown//lib/kramdown/converter/kramdown.rb#229
- def convert_xml_pi(el, _opts); end
-
- # source://kramdown//lib/kramdown/converter/kramdown.rb#408
- def create_abbrev_defs; end
-
- # source://kramdown//lib/kramdown/converter/kramdown.rb#399
- def create_footnote_defs; end
-
- # source://kramdown//lib/kramdown/converter/kramdown.rb#389
- def create_link_defs; end
-
- # Return the IAL containing the attributes of the element +el+.
- #
- # source://kramdown//lib/kramdown/converter/kramdown.rb#419
- def ial_for_element(el); end
-
- # source://kramdown//lib/kramdown/converter/kramdown.rb#54
- def inner(el, opts = T.unsafe(nil)); end
-
- # source://kramdown//lib/kramdown/converter/kramdown.rb#444
- def parse_title(attr); end
-end
-
-# source://kramdown//lib/kramdown/converter/kramdown.rb#74
-Kramdown::Converter::Kramdown::ESCAPED_CHAR_RE = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/converter/kramdown.rb#192
-Kramdown::Converter::Kramdown::HTML_ELEMENT_TYPES = T.let(T.unsafe(nil), Array)
-
-# source://kramdown//lib/kramdown/converter/kramdown.rb#190
-Kramdown::Converter::Kramdown::HTML_TAGS_WITH_BODY = T.let(T.unsafe(nil), Array)
-
-# source://kramdown//lib/kramdown/converter/kramdown.rb#360
-Kramdown::Converter::Kramdown::TYPOGRAPHIC_SYMS = T.let(T.unsafe(nil), Hash)
-
-# Converts an element tree to LaTeX.
-#
-# This converter uses ideas from other Markdown-to-LaTeX converters like Pandoc and Maruku.
-#
-# You can customize this converter by sub-classing it and overriding the +convert_NAME+ methods.
-# Each such method takes the following parameters:
-#
-# [+el+] The element of type +NAME+ to be converted.
-#
-# [+opts+] A hash containing processing options that are passed down from parent elements. The
-# key :parent is always set and contains the parent element as value.
-#
-# The return value of such a method has to be a string containing the element +el+ formatted
-# correctly as LaTeX markup.
-#
-# source://kramdown//lib/kramdown/converter/latex.rb#31
-class Kramdown::Converter::Latex < ::Kramdown::Converter::Base
- # Initialize the LaTeX converter with the +root+ element and the conversion +options+.
- #
- # @return [Latex] a new instance of Latex
- #
- # source://kramdown//lib/kramdown/converter/latex.rb#34
- def initialize(root, options); end
-
- # Return a LaTeX comment containing all attributes as 'key="value"' pairs.
- #
- # source://kramdown//lib/kramdown/converter/latex.rb#599
- def attribute_list(el); end
-
- # Dispatch the conversion of the element +el+ to a +convert_TYPE+ method using the +type+ of
- # the element.
- #
- # source://kramdown//lib/kramdown/converter/latex.rb#41
- def convert(el, opts = T.unsafe(nil)); end
-
- # source://kramdown//lib/kramdown/converter/latex.rb#216
- def convert_a(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/latex.rb#569
- def convert_abbreviation(el, _opts); end
-
- # source://kramdown//lib/kramdown/converter/latex.rb#61
- def convert_blank(_el, opts); end
-
- # source://kramdown//lib/kramdown/converter/latex.rb#110
- def convert_blockquote(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/latex.rb#209
- def convert_br(_el, opts); end
-
- # source://kramdown//lib/kramdown/converter/latex.rb#87
- def convert_codeblock(el, _opts); end
-
- # source://kramdown//lib/kramdown/converter/latex.rb#239
- def convert_codespan(el, _opts); end
-
- # source://kramdown//lib/kramdown/converter/latex.rb#205
- def convert_comment(el, _opts); end
-
- # source://kramdown//lib/kramdown/converter/latex.rb#151
- def convert_dd(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/latex.rb#139
- def convert_dl(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/latex.rb#147
- def convert_dt(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/latex.rb#263
- def convert_em(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/latex.rb#533
- def convert_entity(el, _opts); end
-
- # source://kramdown//lib/kramdown/converter/latex.rb#250
- def convert_footnote(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/latex.rb#114
- def convert_header(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/latex.rb#124
- def convert_hr(el, _opts); end
-
- # source://kramdown//lib/kramdown/converter/latex.rb#155
- def convert_html_element(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/latex.rb#225
- def convert_img(el, _opts); end
-
- # source://kramdown//lib/kramdown/converter/latex.rb#143
- def convert_li(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/latex.rb#556
- def convert_math(el, _opts); end
-
- # source://kramdown//lib/kramdown/converter/latex.rb#129
- def convert_ol(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/latex.rb#69
- def convert_p(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/latex.rb#255
- def convert_raw(el, _opts); end
-
- # source://kramdown//lib/kramdown/converter/latex.rb#57
- def convert_root(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/latex.rb#550
- def convert_smart_quote(el, opts); end
-
- # Helper method used by +convert_p+ to convert a paragraph that only contains a single :img
- # element.
- #
- # source://kramdown//lib/kramdown/converter/latex.rb#80
- def convert_standalone_image(el, _opts, img); end
-
- # source://kramdown//lib/kramdown/converter/latex.rb#267
- def convert_strong(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/latex.rb#177
- def convert_table(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/latex.rb#189
- def convert_tbody(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/latex.rb#201
- def convert_td(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/latex.rb#65
- def convert_text(el, _opts); end
-
- # source://kramdown//lib/kramdown/converter/latex.rb#193
- def convert_tfoot(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/latex.rb#185
- def convert_thead(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/latex.rb#197
- def convert_tr(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/latex.rb#542
- def convert_typographic_sym(el, _opts); end
-
- # source://kramdown//lib/kramdown/converter/latex.rb#129
- def convert_ul(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/latex.rb#166
- def convert_xml_comment(el, _opts); end
-
- # source://kramdown//lib/kramdown/converter/latex.rb#170
- def convert_xml_pi(_el, _opts); end
-
- # source://kramdown//lib/kramdown/converter/latex.rb#522
- def entity_to_latex(entity); end
-
- # Escape the special LaTeX characters in the string +str+.
- #
- # source://kramdown//lib/kramdown/converter/latex.rb#618
- def escape(str); end
-
- # Return the converted content of the children of +el+ as a string.
- #
- # source://kramdown//lib/kramdown/converter/latex.rb#46
- def inner(el, opts); end
-
- # Wrap the +text+ inside a LaTeX environment of type +type+. The element +el+ is passed on to
- # the method #attribute_list -- the resulting string is appended to both the \\begin and the
- # \\end lines of the LaTeX environment for easier post-processing of LaTeX environments.
- #
- # source://kramdown//lib/kramdown/converter/latex.rb#582
- def latex_environment(type, el, text); end
-
- # Return a string containing a valid \hypertarget command if the element has an ID defined, or
- # +nil+ otherwise. If the parameter +add_label+ is +true+, a \label command will also be used
- # additionally to the \hypertarget command.
- #
- # source://kramdown//lib/kramdown/converter/latex.rb#590
- def latex_link_target(el, add_label = T.unsafe(nil)); end
-
- # Normalize the abbreviation key so that it only contains allowed ASCII character
- #
- # source://kramdown//lib/kramdown/converter/latex.rb#575
- def normalize_abbreviation_key(key); end
-end
-
-# Inspired by Maruku: entity conversion table based on the one from htmltolatex
-# (http://sourceforge.net/projects/htmltolatex/), with some small adjustments/additions
-#
-# source://kramdown//lib/kramdown/converter/latex.rb#273
-Kramdown::Converter::Latex::ENTITY_CONV_TABLE = T.let(T.unsafe(nil), Hash)
-
-# source://kramdown//lib/kramdown/converter/latex.rb#605
-Kramdown::Converter::Latex::ESCAPE_MAP = T.let(T.unsafe(nil), Hash)
-
-# source://kramdown//lib/kramdown/converter/latex.rb#615
-Kramdown::Converter::Latex::ESCAPE_RE = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/converter/latex.rb#175
-Kramdown::Converter::Latex::TABLE_ALIGNMENT_CHAR = T.let(T.unsafe(nil), Hash)
-
-# source://kramdown//lib/kramdown/converter/latex.rb#537
-Kramdown::Converter::Latex::TYPOGRAPHIC_SYMS = T.let(T.unsafe(nil), Hash)
-
-# Converts a Kramdown::Document to a manpage in groff format. See man(7), groff_man(7) and
-# man-pages(7) for information regarding the output.
-#
-# source://kramdown//lib/kramdown/converter/man.rb#18
-class Kramdown::Converter::Man < ::Kramdown::Converter::Base
- # source://kramdown//lib/kramdown/converter/man.rb#20
- def convert(el, opts = T.unsafe(nil)); end
-
- private
-
- # source://kramdown//lib/kramdown/converter/man.rb#191
- def convert_a(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/man.rb#229
- def convert_abbreviation(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/man.rb#47
- def convert_blank(*_arg0); end
-
- # source://kramdown//lib/kramdown/converter/man.rb#95
- def convert_blockquote(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/man.rb#225
- def convert_br(_el, opts); end
-
- # source://kramdown//lib/kramdown/converter/man.rb#89
- def convert_codeblock(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/man.rb#221
- def convert_codespan(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/man.rb#186
- def convert_comment(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/man.rb#127
- def convert_dd(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/man.rb#101
- def convert_dl(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/man.rb#121
- def convert_dt(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/man.rb#209
- def convert_em(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/man.rb#255
- def convert_entity(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/man.rb#241
- def convert_footnote(*_arg0); end
-
- # source://kramdown//lib/kramdown/converter/man.rb#61
- def convert_header(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/man.rb#47
- def convert_hr(*_arg0); end
-
- # source://kramdown//lib/kramdown/converter/man.rb#182
- def convert_html_element(*_arg0); end
-
- # source://kramdown//lib/kramdown/converter/man.rb#205
- def convert_img(_el, _opts); end
-
- # source://kramdown//lib/kramdown/converter/man.rb#110
- def convert_li(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/man.rb#233
- def convert_math(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/man.rb#101
- def convert_ol(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/man.rb#52
- def convert_p(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/man.rb#245
- def convert_raw(*_arg0); end
-
- # source://kramdown//lib/kramdown/converter/man.rb#40
- def convert_root(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/man.rb#259
- def convert_smart_quote(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/man.rb#215
- def convert_strong(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/man.rb#139
- def convert_table(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/man.rb#154
- def convert_tbody(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/man.rb#170
- def convert_td(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/man.rb#249
- def convert_text(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/man.rb#161
- def convert_tfoot(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/man.rb#148
- def convert_thead(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/man.rb#165
- def convert_tr(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/man.rb#268
- def convert_typographic_sym(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/man.rb#101
- def convert_ul(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/man.rb#186
- def convert_xml_comment(el, opts); end
-
- # source://kramdown//lib/kramdown/converter/man.rb#47
- def convert_xml_pi(*_arg0); end
-
- # source://kramdown//lib/kramdown/converter/man.rb#285
- def escape(text, preserve_whitespace = T.unsafe(nil)); end
-
- # source://kramdown//lib/kramdown/converter/man.rb#26
- def inner(el, opts, use = T.unsafe(nil)); end
-
- # source://kramdown//lib/kramdown/converter/man.rb#272
- def macro(name, *args); end
-
- # source://kramdown//lib/kramdown/converter/man.rb#276
- def newline(text); end
-
- # source://kramdown//lib/kramdown/converter/man.rb#281
- def quote(text); end
-
- # source://kramdown//lib/kramdown/converter/man.rb#293
- def unicode_char(codepoint); end
-end
-
-# source://kramdown//lib/kramdown/converter/man.rb#137
-Kramdown::Converter::Man::TABLE_CELL_ALIGNMENT = T.let(T.unsafe(nil), Hash)
-
-# source://kramdown//lib/kramdown/converter/man.rb#263
-Kramdown::Converter::Man::TYPOGRAPHIC_SYMS_MAP = T.let(T.unsafe(nil), Hash)
-
-# Removes all block (and optionally span) level HTML tags from the element tree.
-#
-# This converter can be used on parsed HTML documents to get an element tree that will only
-# contain native kramdown elements.
-#
-# *Note* that the returned element tree may not be fully conformant (i.e. the content models of
-# *some elements may be violated)!
-#
-# This converter modifies the given tree in-place and returns it.
-#
-# source://kramdown//lib/kramdown/converter/remove_html_tags.rb#25
-class Kramdown::Converter::RemoveHtmlTags < ::Kramdown::Converter::Base
- # @return [RemoveHtmlTags] a new instance of RemoveHtmlTags
- #
- # source://kramdown//lib/kramdown/converter/remove_html_tags.rb#27
- def initialize(root, options); end
-
- # source://kramdown//lib/kramdown/converter/remove_html_tags.rb#32
- def convert(el); end
-end
-
-# Converts a Kramdown::Document to an element tree that represents the table of contents.
-#
-# The returned tree consists of Element objects of type :toc where the root element is just used
-# as container object. Each :toc element contains as value the wrapped :header element and under
-# the attribute key :id the header ID that should be used (note that this ID may not exist in
-# the wrapped element).
-#
-# Since the TOC tree consists of special :toc elements, one cannot directly feed this tree to
-# other converters!
-#
-# source://kramdown//lib/kramdown/converter/toc.rb#25
-class Kramdown::Converter::Toc < ::Kramdown::Converter::Base
- # @return [Toc] a new instance of Toc
- #
- # source://kramdown//lib/kramdown/converter/toc.rb#27
- def initialize(root, options); end
-
- # source://kramdown//lib/kramdown/converter/toc.rb#34
- def convert(el); end
-
- private
-
- # source://kramdown//lib/kramdown/converter/toc.rb#47
- def add_to_toc(el, id); end
-end
-
-# The main interface to kramdown.
-#
-# This class provides a one-stop-shop for using kramdown to convert text into various output
-# formats. Use it like this:
-#
-# require 'kramdown'
-# doc = Kramdown::Document.new('This *is* some kramdown text')
-# puts doc.to_html
-#
-# The #to_html method is a shortcut for using the Converter::Html class. See #method_missing for
-# more information.
-#
-# The second argument to the ::new method is an options hash for customizing the behaviour of the
-# used parser and the converter. See ::new for more information!
-#
-# source://kramdown//lib/kramdown/document.rb#73
-class Kramdown::Document
- # Create a new Kramdown document from the string +source+ and use the provided +options+. The
- # options that can be used are defined in the Options module.
- #
- # The special options key :input can be used to select the parser that should parse the
- # +source+. It has to be the name of a class in the Kramdown::Parser module. For example, to
- # select the kramdown parser, one would set the :input key to +Kramdown+. If this key is not
- # set, it defaults to +Kramdown+.
- #
- # The +source+ is immediately parsed by the selected parser so that the root element is
- # immediately available and the output can be generated.
- #
- # @return [Document] a new instance of Document
- #
- # source://kramdown//lib/kramdown/document.rb#96
- def initialize(source, options = T.unsafe(nil)); end
-
- # source://kramdown//lib/kramdown/document.rb#124
- def inspect; end
-
- # Check if a method is invoked that begins with +to_+ and if so, try to instantiate a converter
- # class (i.e. a class in the Kramdown::Converter module) and use it for converting the document.
- #
- # For example, +to_html+ would instantiate the Kramdown::Converter::Html class.
- #
- # source://kramdown//lib/kramdown/document.rb#113
- def method_missing(id, *attr, &block); end
-
- # The options hash which holds the options for parsing/converting the Kramdown document.
- #
- # source://kramdown//lib/kramdown/document.rb#80
- def options; end
-
- # The root Element of the element tree. It is immediately available after the ::new method has
- # been called.
- #
- # source://kramdown//lib/kramdown/document.rb#77
- def root; end
-
- # The root Element of the element tree. It is immediately available after the ::new method has
- # been called.
- #
- # source://kramdown//lib/kramdown/document.rb#77
- def root=(_arg0); end
-
- # An array of warning messages. It is filled with warnings during the parsing phase (i.e. in
- # ::new) and the conversion phase.
- #
- # source://kramdown//lib/kramdown/document.rb#84
- def warnings; end
-
- protected
-
- # Try requiring a parser or converter class and don't raise an error if the file is not found.
- #
- # source://kramdown//lib/kramdown/document.rb#129
- def try_require(type, name); end
-end
-
-# Represents all elements in the element tree.
-#
-# kramdown only uses this one class for representing all available elements in an element tree
-# (paragraphs, headers, emphasis, ...). The type of element can be set via the #type accessor.
-#
-# The root of a kramdown element tree has to be an element of type :root. It needs to have certain
-# option keys set so that conversions work correctly. If only a part of a tree should be
-# converted, duplicate the root node and assign the #children appropriately, e.g:
-#
-# root = doc.root
-# new_root = root.dup
-# new_root.children = [root.children[0]] # assign new array with elements to convert
-#
-# Following is a description of all supported element types.
-#
-# Note that the option :location may contain the start line number of an element in the source
-# document.
-#
-# == Structural Elements
-#
-# === :root
-#
-# [Category] None
-# [Usage context] As the root element of a document
-# [Content model] Block-level elements
-#
-# Represents the root of a kramdown document.
-#
-# The root element contains the following option keys:
-#
-# parts of the kramdown document.
-#
-# :abbrev_defs:: This key may be used to store the mapping of abbreviation to abbreviation
-# definition.
-#
-# :abbrev_attr:: This key may be used to store the mapping of abbreviation to abbreviation
-# attributes.
-#
-# :options:: This key may be used to store options that were set during parsing of the document.
-#
-# :footnote_count:: This key stores the number of actually referenced footnotes of the document.
-#
-# === :blank
-#
-# [Category] Block-level element
-# [Usage context] Where block-level elements are expected
-# [Content model] Empty
-#
-# Represents one or more blank lines. It is not allowed to have two or more consecutive blank
-# elements.
-#
-# The +value+ field may contain the original content of the blank lines.
-#
-#
-# === :p
-#
-# [Category] Block-level element
-# [Usage context] Where block-level elements are expected
-# [Content model] Span-level elements
-#
-# Represents a paragraph.
-#
-# If the option :transparent is +true+, this element just represents a block of text. I.e. this
-# element just functions as a container for span-level elements.
-#
-#
-# === :header
-#
-# [Category] Block-level element
-# [Usage context] Where block-level elements are expected
-# [Content model] Span-level elements
-#
-# Represents a header.
-#
-# The option :level specifies the header level and has to contain a number between 1 and \6. The
-# option :raw_text has to contain the raw header text.
-#
-#
-# === :blockquote
-#
-# [Category] Block-level element
-# [Usage context] Where block-level elements are expected
-# [Content model] Block-level elements
-#
-# Represents a blockquote.
-#
-#
-# === :codeblock
-#
-# [Category] Block-level element
-# [Usage context] Where block-level elements are expected
-# [Content model] Empty
-#
-# Represents a code block, i.e. a block of text that should be used as-is.
-#
-# The +value+ field has to contain the content of the code block.
-#
-# The option :lang specifies a highlighting language with possible HTML style options (e.g.
-# php?start_inline=1) and should be used instead of a possibly also available language embedded in
-# a class name of the form 'language-LANG'.
-#
-#
-# === :ul
-#
-# [Category] Block-level element
-# [Usage context] Where block-level elements are expected
-# [Content model] One or more :li elements
-#
-# Represents an unordered list.
-#
-#
-# === :ol
-#
-# [Category] Block-level element
-# [Usage context] Where block-level elements are expected
-# [Content model] One or more :li elements
-#
-# Represents an ordered list.
-#
-#
-# === :li
-#
-# [Category] Block-level element
-# [Usage context] Inside :ol and :ul elements
-# [Content model] Block-level elements
-#
-# Represents a list item of an ordered or unordered list.
-#
-# Note that the first child of a list item must not be a :blank element!
-#
-#
-# === :dl
-#
-# [Category] Block-level element
-# [Usage context] Where block-level elements are expected
-# [Content model] One or more groups each consisting of one or more :dt elements followed by one
-# or more :dd elements.
-#
-# Represents a definition list which contains groups consisting of terms and definitions for them.
-#
-#
-# === :dt
-#
-# [Category] Block-level element
-# [Usage context] Before :dt or :dd elements inside a :dl elment
-# [Content model] Span-level elements
-#
-# Represents the term part of a term-definition group in a definition list.
-#
-#
-# === :dd
-#
-# [Category] Block-level element
-# [Usage context] After :dt or :dd elements inside a :dl elment
-# [Content model] Block-level elements
-#
-# Represents the definition part of a term-definition group in a definition list.
-#
-#
-# === :hr
-#
-# [Category] Block-level element
-# [Usage context] Where block-level elements are expected
-# [Content model] None
-#
-# Represents a horizontal line.
-#
-#
-# === :table
-#
-# [Category] Block-level element
-# [Usage context] Where block-level elements are expected
-# [Content model] Zero or one :thead elements, one or more :tbody elements, zero or one :tfoot
-# elements
-#
-# Represents a table. Each table row (i.e. :tr element) of the table has to contain the same
-# number of :td elements.
-#
-# The option :alignment has to be an array containing the alignment values, exactly one for each
-# column of the table. The possible alignment values are :left, :center, :right and :default.
-#
-#
-# === :thead
-#
-# [Category] None
-# [Usage context] As first element inside a :table element
-# [Content model] One or more :tr elements
-#
-# Represents the table header.
-#
-#
-# === :tbody
-#
-# [Category] None
-# [Usage context] After a :thead element but before a :tfoot element inside a :table element
-# [Content model] One or more :tr elements
-#
-# Represents a table body.
-#
-#
-# === :tfoot
-#
-# [Category] None
-# [Usage context] As last element inside a :table element
-# [Content model] One or more :tr elements
-#
-# Represents the table footer.
-#
-#
-# === :tr
-#
-# [Category] None
-# [Usage context] Inside :thead, :tbody and :tfoot elements
-# [Content model] One or more :td elements
-#
-# Represents a table row.
-#
-#
-# === :td
-#
-# [Category] Block-level element
-# [Usage context] Inside :tr elements
-# [Content model] As child of :thead/:tr span-level elements, as child of :tbody/:tr and
-# :tfoot/:tr block-level elements
-#
-# Represents a table cell.
-#
-#
-# === :math
-#
-# [Category] Block/span-level element
-# [Usage context] Where block/span-level elements are expected
-# [Content model] None
-#
-# Represents mathematical text that is written in LaTeX.
-#
-# The +value+ field has to contain the actual mathematical text.
-#
-# The option :category has to be set to either :span or :block depending on the context where the
-# element is used.
-#
-#
-# == Text Markup Elements
-#
-# === :text
-#
-# [Category] Span-level element
-# [Usage context] Where span-level elements are expected
-# [Content model] None
-#
-# Represents text.
-#
-# The +value+ field has to contain the text itself.
-#
-#
-# === :br
-#
-# [Category] Span-level element
-# [Usage context] Where span-level elements are expected
-# [Content model] None
-#
-# Represents a hard line break.
-#
-#
-# === :a
-#
-# [Category] Span-level element
-# [Usage context] Where span-level elements are expected
-# [Content model] Span-level elements
-#
-# Represents a link to an URL.
-#
-# The attribute +href+ has to be set to the URL to which the link points. The attribute +title+
-# optionally contains the title of the link.
-#
-#
-# === :img
-#
-# [Category] Span-level element
-# [Usage context] Where span-level elements are expected
-# [Content model] None
-#
-# Represents an image.
-#
-# The attribute +src+ has to be set to the URL of the image. The attribute +alt+ has to contain a
-# text description of the image. The attribute +title+ optionally contains the title of the image.
-#
-#
-# === :codespan
-#
-# [Category] Span-level element
-# [Usage context] Where span-level elements are expected
-# [Content model] None
-#
-# Represents verbatim text.
-#
-# The +value+ field has to contain the content of the code span.
-#
-#
-# === :footnote
-#
-# [Category] Span-level element
-# [Usage context] Where span-level elements are expected
-# [Content model] None
-#
-# Represents a footnote marker.
-#
-# The +value+ field has to contain an element whose children are the content of the footnote. The
-# option :name has to contain a valid and unique footnote name. A valid footnote name consists of
-# a word character or a digit and then optionally followed by other word characters, digits or
-# dashes.
-#
-#
-# === :em
-#
-# [Category] Span-level element
-# [Usage context] Where span-level elements are expected
-# [Content model] Span-level elements
-#
-# Represents emphasis of its contents.
-#
-#
-# === :strong
-#
-# [Category] Span-level element
-# [Usage context] Where span-level elements are expected
-# [Content model] Span-level elements
-#
-# Represents strong importance for its contents.
-#
-#
-# === :entity
-#
-# [Category] Span-level element
-# [Usage context] Where span-level elements are expected
-# [Content model] None
-#
-# Represents an HTML entity.
-#
-# The +value+ field has to contain an instance of Kramdown::Utils::Entities::Entity. The option
-# :original can be used to store the original representation of the entity.
-#
-#
-# === :typographic_sym
-#
-# [Category] Span-level element
-# [Usage context] Where span-level elements are expected
-# [Content model] None
-#
-# Represents a typographic symbol.
-#
-# The +value+ field needs to contain a Symbol representing the specific typographic symbol from
-# the following list:
-#
-# :mdash:: An mdash character (---)
-# :ndash:: An ndash character (--)
-# :hellip:: An ellipsis (...)
-# :laquo:: A left guillemet (<<)
-# :raquo:: A right guillemet (>>)
-# :laquo_space:: A left guillemet with a space (<< )
-# :raquo_space:: A right guillemet with a space ( >>)
-#
-#
-# === :smart_quote
-#
-# [Category] Span-level element
-# [Usage context] Where span-level elements are expected
-# [Content model] None
-#
-# Represents a quotation character.
-#
-# The +value+ field needs to contain a Symbol representing the specific quotation character:
-#
-# :lsquo:: Left single quote
-# :rsquo:: Right single quote
-# :ldquo:: Left double quote
-# :rdquo:: Right double quote
-#
-#
-# === :abbreviation
-#
-# [Category] Span-level element
-# [Usage context] Where span-level elements are expected
-# [Content model] None
-#
-# Represents a text part that is an abbreviation.
-#
-# The +value+ field has to contain the text part that is the abbreviation. The definition of the
-# abbreviation is stored in the :root element of the document.
-#
-#
-# == Other Elements
-#
-# === :html_element
-#
-# [Category] Block/span-level element
-# [Usage context] Where block/span-level elements or raw HTML elements are expected
-# [Content model] Depends on the element
-#
-# Represents an HTML element.
-#
-# The +value+ field has to contain the name of the HTML element the element is representing.
-#
-# The option :category has to be set to either :span or :block depending on the whether the
-# element is a block-level or a span-level element. The option :content_model has to be set to the
-# content model for the element (either :block if it contains block-level elements, :span if it
-# contains span-level elements or :raw if it contains raw content).
-#
-#
-# === :xml_comment
-#
-# [Category] Block/span-level element
-# [Usage context] Where block/span-level elements are expected or in raw HTML elements
-# [Content model] None
-#
-# Represents an XML/HTML comment.
-#
-# The +value+ field has to contain the whole XML/HTML comment including the delimiters.
-#
-# The option :category has to be set to either :span or :block depending on the context where the
-# element is used.
-#
-#
-# === :xml_pi
-#
-# [Category] Block/span-level element
-# [Usage context] Where block/span-level elements are expected or in raw HTML elements
-# [Content model] None
-#
-# Represents an XML/HTML processing instruction.
-#
-# The +value+ field has to contain the whole XML/HTML processing instruction including the
-# delimiters.
-#
-# The option :category has to be set to either :span or :block depending on the context where the
-# element is used.
-#
-#
-# === :comment
-#
-# [Category] Block/span-level element
-# [Usage context] Where block/span-level elements are expected
-# [Content model] None
-#
-# Represents a comment.
-#
-# The +value+ field has to contain the comment.
-#
-# The option :category has to be set to either :span or :block depending on the context where the
-# element is used. If it is set to :span, then no blank lines are allowed in the comment.
-#
-#
-# === :raw
-#
-# [Category] Block/span-level element
-# [Usage context] Where block/span-level elements are expected
-# [Content model] None
-#
-# Represents a raw string that should not be modified. For example, the element could contain some
-# HTML code that should be output as-is without modification and escaping.
-#
-# The +value+ field has to contain the actual raw text.
-#
-# The option :category has to be set to either :span or :block depending on the context where the
-# element is used. If it is set to :span, then no blank lines are allowed in the raw text.
-#
-# The option :type can be set to an array of strings to define for which converters the raw string
-# is valid.
-#
-# source://kramdown//lib/kramdown/element.rb#482
-class Kramdown::Element
- # Create a new Element object of type +type+. The optional parameters +value+, +attr+ and
- # +options+ can also be set in this constructor for convenience.
- #
- # @return [Element] a new instance of Element
- #
- # source://kramdown//lib/kramdown/element.rb#496
- def initialize(type, value = T.unsafe(nil), attr = T.unsafe(nil), options = T.unsafe(nil)); end
-
- # The attributes of the element.
- #
- # source://kramdown//lib/kramdown/element.rb#502
- def attr; end
-
- # syntactic sugar to simplify calls such as +Kramdown::Element.category(el) == :block+ with
- # +el.block?+.
- #
- # Returns boolean true or false.
- #
- # @return [Boolean]
- #
- # source://kramdown//lib/kramdown/element.rb#537
- def block?; end
-
- # The child elements of this element.
- #
- # source://kramdown//lib/kramdown/element.rb#492
- def children; end
-
- # The child elements of this element.
- #
- # source://kramdown//lib/kramdown/element.rb#492
- def children=(_arg0); end
-
- # source://kramdown//lib/kramdown/element.rb#511
- def inspect; end
-
- # The options hash for the element. It is used for storing arbitray options.
- #
- # source://kramdown//lib/kramdown/element.rb#507
- def options; end
-
- # syntactic sugar to simplify calls such as +Kramdown::Element.category(el) == :span+ with
- # +el.span?+.
- #
- # Returns boolean true or false.
- #
- # @return [Boolean]
- #
- # source://kramdown//lib/kramdown/element.rb#545
- def span?; end
-
- # A symbol representing the element type. For example, :p or :blockquote.
- #
- # source://kramdown//lib/kramdown/element.rb#485
- def type; end
-
- # A symbol representing the element type. For example, :p or :blockquote.
- #
- # source://kramdown//lib/kramdown/element.rb#485
- def type=(_arg0); end
-
- # The value of the element. The interpretation of this field depends on the type of the element.
- # Many elements don't use this field.
- #
- # source://kramdown//lib/kramdown/element.rb#489
- def value; end
-
- # The value of the element. The interpretation of this field depends on the type of the element.
- # Many elements don't use this field.
- #
- # source://kramdown//lib/kramdown/element.rb#489
- def value=(_arg0); end
-
- class << self
- # Return the category of +el+ which can be :block, :span or +nil+.
- #
- # Most elements have a fixed category, however, some elements can either appear in a block-level
- # or a span-level context. These elements need to have the option :category correctly set.
- #
- # source://kramdown//lib/kramdown/element.rb#529
- def category(el); end
- end
-end
-
-# source://kramdown//lib/kramdown/element.rb#519
-Kramdown::Element::CATEGORY = T.let(T.unsafe(nil), Hash)
-
-# This error is raised when an error condition is encountered.
-#
-# *Note* that this error is only raised by the support framework for the parsers and converters.
-#
-# source://kramdown//lib/kramdown/error.rb#15
-class Kramdown::Error < ::RuntimeError; end
-
-# This module defines all options that are used by parsers and/or converters as well as providing
-# methods to deal with the options.
-#
-# source://kramdown//lib/kramdown/options.rb#16
-module Kramdown::Options
- class << self
- # Return a Hash with the default values for all options.
- #
- # source://kramdown//lib/kramdown/options.rb#72
- def defaults; end
-
- # Define a new option called +name+ (a Symbol) with the given +type+ (String, Integer, Float,
- # Symbol, Boolean, Object), default value +default+ and the description +desc+. If a block is
- # specified, it should validate the value and either raise an error or return a valid value.
- #
- # The type 'Object' should only be used for complex types for which none of the other types
- # suffices. A block needs to be specified when using type 'Object' and it has to cope with
- # a value given as string and as the opaque type.
- #
- # @raise [ArgumentError]
- #
- # source://kramdown//lib/kramdown/options.rb#51
- def define(name, type, default, desc, &block); end
-
- # Return +true+ if an option called +name+ is defined.
- #
- # @return [Boolean]
- #
- # source://kramdown//lib/kramdown/options.rb#67
- def defined?(name); end
-
- # Return all option definitions.
- #
- # source://kramdown//lib/kramdown/options.rb#62
- def definitions; end
-
- # Merge the #defaults Hash with the *parsed* options from the given Hash, i.e. only valid option
- # names are considered and their value is run through the #parse method.
- #
- # source://kramdown//lib/kramdown/options.rb#82
- def merge(hash); end
-
- # Parse the given value +data+ as if it was a value for the option +name+ and return the parsed
- # value with the correct type.
- #
- # If +data+ already has the correct type, it is just returned. Otherwise it is converted to a
- # String and then to the correct type.
- #
- # @raise [ArgumentError]
- #
- # source://kramdown//lib/kramdown/options.rb#96
- def parse(name, data); end
-
- # Ensures that the option value +val+ for the option called +name+ is a valid array. The
- # parameter +val+ can be
- #
- # - a comma separated string which is split into an array of values
- # - or an array.
- #
- # Optionally, the array is checked for the correct size.
- #
- # source://kramdown//lib/kramdown/options.rb#141
- def simple_array_validator(val, name, size = T.unsafe(nil)); end
-
- # Ensures that the option value +val+ for the option called +name+ is a valid hash. The
- # parameter +val+ can be
- #
- # - a hash in YAML format
- # - or a Ruby Hash object.
- #
- # @raise [Kramdown::Error]
- #
- # source://kramdown//lib/kramdown/options.rb#158
- def simple_hash_validator(val, name); end
-
- # Converts the given String +data+ into a Symbol or +nil+ with the
- # following provisions:
- #
- # - A leading colon is stripped from the string.
- # - An empty value or a value equal to "nil" results in +nil+.
- #
- # source://kramdown//lib/kramdown/options.rb#122
- def str_to_sym(data); end
- end
-end
-
-# Allowed option types.
-#
-# source://kramdown//lib/kramdown/options.rb#39
-Kramdown::Options::ALLOWED_TYPES = T.let(T.unsafe(nil), Array)
-
-# Helper class introducing a boolean type for specifying boolean values (+true+ and +false+) as
-# option types.
-#
-# source://kramdown//lib/kramdown/options.rb#20
-class Kramdown::Options::Boolean
- class << self
- # Return +true+ if +other+ is either +true+ or +false+
- #
- # source://kramdown//lib/kramdown/options.rb#23
- def ===(other); end
- end
-end
-
-# Struct class for storing the definition of an option.
-#
-# source://kramdown//lib/kramdown/options.rb#36
-class Kramdown::Options::Definition < ::Struct
- # Returns the value of attribute default
- #
- # @return [Object] the current value of default
- def default; end
-
- # Sets the attribute default
- #
- # @param value [Object] the value to set the attribute default to.
- # @return [Object] the newly set value
- def default=(_); end
-
- # Returns the value of attribute desc
- #
- # @return [Object] the current value of desc
- def desc; end
-
- # Sets the attribute desc
- #
- # @param value [Object] the value to set the attribute desc to.
- # @return [Object] the newly set value
- def desc=(_); end
-
- # Returns the value of attribute name
- #
- # @return [Object] the current value of name
- def name; end
-
- # Sets the attribute name
- #
- # @param value [Object] the value to set the attribute name to.
- # @return [Object] the newly set value
- def name=(_); end
-
- # Returns the value of attribute type
- #
- # @return [Object] the current value of type
- def type; end
-
- # Sets the attribute type
- #
- # @param value [Object] the value to set the attribute type to.
- # @return [Object] the newly set value
- def type=(_); end
-
- # Returns the value of attribute validator
- #
- # @return [Object] the current value of validator
- def validator; end
-
- # Sets the attribute validator
- #
- # @param value [Object] the value to set the attribute validator to.
- # @return [Object] the newly set value
- def validator=(_); end
-
- class << self
- def [](*_arg0); end
- def inspect; end
- def keyword_init?; end
- def members; end
- def new(*_arg0); end
- end
-end
-
-# source://kramdown//lib/kramdown/options.rb#396
-Kramdown::Options::SMART_QUOTES_ENTITIES = T.let(T.unsafe(nil), Array)
-
-# source://kramdown//lib/kramdown/options.rb#397
-Kramdown::Options::SMART_QUOTES_STR = T.let(T.unsafe(nil), String)
-
-# source://kramdown//lib/kramdown/options.rb#336
-Kramdown::Options::TOC_LEVELS_ARRAY = T.let(T.unsafe(nil), Array)
-
-# source://kramdown//lib/kramdown/options.rb#335
-Kramdown::Options::TOC_LEVELS_RANGE = T.let(T.unsafe(nil), Range)
-
-# This module contains all available parsers. A parser takes an input string and converts the
-# string to an element tree.
-#
-# New parsers should be derived from the Base class which provides common functionality - see its
-# API documentation for how to create a custom converter class.
-#
-# source://kramdown//lib/kramdown/parser.rb#17
-module Kramdown::Parser; end
-
-# == \Base class for parsers
-#
-# This class serves as base class for parsers. It provides common methods that can/should be
-# used by all parsers, especially by those using StringScanner(Kramdown) for parsing.
-#
-# A parser object is used as a throw-away object, i.e. it is only used for storing the needed
-# state information during parsing. Therefore one can't instantiate a parser object directly but
-# only use the Base::parse method.
-#
-# == Implementing a parser
-#
-# Implementing a new parser is rather easy: just derive a new class from this class and put it
-# in the Kramdown::Parser module -- the latter is needed so that the auto-detection of the new
-# parser works correctly. Then you need to implement the +#parse+ method which has to contain
-# the parsing code.
-#
-# Have a look at the Base::parse, Base::new and Base#parse methods for additional information!
-#
-# source://kramdown//lib/kramdown/parser/base.rb#34
-class Kramdown::Parser::Base
- # Initialize the parser object with the +source+ string and the parsing +options+.
- #
- # The @root element, the @warnings array and @text_type (specifies the default type for newly
- # created text nodes) are automatically initialized.
- #
- # @return [Base] a new instance of Base
- #
- # source://kramdown//lib/kramdown/parser/base.rb#52
- def initialize(source, options); end
-
- # Modify the string +source+ to be usable by the parser (unifies line ending characters to
- # +\n+ and makes sure +source+ ends with a new line character).
- #
- # source://kramdown//lib/kramdown/parser/base.rb#91
- def adapt_source(source); end
-
- # This helper method adds the given +text+ either to the last element in the +tree+ if it is a
- # +type+ element or creates a new text element with the given +type+.
- #
- # source://kramdown//lib/kramdown/parser/base.rb#103
- def add_text(text, tree = T.unsafe(nil), type = T.unsafe(nil)); end
-
- # Extract the part of the StringScanner +strscan+ backed string specified by the +range+. This
- # method works correctly under Ruby 1.8 and Ruby 1.9.
- #
- # source://kramdown//lib/kramdown/parser/base.rb#115
- def extract_string(range, strscan); end
-
- # The hash with the parsing options.
- #
- # source://kramdown//lib/kramdown/parser/base.rb#37
- def options; end
-
- # Parse the source string into an element tree.
- #
- # The parsing code should parse the source provided in @source and build an element tree the
- # root of which should be @root.
- #
- # This is the only method that has to be implemented by sub-classes!
- #
- # @raise [NotImplementedError]
- #
- # source://kramdown//lib/kramdown/parser/base.rb#79
- def parse; end
-
- # The root element of element tree that is created from the source string.
- #
- # source://kramdown//lib/kramdown/parser/base.rb#46
- def root; end
-
- # The original source string.
- #
- # source://kramdown//lib/kramdown/parser/base.rb#43
- def source; end
-
- # Add the given warning +text+ to the warning array.
- #
- # source://kramdown//lib/kramdown/parser/base.rb#84
- def warning(text); end
-
- # The array with the parser warnings.
- #
- # source://kramdown//lib/kramdown/parser/base.rb#40
- def warnings; end
-
- class << self
- # Parse the +source+ string into an element tree, possibly using the parsing +options+, and
- # return the root element of the element tree and an array with warning messages.
- #
- # Initializes a new instance of the calling class and then calls the +#parse+ method that must
- # be implemented by each subclass.
- #
- # source://kramdown//lib/kramdown/parser/base.rb#67
- def parse(source, options = T.unsafe(nil)); end
-
- private
-
- def allocate; end
- def new(*_arg0); end
- end
-end
-
-# Used for parsing an HTML document.
-#
-# The parsing code is in the Parser module that can also be used by other parsers.
-#
-# source://kramdown//lib/kramdown/parser/html.rb#22
-class Kramdown::Parser::Html < ::Kramdown::Parser::Base
- include ::Kramdown::Parser::Html::Constants
- include ::Kramdown::Parser::Html::Parser
-
- # Parse the source string provided on initialization as HTML document.
- #
- # source://kramdown//lib/kramdown/parser/html.rb#586
- def parse; end
-end
-
-# Contains all constants that are used when parsing.
-#
-# source://kramdown//lib/kramdown/parser/html.rb#25
-module Kramdown::Parser::Html::Constants; end
-
-# source://kramdown//lib/kramdown/parser/html.rb#32
-Kramdown::Parser::Html::Constants::HTML_ATTRIBUTE_RE = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/html.rb#59
-Kramdown::Parser::Html::Constants::HTML_BLOCK_ELEMENTS = T.let(T.unsafe(nil), Array)
-
-# source://kramdown//lib/kramdown/parser/html.rb#30
-Kramdown::Parser::Html::Constants::HTML_COMMENT_RE = T.let(T.unsafe(nil), Regexp)
-
-# The following elements are also parsed as raw since they need child elements that cannot
-# be expressed using kramdown syntax: colgroup table tbody thead tfoot tr ul ol
-#
-# source://kramdown//lib/kramdown/parser/html.rb#48
-Kramdown::Parser::Html::Constants::HTML_CONTENT_MODEL = T.let(T.unsafe(nil), Hash)
-
-# source://kramdown//lib/kramdown/parser/html.rb#37
-Kramdown::Parser::Html::Constants::HTML_CONTENT_MODEL_BLOCK = T.let(T.unsafe(nil), Array)
-
-# source://kramdown//lib/kramdown/parser/html.rb#44
-Kramdown::Parser::Html::Constants::HTML_CONTENT_MODEL_RAW = T.let(T.unsafe(nil), Array)
-
-# source://kramdown//lib/kramdown/parser/html.rb#41
-Kramdown::Parser::Html::Constants::HTML_CONTENT_MODEL_SPAN = T.let(T.unsafe(nil), Array)
-
-# :stopdoc:
-# The following regexps are based on the ones used by REXML, with some slight modifications.
-#
-# source://kramdown//lib/kramdown/parser/html.rb#29
-Kramdown::Parser::Html::Constants::HTML_DOCTYPE_RE = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/html.rb#66
-Kramdown::Parser::Html::Constants::HTML_ELEMENT = T.let(T.unsafe(nil), Hash)
-
-# source://kramdown//lib/kramdown/parser/html.rb#63
-Kramdown::Parser::Html::Constants::HTML_ELEMENTS_WITHOUT_BODY = T.let(T.unsafe(nil), Array)
-
-# source://kramdown//lib/kramdown/parser/html.rb#35
-Kramdown::Parser::Html::Constants::HTML_ENTITY_RE = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/html.rb#31
-Kramdown::Parser::Html::Constants::HTML_INSTRUCTION_RE = T.let(T.unsafe(nil), Regexp)
-
-# Some HTML elements like script belong to both categories (i.e. are valid in block and
-# span HTML) and don't appear therefore!
-# script, textarea
-#
-# source://kramdown//lib/kramdown/parser/html.rb#56
-Kramdown::Parser::Html::Constants::HTML_SPAN_ELEMENTS = T.let(T.unsafe(nil), Array)
-
-# source://kramdown//lib/kramdown/parser/html.rb#34
-Kramdown::Parser::Html::Constants::HTML_TAG_CLOSE_RE = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/html.rb#33
-Kramdown::Parser::Html::Constants::HTML_TAG_RE = T.let(T.unsafe(nil), Regexp)
-
-# Converts HTML elements to native elements if possible.
-#
-# source://kramdown//lib/kramdown/parser/html.rb#197
-class Kramdown::Parser::Html::ElementConverter
- include ::Kramdown::Parser::Html::Constants
- include ::Kramdown::Utils::Entities
-
- # @return [ElementConverter] a new instance of ElementConverter
- #
- # source://kramdown//lib/kramdown/parser/html.rb#216
- def initialize(root); end
-
- # source://kramdown//lib/kramdown/parser/html.rb#384
- def convert_a(el); end
-
- # source://kramdown//lib/kramdown/parser/html.rb#394
- def convert_b(el); end
-
- # source://kramdown//lib/kramdown/parser/html.rb#417
- def convert_code(el); end
-
- # source://kramdown//lib/kramdown/parser/html.rb#394
- def convert_em(el); end
-
- # source://kramdown//lib/kramdown/parser/html.rb#408
- def convert_h1(el); end
-
- # source://kramdown//lib/kramdown/parser/html.rb#408
- def convert_h2(el); end
-
- # source://kramdown//lib/kramdown/parser/html.rb#408
- def convert_h3(el); end
-
- # source://kramdown//lib/kramdown/parser/html.rb#408
- def convert_h4(el); end
-
- # source://kramdown//lib/kramdown/parser/html.rb#408
- def convert_h5(el); end
-
- # source://kramdown//lib/kramdown/parser/html.rb#408
- def convert_h6(el); end
-
- # source://kramdown//lib/kramdown/parser/html.rb#394
- def convert_i(el); end
-
- # source://kramdown//lib/kramdown/parser/html.rb#417
- def convert_pre(el); end
-
- # source://kramdown//lib/kramdown/parser/html.rb#563
- def convert_script(el); end
-
- # source://kramdown//lib/kramdown/parser/html.rb#394
- def convert_strong(el); end
-
- # source://kramdown//lib/kramdown/parser/html.rb#460
- def convert_table(el); end
-
- # source://kramdown//lib/kramdown/parser/html.rb#380
- def convert_textarea(el); end
-
- # source://kramdown//lib/kramdown/parser/html.rb#375
- def extract_text(el, raw); end
-
- # source://kramdown//lib/kramdown/parser/html.rb#575
- def handle_math_tag(el); end
-
- # @return [Boolean]
- #
- # source://kramdown//lib/kramdown/parser/html.rb#571
- def is_math_tag?(el); end
-
- # @return [Boolean]
- #
- # source://kramdown//lib/kramdown/parser/html.rb#503
- def is_simple_table?(el); end
-
- # Convert the element +el+ and its children.
- #
- # source://kramdown//lib/kramdown/parser/html.rb#225
- def process(el, do_conversion = T.unsafe(nil), preserve_text = T.unsafe(nil), parent = T.unsafe(nil)); end
-
- # source://kramdown//lib/kramdown/parser/html.rb#278
- def process_children(el, do_conversion = T.unsafe(nil), preserve_text = T.unsafe(nil)); end
-
- # source://kramdown//lib/kramdown/parser/html.rb#320
- def process_html_element(el, do_conversion = T.unsafe(nil), preserve_text = T.unsafe(nil)); end
-
- # Process the HTML text +raw+: compress whitespace (if +preserve+ is +false+) and convert
- # entities in entity elements.
- #
- # source://kramdown//lib/kramdown/parser/html.rb#291
- def process_text(raw, preserve = T.unsafe(nil)); end
-
- # source://kramdown//lib/kramdown/parser/html.rb#326
- def remove_text_children(el); end
-
- # source://kramdown//lib/kramdown/parser/html.rb#359
- def remove_whitespace_children(el); end
-
- # source://kramdown//lib/kramdown/parser/html.rb#369
- def set_basics(el, type, opts = T.unsafe(nil)); end
-
- # source://kramdown//lib/kramdown/parser/html.rb#349
- def strip_whitespace(el); end
-
- # source://kramdown//lib/kramdown/parser/html.rb#330
- def wrap_text_children(el); end
-
- class << self
- # source://kramdown//lib/kramdown/parser/html.rb#220
- def convert(root, el = T.unsafe(nil)); end
- end
-end
-
-# source://kramdown//lib/kramdown/parser/html.rb#393
-Kramdown::Parser::Html::ElementConverter::EMPHASIS_TYPE_MAP = T.let(T.unsafe(nil), Hash)
-
-# source://kramdown//lib/kramdown/parser/html.rb#204
-Kramdown::Parser::Html::ElementConverter::REMOVE_TEXT_CHILDREN = T.let(T.unsafe(nil), Array)
-
-# source://kramdown//lib/kramdown/parser/html.rb#208
-Kramdown::Parser::Html::ElementConverter::REMOVE_WHITESPACE_CHILDREN = T.let(T.unsafe(nil), Array)
-
-# source://kramdown//lib/kramdown/parser/html.rb#213
-Kramdown::Parser::Html::ElementConverter::SIMPLE_ELEMENTS = T.let(T.unsafe(nil), Array)
-
-# source://kramdown//lib/kramdown/parser/html.rb#210
-Kramdown::Parser::Html::ElementConverter::STRIP_WHITESPACE = T.let(T.unsafe(nil), Array)
-
-# source://kramdown//lib/kramdown/parser/html.rb#206
-Kramdown::Parser::Html::ElementConverter::WRAP_TEXT_CHILDREN = T.let(T.unsafe(nil), Array)
-
-# Contains the parsing methods. This module can be mixed into any parser to get HTML parsing
-# functionality. The only thing that must be provided by the class are instance variable
-# parsing.
-#
-# source://kramdown//lib/kramdown/parser/html.rb#77
-module Kramdown::Parser::Html::Parser
- include ::Kramdown::Parser::Html::Constants
-
- # Process the HTML start tag that has already be scanned/checked via @src.
- #
- # Does the common processing steps and then yields to the caller for further processing
- # (first parameter is the created element; the second parameter is +true+ if the HTML
- # element is already closed, ie. contains no body; the third parameter specifies whether the
- # body - and the end tag - need to be handled in case closed=false).
- #
- # source://kramdown//lib/kramdown/parser/html.rb#87
- def handle_html_start_tag(line = T.unsafe(nil)); end
-
- # Handle the raw HTML tag at the current position.
- #
- # source://kramdown//lib/kramdown/parser/html.rb#127
- def handle_raw_html_tag(name); end
-
- # Parses the given string for HTML attributes and returns the resulting hash.
- #
- # If the optional +line+ parameter is supplied, it is used in warning messages.
- #
- # If the optional +in_html_tag+ parameter is set to +false+, attributes are not modified to
- # contain only lowercase letters.
- #
- # source://kramdown//lib/kramdown/parser/html.rb#114
- def parse_html_attributes(str, line = T.unsafe(nil), in_html_tag = T.unsafe(nil)); end
-
- # Parse raw HTML from the current source position, storing the found elements in +el+.
- # Parsing continues until one of the following criteria are fulfilled:
- #
- # - The end of the document is reached.
- # - The matching end tag for the element +el+ is found (only used if +el+ is an HTML
- # element).
- #
- # When an HTML start tag is found, processing is deferred to #handle_html_start_tag,
- # providing the block given to this method.
- #
- # source://kramdown//lib/kramdown/parser/html.rb#150
- def parse_raw_html(el, &block); end
-end
-
-# source://kramdown//lib/kramdown/parser/html.rb#139
-Kramdown::Parser::Html::Parser::HTML_RAW_START = T.let(T.unsafe(nil), Regexp)
-
-# Used for parsing a document in kramdown format.
-#
-# If you want to extend the functionality of the parser, you need to do the following:
-#
-# * Create a new subclass
-# * add the needed parser methods
-# * modify the @block_parsers and @span_parsers variables and add the names of your parser
-# methods
-#
-# Here is a small example for an extended parser class that parses ERB style tags as raw text if
-# they are used as span-level elements (an equivalent block-level parser should probably also be
-# made to handle the block case):
-#
-# require 'kramdown/parser/kramdown'
-#
-# class Kramdown::Parser::ERBKramdown < Kramdown::Parser::Kramdown
-#
-# def initialize(source, options)
-# super
-# @span_parsers.unshift(:erb_tags)
-# end
-#
-# ERB_TAGS_START = /<%.*?%>/
-#
-# def parse_erb_tags
-# @src.pos += @src.matched_size
-# @tree.children << Element.new(:raw, @src.matched)
-# end
-# define_parser(:erb_tags, ERB_TAGS_START, '<%')
-#
-# end
-#
-# The new parser can be used like this:
-#
-# require 'kramdown/document'
-# # require the file with the above parser class
-#
-# Kramdown::Document.new(input_text, :input => 'ERBKramdown').to_html
-#
-# source://kramdown//lib/kramdown/parser/kramdown.rb#60
-class Kramdown::Parser::Kramdown < ::Kramdown::Parser::Base
- include ::Kramdown
- include ::Kramdown::Parser::Html::Constants
- include ::Kramdown::Parser::Html::Parser
-
- # Create a new Kramdown parser object with the given +options+.
- #
- # @return [Kramdown] a new instance of Kramdown
- #
- # source://kramdown//lib/kramdown/parser/kramdown.rb#65
- def initialize(source, options); end
-
- # This helper methods adds the approriate attributes to the element +el+ of type +a+ or +img+
- # and the element itself to the @tree.
- #
- # source://kramdown//lib/kramdown/parser/kramdown/link.rb#39
- def add_link(el, href, title, alt_text = T.unsafe(nil), ial = T.unsafe(nil)); end
-
- # Return +true+ if we are after a block boundary.
- #
- # @return [Boolean]
- #
- # source://kramdown//lib/kramdown/parser/kramdown/block_boundary.rb#21
- def after_block_boundary?; end
-
- # Return +true+ if we are before a block boundary.
- #
- # @return [Boolean]
- #
- # source://kramdown//lib/kramdown/parser/kramdown/block_boundary.rb#28
- def before_block_boundary?; end
-
- # Correct abbreviation attributes.
- #
- # source://kramdown//lib/kramdown/parser/kramdown/abbreviation.rb#34
- def correct_abbreviations_attributes; end
-
- # source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#96
- def handle_extension(name, opts, body, type, line_no = T.unsafe(nil)); end
-
- # source://kramdown//lib/kramdown/parser/kramdown/html.rb#25
- def handle_kramdown_html_tag(el, closed, handle_body); end
-
- # Normalize the link identifier.
- #
- # source://kramdown//lib/kramdown/parser/kramdown/link.rb#17
- def normalize_link_id(id); end
-
- # source://kramdown//lib/kramdown/parser/kramdown/paragraph.rb#56
- def paragraph_end; end
-
- # The source string provided on initialization is parsed into the @root element.
- #
- # source://kramdown//lib/kramdown/parser/kramdown.rb#88
- def parse; end
-
- # Parse the link definition at the current location.
- #
- # source://kramdown//lib/kramdown/parser/kramdown/abbreviation.rb#17
- def parse_abbrev_definition; end
-
- # Parse the string +str+ and extract all attributes and add all found attributes to the hash
- # +opts+.
- #
- # source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#18
- def parse_attribute_list(str, opts); end
-
- # Parse the Atx header at the current location.
- #
- # source://kramdown//lib/kramdown/parser/kramdown/header.rb#32
- def parse_atx_header; end
-
- # Parse the autolink at the current location.
- #
- # source://kramdown//lib/kramdown/parser/kramdown/autolink.rb#19
- def parse_autolink; end
-
- # Parse the blank line at the current postition.
- #
- # source://kramdown//lib/kramdown/parser/kramdown/blank_line.rb#17
- def parse_blank_line; end
-
- # Parse one of the block extensions (ALD, block IAL or generic extension) at the current
- # location.
- #
- # source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#164
- def parse_block_extensions; end
-
- # Parse the HTML at the current position as block-level HTML.
- #
- # source://kramdown//lib/kramdown/parser/kramdown/html.rb#71
- def parse_block_html; end
-
- # Parse the math block at the current location.
- #
- # source://kramdown//lib/kramdown/parser/kramdown/math.rb#19
- def parse_block_math; end
-
- # Parse the blockquote at the current location.
- #
- # source://kramdown//lib/kramdown/parser/kramdown/blockquote.rb#21
- def parse_blockquote; end
-
- # Parse the indented codeblock at the current location.
- #
- # source://kramdown//lib/kramdown/parser/kramdown/codeblock.rb#23
- def parse_codeblock; end
-
- # Parse the fenced codeblock at the current location.
- #
- # source://kramdown//lib/kramdown/parser/kramdown/codeblock.rb#37
- def parse_codeblock_fenced; end
-
- # Parse the codespan at the current scanner location.
- #
- # source://kramdown//lib/kramdown/parser/kramdown/codespan.rb#17
- def parse_codespan; end
-
- # Parse the ordered or unordered list at the current location.
- #
- # source://kramdown//lib/kramdown/parser/kramdown/list.rb#153
- def parse_definition_list; end
-
- # Parse the emphasis at the current location.
- #
- # source://kramdown//lib/kramdown/parser/kramdown/emphasis.rb#17
- def parse_emphasis; end
-
- # Parse the EOB marker at the current location.
- #
- # source://kramdown//lib/kramdown/parser/kramdown/eob.rb#17
- def parse_eob_marker; end
-
- # Parse the backslash-escaped character at the current location.
- #
- # source://kramdown//lib/kramdown/parser/kramdown/escaped_chars.rb#17
- def parse_escaped_chars; end
-
- # Parse the generic extension at the current point. The parameter +type+ can either be :block
- # or :span depending whether we parse a block or span extension tag.
- #
- # source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#54
- def parse_extension_start_tag(type); end
-
- # Used for parsing the first line of a list item or a definition, i.e. the line with list item
- # marker or the definition marker.
- #
- # source://kramdown//lib/kramdown/parser/kramdown/list.rb#32
- def parse_first_list_line(indentation, content); end
-
- # Parse the foot note definition at the current location.
- #
- # source://kramdown//lib/kramdown/parser/kramdown/footnote.rb#21
- def parse_footnote_definition; end
-
- # Parse the footnote marker at the current location.
- #
- # source://kramdown//lib/kramdown/parser/kramdown/footnote.rb#40
- def parse_footnote_marker; end
-
- # Parse the horizontal rule at the current location.
- #
- # source://kramdown//lib/kramdown/parser/kramdown/horizontal_rule.rb#17
- def parse_horizontal_rule; end
-
- # Parse the HTML entity at the current location.
- #
- # source://kramdown//lib/kramdown/parser/kramdown/html_entity.rb#17
- def parse_html_entity; end
-
- # Parse the inline math at the current location.
- #
- # source://kramdown//lib/kramdown/parser/kramdown/math.rb#44
- def parse_inline_math; end
-
- # Parse the line break at the current location.
- #
- # source://kramdown//lib/kramdown/parser/kramdown/line_break.rb#17
- def parse_line_break; end
-
- # Parse the link at the current scanner position. This method is used to parse normal links as
- # well as image links.
- #
- # source://kramdown//lib/kramdown/parser/kramdown/link.rb#61
- def parse_link; end
-
- # Parse the link definition at the current location.
- #
- # source://kramdown//lib/kramdown/parser/kramdown/link.rb#24
- def parse_link_definition; end
-
- # Parse the ordered or unordered list at the current location.
- #
- # source://kramdown//lib/kramdown/parser/kramdown/list.rb#54
- def parse_list; end
-
- # Parse the paragraph at the current location.
- #
- # source://kramdown//lib/kramdown/parser/kramdown/paragraph.rb#31
- def parse_paragraph; end
-
- # Parse the Setext header at the current location.
- #
- # source://kramdown//lib/kramdown/parser/kramdown/header.rb#20
- def parse_setext_header; end
-
- # Parse the smart quotes at current location.
- #
- # source://kramdown//lib/kramdown/parser/kramdown/smart_quotes.rb#158
- def parse_smart_quotes; end
-
- # Parse the extension span at the current location.
- #
- # source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#192
- def parse_span_extensions; end
-
- # Parse the HTML at the current position as span-level HTML.
- #
- # source://kramdown//lib/kramdown/parser/kramdown/html.rb#102
- def parse_span_html; end
-
- # Parse the table at the current location.
- #
- # source://kramdown//lib/kramdown/parser/kramdown/table.rb#25
- def parse_table; end
-
- # Parse the typographic symbols at the current location.
- #
- # source://kramdown//lib/kramdown/parser/kramdown/typographic_symbol.rb#22
- def parse_typographic_syms; end
-
- # Replace the abbreviation text with elements.
- #
- # source://kramdown//lib/kramdown/parser/kramdown/abbreviation.rb#41
- def replace_abbreviations(el, regexps = T.unsafe(nil)); end
-
- # Update the +ial+ with the information from the inline attribute list +opts+.
- #
- # source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#41
- def update_ial_with_ial(ial, opts); end
-
- protected
-
- # source://kramdown//lib/kramdown/parser/kramdown/header.rb#59
- def add_header(level, text, id); end
-
- # Adapt the object to allow parsing like specified in the options.
- #
- # source://kramdown//lib/kramdown/parser/kramdown.rb#121
- def configure_parser; end
-
- # Create a new block-level element, taking care of applying a preceding block IAL if it
- # exists. This method should always be used for creating a block-level element!
- #
- # source://kramdown//lib/kramdown/parser/kramdown.rb#305
- def new_block_el(*args); end
-
- # Parse all block-level elements in +text+ into the element +el+.
- #
- # source://kramdown//lib/kramdown/parser/kramdown.rb#140
- def parse_blocks(el, text = T.unsafe(nil)); end
-
- # Returns header text and optional ID.
- #
- # source://kramdown//lib/kramdown/parser/kramdown/header.rb#47
- def parse_header_contents; end
-
- # Parse all span-level elements in the source string of @src into +el+.
- #
- # If the parameter +stop_re+ (a regexp) is used, parsing is immediately stopped if the regexp
- # matches and if no block is given or if a block is given and it returns +true+.
- #
- # The parameter +parsers+ can be used to specify the (span-level) parsing methods that should
- # be used for parsing.
- #
- # The parameter +text_type+ specifies the type which should be used for created text nodes.
- #
- # source://kramdown//lib/kramdown/parser/kramdown.rb#214
- def parse_spans(el, stop_re = T.unsafe(nil), parsers = T.unsafe(nil), text_type = T.unsafe(nil)); end
-
- # Reset the current parsing environment. The parameter +env+ can be used to set initial
- # values for one or more environment variables.
- #
- # source://kramdown//lib/kramdown/parser/kramdown.rb#253
- def reset_env(opts = T.unsafe(nil)); end
-
- # Restore the current parsing environment.
- #
- # source://kramdown//lib/kramdown/parser/kramdown.rb#268
- def restore_env(env); end
-
- # Return the current parsing environment.
- #
- # source://kramdown//lib/kramdown/parser/kramdown.rb#263
- def save_env; end
-
- # Create the needed span parser regexps.
- #
- # source://kramdown//lib/kramdown/parser/kramdown.rb#134
- def span_parser_regexps(parsers = T.unsafe(nil)); end
-
- # Update the given attributes hash +attr+ with the information from the inline attribute list
- # +ial+ and all referenced ALDs.
- #
- # source://kramdown//lib/kramdown/parser/kramdown.rb#274
- def update_attr_with_ial(attr, ial); end
-
- #
- # Update the parser specific link definitions with the data from +link_defs+ (the value of the
- # :link_defs option).
- #
- # The parameter +link_defs+ is a hash where the keys are possibly unnormalized link IDs and
- # the values are two element arrays consisting of the link target and a title (can be +nil+).
- #
- # source://kramdown//lib/kramdown/parser/kramdown.rb#116
- def update_link_definitions(link_defs); end
-
- # Update the raw text for automatic ID generation.
- #
- # source://kramdown//lib/kramdown/parser/kramdown.rb#288
- def update_raw_text(item); end
-
- # Update the tree by parsing all :+raw_text+ elements with the span-level parser (resets the
- # environment) and by updating the attributes from the IALs.
- #
- # source://kramdown//lib/kramdown/parser/kramdown.rb#166
- def update_tree(element); end
-
- private
-
- # precomputed patterns for indentations 1..4 and fallback expression
- # to compute pattern when indentation is outside the 1..4 range.
- #
- # source://kramdown//lib/kramdown/parser/kramdown/list.rb#258
- def fetch_pattern(type, indentation); end
-
- # source://kramdown//lib/kramdown/parser/kramdown.rb#200
- def span_pattern_cache(stop_re, span_start); end
-
- class << self
- # Add a parser method
- #
- # * with the given +name+,
- # * using +start_re+ as start regexp
- # * and, for span parsers, +span_start+ as a String that can be used in a regexp and
- # which identifies the starting character(s)
- #
- # to the registry. The method name is automatically derived from the +name+ or can explicitly
- # be set by using the +meth_name+ parameter.
- #
- # source://kramdown//lib/kramdown/parser/kramdown.rb#328
- def define_parser(name, start_re, span_start = T.unsafe(nil), meth_name = T.unsafe(nil)); end
-
- # Return +true+ if there is a parser called +name+.
- #
- # @return [Boolean]
- #
- # source://kramdown//lib/kramdown/parser/kramdown.rb#339
- def has_parser?(name); end
-
- # Return the Data structure for the parser +name+.
- #
- # source://kramdown//lib/kramdown/parser/kramdown.rb#334
- def parser(name = T.unsafe(nil)); end
- end
-end
-
-# source://kramdown//lib/kramdown/parser/kramdown/abbreviation.rb#14
-Kramdown::Parser::Kramdown::ABBREV_DEFINITION_START = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/autolink.rb#14
-Kramdown::Parser::Kramdown::ACHARS = T.let(T.unsafe(nil), String)
-
-# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#140
-Kramdown::Parser::Kramdown::ALD_ANY_CHARS = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#142
-Kramdown::Parser::Kramdown::ALD_CLASS_NAME = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#139
-Kramdown::Parser::Kramdown::ALD_ID_CHARS = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#141
-Kramdown::Parser::Kramdown::ALD_ID_NAME = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#150
-Kramdown::Parser::Kramdown::ALD_START = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#149
-Kramdown::Parser::Kramdown::ALD_TYPE_ANY = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#144
-Kramdown::Parser::Kramdown::ALD_TYPE_CLASS_NAME = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#145
-Kramdown::Parser::Kramdown::ALD_TYPE_ID_NAME = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#146
-Kramdown::Parser::Kramdown::ALD_TYPE_ID_OR_CLASS = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#147
-Kramdown::Parser::Kramdown::ALD_TYPE_ID_OR_CLASS_MULTI = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#143
-Kramdown::Parser::Kramdown::ALD_TYPE_KEY_VALUE_PAIR = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#148
-Kramdown::Parser::Kramdown::ALD_TYPE_REF = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/header.rb#29
-Kramdown::Parser::Kramdown::ATX_HEADER_START = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/autolink.rb#16
-Kramdown::Parser::Kramdown::AUTOLINK_START = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/autolink.rb#15
-Kramdown::Parser::Kramdown::AUTOLINK_START_STR = T.let(T.unsafe(nil), String)
-
-# source://kramdown//lib/kramdown/parser/kramdown/blank_line.rb#14
-Kramdown::Parser::Kramdown::BLANK_LINE = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/blockquote.rb#18
-Kramdown::Parser::Kramdown::BLOCKQUOTE_START = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/block_boundary.rb#18
-Kramdown::Parser::Kramdown::BLOCK_BOUNDARY = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#160
-Kramdown::Parser::Kramdown::BLOCK_EXTENSIONS_START = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/math.rb#16
-Kramdown::Parser::Kramdown::BLOCK_MATH_START = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/codeblock.rb#20
-Kramdown::Parser::Kramdown::CODEBLOCK_MATCH = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/codeblock.rb#19
-Kramdown::Parser::Kramdown::CODEBLOCK_START = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/codespan.rb#14
-Kramdown::Parser::Kramdown::CODESPAN_DELIMITER = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/list.rb#150
-Kramdown::Parser::Kramdown::DEFINITION_LIST_START = T.let(T.unsafe(nil), Regexp)
-
-# Struct class holding all the needed data for one block/span-level parser method.
-#
-# source://kramdown//lib/kramdown/parser/kramdown.rb#317
-class Kramdown::Parser::Kramdown::Data < ::Struct
- # Returns the value of attribute method
- #
- # @return [Object] the current value of method
- def method; end
-
- # Sets the attribute method
- #
- # @param value [Object] the value to set the attribute method to.
- # @return [Object] the newly set value
- def method=(_); end
-
- # Returns the value of attribute name
- #
- # @return [Object] the current value of name
- def name; end
-
- # Sets the attribute name
- #
- # @param value [Object] the value to set the attribute name to.
- # @return [Object] the newly set value
- def name=(_); end
-
- # Returns the value of attribute span_start
- #
- # @return [Object] the current value of span_start
- def span_start; end
-
- # Sets the attribute span_start
- #
- # @param value [Object] the value to set the attribute span_start to.
- # @return [Object] the newly set value
- def span_start=(_); end
-
- # Returns the value of attribute start_re
- #
- # @return [Object] the current value of start_re
- def start_re; end
-
- # Sets the attribute start_re
- #
- # @param value [Object] the value to set the attribute start_re to.
- # @return [Object] the newly set value
- def start_re=(_); end
-
- class << self
- def [](*_arg0); end
- def inspect; end
- def keyword_init?; end
- def members; end
- def new(*_arg0); end
- end
-end
-
-# source://kramdown//lib/kramdown/parser/kramdown/emphasis.rb#14
-Kramdown::Parser::Kramdown::EMPHASIS_START = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/eob.rb#14
-Kramdown::Parser::Kramdown::EOB_MARKER = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/escaped_chars.rb#14
-Kramdown::Parser::Kramdown::ESCAPED_CHARS = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#154
-Kramdown::Parser::Kramdown::EXT_BLOCK_START = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#155
-Kramdown::Parser::Kramdown::EXT_BLOCK_STOP_STR = T.let(T.unsafe(nil), String)
-
-# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#187
-Kramdown::Parser::Kramdown::EXT_SPAN_START = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#153
-Kramdown::Parser::Kramdown::EXT_START_STR = T.let(T.unsafe(nil), String)
-
-# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#152
-Kramdown::Parser::Kramdown::EXT_STOP_STR = T.let(T.unsafe(nil), String)
-
-# source://kramdown//lib/kramdown/parser/kramdown/codeblock.rb#34
-Kramdown::Parser::Kramdown::FENCED_CODEBLOCK_MATCH = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/codeblock.rb#33
-Kramdown::Parser::Kramdown::FENCED_CODEBLOCK_START = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/footnote.rb#18
-Kramdown::Parser::Kramdown::FOOTNOTE_DEFINITION_START = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/footnote.rb#37
-Kramdown::Parser::Kramdown::FOOTNOTE_MARKER_START = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/header.rb#44
-Kramdown::Parser::Kramdown::HEADER_ID = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/horizontal_rule.rb#14
-Kramdown::Parser::Kramdown::HR_START = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/html.rb#68
-Kramdown::Parser::Kramdown::HTML_BLOCK_START = T.let(T.unsafe(nil), Regexp)
-
-# Mapping of markdown attribute value to content model. I.e. :raw when "0", :default when "1"
-# (use default content model for the HTML element), :span when "span", :block when block and
-# for everything else +nil+ is returned.
-#
-# source://kramdown//lib/kramdown/parser/kramdown/html.rb#21
-Kramdown::Parser::Kramdown::HTML_MARKDOWN_ATTR_MAP = T.let(T.unsafe(nil), Hash)
-
-# source://kramdown//lib/kramdown/parser/kramdown/html.rb#99
-Kramdown::Parser::Kramdown::HTML_SPAN_START = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#157
-Kramdown::Parser::Kramdown::IAL_BLOCK = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#158
-Kramdown::Parser::Kramdown::IAL_BLOCK_START = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#14
-Kramdown::Parser::Kramdown::IAL_CLASS_ATTR = T.let(T.unsafe(nil), String)
-
-# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#188
-Kramdown::Parser::Kramdown::IAL_SPAN_START = T.let(T.unsafe(nil), Regexp)
-
-# Regexp for matching indentation (one tab or four spaces)
-#
-# source://kramdown//lib/kramdown/parser/kramdown.rb#344
-Kramdown::Parser::Kramdown::INDENT = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/math.rb#41
-Kramdown::Parser::Kramdown::INLINE_MATH_START = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/paragraph.rb#24
-Kramdown::Parser::Kramdown::LAZY_END = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/paragraph.rb#20
-Kramdown::Parser::Kramdown::LAZY_END_HTML_SPAN_ELEMENTS = T.let(T.unsafe(nil), Array)
-
-# source://kramdown//lib/kramdown/parser/kramdown/paragraph.rb#21
-Kramdown::Parser::Kramdown::LAZY_END_HTML_START = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/paragraph.rb#22
-Kramdown::Parser::Kramdown::LAZY_END_HTML_STOP = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/line_break.rb#14
-Kramdown::Parser::Kramdown::LINE_BREAK = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/link.rb#53
-Kramdown::Parser::Kramdown::LINK_BRACKET_STOP_RE = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/link.rb#21
-Kramdown::Parser::Kramdown::LINK_DEFINITION_START = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/link.rb#55
-Kramdown::Parser::Kramdown::LINK_INLINE_ID_RE = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/link.rb#56
-Kramdown::Parser::Kramdown::LINK_INLINE_TITLE_RE = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/link.rb#54
-Kramdown::Parser::Kramdown::LINK_PAREN_STOP_RE = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/link.rb#57
-Kramdown::Parser::Kramdown::LINK_START = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/list.rb#19
-Kramdown::Parser::Kramdown::LIST_ITEM_IAL = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/list.rb#20
-Kramdown::Parser::Kramdown::LIST_ITEM_IAL_CHECK = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/list.rb#51
-Kramdown::Parser::Kramdown::LIST_START = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/list.rb#50
-Kramdown::Parser::Kramdown::LIST_START_OL = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/list.rb#49
-Kramdown::Parser::Kramdown::LIST_START_UL = T.let(T.unsafe(nil), Regexp)
-
-# Regexp for matching the optional space (zero or up to three spaces)
-#
-# source://kramdown//lib/kramdown/parser/kramdown.rb#346
-Kramdown::Parser::Kramdown::OPT_SPACE = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/paragraph.rb#28
-Kramdown::Parser::Kramdown::PARAGRAPH_END = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/paragraph.rb#27
-Kramdown::Parser::Kramdown::PARAGRAPH_MATCH = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/paragraph.rb#26
-Kramdown::Parser::Kramdown::PARAGRAPH_START = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/list.rb#22
-Kramdown::Parser::Kramdown::PARSE_FIRST_LIST_LINE_REGEXP_CACHE = T.let(T.unsafe(nil), Hash)
-
-# source://kramdown//lib/kramdown/parser/kramdown/list.rb#47
-Kramdown::Parser::Kramdown::PATTERN_TAIL = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/header.rb#17
-Kramdown::Parser::Kramdown::SETEXT_HEADER_START = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/smart_quotes.rb#155
-Kramdown::Parser::Kramdown::SMART_QUOTES_RE = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#189
-Kramdown::Parser::Kramdown::SPAN_EXTENSIONS_START = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/smart_quotes.rb#122
-Kramdown::Parser::Kramdown::SQ_CLOSE = T.let(T.unsafe(nil), String)
-
-# source://kramdown//lib/kramdown/parser/kramdown/smart_quotes.rb#121
-Kramdown::Parser::Kramdown::SQ_PUNCT = T.let(T.unsafe(nil), String)
-
-# source://kramdown//lib/kramdown/parser/kramdown/smart_quotes.rb#124
-Kramdown::Parser::Kramdown::SQ_RULES = T.let(T.unsafe(nil), Array)
-
-# '"
-#
-# source://kramdown//lib/kramdown/parser/kramdown/smart_quotes.rb#145
-Kramdown::Parser::Kramdown::SQ_SUBSTS = T.let(T.unsafe(nil), Hash)
-
-# source://kramdown//lib/kramdown/parser/kramdown/table.rb#18
-Kramdown::Parser::Kramdown::TABLE_FSEP_LINE = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/table.rb#17
-Kramdown::Parser::Kramdown::TABLE_HSEP_ALIGN = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/table.rb#21
-Kramdown::Parser::Kramdown::TABLE_LINE = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/table.rb#20
-Kramdown::Parser::Kramdown::TABLE_PIPE_CHECK = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/table.rb#19
-Kramdown::Parser::Kramdown::TABLE_ROW_LINE = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/table.rb#16
-Kramdown::Parser::Kramdown::TABLE_SEP_LINE = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/table.rb#22
-Kramdown::Parser::Kramdown::TABLE_START = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/html.rb#23
-Kramdown::Parser::Kramdown::TRAILING_WHITESPACE = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/typographic_symbol.rb#14
-Kramdown::Parser::Kramdown::TYPOGRAPHIC_SYMS = T.let(T.unsafe(nil), Array)
-
-# source://kramdown//lib/kramdown/parser/kramdown/typographic_symbol.rb#19
-Kramdown::Parser::Kramdown::TYPOGRAPHIC_SYMS_RE = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/kramdown/typographic_symbol.rb#18
-Kramdown::Parser::Kramdown::TYPOGRAPHIC_SYMS_SUBST = T.let(T.unsafe(nil), Hash)
-
-# Used for parsing a document in Markdown format.
-#
-# This parser is based on the kramdown parser and removes the parser methods for the additional
-# non-Markdown features. However, since some things are handled differently by the kramdown
-# parser methods (like deciding when a list item contains just text), this parser differs from
-# real Markdown parsers in some respects.
-#
-# Note, though, that the parser basically fails just one of the Markdown test cases (some others
-# also fail but those failures are negligible).
-#
-# source://kramdown//lib/kramdown/parser/markdown.rb#25
-class Kramdown::Parser::Markdown < ::Kramdown::Parser::Kramdown
- # @return [Markdown] a new instance of Markdown
- #
- # source://kramdown//lib/kramdown/parser/markdown.rb#32
- def initialize(source, options); end
-end
-
-# :stopdoc:
-#
-# source://kramdown//lib/kramdown/parser/markdown.rb#40
-Kramdown::Parser::Markdown::BLOCK_BOUNDARY = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/markdown.rb#43
-Kramdown::Parser::Markdown::CODEBLOCK_MATCH = T.let(T.unsafe(nil), Regexp)
-
-# Array with all the parsing methods that should be removed from the standard kramdown parser.
-#
-# source://kramdown//lib/kramdown/parser/markdown.rb#28
-Kramdown::Parser::Markdown::EXTENDED = T.let(T.unsafe(nil), Array)
-
-# source://kramdown//lib/kramdown/parser/markdown.rb#46
-Kramdown::Parser::Markdown::IAL_RAND_CHARS = T.let(T.unsafe(nil), Array)
-
-# source://kramdown//lib/kramdown/parser/markdown.rb#47
-Kramdown::Parser::Markdown::IAL_RAND_STRING = T.let(T.unsafe(nil), String)
-
-# source://kramdown//lib/kramdown/parser/markdown.rb#49
-Kramdown::Parser::Markdown::IAL_SPAN_START = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/markdown.rb#41
-Kramdown::Parser::Markdown::LAZY_END = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/markdown.rb#48
-Kramdown::Parser::Markdown::LIST_ITEM_IAL = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/parser/markdown.rb#44
-Kramdown::Parser::Markdown::PARAGRAPH_END = T.let(T.unsafe(nil), Regexp)
-
-# == \Utils Module
-#
-# This module contains utility class/modules/methods that can be used by both parsers and
-# converters.
-#
-# source://kramdown//lib/kramdown/utils.rb#16
-module Kramdown::Utils
- class << self
- # Treat +name+ as if it were snake cased (e.g. snake_case) and camelize it (e.g. SnakeCase).
- #
- # source://kramdown//lib/kramdown/utils.rb#26
- def camelize(name); end
-
- # source://kramdown//lib/kramdown/utils.rb#39
- def deep_const_get(str); end
-
- # Treat +name+ as if it were camelized (e.g. CamelizedName) and snake-case it (e.g. camelized_name).
- #
- # source://kramdown//lib/kramdown/utils.rb#31
- def snake_case(name); end
- end
-end
-
-# Methods for registering configurable extensions.
-#
-# source://kramdown//lib/kramdown/utils/configurable.rb#14
-module Kramdown::Utils::Configurable
- # Create a new configurable extension called +name+.
- #
- # Three methods will be defined on the calling object which allow to use this configurable
- # extension:
- #
- # configurables:: Returns a hash of hashes that is used to store all configurables of the
- # object.
- #
- # (ext_name):: Return the configured extension +ext_name+.
- #
- # add_(ext_name, data=nil, &block):: Define an extension +ext_name+ by specifying either
- # the data as argument or by using a block.
- #
- # source://kramdown//lib/kramdown/utils/configurable.rb#28
- def configurable(name); end
-end
-
-# Provides convenience methods for handling named and numeric entities.
-#
-# source://kramdown//lib/kramdown/utils/entities.rb#15
-module Kramdown::Utils::Entities
- private
-
- # Return the entity for the given code point or name +point_or_name+.
- #
- # source://kramdown//lib/kramdown/utils/entities.rb#334
- def entity(point_or_name); end
-
- class << self
- # Return the entity for the given code point or name +point_or_name+.
- #
- # source://kramdown//lib/kramdown/utils/entities.rb#334
- def entity(point_or_name); end
- end
-end
-
-# Contains the mapping of code point (or name) to the actual Entity object.
-#
-# source://kramdown//lib/kramdown/utils/entities.rb#317
-Kramdown::Utils::Entities::ENTITY_MAP = T.let(T.unsafe(nil), Hash)
-
-# Array of arrays. Each sub-array specifies a code point and the associated name.
-#
-# This table is not used directly -- Entity objects are automatically created from it and put
-# into a Hash map when this file is loaded.
-#
-# source://kramdown//lib/kramdown/utils/entities.rb#29
-Kramdown::Utils::Entities::ENTITY_TABLE = T.let(T.unsafe(nil), Array)
-
-# Represents an entity that has a +code_point+ and +name+.
-#
-# source://kramdown//lib/kramdown/utils/entities.rb#18
-class Kramdown::Utils::Entities::Entity < ::Struct
- # Return the UTF8 representation of the entity.
- #
- # source://kramdown//lib/kramdown/utils/entities.rb#20
- def char; end
-
- # Returns the value of attribute code_point
- #
- # @return [Object] the current value of code_point
- def code_point; end
-
- # Sets the attribute code_point
- #
- # @param value [Object] the value to set the attribute code_point to.
- # @return [Object] the newly set value
- def code_point=(_); end
-
- # Returns the value of attribute name
- #
- # @return [Object] the current value of name
- def name; end
-
- # Sets the attribute name
- #
- # @param value [Object] the value to set the attribute name to.
- # @return [Object] the newly set value
- def name=(_); end
-
- class << self
- def [](*_arg0); end
- def inspect; end
- def keyword_init?; end
- def members; end
- def new(*_arg0); end
- end
-end
-
-# Provides convenience methods for HTML related tasks.
-#
-# *Note* that this module has to be mixed into a class that has a @root (containing an element
-# of type :root) and an @options (containing an options hash) instance variable so that some of
-# the methods can work correctly.
-#
-# source://kramdown//lib/kramdown/utils/html.rb#21
-module Kramdown::Utils::Html
- # Convert the entity +e+ to a string. The optional parameter +original+ may contain the
- # original representation of the entity.
- #
- # This method uses the option +entity_output+ to determine the output form for the entity.
- #
- # source://kramdown//lib/kramdown/utils/html.rb#27
- def entity_to_str(e, original = T.unsafe(nil)); end
-
- # Escape the special HTML characters in the string +str+. The parameter +type+ specifies what
- # is escaped: :all - all special HTML characters except the quotation mark as well as
- # entities, :text - all special HTML characters except the quotation mark but no entities and
- # :attribute - all special HTML characters including the quotation mark but no entities.
- #
- # source://kramdown//lib/kramdown/utils/html.rb#69
- def escape_html(str, type = T.unsafe(nil)); end
-
- # source://kramdown//lib/kramdown/utils/html.rb#74
- def fix_cjk_line_break(str); end
-
- # Return the HTML representation of the attributes +attr+.
- #
- # source://kramdown//lib/kramdown/utils/html.rb#44
- def html_attributes(attr); end
-end
-
-# source://kramdown//lib/kramdown/utils/html.rb#59
-Kramdown::Utils::Html::ESCAPE_ALL_RE = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/utils/html.rb#61
-Kramdown::Utils::Html::ESCAPE_ATTRIBUTE_RE = T.let(T.unsafe(nil), Regexp)
-
-# :stopdoc:
-#
-# source://kramdown//lib/kramdown/utils/html.rb#53
-Kramdown::Utils::Html::ESCAPE_MAP = T.let(T.unsafe(nil), Hash)
-
-# source://kramdown//lib/kramdown/utils/html.rb#62
-Kramdown::Utils::Html::ESCAPE_RE_FROM_TYPE = T.let(T.unsafe(nil), Hash)
-
-# source://kramdown//lib/kramdown/utils/html.rb#60
-Kramdown::Utils::Html::ESCAPE_TEXT_RE = T.let(T.unsafe(nil), Regexp)
-
-# source://kramdown//lib/kramdown/utils/html.rb#73
-Kramdown::Utils::Html::REDUNDANT_LINE_BREAK_REGEX = T.let(T.unsafe(nil), Regexp)
-
-# A simple least recently used (LRU) cache.
-#
-# The cache relies on the fact that Ruby's Hash class maintains insertion order. So deleting
-# and re-inserting a key-value pair on access moves the key to the last position. When an
-# entry is added and the cache is full, the first entry is removed.
-#
-# source://kramdown//lib/kramdown/utils/lru_cache.rb#18
-class Kramdown::Utils::LRUCache
- # Creates a new LRUCache that can hold +size+ entries.
- #
- # @return [LRUCache] a new instance of LRUCache
- #
- # source://kramdown//lib/kramdown/utils/lru_cache.rb#21
- def initialize(size); end
-
- # Returns the stored value for +key+ or +nil+ if no value was stored under the key.
- #
- # source://kramdown//lib/kramdown/utils/lru_cache.rb#27
- def [](key); end
-
- # Stores the +value+ under the +key+.
- #
- # source://kramdown//lib/kramdown/utils/lru_cache.rb#32
- def []=(key, value); end
-end
-
-# This patched StringScanner adds line number information for current scan position and a
-# start_line_number override for nested StringScanners.
-#
-# source://kramdown//lib/kramdown/utils/string_scanner.rb#17
-class Kramdown::Utils::StringScanner < ::StringScanner
- # Takes the start line number as optional second argument.
- #
- # Note: The original second argument is no longer used so this should be safe.
- #
- # @return [StringScanner] a new instance of StringScanner
- #
- # source://kramdown//lib/kramdown/utils/string_scanner.rb#26
- def initialize(string, start_line_number = T.unsafe(nil)); end
-
- # Returns the line number for current charpos.
- #
- # NOTE: Requires that all line endings are normalized to '\n'
- #
- # NOTE: Normally we'd have to add one to the count of newlines to get the correct line number.
- # However we add the one indirectly by using a one-based start_line_number.
- #
- # source://kramdown//lib/kramdown/utils/string_scanner.rb#67
- def current_line_number; end
-
- # Sets the byte position of the scan pointer.
- #
- # Note: This also resets some internal variables, so always use pos= when setting the position
- # and don't use any other method for that!
- #
- # source://kramdown//lib/kramdown/utils/string_scanner.rb#37
- def pos=(pos); end
-
- # Revert the position to one saved by #save_pos.
- #
- # source://kramdown//lib/kramdown/utils/string_scanner.rb#56
- def revert_pos(data); end
-
- # Return information needed to revert the byte position of the string scanner in a performant
- # way.
- #
- # The returned data can be fed to #revert_pos to revert the position to the saved one.
- #
- # Note: Just saving #pos won't be enough.
- #
- # source://kramdown//lib/kramdown/utils/string_scanner.rb#51
- def save_pos; end
-
- # The start line number. Used for nested StringScanners that scan a sub-string of the source
- # document. The kramdown parser uses this, e.g., for span level parsers.
- #
- # source://kramdown//lib/kramdown/utils/string_scanner.rb#21
- def start_line_number; end
-end
-
-# The kramdown version.
-#
-# source://kramdown//lib/kramdown/version.rb#13
-Kramdown::VERSION = T.let(T.unsafe(nil), String)
diff --git a/sorbet/rbi/gems/listen@3.7.1.rbi b/sorbet/rbi/gems/listen@3.7.1.rbi
deleted file mode 100644
index 7904eae0..00000000
--- a/sorbet/rbi/gems/listen@3.7.1.rbi
+++ /dev/null
@@ -1,1181 +0,0 @@
-# typed: true
-
-# DO NOT EDIT MANUALLY
-# This is an autogenerated file for types exported from the `listen` gem.
-# Please instead update this file by running `bin/tapioca gem listen`.
-
-# Besides programming error exceptions like ArgumentError,
-# all public interface exceptions should be declared here and inherit from Listen::Error.
-#
-# source://listen//lib/listen/logger.rb#3
-module Listen
- class << self
- # source://listen//lib/listen/logger.rb#12
- def logger; end
-
- # Sets the attribute logger
- #
- # @param value the value to set the attribute logger to.
- #
- # source://listen//lib/listen/logger.rb#10
- def logger=(_arg0); end
-
- # This is used by the `listen` binary to handle Ctrl-C
- #
- # source://listen//lib/listen.rb#37
- def stop; end
-
- # Listens to file system modifications on a either single directory or
- # multiple directories.
- #
- # @return [Listen::Listener] the listener
- # @yield [modified, added, removed] the changed files
- # @yieldparam modified [Array] the list of modified files
- # @yieldparam added [Array] the list of added files
- # @yieldparam removed [Array] the list of removed files
- #
- # source://listen//lib/listen.rb#29
- def to(*args, &block); end
-
- private
-
- # source://listen//lib/listen/logger.rb#18
- def default_logger; end
- end
-end
-
-# source://listen//lib/listen/adapter/base.rb#9
-module Listen::Adapter
- class << self
- # source://listen//lib/listen/adapter.rb#17
- def select(options = T.unsafe(nil)); end
-
- private
-
- # source://listen//lib/listen/adapter.rb#33
- def _usable_adapter_class; end
-
- # source://listen//lib/listen/adapter.rb#37
- def _warn_polling_fallback(options); end
- end
-end
-
-# source://listen//lib/listen/adapter/bsd.rb#9
-class Listen::Adapter::BSD < ::Listen::Adapter::Base
- private
-
- # source://listen//lib/listen/adapter/bsd.rb#73
- def _change(event_flags); end
-
- # source://listen//lib/listen/adapter/bsd.rb#43
- def _configure(directory, &callback); end
-
- # source://listen//lib/listen/adapter/bsd.rb#82
- def _event_path(event); end
-
- # Quick rubocop workaround
- #
- # source://listen//lib/listen/adapter/bsd.rb#102
- def _find(*paths, &block); end
-
- # source://listen//lib/listen/adapter/bsd.rb#55
- def _process_event(dir, event); end
-
- # source://listen//lib/listen/adapter/bsd.rb#51
- def _run; end
-
- # source://listen//lib/listen/adapter/bsd.rb#95
- def _watch_file(path, queue); end
-
- # source://listen//lib/listen/adapter/bsd.rb#86
- def _watch_for_new_file(event); end
-
- class << self
- # @return [Boolean]
- #
- # source://listen//lib/listen/adapter/bsd.rb#31
- def usable?; end
- end
-end
-
-# source://listen//lib/listen/adapter/bsd.rb#23
-Listen::Adapter::BSD::BUNDLER_DECLARE_GEM = T.let(T.unsafe(nil), String)
-
-# source://listen//lib/listen/adapter/bsd.rb#12
-Listen::Adapter::BSD::DEFAULTS = T.let(T.unsafe(nil), Hash)
-
-# source://listen//lib/listen/adapter/bsd.rb#10
-Listen::Adapter::BSD::OS_REGEXP = T.let(T.unsafe(nil), Regexp)
-
-# source://listen//lib/listen/adapter/base.rb#10
-class Listen::Adapter::Base
- # @return [Base] a new instance of Base
- #
- # source://listen//lib/listen/adapter/base.rb#16
- def initialize(config); end
-
- # Returns the value of attribute config.
- #
- # source://listen//lib/listen/adapter/base.rb#11
- def config; end
-
- # TODO: it's a separate method as a temporary workaround for tests
- #
- # source://listen//lib/listen/adapter/base.rb#33
- def configure; end
-
- # Returns the value of attribute options.
- #
- # source://listen//lib/listen/adapter/base.rb#11
- def options; end
-
- # source://listen//lib/listen/adapter/base.rb#65
- def start; end
-
- # @return [Boolean]
- #
- # source://listen//lib/listen/adapter/base.rb#61
- def started?; end
-
- # source://listen//lib/listen/adapter/base.rb#83
- def stop; end
-
- private
-
- # source://listen//lib/listen/adapter/base.rb#111
- def _log_exception(msg, caller_stack); end
-
- # TODO: allow backend adapters to pass specific invalidation objects
- # e.g. Darwin -> DirRescan, INotify -> MoveScan, etc.
- #
- # source://listen//lib/listen/adapter/base.rb#107
- def _queue_change(type, dir, rel_path, options); end
-
- # source://listen//lib/listen/adapter/base.rb#90
- def _stop; end
-
- # source://listen//lib/listen/adapter/base.rb#95
- def _timed(title); end
-
- class << self
- # @return [Boolean]
- #
- # source://listen//lib/listen/adapter/base.rb#123
- def usable?; end
- end
-end
-
-# TODO: only used by tests
-#
-# source://listen//lib/listen/adapter/base.rb#14
-Listen::Adapter::Base::DEFAULTS = T.let(T.unsafe(nil), Hash)
-
-# source://listen//lib/listen/adapter/config.rb#7
-class Listen::Adapter::Config
- # @return [Config] a new instance of Config
- #
- # source://listen//lib/listen/adapter/config.rb#10
- def initialize(directories, queue, silencer, adapter_options); end
-
- # Returns the value of attribute adapter_options.
- #
- # source://listen//lib/listen/adapter/config.rb#8
- def adapter_options; end
-
- # Returns the value of attribute directories.
- #
- # source://listen//lib/listen/adapter/config.rb#8
- def directories; end
-
- # Returns the value of attribute queue.
- #
- # source://listen//lib/listen/adapter/config.rb#8
- def queue; end
-
- # Returns the value of attribute silencer.
- #
- # source://listen//lib/listen/adapter/config.rb#8
- def silencer; end
-end
-
-# Adapter implementation for Mac OS X `FSEvents`.
-#
-# source://listen//lib/listen/adapter/darwin.rb#9
-class Listen::Adapter::Darwin < ::Listen::Adapter::Base
- private
-
- # source://listen//lib/listen/adapter/darwin.rb#39
- def _configure(dir, &callback); end
-
- # source://listen//lib/listen/adapter/darwin.rb#52
- def _process_changes(dirs); end
-
- # source://listen//lib/listen/adapter/darwin.rb#64
- def _process_event(dir, path); end
-
- # source://listen//lib/listen/adapter/darwin.rb#43
- def _run; end
-
- # source://listen//lib/listen/adapter/darwin.rb#71
- def _stop; end
-
- class << self
- # @return [Boolean]
- #
- # source://listen//lib/listen/adapter/darwin.rb#25
- def usable?; end
- end
-end
-
-# The default delay between checking for changes.
-#
-# source://listen//lib/listen/adapter/darwin.rb#13
-Listen::Adapter::Darwin::DEFAULTS = T.let(T.unsafe(nil), Hash)
-
-# source://listen//lib/listen/adapter/darwin.rb#15
-Listen::Adapter::Darwin::INCOMPATIBLE_GEM_VERSION = T.let(T.unsafe(nil), String)
-
-# source://listen//lib/listen/adapter/darwin.rb#10
-Listen::Adapter::Darwin::OS_REGEXP = T.let(T.unsafe(nil), Regexp)
-
-# @see https://github.com/nex3/rb-inotify
-#
-# source://listen//lib/listen/adapter/linux.rb#6
-class Listen::Adapter::Linux < ::Listen::Adapter::Base
- private
-
- # source://listen//lib/listen/adapter/linux.rb#86
- def _change(event_flags); end
-
- # source://listen//lib/listen/adapter/linux.rb#27
- def _configure(directory, &callback); end
-
- # @return [Boolean]
- #
- # source://listen//lib/listen/adapter/linux.rb#97
- def _dir_event?(event); end
-
- # source://listen//lib/listen/adapter/linux.rb#42
- def _process_event(dir, event); end
-
- # source://listen//lib/listen/adapter/linux.rb#37
- def _run; end
-
- # @return [Boolean]
- #
- # source://listen//lib/listen/adapter/linux.rb#76
- def _skip_event?(event); end
-
- # source://listen//lib/listen/adapter/linux.rb#101
- def _stop; end
-end
-
-# source://listen//lib/listen/adapter/linux.rb#9
-Listen::Adapter::Linux::DEFAULTS = T.let(T.unsafe(nil), Hash)
-
-# source://listen//lib/listen/adapter/linux.rb#7
-Listen::Adapter::Linux::OS_REGEXP = T.let(T.unsafe(nil), Regexp)
-
-# source://listen//lib/listen/adapter/linux.rb#24
-Listen::Adapter::Linux::README_URL = T.let(T.unsafe(nil), String)
-
-# source://listen//lib/listen/adapter.rb#12
-Listen::Adapter::OPTIMIZED_ADAPTERS = T.let(T.unsafe(nil), Array)
-
-# source://listen//lib/listen/adapter.rb#13
-Listen::Adapter::POLLING_FALLBACK_MESSAGE = T.let(T.unsafe(nil), String)
-
-# Polling Adapter that works cross-platform and
-# has no dependencies. This is the adapter that
-# uses the most CPU processing power and has higher
-# file IO than the other implementations.
-#
-# source://listen//lib/listen/adapter/polling.rb#10
-class Listen::Adapter::Polling < ::Listen::Adapter::Base
- private
-
- # source://listen//lib/listen/adapter/polling.rb#17
- def _configure(_, &callback); end
-
- # source://listen//lib/listen/adapter/polling.rb#35
- def _process_event(dir, _); end
-
- # source://listen//lib/listen/adapter/polling.rb#22
- def _run; end
-end
-
-# source://listen//lib/listen/adapter/polling.rb#13
-Listen::Adapter::Polling::DEFAULTS = T.let(T.unsafe(nil), Hash)
-
-# match every OS
-#
-# source://listen//lib/listen/adapter/polling.rb#11
-Listen::Adapter::Polling::OS_REGEXP = T.let(T.unsafe(nil), Regexp)
-
-# Adapter implementation for Windows `wdm`.
-#
-# source://listen//lib/listen/adapter/windows.rb#7
-class Listen::Adapter::Windows < ::Listen::Adapter::Base
- private
-
- # source://listen//lib/listen/adapter/windows.rb#87
- def _change(type); end
-
- # source://listen//lib/listen/adapter/windows.rb#29
- def _configure(dir); end
-
- # source://listen//lib/listen/adapter/windows.rb#51
- def _process_event(dir, event); end
-
- # source://listen//lib/listen/adapter/windows.rb#46
- def _run; end
-
- class << self
- # @return [Boolean]
- #
- # source://listen//lib/listen/adapter/windows.rb#15
- def usable?; end
- end
-end
-
-# source://listen//lib/listen/adapter/windows.rb#10
-Listen::Adapter::Windows::BUNDLER_DECLARE_GEM = T.let(T.unsafe(nil), String)
-
-# source://listen//lib/listen/adapter/windows.rb#8
-Listen::Adapter::Windows::OS_REGEXP = T.let(T.unsafe(nil), Regexp)
-
-# source://listen//lib/listen/backend.rb#12
-class Listen::Backend
- extend ::Forwardable
-
- # @return [Backend] a new instance of Backend
- #
- # source://listen//lib/listen/backend.rb#15
- def initialize(directories, queue, silencer, config); end
-
- # Returns the value of attribute min_delay_between_events.
- #
- # source://listen//lib/listen/backend.rb#34
- def min_delay_between_events; end
-
- # source://forwardable/1.3.2/forwardable.rb#229
- def start(*args, **_arg1, &block); end
-
- # source://forwardable/1.3.2/forwardable.rb#229
- def stop(*args, **_arg1, &block); end
-
- private
-
- # Returns the value of attribute adapter.
- #
- # source://listen//lib/listen/backend.rb#38
- def adapter; end
-end
-
-# TODO: rename to Snapshot
-#
-# source://listen//lib/listen/change.rb#8
-class Listen::Change
- # @return [Change] a new instance of Change
- #
- # source://listen//lib/listen/change.rb#27
- def initialize(config, record); end
-
- # Invalidate some part of the snapshot/record (dir, file, subtree, etc.)
- #
- # source://listen//lib/listen/change.rb#36
- def invalidate(type, rel_path, options); end
-
- # Returns the value of attribute record.
- #
- # source://listen//lib/listen/change.rb#25
- def record; end
-end
-
-# TODO: test this class for coverage
-#
-# source://listen//lib/listen/change.rb#10
-class Listen::Change::Config
- # @return [Config] a new instance of Config
- #
- # source://listen//lib/listen/change.rb#11
- def initialize(queue, silencer); end
-
- # source://listen//lib/listen/change.rb#20
- def queue(*args); end
-
- # @return [Boolean]
- #
- # source://listen//lib/listen/change.rb#16
- def silenced?(path, type); end
-end
-
-# TODO: refactor (turn it into a normal object, cache the stat, etc)
-#
-# source://listen//lib/listen/directory.rb#7
-class Listen::Directory
- class << self
- # source://listen//lib/listen/directory.rb#62
- def _async_changes(snapshot, path, previous, options); end
-
- # source://listen//lib/listen/directory.rb#72
- def _change(snapshot, type, path, options); end
-
- # source://listen//lib/listen/directory.rb#82
- def _children(path); end
-
- # @return [Boolean]
- #
- # source://listen//lib/listen/directory.rb#56
- def ascendant_of?(base, other); end
-
- # source://listen//lib/listen/directory.rb#9
- def scan(snapshot, rel_path, options); end
- end
-end
-
-# source://listen//lib/listen/error.rb#6
-class Listen::Error < ::RuntimeError; end
-
-# source://listen//lib/listen/error.rb#9
-class Listen::Error::INotifyMaxWatchesExceeded < ::Listen::Error; end
-
-# source://listen//lib/listen/error.rb#7
-class Listen::Error::NotStarted < ::Listen::Error; end
-
-# source://listen//lib/listen/error.rb#8
-class Listen::Error::SymlinkLoop < ::Listen::Error; end
-
-# source://listen//lib/listen/event/processor.rb#6
-module Listen::Event; end
-
-# source://listen//lib/listen/event/config.rb#5
-class Listen::Event::Config
- # @return [Config] a new instance of Config
- #
- # source://listen//lib/listen/event/config.rb#8
- def initialize(listener, event_queue, queue_optimizer, wait_for_delay, &block); end
-
- # source://listen//lib/listen/event/config.rb#27
- def call(*args); end
-
- # @return [Boolean]
- #
- # source://listen//lib/listen/event/config.rb#31
- def callable?; end
-
- # Returns the value of attribute event_queue.
- #
- # source://listen//lib/listen/event/config.rb#6
- def event_queue; end
-
- # Returns the value of attribute listener.
- #
- # source://listen//lib/listen/event/config.rb#6
- def listener; end
-
- # Returns the value of attribute min_delay_between_events.
- #
- # source://listen//lib/listen/event/config.rb#6
- def min_delay_between_events; end
-
- # source://listen//lib/listen/event/config.rb#35
- def optimize_changes(changes); end
-
- # source://listen//lib/listen/event/config.rb#23
- def sleep(seconds); end
-end
-
-# source://listen//lib/listen/event/loop.rb#12
-class Listen::Event::Loop
- include ::Listen::FSM
- extend ::Listen::FSM::ClassMethods
-
- # @return [Loop] a new instance of Loop
- #
- # source://listen//lib/listen/event/loop.rb#24
- def initialize(config); end
-
- # source://listen//lib/listen/event/loop.rb#62
- def pause; end
-
- # source://listen//lib/listen/event/loop.rb#44
- def start; end
-
- # @return [Boolean]
- #
- # source://listen//lib/listen/event/loop.rb#37
- def started?; end
-
- # source://listen//lib/listen/event/loop.rb#67
- def stop; end
-
- # @return [Boolean]
- #
- # source://listen//lib/listen/event/loop.rb#74
- def stopped?; end
-
- # source://listen//lib/listen/event/loop.rb#31
- def wakeup_on_event; end
-
- private
-
- # source://listen//lib/listen/event/loop.rb#80
- def _process_changes; end
-
- # source://listen//lib/listen/event/loop.rb#88
- def _wakeup(reason); end
-end
-
-# source://listen//lib/listen/event/loop.rb#15
-Listen::Event::Loop::Error = Listen::Error
-
-# source://listen//lib/listen/event/loop.rb#41
-Listen::Event::Loop::MAX_STARTUP_SECONDS = T.let(T.unsafe(nil), Float)
-
-# for backward compatibility
-#
-# source://listen//lib/listen/event/loop.rb#16
-Listen::Event::Loop::NotStarted = Listen::Error::NotStarted
-
-# source://listen//lib/listen/event/processor.rb#7
-class Listen::Event::Processor
- # @return [Processor] a new instance of Processor
- #
- # source://listen//lib/listen/event/processor.rb#8
- def initialize(config, reasons); end
-
- # TODO: implement this properly instead of checking the state at arbitrary
- # points in time
- #
- # source://listen//lib/listen/event/processor.rb#17
- def loop_for(latency); end
-
- private
-
- # source://listen//lib/listen/event/processor.rb#55
- def _check_stopped; end
-
- # source://listen//lib/listen/event/processor.rb#82
- def _deadline; end
-
- # source://listen//lib/listen/event/processor.rb#94
- def _flush_wakeup_reasons; end
-
- # for easier testing without sleep loop
- #
- # source://listen//lib/listen/event/processor.rb#102
- def _process_changes(event); end
-
- # source://listen//lib/listen/event/processor.rb#74
- def _remember_time_of_first_unprocessed_event; end
-
- # source://listen//lib/listen/event/processor.rb#78
- def _reset_no_unprocessed_events; end
-
- # source://listen//lib/listen/event/processor.rb#62
- def _sleep(seconds); end
-
- # blocks until event is popped
- # returns the event or `nil` when the event_queue is closed
- #
- # source://listen//lib/listen/event/processor.rb#88
- def _wait_until_events; end
-
- # source://listen//lib/listen/event/processor.rb#36
- def _wait_until_events_calm_down; end
-
- # source://listen//lib/listen/event/processor.rb#51
- def _wait_until_no_longer_paused; end
-
- # Returns the value of attribute config.
- #
- # source://listen//lib/listen/event/processor.rb#123
- def config; end
-end
-
-# source://listen//lib/listen/event/processor.rb#33
-class Listen::Event::Processor::Stopped < ::RuntimeError; end
-
-# source://listen//lib/listen/event/queue.rb#9
-class Listen::Event::Queue
- extend ::Forwardable
-
- # @return [Queue] a new instance of Queue
- #
- # source://listen//lib/listen/event/queue.rb#22
- def initialize(config); end
-
- # source://listen//lib/listen/event/queue.rb#27
- def <<(args); end
-
- # source://forwardable/1.3.2/forwardable.rb#229
- def close(*args, **_arg1, &block); end
-
- # source://forwardable/1.3.2/forwardable.rb#229
- def empty?(*args, **_arg1, &block); end
-
- # source://forwardable/1.3.2/forwardable.rb#229
- def pop(*args, **_arg1, &block); end
-
- private
-
- # source://listen//lib/listen/event/queue.rb#47
- def _safe_relative_from_cwd(dir); end
-end
-
-# source://listen//lib/listen/event/queue.rb#12
-class Listen::Event::Queue::Config
- # @return [Config] a new instance of Config
- #
- # source://listen//lib/listen/event/queue.rb#13
- def initialize(relative); end
-
- # @return [Boolean]
- #
- # source://listen//lib/listen/event/queue.rb#17
- def relative?; end
-end
-
-# source://listen//lib/listen/fsm.rb#8
-module Listen::FSM
- mixes_in_class_methods ::Listen::FSM::ClassMethods
-
- # Note: including classes must call initialize_fsm from their initialize method.
- #
- # source://listen//lib/listen/fsm.rb#42
- def initialize_fsm; end
-
- # Current state of the FSM, stored as a symbol
- #
- # source://listen//lib/listen/fsm.rb#50
- def state; end
-
- # checks for one of the given states to wait for
- # if not already, waits for a state change (up to timeout seconds--`nil` means infinite)
- # returns truthy iff the transition to one of the desired state has occurred
- #
- # source://listen//lib/listen/fsm.rb#55
- def wait_for_state(*wait_for_states, timeout: T.unsafe(nil)); end
-
- private
-
- # source://listen//lib/listen/fsm.rb#108
- def current_state; end
-
- # source://listen//lib/listen/fsm.rb#69
- def transition(new_state_name); end
-
- # Low-level, immediate state transition with no checks or callbacks.
- #
- # source://listen//lib/listen/fsm.rb#77
- def transition!(new_state_name); end
-
- # source://listen//lib/listen/fsm.rb#103
- def transition_with_callbacks!(new_state); end
-
- # source://listen//lib/listen/fsm.rb#87
- def validate_and_sanitize_new_state(new_state_name); end
-
- class << self
- # Included hook to extend class methods
- #
- # source://listen//lib/listen/fsm.rb#10
- def included(klass); end
- end
-end
-
-# source://listen//lib/listen/fsm.rb#14
-module Listen::FSM::ClassMethods
- # Obtain or set the start state
- # Passing a state name sets the start state
- #
- # source://listen//lib/listen/fsm.rb#17
- def start_state(new_start_state = T.unsafe(nil)); end
-
- # Declare an FSM state and optionally provide a callback block to fire on state entry
- # Options:
- # * to: a state or array of states this state can transition to
- #
- # source://listen//lib/listen/fsm.rb#35
- def state(state_name, to: T.unsafe(nil), &block); end
-
- # The valid states for this FSM, as a hash with state name symbols as keys and State objects as values.
- #
- # source://listen//lib/listen/fsm.rb#28
- def states; end
-end
-
-# source://listen//lib/listen/fsm.rb#112
-class Listen::FSM::State
- # @return [State] a new instance of State
- #
- # source://listen//lib/listen/fsm.rb#115
- def initialize(name, transitions, &block); end
-
- # source://listen//lib/listen/fsm.rb#123
- def call(obj); end
-
- # Returns the value of attribute name.
- #
- # source://listen//lib/listen/fsm.rb#113
- def name; end
-
- # Returns the value of attribute transitions.
- #
- # source://listen//lib/listen/fsm.rb#113
- def transitions; end
-
- # @return [Boolean]
- #
- # source://listen//lib/listen/fsm.rb#127
- def valid_transition?(new_state); end
-end
-
-# source://listen//lib/listen/file.rb#6
-class Listen::File
- class << self
- # source://listen//lib/listen/file.rb#10
- def change(record, rel_path); end
-
- # @return [Boolean]
- #
- # source://listen//lib/listen/file.rb#86
- def inaccurate_mac_time?(stat); end
- end
-end
-
-# source://listen//lib/listen/listener/config.rb#4
-class Listen::Listener
- include ::Listen::FSM
- extend ::Listen::FSM::ClassMethods
-
- # Initializes the directories listener.
- #
- #
- # @param directory [String] the directories to listen to
- # @param options [Hash] the listen options (see Listen::Listener::Options)
- # @return [Listener] a new instance of Listener
- # @yield [modified, added, removed] the changed files
- # @yieldparam modified [Array] the list of modified files
- # @yieldparam added [Array] the list of added files
- # @yieldparam removed [Array] the list of removed files
- #
- # source://listen//lib/listen/listener.rb#37
- def initialize(*dirs, &block); end
-
- # source://listen//lib/listen/listener.rb#124
- def ignore(regexps); end
-
- # source://listen//lib/listen/listener.rb#128
- def ignore!(regexps); end
-
- # source://listen//lib/listen/listener.rb#132
- def only(regexps); end
-
- # Stops invoking callbacks (messages pile up)
- #
- # source://listen//lib/listen/listener.rb#107
- def pause; end
-
- # @return [Boolean]
- #
- # source://listen//lib/listen/listener.rb#116
- def paused?; end
-
- # processing means callbacks are called
- #
- # @return [Boolean]
- #
- # source://listen//lib/listen/listener.rb#112
- def processing?; end
-
- # Starts processing events and starts adapters
- # or resumes invoking callbacks if paused
- #
- # source://listen//lib/listen/listener.rb#89
- def start; end
-
- # Stops both listening for events and processing them
- #
- # source://listen//lib/listen/listener.rb#102
- def stop; end
-
- # @return [Boolean]
- #
- # source://listen//lib/listen/listener.rb#120
- def stopped?; end
-end
-
-# source://listen//lib/listen/listener/config.rb#5
-class Listen::Listener::Config
- # @return [Config] a new instance of Config
- #
- # source://listen//lib/listen/listener/config.rb#17
- def initialize(opts); end
-
- # source://listen//lib/listen/listener/config.rb#30
- def adapter_instance_options(klass); end
-
- # source://listen//lib/listen/listener/config.rb#35
- def adapter_select_options; end
-
- # Returns the value of attribute min_delay_between_events.
- #
- # source://listen//lib/listen/listener/config.rb#28
- def min_delay_between_events; end
-
- # @return [Boolean]
- #
- # source://listen//lib/listen/listener/config.rb#24
- def relative?; end
-
- # Returns the value of attribute silencer_rules.
- #
- # source://listen//lib/listen/listener/config.rb#28
- def silencer_rules; end
-end
-
-# source://listen//lib/listen/listener/config.rb#6
-Listen::Listener::Config::DEFAULTS = T.let(T.unsafe(nil), Hash)
-
-# source://listen//lib/listen/monotonic_time.rb#4
-module Listen::MonotonicTime
- class << self
- # source://listen//lib/listen/monotonic_time.rb#8
- def now; end
- end
-end
-
-# source://listen//lib/listen/options.rb#4
-class Listen::Options
- # @return [Options] a new instance of Options
- #
- # source://listen//lib/listen/options.rb#5
- def initialize(opts, defaults); end
-
- # source://listen//lib/listen/options.rb#20
- def method_missing(name, *_); end
-
- private
-
- # @return [Boolean]
- #
- # source://listen//lib/listen/options.rb#16
- def respond_to_missing?(name, *_); end
-end
-
-# source://listen//lib/listen/queue_optimizer.rb#4
-class Listen::QueueOptimizer
- # @return [QueueOptimizer] a new instance of QueueOptimizer
- #
- # source://listen//lib/listen/queue_optimizer.rb#32
- def initialize(config); end
-
- # source://listen//lib/listen/queue_optimizer.rb#24
- def smoosh_changes(changes); end
-
- private
-
- # source://listen//lib/listen/queue_optimizer.rb#69
- def _calculate_add_remove_difference(actions, path, default_if_exists); end
-
- # source://listen//lib/listen/queue_optimizer.rb#61
- def _logical_action_for(path, actions); end
-
- # remove extraneous rb-inotify events, keeping them only if it's a possible
- # editor rename() call (e.g. Kate and Sublime)
- #
- # source://listen//lib/listen/queue_optimizer.rb#91
- def _reinterpret_related_changes(cookies); end
-
- # groups changes into the expected structure expected by
- # clients
- #
- # source://listen//lib/listen/queue_optimizer.rb#42
- def _squash_changes(changes); end
-
- # Returns the value of attribute config.
- #
- # source://listen//lib/listen/queue_optimizer.rb#38
- def config; end
-
- # @return [Boolean]
- #
- # source://listen//lib/listen/queue_optimizer.rb#107
- def editor_modified?(changes); end
-end
-
-# source://listen//lib/listen/queue_optimizer.rb#5
-class Listen::QueueOptimizer::Config
- # @return [Config] a new instance of Config
- #
- # source://listen//lib/listen/queue_optimizer.rb#6
- def initialize(adapter_class, silencer); end
-
- # source://listen//lib/listen/queue_optimizer.rb#19
- def debug(*args, &block); end
-
- # @return [Boolean]
- #
- # source://listen//lib/listen/queue_optimizer.rb#11
- def exist?(path); end
-
- # @return [Boolean]
- #
- # source://listen//lib/listen/queue_optimizer.rb#15
- def silenced?(path, type); end
-end
-
-# @private api
-#
-# source://listen//lib/listen/record/entry.rb#5
-class Listen::Record
- # @return [Record] a new instance of Record
- #
- # source://listen//lib/listen/record.rb#14
- def initialize(directory, silencer); end
-
- # source://listen//lib/listen/record.rb#20
- def add_dir(rel_path); end
-
- # source://listen//lib/listen/record.rb#62
- def build; end
-
- # source://listen//lib/listen/record.rb#46
- def dir_entries(rel_path); end
-
- # source://listen//lib/listen/record.rb#36
- def file_data(rel_path); end
-
- # TODO: one Record object per watched directory?
- # TODO: deprecate
- #
- # source://listen//lib/listen/record.rb#12
- def root; end
-
- # source://listen//lib/listen/record.rb#31
- def unset_path(rel_path); end
-
- # source://listen//lib/listen/record.rb#26
- def update_file(rel_path, data); end
-
- private
-
- # source://listen//lib/listen/record.rb#103
- def _fast_build_dir(remaining, symlink_detector); end
-
- # source://listen//lib/listen/record.rb#117
- def _fast_try_file(entry); end
-
- # source://listen//lib/listen/record.rb#91
- def _fast_unset_path(dirname, basename); end
-
- # source://listen//lib/listen/record.rb#83
- def _fast_update_file(dirname, basename, data); end
-
- # @return [Boolean]
- #
- # source://listen//lib/listen/record.rb#75
- def empty_dirname?(dirname); end
-
- # source://listen//lib/listen/record.rb#79
- def reset_tree; end
-end
-
-# Represents a directory entry (dir or file)
-#
-# source://listen//lib/listen/record/entry.rb#7
-class Listen::Record::Entry
- # file: "/home/me/watched_dir", "app/models", "foo.rb"
- # dir, "/home/me/watched_dir", "."
- #
- # @return [Entry] a new instance of Entry
- #
- # source://listen//lib/listen/record/entry.rb#10
- def initialize(root, relative, name = T.unsafe(nil)); end
-
- # source://listen//lib/listen/record/entry.rb#18
- def children; end
-
- # source://listen//lib/listen/record/entry.rb#25
- def meta; end
-
- # Returns the value of attribute name.
- #
- # source://listen//lib/listen/record/entry.rb#16
- def name; end
-
- # source://listen//lib/listen/record/entry.rb#43
- def real_path; end
-
- # record hash is e.g.
- # if @record["/home/me/watched_dir"]["project/app/models"]["foo.rb"]
- # if @record["/home/me/watched_dir"]["project/app"]["models"]
- # record_dir_key is "project/app/models"
- #
- # source://listen//lib/listen/record/entry.rb#34
- def record_dir_key; end
-
- # Returns the value of attribute relative.
- #
- # source://listen//lib/listen/record/entry.rb#16
- def relative; end
-
- # Returns the value of attribute root.
- #
- # source://listen//lib/listen/record/entry.rb#16
- def root; end
-
- # source://listen//lib/listen/record/entry.rb#38
- def sys_path; end
-
- private
-
- # @raise [Errno::ENOTDIR]
- #
- # source://listen//lib/listen/record/entry.rb#54
- def _entries(dir); end
-
- # source://listen//lib/listen/record/entry.rb#49
- def _join; end
-end
-
-# source://listen//lib/listen/record/symlink_detector.rb#9
-class Listen::Record::SymlinkDetector
- # @return [SymlinkDetector] a new instance of SymlinkDetector
- #
- # source://listen//lib/listen/record/symlink_detector.rb#24
- def initialize; end
-
- # source://listen//lib/listen/record/symlink_detector.rb#28
- def verify_unwatched!(entry); end
-
- private
-
- # @raise [::Listen::Error::SymlinkLoop]
- #
- # source://listen//lib/listen/record/symlink_detector.rb#35
- def _fail(symlinked, real_path); end
-end
-
-# for backward compatibility
-#
-# source://listen//lib/listen/record/symlink_detector.rb#22
-Listen::Record::SymlinkDetector::Error = Listen::Error
-
-# source://listen//lib/listen/record/symlink_detector.rb#10
-Listen::Record::SymlinkDetector::README_URL = T.let(T.unsafe(nil), String)
-
-# source://listen//lib/listen/record/symlink_detector.rb#12
-Listen::Record::SymlinkDetector::SYMLINK_LOOP_ERROR = T.let(T.unsafe(nil), String)
-
-# source://listen//lib/listen/silencer.rb#4
-class Listen::Silencer
- # @return [Silencer] a new instance of Silencer
- #
- # source://listen//lib/listen/silencer.rb#67
- def initialize(**options); end
-
- # TODO: deprecate this mutator
- #
- # source://listen//lib/listen/silencer.rb#72
- def configure(options); end
-
- # TODO: deprecate these mutators; use attr_reader instead
- #
- # source://listen//lib/listen/silencer.rb#65
- def ignore_patterns; end
-
- # TODO: deprecate these mutators; use attr_reader instead
- #
- # source://listen//lib/listen/silencer.rb#65
- def ignore_patterns=(_arg0); end
-
- # TODO: deprecate these mutators; use attr_reader instead
- #
- # source://listen//lib/listen/silencer.rb#65
- def only_patterns; end
-
- # TODO: deprecate these mutators; use attr_reader instead
- #
- # source://listen//lib/listen/silencer.rb#65
- def only_patterns=(_arg0); end
-
- # @return [Boolean]
- #
- # source://listen//lib/listen/silencer.rb#77
- def silenced?(relative_path, type); end
-
- private
-
- # @return [Boolean]
- #
- # source://listen//lib/listen/silencer.rb#85
- def _ignore?(path); end
-
- # source://listen//lib/listen/silencer.rb#93
- def _init_ignores(ignores, overrides); end
-
- # @return [Boolean]
- #
- # source://listen//lib/listen/silencer.rb#89
- def _only?(path); end
-end
-
-# source://listen//lib/listen/silencer/controller.rb#5
-class Listen::Silencer::Controller
- # @return [Controller] a new instance of Controller
- #
- # source://listen//lib/listen/silencer/controller.rb#6
- def initialize(silencer, default_options); end
-
- # source://listen//lib/listen/silencer/controller.rb#19
- def append_ignores(*regexps); end
-
- # source://listen//lib/listen/silencer/controller.rb#24
- def replace_with_bang_ignores(regexps); end
-
- # source://listen//lib/listen/silencer/controller.rb#28
- def replace_with_only(regexps); end
-
- private
-
- # source://listen//lib/listen/silencer/controller.rb#34
- def _reconfigure_silencer(extra_options); end
-end
-
-# The default list of files that get ignored.
-#
-# source://listen//lib/listen/silencer.rb#24
-Listen::Silencer::DEFAULT_IGNORED_EXTENSIONS = T.let(T.unsafe(nil), Regexp)
-
-# The default list of directories that get ignored.
-#
-# source://listen//lib/listen/silencer.rb#6
-Listen::Silencer::DEFAULT_IGNORED_FILES = T.let(T.unsafe(nil), Regexp)
-
-# source://listen//lib/listen/thread.rb#8
-module Listen::Thread
- class << self
- # Creates a new thread with the given name.
- # Any exceptions raised by the thread will be logged with the thread name and complete backtrace.
- #
- # source://listen//lib/listen/thread.rb#13
- def new(name, &block); end
-
- # source://listen//lib/listen/thread.rb#25
- def rescue_and_log(method_name, *args, caller_stack: T.unsafe(nil)); end
-
- private
-
- # source://listen//lib/listen/thread.rb#43
- def _exception_with_causes(exception); end
-
- # source://listen//lib/listen/thread.rb#33
- def _log_exception(exception, thread_name, caller_stack: T.unsafe(nil)); end
- end
-end
-
-# source://listen//lib/listen/version.rb#4
-Listen::VERSION = T.let(T.unsafe(nil), String)
diff --git a/sorbet/rbi/gems/localhost@1.1.10.rbi b/sorbet/rbi/gems/localhost@1.1.10.rbi
deleted file mode 100644
index 70f96f84..00000000
--- a/sorbet/rbi/gems/localhost@1.1.10.rbi
+++ /dev/null
@@ -1,104 +0,0 @@
-# typed: true
-
-# DO NOT EDIT MANUALLY
-# This is an autogenerated file for types exported from the `localhost` gem.
-# Please instead update this file by running `bin/tapioca gem localhost`.
-
-# source:////lib/localhost/version.rb#6
-module Localhost; end
-
-# Represents a single public/private key pair for a given hostname.
-#
-# source:////lib/localhost/authority.rb#15
-class Localhost::Authority
- # Create an authority forn the given hostname.
- #
- # @return [Authority] a new instance of Authority
- #
- # source:////lib/localhost/authority.rb#50
- def initialize(hostname = T.unsafe(nil), root: T.unsafe(nil)); end
-
- # The public certificate.
- #
- # source:////lib/localhost/authority.rb#103
- def certificate; end
-
- # The public certificate path.
- #
- # source:////lib/localhost/authority.rb#79
- def certificate_path; end
-
- # source:////lib/localhost/authority.rb#168
- def client_context(*args); end
-
- # source:////lib/localhost/authority.rb#69
- def dh_key; end
-
- # source:////lib/localhost/authority.rb#65
- def ecdh_key; end
-
- # The hostname of the certificate authority.
- #
- # source:////lib/localhost/authority.rb#61
- def hostname; end
-
- # The private key.
- #
- # source:////lib/localhost/authority.rb#84
- def key; end
-
- # source:////lib/localhost/authority.rb#88
- def key=(key); end
-
- # The private key path.
- #
- # source:////lib/localhost/authority.rb#74
- def key_path; end
-
- # source:////lib/localhost/authority.rb#178
- def load(path = T.unsafe(nil)); end
-
- # The certificate name.
- #
- # source:////lib/localhost/authority.rb#93
- def name; end
-
- # source:////lib/localhost/authority.rb#97
- def name=(name); end
-
- # source:////lib/localhost/authority.rb#198
- def save(path = T.unsafe(nil)); end
-
- # source:////lib/localhost/authority.rb#143
- def server_context(*arguments); end
-
- # The certificate store which is used for validating the server certificate.
- #
- # source:////lib/localhost/authority.rb#134
- def store; end
-
- class << self
- # Fetch (load or create) a certificate with the given hostname.
- # See {#initialize} for the format of the arguments.
- #
- # source:////lib/localhost/authority.rb#37
- def fetch(*arguments, **options); end
-
- # List all certificate authorities in the given directory:
- #
- # source:////lib/localhost/authority.rb#21
- def list(root = T.unsafe(nil)); end
-
- # source:////lib/localhost/authority.rb#16
- def path; end
- end
-end
-
-# source:////lib/localhost/authority.rb#63
-Localhost::Authority::BITS = T.let(T.unsafe(nil), Integer)
-
-# source:////lib/localhost/authority.rb#140
-Localhost::Authority::SERVER_CIPHERS = T.let(T.unsafe(nil), String)
-
-# source:////lib/localhost/version.rb#7
-Localhost::VERSION = T.let(T.unsafe(nil), String)
diff --git a/sorbet/rbi/gems/lumberjack@1.2.8.rbi b/sorbet/rbi/gems/lumberjack@1.2.8.rbi
deleted file mode 100644
index bc272756..00000000
--- a/sorbet/rbi/gems/lumberjack@1.2.8.rbi
+++ /dev/null
@@ -1,1501 +0,0 @@
-# typed: true
-
-# DO NOT EDIT MANUALLY
-# This is an autogenerated file for types exported from the `lumberjack` gem.
-# Please instead update this file by running `bin/tapioca gem lumberjack`.
-
-# frozen_string_literals: true
-#
-# source://lumberjack//lib/lumberjack.rb#8
-module Lumberjack
- class << self
- # Contexts can be used to store tags that will be attached to all log entries in the block.
- #
- # If this method is called with a block, it will set a logging context for the scope of a block.
- # If there is already a context in scope, a new one will be created that inherits
- # all the tags of the parent context.
- #
- # Otherwise, it will return the current context. If one doesn't exist, it will return a new one
- # but that context will not be in any scope.
- #
- # source://lumberjack//lib/lumberjack.rb#56
- def context(&block); end
-
- # Return true if inside a context block.
- #
- # @return [Boolean]
- #
- # source://lumberjack//lib/lumberjack.rb#77
- def context?; end
-
- # Return the tags from the current context or nil if there are no tags.
- #
- # source://lumberjack//lib/lumberjack.rb#82
- def context_tags; end
-
- # Set tags on the current context
- #
- # source://lumberjack//lib/lumberjack.rb#88
- def tag(tags); end
-
- # Define a unit of work within a block. Within the block supplied to this
- # method, calling +unit_of_work_id+ will return the same value that can
- # This can then be used for tying together log entries.
- #
- # You can specify the id for the unit of work if desired. If you don't supply
- # it, a 12 digit hexidecimal number will be automatically generated for you.
- #
- # For the common use case of treating a single web request as a unit of work, see the
- # Lumberjack::Rack::UnitOfWork class.
- #
- # source://lumberjack//lib/lumberjack.rb#35
- def unit_of_work(id = T.unsafe(nil)); end
-
- # Get the UniqueIdentifier for the current unit of work.
- #
- # source://lumberjack//lib/lumberjack.rb#44
- def unit_of_work_id; end
-
- # Set the context to use within a block.
- #
- # source://lumberjack//lib/lumberjack.rb#66
- def use_context(context, &block); end
- end
-end
-
-# A context is used to store tags that are then added to all log entries within a block.
-#
-# source://lumberjack//lib/lumberjack/context.rb#5
-class Lumberjack::Context
- # @return [Context] a new instance of Context
- #
- # source://lumberjack//lib/lumberjack/context.rb#8
- def initialize(parent_context = T.unsafe(nil)); end
-
- # Get a context tag.
- #
- # source://lumberjack//lib/lumberjack/context.rb#21
- def [](key); end
-
- # Set a context tag.
- #
- # source://lumberjack//lib/lumberjack/context.rb#26
- def []=(key, value); end
-
- # Clear all the context data.
- #
- # source://lumberjack//lib/lumberjack/context.rb#31
- def reset; end
-
- # Set tags on the context.
- #
- # source://lumberjack//lib/lumberjack/context.rb#14
- def tag(tags); end
-
- # Returns the value of attribute tags.
- #
- # source://lumberjack//lib/lumberjack/context.rb#6
- def tags; end
-end
-
-# This is an abstract class for logging devices. Subclasses must implement the +write+ method and
-# may implement the +close+ and +flush+ methods if applicable.
-#
-# source://lumberjack//lib/lumberjack/device.rb#6
-class Lumberjack::Device
- # source://lumberjack//lib/lumberjack/device/rolling_log_file.rb#110
- def cleanup_files!; end
-
- # Subclasses may implement this method to close the device.
- #
- # source://lumberjack//lib/lumberjack/device.rb#21
- def close; end
-
- # Subclasses may implement this method to get the format for log timestamps.
- #
- # source://lumberjack//lib/lumberjack/device.rb#35
- def datetime_format; end
-
- # Subclasses may implement this method to set a format for log timestamps.
- #
- # source://lumberjack//lib/lumberjack/device.rb#39
- def datetime_format=(format); end
-
- # source://lumberjack//lib/lumberjack/device/rolling_log_file.rb#121
- def do_once(file); end
-
- # Subclasses may implement this method to flush any buffers used by the device.
- #
- # source://lumberjack//lib/lumberjack/device.rb#31
- def flush; end
-
- # Subclasses may implement this method to reopen the device.
- #
- # source://lumberjack//lib/lumberjack/device.rb#26
- def reopen(logdev = T.unsafe(nil)); end
-
- # Subclasses must implement this method to write a LogEntry.
- #
- # @raise [NotImplementedError]
- #
- # source://lumberjack//lib/lumberjack/device.rb#16
- def write(entry); end
-end
-
-# This log device will append entries to a file and roll the file periodically by date. Files
-# are rolled at midnight and can be rolled daily, weekly, or monthly. Archive file names will
-# have the date appended to them in the format ".YYYY-MM-DD" for daily, ".week-of-YYYY-MM-DD" for weekly
-# and ".YYYY-MM" for monthly. It is not guaranteed that log messages will break exactly on the
-# roll period as buffered entries will always be written to the same file.
-#
-# source://lumberjack//lib/lumberjack/device/date_rolling_log_file.rb#15
-class Lumberjack::Device::DateRollingLogFile < ::Lumberjack::Device::RollingLogFile
- # Create a new logging device to the specified file. The period to roll the file is specified
- # with the :roll option which may contain a value of :daily, :weekly,
- # or :monthly.
- #
- # @return [DateRollingLogFile] a new instance of DateRollingLogFile
- #
- # source://lumberjack//lib/lumberjack/device/date_rolling_log_file.rb#16
- def initialize(path, options = T.unsafe(nil)); end
-
- # source://lumberjack//lib/lumberjack/device/date_rolling_log_file.rb#28
- def archive_file_suffix; end
-
- # @return [Boolean]
- #
- # source://lumberjack//lib/lumberjack/device/date_rolling_log_file.rb#39
- def roll_file?; end
-
- protected
-
- # source://lumberjack//lib/lumberjack/device/date_rolling_log_file.rb#60
- def after_roll; end
-end
-
-# This is a logging device that appends log entries to a file.
-#
-# source://lumberjack//lib/lumberjack/device/log_file.rb#8
-class Lumberjack::Device::LogFile < ::Lumberjack::Device::Writer
- # Create a logger to the file at +path+. Options are passed through to the Writer constructor.
- #
- # @return [LogFile] a new instance of LogFile
- #
- # source://lumberjack//lib/lumberjack/device/log_file.rb#15
- def initialize(path, options = T.unsafe(nil)); end
-
- # The absolute path of the file being logged to.
- #
- # source://lumberjack//lib/lumberjack/device/log_file.rb#12
- def path; end
-
- # source://lumberjack//lib/lumberjack/device/log_file.rb#21
- def reopen(logdev = T.unsafe(nil)); end
-
- private
-
- # source://lumberjack//lib/lumberjack/device/log_file.rb#28
- def file_stream; end
-end
-
-# source://lumberjack//lib/lumberjack/device/log_file.rb#9
-Lumberjack::Device::LogFile::EXTERNAL_ENCODING = T.let(T.unsafe(nil), String)
-
-# This is a logging device that forward log entries to multiple other devices.
-#
-# source://lumberjack//lib/lumberjack/device/multi.rb#6
-class Lumberjack::Device::Multi < ::Lumberjack::Device
- # @return [Multi] a new instance of Multi
- #
- # source://lumberjack//lib/lumberjack/device/multi.rb#7
- def initialize(*devices); end
-
- # source://lumberjack//lib/lumberjack/device/multi.rb#23
- def close; end
-
- # source://lumberjack//lib/lumberjack/device/multi.rb#35
- def datetime_format; end
-
- # source://lumberjack//lib/lumberjack/device/multi.rb#39
- def datetime_format=(format); end
-
- # source://lumberjack//lib/lumberjack/device/multi.rb#17
- def flush; end
-
- # source://lumberjack//lib/lumberjack/device/multi.rb#29
- def reopen(logdev = T.unsafe(nil)); end
-
- # source://lumberjack//lib/lumberjack/device/multi.rb#11
- def write(entry); end
-end
-
-# This is a logging device that produces no output. It can be useful in
-# testing environments when log file output is not useful.
-#
-# source://lumberjack//lib/lumberjack/device/null.rb#7
-class Lumberjack::Device::Null < ::Lumberjack::Device
- # @return [Null] a new instance of Null
- #
- # source://lumberjack//lib/lumberjack/device/null.rb#8
- def initialize(*args); end
-
- # source://lumberjack//lib/lumberjack/device/null.rb#11
- def write(entry); end
-end
-
-# This is an abstract class for a device that appends entries to a file and periodically archives
-# the existing file and starts a one. Subclasses must implement the roll_file? and archive_file_suffix
-# methods.
-#
-# The :keep option can be used to specify a maximum number of rolled log files to keep.
-# Older files will be deleted based on the time they were created. The default is to keep all files.
-#
-# The :min_roll_check option can be used to specify the number of seconds between checking
-# the file to determine if it needs to be rolled. The default is to check at most once per second.
-#
-# source://lumberjack//lib/lumberjack/device/rolling_log_file.rb#14
-class Lumberjack::Device::RollingLogFile < ::Lumberjack::Device::LogFile
- # @return [RollingLogFile] a new instance of RollingLogFile
- #
- # source://lumberjack//lib/lumberjack/device/rolling_log_file.rb#18
- def initialize(path, options = T.unsafe(nil)); end
-
- # Returns a suffix that will be appended to the file name when it is archived.. The suffix should
- # change after it is time to roll the file. The log file will be renamed when it is rolled.
- #
- # @raise [NotImplementedError]
- #
- # source://lumberjack//lib/lumberjack/device/rolling_log_file.rb#34
- def archive_file_suffix; end
-
- # Returns the value of attribute keep.
- #
- # source://lumberjack//lib/lumberjack/device/rolling_log_file.rb#16
- def keep; end
-
- # Sets the attribute keep
- #
- # @param value the value to set the attribute keep to.
- #
- # source://lumberjack//lib/lumberjack/device/rolling_log_file.rb#16
- def keep=(_arg0); end
-
- # Returns the value of attribute path.
- #
- # source://lumberjack//lib/lumberjack/device/rolling_log_file.rb#15
- def path; end
-
- # Roll the log file by renaming it to the archive file name and then re-opening a stream to the log
- # file path. Rolling a file is safe in multi-threaded or multi-process environments.
- #
- # source://lumberjack//lib/lumberjack/device/rolling_log_file.rb#45
- def roll_file!; end
-
- # Return +true+ if the file should be rolled.
- #
- # @raise [NotImplementedError]
- # @return [Boolean]
- #
- # source://lumberjack//lib/lumberjack/device/rolling_log_file.rb#39
- def roll_file?; end
-
- protected
-
- # This method will be called after a file has been rolled. Subclasses can
- # implement code to reset the state of the device. This method is thread safe.
- #
- # source://lumberjack//lib/lumberjack/device/rolling_log_file.rb#73
- def after_roll; end
-
- # Handle rolling the file before flushing.
- #
- # source://lumberjack//lib/lumberjack/device/rolling_log_file.rb#77
- def before_flush; end
-
- private
-
- # source://lumberjack//lib/lumberjack/device/rolling_log_file.rb#96
- def reopen_file; end
-end
-
-# This is a log device that appends entries to a file and rolls the file when it reaches a specified
-# size threshold. When a file is rolled, it will have an number extension appended to the file name.
-# For example, if the log file is named production.log, the first time it is rolled it will be renamed
-# production.log.1, then production.log.2, etc.
-#
-# source://lumberjack//lib/lumberjack/device/size_rolling_log_file.rb#9
-class Lumberjack::Device::SizeRollingLogFile < ::Lumberjack::Device::RollingLogFile
- # Create an new log device to the specified file. The maximum size of the log file is specified with
- # the :max_size option. The unit can also be specified: "32K", "100M", "2G" are all valid.
- #
- # @return [SizeRollingLogFile] a new instance of SizeRollingLogFile
- #
- # source://lumberjack//lib/lumberjack/device/size_rolling_log_file.rb#14
- def initialize(path, options = T.unsafe(nil)); end
-
- # source://lumberjack//lib/lumberjack/device/size_rolling_log_file.rb#38
- def archive_file_suffix; end
-
- # Returns the value of attribute max_size.
- #
- # source://lumberjack//lib/lumberjack/device/size_rolling_log_file.rb#10
- def max_size; end
-
- # @return [Boolean]
- #
- # source://lumberjack//lib/lumberjack/device/size_rolling_log_file.rb#42
- def roll_file?; end
-
- protected
-
- # Calculate the next archive file name extension.
- #
- # source://lumberjack//lib/lumberjack/device/size_rolling_log_file.rb#51
- def next_archive_number; end
-end
-
-# This logging device writes log entries as strings to an IO stream. By default, messages will be buffered
-# and written to the stream in a batch when the buffer is full or when +flush+ is called.
-#
-# Subclasses can implement a +before_flush+ method if they have logic to execute before flushing the log.
-# If it is implemented, it will be called before every flush inside a mutex lock.
-#
-# source://lumberjack//lib/lumberjack/device/writer.rb#10
-class Lumberjack::Device::Writer < ::Lumberjack::Device
- # Create a new device to write log entries to a stream. Entries are converted to strings
- # using a Template. The template can be specified using the :template option. This can
- # either be a Proc or a string that will compile into a Template object.
- #
- # If the template is a Proc, it should accept an LogEntry as its only argument and output a string.
- #
- # If the template is a template string, it will be used to create a Template. The
- # :additional_lines and :time_format options will be passed through to the
- # Template constuctor.
- #
- # The default template is "[:time :severity :progname(:pid) #:unit_of_work_id] :message"
- # with additional lines formatted as "\n [#:unit_of_work_id] :message". The unit of
- # work id will only appear if it is present.
- #
- # The size of the internal buffer in bytes can be set by providing :buffer_size (defaults to 32K).
- #
- # @return [Writer] a new instance of Writer
- #
- # source://lumberjack//lib/lumberjack/device/writer.rb#63
- def initialize(stream, options = T.unsafe(nil)); end
-
- # The size of the internal buffer. Defaults to 32K.
- #
- # source://lumberjack//lib/lumberjack/device/writer.rb#15
- def buffer_size; end
-
- # Set the buffer size in bytes. The device will only be physically written to when the buffer size
- # is exceeded.
- #
- # source://lumberjack//lib/lumberjack/device/writer.rb#80
- def buffer_size=(value); end
-
- # Close the underlying stream.
- #
- # source://lumberjack//lib/lumberjack/device/writer.rb#108
- def close; end
-
- # source://lumberjack//lib/lumberjack/device/writer.rb#123
- def datetime_format; end
-
- # source://lumberjack//lib/lumberjack/device/writer.rb#127
- def datetime_format=(format); end
-
- # Flush the underlying stream.
- #
- # source://lumberjack//lib/lumberjack/device/writer.rb#114
- def flush; end
-
- # Write an entry to the stream. The entry will be converted into a string using the defined template.
- #
- # source://lumberjack//lib/lumberjack/device/writer.rb#86
- def write(entry); end
-
- protected
-
- # Get the underlying stream.
- #
- # source://lumberjack//lib/lumberjack/device/writer.rb#139
- def stream; end
-
- # Set the underlying stream.
- #
- # source://lumberjack//lib/lumberjack/device/writer.rb#136
- def stream=(_arg0); end
-
- private
-
- # source://lumberjack//lib/lumberjack/device/writer.rb#143
- def write_to_stream(lines); end
-end
-
-# Internal buffer to batch writes to the stream.
-#
-# source://lumberjack//lib/lumberjack/device/writer.rb#18
-class Lumberjack::Device::Writer::Buffer
- # @return [Buffer] a new instance of Buffer
- #
- # source://lumberjack//lib/lumberjack/device/writer.rb#21
- def initialize; end
-
- # source://lumberjack//lib/lumberjack/device/writer.rb#26
- def <<(string); end
-
- # source://lumberjack//lib/lumberjack/device/writer.rb#42
- def clear; end
-
- # @return [Boolean]
- #
- # source://lumberjack//lib/lumberjack/device/writer.rb#31
- def empty?; end
-
- # source://lumberjack//lib/lumberjack/device/writer.rb#35
- def pop!; end
-
- # source://lumberjack//lib/lumberjack/device/writer.rb#19
- def size; end
-end
-
-# source://lumberjack//lib/lumberjack/device/writer.rb#12
-Lumberjack::Device::Writer::DEFAULT_ADDITIONAL_LINES_TEMPLATE = T.let(T.unsafe(nil), String)
-
-# source://lumberjack//lib/lumberjack/device/writer.rb#11
-Lumberjack::Device::Writer::DEFAULT_FIRST_LINE_TEMPLATE = T.let(T.unsafe(nil), String)
-
-# This class controls the conversion of log entry messages into a loggable format. This allows you
-# to log any object you want and have the logging system deal with converting it into a string.
-#
-# Formats are added to a Formatter by associating them with a class using the +add+ method. Formats
-# are any object that responds to the +call+ method.
-#
-# By default, all object will be converted to strings using their inspect method except for Strings
-# and Exceptions. Strings are not converted and Exceptions are converted using the ExceptionFormatter.
-#
-# Enumerable objects (including Hash and Array) will call the formatter recursively for each element.
-#
-# source://lumberjack//lib/lumberjack/formatter.rb#14
-class Lumberjack::Formatter
- # @return [Formatter] a new instance of Formatter
- #
- # source://lumberjack//lib/lumberjack/formatter.rb#34
- def initialize; end
-
- # Add a formatter for a class. The formatter can be specified as either an object
- # that responds to the +call+ method or as a symbol representing one of the predefined
- # formatters, or as a block to the method call.
- #
- # The predefined formatters are: :inspect, :string, :exception, and :pretty_print.
- #
- # You can add multiple classes at once by passing an array of classes.
- #
- # You can also pass class names as strings instead of the classes themselves. This can
- # help avoid loading dependency issues. This applies only to classes; modules cannot be
- # passed in as strings.
- #
- # === Examples
- #
- # # Use a predefined formatter
- # formatter.add(MyClass, :pretty_print)
- #
- # # Pass in a formatter object
- # formatter.add(MyClass, Lumberjack::Formatter::PrettyPrintFormatter.new)
- #
- # # Use a block
- # formatter.add(MyClass){|obj| obj.humanize}
- #
- # # Add statements can be chained together
- # formatter.add(MyClass, :pretty_print).add(YourClass){|obj| obj.humanize}
- #
- # source://lumberjack//lib/lumberjack/formatter.rb#69
- def add(klass, formatter = T.unsafe(nil), &block); end
-
- # Compatibility with the Logger::Formatter signature. This method will just convert the message
- # object to a string and ignores the other parameters.
- #
- # source://lumberjack//lib/lumberjack/formatter.rb#129
- def call(severity, timestamp, progname, msg); end
-
- # Remove all formatters including the default formatter. Can be chained to add method calls.
- #
- # source://lumberjack//lib/lumberjack/formatter.rb#111
- def clear; end
-
- # Format a message object as a string.
- #
- # source://lumberjack//lib/lumberjack/formatter.rb#118
- def format(message); end
-
- # Remove the formatter associated with a class. Remove statements can be chained together.
- #
- # You can remove multiple classes at once by passing an array of classes.
- #
- # You can also pass class names as strings instead of the classes themselves. This can
- # help avoid loading dependency issues. This applies only to classes; modules cannot be
- # passed in as strings.
- #
- # source://lumberjack//lib/lumberjack/formatter.rb#98
- def remove(klass); end
-
- private
-
- # Find the formatter for a class by looking it up using the class hierarchy.
- #
- # source://lumberjack//lib/lumberjack/formatter.rb#136
- def formatter_for(klass); end
-
- class << self
- # Returns a new empty formatter with no mapping. For historical reasons, a formatter
- # is initialized with mappings to help output objects as strings. This will return one
- # without the default mappings.
- #
- # source://lumberjack//lib/lumberjack/formatter.rb#29
- def empty; end
- end
-end
-
-# Format a Date, Time, or DateTime object. If you don't specify a format in the constructor,
-# it will use the ISO-8601 format.
-#
-# source://lumberjack//lib/lumberjack/formatter/date_time_formatter.rb#7
-class Lumberjack::Formatter::DateTimeFormatter
- # @return [DateTimeFormatter] a new instance of DateTimeFormatter
- #
- # source://lumberjack//lib/lumberjack/formatter/date_time_formatter.rb#10
- def initialize(format = T.unsafe(nil)); end
-
- # source://lumberjack//lib/lumberjack/formatter/date_time_formatter.rb#14
- def call(obj); end
-
- # Returns the value of attribute format.
- #
- # source://lumberjack//lib/lumberjack/formatter/date_time_formatter.rb#8
- def format; end
-end
-
-# Format an exception including the backtrace. You can specify an object that
-# responds to `call` as a backtrace cleaner. The exception backtrace will be
-# passed to this object and the returned array is what will be logged. You can
-# use this to clean out superfluous lines.
-#
-# source://lumberjack//lib/lumberjack/formatter/exception_formatter.rb#9
-class Lumberjack::Formatter::ExceptionFormatter
- # @return [ExceptionFormatter] a new instance of ExceptionFormatter
- #
- # source://lumberjack//lib/lumberjack/formatter/exception_formatter.rb#12
- def initialize(backtrace_cleaner = T.unsafe(nil)); end
-
- # Returns the value of attribute backtrace_cleaner.
- #
- # source://lumberjack//lib/lumberjack/formatter/exception_formatter.rb#10
- def backtrace_cleaner; end
-
- # Sets the attribute backtrace_cleaner
- #
- # @param value the value to set the attribute backtrace_cleaner to.
- #
- # source://lumberjack//lib/lumberjack/formatter/exception_formatter.rb#10
- def backtrace_cleaner=(_arg0); end
-
- # source://lumberjack//lib/lumberjack/formatter/exception_formatter.rb#16
- def call(exception); end
-
- private
-
- # source://lumberjack//lib/lumberjack/formatter/exception_formatter.rb#28
- def clean_backtrace(trace); end
-end
-
-# Format an object that has an id as a hash with keys for class and id. This formatter is useful
-# as a default formatter for objects pulled from a data store. By default it will use :id as the
-# id attribute.
-#
-# source://lumberjack//lib/lumberjack/formatter/id_formatter.rb#8
-class Lumberjack::Formatter::IdFormatter
- # @return [IdFormatter] a new instance of IdFormatter
- #
- # source://lumberjack//lib/lumberjack/formatter/id_formatter.rb#9
- def initialize(id_attribute = T.unsafe(nil)); end
-
- # source://lumberjack//lib/lumberjack/formatter/id_formatter.rb#13
- def call(obj); end
-end
-
-# Format an object by calling +inspect+ on it.
-#
-# source://lumberjack//lib/lumberjack/formatter/inspect_formatter.rb#6
-class Lumberjack::Formatter::InspectFormatter
- # source://lumberjack//lib/lumberjack/formatter/inspect_formatter.rb#7
- def call(obj); end
-end
-
-# No-op formatter that just returns the object itself.
-#
-# source://lumberjack//lib/lumberjack/formatter/object_formatter.rb#6
-class Lumberjack::Formatter::ObjectFormatter
- # source://lumberjack//lib/lumberjack/formatter/object_formatter.rb#7
- def call(obj); end
-end
-
-# Format an object with it's pretty print method.
-#
-# source://lumberjack//lib/lumberjack/formatter/pretty_print_formatter.rb#9
-class Lumberjack::Formatter::PrettyPrintFormatter
- # Create a new formatter. The maximum width of the message can be specified with the width
- # parameter (defaults to 79 characters).
- #
- # @return [PrettyPrintFormatter] a new instance of PrettyPrintFormatter
- #
- # source://lumberjack//lib/lumberjack/formatter/pretty_print_formatter.rb#14
- def initialize(width = T.unsafe(nil)); end
-
- # source://lumberjack//lib/lumberjack/formatter/pretty_print_formatter.rb#18
- def call(obj); end
-
- # Returns the value of attribute width.
- #
- # source://lumberjack//lib/lumberjack/formatter/pretty_print_formatter.rb#10
- def width; end
-
- # Sets the attribute width
- #
- # @param value the value to set the attribute width to.
- #
- # source://lumberjack//lib/lumberjack/formatter/pretty_print_formatter.rb#10
- def width=(_arg0); end
-end
-
-# Format an object by calling `to_s` on it.
-#
-# source://lumberjack//lib/lumberjack/formatter/string_formatter.rb#6
-class Lumberjack::Formatter::StringFormatter
- # source://lumberjack//lib/lumberjack/formatter/string_formatter.rb#7
- def call(obj); end
-end
-
-# Format an object by calling `to_s` on it and stripping leading and trailing whitespace.
-#
-# source://lumberjack//lib/lumberjack/formatter/strip_formatter.rb#6
-class Lumberjack::Formatter::StripFormatter
- # source://lumberjack//lib/lumberjack/formatter/strip_formatter.rb#7
- def call(obj); end
-end
-
-# Dereference arrays and hashes and recursively call formatters on each element.
-#
-# source://lumberjack//lib/lumberjack/formatter/structured_formatter.rb#8
-class Lumberjack::Formatter::StructuredFormatter
- # @return [StructuredFormatter] a new instance of StructuredFormatter
- #
- # source://lumberjack//lib/lumberjack/formatter/structured_formatter.rb#12
- def initialize(formatter = T.unsafe(nil)); end
-
- # source://lumberjack//lib/lumberjack/formatter/structured_formatter.rb#16
- def call(obj); end
-
- private
-
- # source://lumberjack//lib/lumberjack/formatter/structured_formatter.rb#22
- def call_with_references(obj, references); end
-
- # source://lumberjack//lib/lumberjack/formatter/structured_formatter.rb#48
- def with_object_reference(obj, references); end
-end
-
-# source://lumberjack//lib/lumberjack/formatter/structured_formatter.rb#9
-class Lumberjack::Formatter::StructuredFormatter::RecusiveReferenceError < ::StandardError; end
-
-# source://lumberjack//lib/lumberjack.rb#9
-Lumberjack::LINE_SEPARATOR = T.let(T.unsafe(nil), String)
-
-# An entry in a log is a data structure that captures the log message as well as
-# information about the system that logged the message.
-#
-# source://lumberjack//lib/lumberjack/log_entry.rb#6
-class Lumberjack::LogEntry
- # @return [LogEntry] a new instance of LogEntry
- #
- # source://lumberjack//lib/lumberjack/log_entry.rb#13
- def initialize(time, severity, message, progname, pid, tags); end
-
- # source://lumberjack//lib/lumberjack/log_entry.rb#35
- def inspect; end
-
- # Returns the value of attribute message.
- #
- # source://lumberjack//lib/lumberjack/log_entry.rb#7
- def message; end
-
- # Sets the attribute message
- #
- # @param value the value to set the attribute message to.
- #
- # source://lumberjack//lib/lumberjack/log_entry.rb#7
- def message=(_arg0); end
-
- # Returns the value of attribute pid.
- #
- # source://lumberjack//lib/lumberjack/log_entry.rb#7
- def pid; end
-
- # Sets the attribute pid
- #
- # @param value the value to set the attribute pid to.
- #
- # source://lumberjack//lib/lumberjack/log_entry.rb#7
- def pid=(_arg0); end
-
- # Returns the value of attribute progname.
- #
- # source://lumberjack//lib/lumberjack/log_entry.rb#7
- def progname; end
-
- # Sets the attribute progname
- #
- # @param value the value to set the attribute progname to.
- #
- # source://lumberjack//lib/lumberjack/log_entry.rb#7
- def progname=(_arg0); end
-
- # Returns the value of attribute severity.
- #
- # source://lumberjack//lib/lumberjack/log_entry.rb#7
- def severity; end
-
- # Sets the attribute severity
- #
- # @param value the value to set the attribute severity to.
- #
- # source://lumberjack//lib/lumberjack/log_entry.rb#7
- def severity=(_arg0); end
-
- # source://lumberjack//lib/lumberjack/log_entry.rb#27
- def severity_label; end
-
- # Return the tag with the specified name.
- #
- # source://lumberjack//lib/lumberjack/log_entry.rb#54
- def tag(name); end
-
- # Returns the value of attribute tags.
- #
- # source://lumberjack//lib/lumberjack/log_entry.rb#7
- def tags; end
-
- # Sets the attribute tags
- #
- # @param value the value to set the attribute tags to.
- #
- # source://lumberjack//lib/lumberjack/log_entry.rb#7
- def tags=(_arg0); end
-
- # Returns the value of attribute time.
- #
- # source://lumberjack//lib/lumberjack/log_entry.rb#7
- def time; end
-
- # Sets the attribute time
- #
- # @param value the value to set the attribute time to.
- #
- # source://lumberjack//lib/lumberjack/log_entry.rb#7
- def time=(_arg0); end
-
- # source://lumberjack//lib/lumberjack/log_entry.rb#31
- def to_s; end
-
- # Deprecated - backward compatibility with 1.0 API
- #
- # source://lumberjack//lib/lumberjack/log_entry.rb#40
- def unit_of_work_id; end
-
- # Deprecated - backward compatibility with 1.0 API
- #
- # source://lumberjack//lib/lumberjack/log_entry.rb#45
- def unit_of_work_id=(value); end
-
- private
-
- # source://lumberjack//lib/lumberjack/log_entry.rb#60
- def tags_to_s; end
-end
-
-# source://lumberjack//lib/lumberjack/log_entry.rb#9
-Lumberjack::LogEntry::TIME_FORMAT = T.let(T.unsafe(nil), String)
-
-# source://lumberjack//lib/lumberjack/log_entry.rb#11
-Lumberjack::LogEntry::UNIT_OF_WORK_ID = T.let(T.unsafe(nil), String)
-
-# Logger is a thread safe logging object. It has a compatible API with the Ruby
-# standard library Logger class, the Log4r gem, and ActiveSupport::BufferedLogger.
-#
-# === Example
-#
-# logger = Lumberjack::Logger.new
-# logger.info("Starting processing")
-# logger.debug("Processing options #{options.inspect}")
-# logger.fatal("OMG the application is on fire!")
-#
-# Log entries are written to a logging Device if their severity meets or exceeds the log level.
-#
-# Devices may use buffers internally and the log entries are not guaranteed to be written until you call
-# the +flush+ method. Sometimes this can result in problems when trying to track down extraordinarily
-# long running sections of code since it is likely that none of the messages logged before the long
-# running code will appear in the log until the entire process finishes. You can set the +:flush_seconds+
-# option on the constructor to force the device to be flushed periodically. This will create a new
-# monitoring thread, but its use is highly recommended.
-#
-# Each log entry records the log message and severity along with the time it was logged, the
-# program name, process id, and unit of work id. The message will be converted to a string, but
-# otherwise, it is up to the device how these values are recorded. Messages are converted to strings
-# using a Formatter associated with the logger.
-#
-# source://lumberjack//lib/lumberjack/logger.rb#27
-class Lumberjack::Logger
- include ::Lumberjack::Severity
-
- # Create a new logger to log to a Device.
- #
- # The +device+ argument can be in any one of several formats.
- #
- # If it is a Device object, that object will be used.
- # If it has a +write+ method, it will be wrapped in a Device::Writer class.
- # If it is :null, it will be a Null device that won't record any output.
- # Otherwise, it will be assumed to be file path and wrapped in a Device::LogFile class.
- #
- # This method can take the following options:
- #
- # * :level - The logging level below which messages will be ignored.
- # * :formatter - The formatter to use for outputting messages to the log.
- # * :datetime_format - The format to use for log timestamps.
- # * :tag_formatter - The TagFormatter to use for formatting tags.
- # * :progname - The name of the program that will be recorded with each log entry.
- # * :flush_seconds - The maximum number of seconds between flush calls.
- # * :roll - If the log device is a file path, it will be a Device::DateRollingLogFile if this is set.
- # * :max_size - If the log device is a file path, it will be a Device::SizeRollingLogFile if this is set.
- #
- # All other options are passed to the device constuctor.
- #
- # @return [Logger] a new instance of Logger
- #
- # source://lumberjack//lib/lumberjack/logger.rb#66
- def initialize(device = T.unsafe(nil), options = T.unsafe(nil)); end
-
- # source://lumberjack//lib/lumberjack/logger.rb#312
- def <<(msg); end
-
- # ::Logger compatible method to add a log entry.
- #
- # source://lumberjack//lib/lumberjack/logger.rb#194
- def add(severity, message = T.unsafe(nil), progname = T.unsafe(nil), &block); end
-
- # Add a message to the log with a given severity. The message can be either
- # passed in the +message+ argument or supplied with a block. This method
- # is not normally called. Instead call one of the helper functions
- # +fatal+, +error+, +warn+, +info+, or +debug+.
- #
- # The severity can be passed in either as one of the Severity constants,
- # or as a Severity label.
- #
- # === Example
- #
- # logger.add_entry(Logger::ERROR, exception)
- # logger.add_entry(Logger::INFO, "Request completed")
- # logger.add_entry(:warn, "Request took a long time")
- # logger.add_entry(Logger::DEBUG){"Start processing with options #{options.inspect}"}
- #
- # source://lumberjack//lib/lumberjack/logger.rb#158
- def add_entry(severity, message, progname = T.unsafe(nil), tags = T.unsafe(nil)); end
-
- # Close the logging device.
- #
- # source://lumberjack//lib/lumberjack/logger.rb#216
- def close; end
-
- # @return [Boolean]
- #
- # source://lumberjack//lib/lumberjack/logger.rb#222
- def closed?; end
-
- # Get the timestamp format on the device if it has one.
- #
- # source://lumberjack//lib/lumberjack/logger.rb#86
- def datetime_format; end
-
- # Set the timestamp format on the device if it is supported.
- #
- # source://lumberjack//lib/lumberjack/logger.rb#91
- def datetime_format=(format); end
-
- # Log a +DEBUG+ message. The message can be passed in either the +message+ argument or in a block.
- #
- # source://lumberjack//lib/lumberjack/logger.rb#292
- def debug(message_or_progname_or_tags = T.unsafe(nil), progname_or_tags = T.unsafe(nil), &block); end
-
- # Set the log level to debug.
- #
- # source://lumberjack//lib/lumberjack/logger.rb#302
- def debug!; end
-
- # Return +true+ if +DEBUG+ messages are being logged.
- #
- # @return [Boolean]
- #
- # source://lumberjack//lib/lumberjack/logger.rb#297
- def debug?; end
-
- # The device being written to
- #
- # source://lumberjack//lib/lumberjack/logger.rb#40
- def device; end
-
- # The device being written to
- #
- # source://lumberjack//lib/lumberjack/logger.rb#40
- def device=(_arg0); end
-
- # Log an +ERROR+ message. The message can be passed in either the +message+ argument or in a block.
- #
- # source://lumberjack//lib/lumberjack/logger.rb#247
- def error(message_or_progname_or_tags = T.unsafe(nil), progname_or_tags = T.unsafe(nil), &block); end
-
- # Set the log level to error.
- #
- # source://lumberjack//lib/lumberjack/logger.rb#257
- def error!; end
-
- # Return +true+ if +ERROR+ messages are being logged.
- #
- # @return [Boolean]
- #
- # source://lumberjack//lib/lumberjack/logger.rb#252
- def error?; end
-
- # Log a +FATAL+ message. The message can be passed in either the +message+ argument or in a block.
- #
- # source://lumberjack//lib/lumberjack/logger.rb#232
- def fatal(message_or_progname_or_tags = T.unsafe(nil), progname_or_tags = T.unsafe(nil), &block); end
-
- # Set the log level to fatal.
- #
- # source://lumberjack//lib/lumberjack/logger.rb#242
- def fatal!; end
-
- # Return +true+ if +FATAL+ messages are being logged.
- #
- # @return [Boolean]
- #
- # source://lumberjack//lib/lumberjack/logger.rb#237
- def fatal?; end
-
- # Flush the logging device. Messages are not guaranteed to be written until this method is called.
- #
- # source://lumberjack//lib/lumberjack/logger.rb#209
- def flush; end
-
- # Get the Lumberjack::Formatter used to format objects for logging as messages.
- #
- # source://lumberjack//lib/lumberjack/logger.rb#123
- def formatter; end
-
- # Set the Lumberjack::Formatter used to format objects for logging as messages.
- #
- # source://lumberjack//lib/lumberjack/logger.rb#118
- def formatter=(value); end
-
- # Log an +INFO+ message. The message can be passed in either the +message+ argument or in a block.
- #
- # source://lumberjack//lib/lumberjack/logger.rb#277
- def info(message_or_progname_or_tags = T.unsafe(nil), progname_or_tags = T.unsafe(nil), &block); end
-
- # Set the log level to info.
- #
- # source://lumberjack//lib/lumberjack/logger.rb#287
- def info!; end
-
- # Return +true+ if +INFO+ messages are being logged.
- #
- # @return [Boolean]
- #
- # source://lumberjack//lib/lumberjack/logger.rb#282
- def info?; end
-
- # The time that the device was last flushed.
- #
- # source://lumberjack//lib/lumberjack/logger.rb#31
- def last_flushed_at; end
-
- # Get the level of severity of entries that are logged. Entries with a lower
- # severity level will be ignored.
- #
- # source://lumberjack//lib/lumberjack/logger.rb#99
- def level; end
-
- # Set the log level using either an integer level like Logger::INFO or a label like
- # :info or "info"
- #
- # source://lumberjack//lib/lumberjack/logger.rb#107
- def level=(value); end
-
- # ::Logger compatible method to add a log entry.
- #
- # source://lumberjack//lib/lumberjack/logger.rb#194
- def log(severity, message = T.unsafe(nil), progname = T.unsafe(nil), &block); end
-
- # Get the program name associated with log messages.
- #
- # source://lumberjack//lib/lumberjack/logger.rb#347
- def progname; end
-
- # Set the name of the program to attach to log entries.
- #
- # source://lumberjack//lib/lumberjack/logger.rb#37
- def progname=(_arg0); end
-
- # Remove a tag from the current tag context. If this is called inside a block to a
- # call to `tag`, the tags will only be removed for the duration of that block. Otherwise
- # they will be removed from the global tags.
- #
- # source://lumberjack//lib/lumberjack/logger.rb#374
- def remove_tag(*tag_names); end
-
- # source://lumberjack//lib/lumberjack/logger.rb#226
- def reopen(logdev = T.unsafe(nil)); end
-
- # Set the program name that is associated with log messages. If a block
- # is given, the program name will be valid only within the block.
- #
- # source://lumberjack//lib/lumberjack/logger.rb#338
- def set_progname(value, &block); end
-
- # Get the level of severity of entries that are logged. Entries with a lower
- # severity level will be ignored.
- #
- # source://lumberjack//lib/lumberjack/logger.rb#99
- def sev_threshold; end
-
- # Set the log level using either an integer level like Logger::INFO or a label like
- # :info or "info"
- #
- # source://lumberjack//lib/lumberjack/logger.rb#107
- def sev_threshold=(value); end
-
- # Silence the logger by setting a new log level inside a block. By default, only +ERROR+ or +FATAL+
- # messages will be logged.
- #
- # === Example
- #
- # logger.level = Logger::INFO
- # logger.silence do
- # do_something # Log level inside the block is +ERROR+
- # end
- #
- # source://lumberjack//lib/lumberjack/logger.rb#325
- def silence(temporary_level = T.unsafe(nil), &block); end
-
- # Set +silencer+ to false to disable silencing the log.
- #
- # source://lumberjack//lib/lumberjack/logger.rb#34
- def silencer; end
-
- # Set +silencer+ to false to disable silencing the log.
- #
- # source://lumberjack//lib/lumberjack/logger.rb#34
- def silencer=(_arg0); end
-
- # Set a hash of tags on logger. If a block is given, the tags will only be set
- # for the duration of the block. If this method is called inside such a block,
- # the tags will only be defined on the tags in that block. When the parent block
- # exits, all the tags will be reverted. If there is no block, then the tags will
- # be defined as global and apply to all log statements.
- #
- # source://lumberjack//lib/lumberjack/logger.rb#356
- def tag(tags, &block); end
-
- # The TagFormatter used for formatting tags for output
- #
- # source://lumberjack//lib/lumberjack/logger.rb#43
- def tag_formatter; end
-
- # The TagFormatter used for formatting tags for output
- #
- # source://lumberjack//lib/lumberjack/logger.rb#43
- def tag_formatter=(_arg0); end
-
- # Enable this logger to function like an ActiveSupport::TaggedLogger. This will make the logger
- # API compatible with ActiveSupport::TaggedLogger and is provided as a means of compatibility
- # with other libraries that assume they can call the `tagged` method on a logger to add tags.
- #
- # The tags added with this method are just strings so they are stored in the logger tags
- # in an array under the "tagged" tag. So calling `logger.tagged("foo", "bar")` will result
- # in tags `{"tagged" => ["foo", "bar"]}`.
- #
- # source://lumberjack//lib/lumberjack/logger.rb#139
- def tagged_logger!; end
-
- # Return all tags in scope on the logger including global tags set on the Lumberjack
- # context, tags set on the logger, and tags set on the current block for the logger.
- #
- # source://lumberjack//lib/lumberjack/logger.rb#385
- def tags; end
-
- # Log a message when the severity is not known. Unknown messages will always appear in the log.
- # The message can be passed in either the +message+ argument or in a block.
- #
- # source://lumberjack//lib/lumberjack/logger.rb#308
- def unknown(message_or_progname_or_tags = T.unsafe(nil), progname_or_tags = T.unsafe(nil), &block); end
-
- # Remove all tags on the current logger and logging context within a block.
- # You can still set new block scoped tags within theuntagged block and provide
- # tags on individual log methods.
- #
- # source://lumberjack//lib/lumberjack/logger.rb#398
- def untagged(&block); end
-
- # Log a +WARN+ message. The message can be passed in either the +message+ argument or in a block.
- #
- # source://lumberjack//lib/lumberjack/logger.rb#262
- def warn(message_or_progname_or_tags = T.unsafe(nil), progname_or_tags = T.unsafe(nil), &block); end
-
- # Set the log level to warn.
- #
- # source://lumberjack//lib/lumberjack/logger.rb#272
- def warn!; end
-
- # Return +true+ if +WARN+ messages are being logged.
- #
- # @return [Boolean]
- #
- # source://lumberjack//lib/lumberjack/logger.rb#267
- def warn?; end
-
- private
-
- # Dereference arguments to log calls so we can have methods with compatibility with ::Logger
- #
- # source://lumberjack//lib/lumberjack/logger.rb#416
- def call_add_entry(severity, message_or_progname_or_tags, progname_or_tags, &block); end
-
- # Create a thread that will periodically call flush.
- #
- # source://lumberjack//lib/lumberjack/logger.rb#504
- def create_flusher_thread(flush_seconds); end
-
- # Open a logging device.
- #
- # source://lumberjack//lib/lumberjack/logger.rb#473
- def open_device(device, options); end
-
- # Set a local value for a thread tied to this object within a block.
- #
- # source://lumberjack//lib/lumberjack/logger.rb#462
- def push_thread_local_value(name, value); end
-
- # Set a local value for a thread tied to this object.
- #
- # source://lumberjack//lib/lumberjack/logger.rb#441
- def set_thread_local_value(name, value); end
-
- # Get a local value for a thread tied to this object.
- #
- # source://lumberjack//lib/lumberjack/logger.rb#456
- def thread_local_value(name); end
-
- # source://lumberjack//lib/lumberjack/logger.rb#494
- def write_to_device(entry); end
-end
-
-# source://lumberjack//lib/lumberjack/rack.rb#4
-module Lumberjack::Rack; end
-
-# Middleware to create a global context for Lumberjack for the scope of a rack request.
-#
-# source://lumberjack//lib/lumberjack/rack/context.rb#6
-class Lumberjack::Rack::Context
- # @return [Context] a new instance of Context
- #
- # source://lumberjack//lib/lumberjack/rack/context.rb#7
- def initialize(app); end
-
- # source://lumberjack//lib/lumberjack/rack/context.rb#11
- def call(env); end
-end
-
-# Support for using the Rails ActionDispatch request id in the log.
-# The format is expected to be a random UUID and only the first chunk is used for terseness
-# if the abbreviated argument is true.
-#
-# source://lumberjack//lib/lumberjack/rack/request_id.rb#8
-class Lumberjack::Rack::RequestId
- # @return [RequestId] a new instance of RequestId
- #
- # source://lumberjack//lib/lumberjack/rack/request_id.rb#11
- def initialize(app, abbreviated = T.unsafe(nil)); end
-
- # source://lumberjack//lib/lumberjack/rack/request_id.rb#16
- def call(env); end
-end
-
-# source://lumberjack//lib/lumberjack/rack/request_id.rb#9
-Lumberjack::Rack::RequestId::REQUEST_ID = T.let(T.unsafe(nil), String)
-
-# source://lumberjack//lib/lumberjack/rack/unit_of_work.rb#5
-class Lumberjack::Rack::UnitOfWork
- # @return [UnitOfWork] a new instance of UnitOfWork
- #
- # source://lumberjack//lib/lumberjack/rack/unit_of_work.rb#6
- def initialize(app); end
-
- # source://lumberjack//lib/lumberjack/rack/unit_of_work.rb#10
- def call(env); end
-end
-
-# The standard severity levels for logging messages.
-#
-# source://lumberjack//lib/lumberjack/severity.rb#5
-module Lumberjack::Severity
- class << self
- # source://lumberjack//lib/lumberjack/severity.rb#21
- def label_to_level(label); end
-
- # source://lumberjack//lib/lumberjack/severity.rb#17
- def level_to_label(severity); end
- end
-end
-
-# Backward compatibilty with 1.0 API
-#
-# source://lumberjack//lib/lumberjack/severity.rb#7
-Lumberjack::Severity::DEBUG = T.let(T.unsafe(nil), Integer)
-
-# source://lumberjack//lib/lumberjack/severity.rb#10
-Lumberjack::Severity::ERROR = T.let(T.unsafe(nil), Integer)
-
-# source://lumberjack//lib/lumberjack/severity.rb#11
-Lumberjack::Severity::FATAL = T.let(T.unsafe(nil), Integer)
-
-# source://lumberjack//lib/lumberjack/severity.rb#8
-Lumberjack::Severity::INFO = T.let(T.unsafe(nil), Integer)
-
-# source://lumberjack//lib/lumberjack/severity.rb#14
-Lumberjack::Severity::SEVERITY_LABELS = T.let(T.unsafe(nil), Array)
-
-# source://lumberjack//lib/lumberjack/severity.rb#12
-Lumberjack::Severity::UNKNOWN = T.let(T.unsafe(nil), Integer)
-
-# source://lumberjack//lib/lumberjack/severity.rb#9
-Lumberjack::Severity::WARN = T.let(T.unsafe(nil), Integer)
-
-# Class for formatting tags. You can register a default formatter and tag
-# name specific formatters. Formatters can be either `Lumberjack::Formatter`
-# objects or any object that responds to `call`.
-#
-# tag_formatter = Lumberjack::TagFormatter.new.default(Lumberjack::Formatter.new)
-# tag_formatter.add(["password", "email"]) { |value| "***" }
-# tag_formatter.add("finished_at", Lumberjack::Formatter::DateTimeFormatter.new("%Y-%m-%dT%H:%m:%S%z"))
-#
-# source://lumberjack//lib/lumberjack/tag_formatter.rb#11
-class Lumberjack::TagFormatter
- # @return [TagFormatter] a new instance of TagFormatter
- #
- # source://lumberjack//lib/lumberjack/tag_formatter.rb#12
- def initialize; end
-
- # Add a formatter for specific tag names. This can either be a Lumberjack::Formatter
- # or an object that responds to `call` or a block. The default formatter will not be
- # applied.
- #
- # source://lumberjack//lib/lumberjack/tag_formatter.rb#35
- def add(names, formatter = T.unsafe(nil), &block); end
-
- # Remove all formatters.
- #
- # source://lumberjack//lib/lumberjack/tag_formatter.rb#57
- def clear; end
-
- # Add a default formatter applied to all tag values. This can either be a Lumberjack::Formatter
- # or an object that responds to `call` or a block.
- #
- # source://lumberjack//lib/lumberjack/tag_formatter.rb#19
- def default(formatter = T.unsafe(nil), &block); end
-
- # Format a hash of tags using the formatters
- #
- # source://lumberjack//lib/lumberjack/tag_formatter.rb#64
- def format(tags); end
-
- # Remove formatters for specific tag names. The default formatter will still be applied.
- #
- # source://lumberjack//lib/lumberjack/tag_formatter.rb#49
- def remove(names); end
-
- # Remove the default formatter.
- #
- # source://lumberjack//lib/lumberjack/tag_formatter.rb#27
- def remove_default; end
-
- private
-
- # source://lumberjack//lib/lumberjack/tag_formatter.rb#85
- def dereference_formatter(formatter); end
-end
-
-# Methods to make Lumberjack::Logger API compatible with ActiveSupport::TaggedLogger.
-#
-# source://lumberjack//lib/lumberjack/tagged_logger_support.rb#8
-module Lumberjack::TaggedLoggerSupport
- # source://lumberjack//lib/lumberjack/tagged_logger_support.rb#62
- def clear_tags!; end
-
- # source://lumberjack//lib/lumberjack/tagged_logger_support.rb#56
- def pop_tags(size = T.unsafe(nil)); end
-
- # source://lumberjack//lib/lumberjack/tagged_logger_support.rb#52
- def push_tags(*tags); end
-
- # Compatibility with ActiveSupport::TaggedLogging which only supports adding tags as strings.
- # If a tag looks like "key:value" or "key=value", it will be added as a key value pair.
- # Otherwise it will be appended to a list named "tagged".
- #
- # source://lumberjack//lib/lumberjack/tagged_logger_support.rb#43
- def tagged(*tags, &block); end
-end
-
-# source://lumberjack//lib/lumberjack/tagged_logger_support.rb#9
-class Lumberjack::TaggedLoggerSupport::Formatter
- extend ::Forwardable
-
- # @return [Formatter] a new instance of Formatter
- #
- # source://lumberjack//lib/lumberjack/tagged_logger_support.rb#13
- def initialize(formatter:, logger:); end
-
- # source://lumberjack//lib/lumberjack/tagged_logger_support.rb#35
- def __formatter; end
-
- # source://forwardable/1.3.2/forwardable.rb#229
- def clear_tags!(*args, **_arg1, &block); end
-
- # source://lumberjack//lib/lumberjack/tagged_logger_support.rb#19
- def current_tags; end
-
- # source://forwardable/1.3.2/forwardable.rb#229
- def pop_tags(*args, **_arg1, &block); end
-
- # source://forwardable/1.3.2/forwardable.rb#229
- def push_tags(*args, **_arg1, &block); end
-
- # source://forwardable/1.3.2/forwardable.rb#229
- def tagged(*args, **_arg1, &block); end
-
- # source://lumberjack//lib/lumberjack/tagged_logger_support.rb#28
- def tags_text; end
-end
-
-# Monkey patch for ActiveSupport::TaggedLogger so it doesn't blow up when
-# a Lumberjack logger is trying to be wrapped. This module will be automatically
-# included in ActiveSupport::TaggedLogger if activesupport is already loaded.
-#
-# source://lumberjack//lib/lumberjack/tagged_logging.rb#7
-module Lumberjack::TaggedLogging
- mixes_in_class_methods ::Lumberjack::TaggedLogging::ClassMethods
-
- class << self
- # @private
- #
- # source://lumberjack//lib/lumberjack/tagged_logging.rb#9
- def included(base); end
- end
-end
-
-# source://lumberjack//lib/lumberjack/tagged_logging.rb#14
-module Lumberjack::TaggedLogging::ClassMethods
- # source://lumberjack//lib/lumberjack/tagged_logging.rb#15
- def new(logger); end
-end
-
-# source://lumberjack//lib/lumberjack/tags.rb#4
-class Lumberjack::Tags
- class << self
- # Ensure keys are strings and expand any values in a hash that are Proc's by calling them and replacing
- # the value with the result. This allows setting global tags with runtime values.
- #
- # source://lumberjack//lib/lumberjack/tags.rb#25
- def expand_runtime_values(hash); end
-
- # Transform hash keys to strings. This method exists for optimization and backward compatibility.
- # If a hash already has string keys, it will be returned as is.
- #
- # source://lumberjack//lib/lumberjack/tags.rb#8
- def stringify_keys(hash); end
- end
-end
-
-# A template converts entries to strings. Templates can contain the following place holders to
-# reference log entry values:
-#
-# * :time
-# * :severity
-# * :progname
-# * :tags
-# * :message
-#
-# Any other words prefixed with a colon will be substituted with the value of the tag with that name.
-# If your tag name contains characters other than alpha numerics and the underscore, you must surround it
-# with curly brackets: `:{http.request-id}`.
-#
-# source://lumberjack//lib/lumberjack/template.rb#16
-class Lumberjack::Template
- # Create a new template from the markup. The +first_line+ argument is used to format only the first
- # line of a message. Additional lines will be added to the message unformatted. If you wish to format
- # the additional lines, use the :additional_lines options to specify a template. Note that you'll need
- # to provide the line separator character in this template if you want to keep the message on multiple lines.
- #
- # The time will be formatted as YYYY-MM-DDTHH:MM:SSS.SSS by default. If you wish to change the format, you
- # can specify the :time_format option which can be either a time format template as documented in
- # +Time#strftime+ or the values +:milliseconds+ or +:microseconds+ to use the standard format with the
- # specified precision.
- #
- # Messages will have white space stripped from both ends.
- #
- # @return [Template] a new instance of Template
- #
- # source://lumberjack//lib/lumberjack/template.rb#33
- def initialize(first_line, options = T.unsafe(nil)); end
-
- # Convert an entry into a string using the template.
- #
- # source://lumberjack//lib/lumberjack/template.rb#56
- def call(entry); end
-
- # source://lumberjack//lib/lumberjack/template.rb#51
- def datetime_format; end
-
- # source://lumberjack//lib/lumberjack/template.rb#42
- def datetime_format=(format); end
-
- private
-
- # Compile the template string into a value that can be used with sprintf.
- #
- # source://lumberjack//lib/lumberjack/template.rb#106
- def compile(template); end
-
- # source://lumberjack//lib/lumberjack/template.rb#86
- def tag_args(tags, tag_vars); end
-end
-
-# source://lumberjack//lib/lumberjack/template.rb#19
-Lumberjack::Template::MICROSECOND_TIME_FORMAT = T.let(T.unsafe(nil), String)
-
-# source://lumberjack//lib/lumberjack/template.rb#18
-Lumberjack::Template::MILLISECOND_TIME_FORMAT = T.let(T.unsafe(nil), String)
-
-# source://lumberjack//lib/lumberjack/template.rb#20
-Lumberjack::Template::PLACEHOLDER_PATTERN = T.let(T.unsafe(nil), Regexp)
-
-# source://lumberjack//lib/lumberjack/template.rb#17
-Lumberjack::Template::TEMPLATE_ARGUMENT_ORDER = T.let(T.unsafe(nil), Array)
diff --git a/sorbet/rbi/gems/mayu-css@0.1.2.rbi b/sorbet/rbi/gems/mayu-css@0.1.2.rbi
deleted file mode 100644
index ce802d75..00000000
--- a/sorbet/rbi/gems/mayu-css@0.1.2.rbi
+++ /dev/null
@@ -1,187 +0,0 @@
-# typed: true
-
-# DO NOT EDIT MANUALLY
-# This is an autogenerated file for types exported from the `mayu-css` gem.
-# Please instead update this file by running `bin/tapioca gem mayu-css`.
-
-# source://mayu-css//lib/mayu/css/version.rb#3
-module Mayu; end
-
-# source://mayu-css//lib/mayu/css/version.rb#4
-module Mayu::CSS
- class << self
- def ext_minify(_arg0, _arg1); end
- def ext_serialize(_arg0, _arg1); end
- def ext_transform(_arg0, _arg1, _arg2); end
-
- # source://mayu-css//lib/mayu/css.rb#107
- def minify(file, code); end
-
- # source://mayu-css//lib/mayu/css.rb#110
- def serialize(file, code); end
-
- # source://mayu-css//lib/mayu/css.rb#104
- def transform(file, code, minify: T.unsafe(nil)); end
- end
-end
-
-class Mayu::CSS::ComposeDependency < ::Data
- def name; end
- def specifier; end
-
- class << self
- def [](*_arg0); end
- def inspect; end
- def members; end
- def new(*_arg0); end
- end
-end
-
-class Mayu::CSS::ComposeLocal < ::Data
- def name; end
-
- class << self
- def [](*_arg0); end
- def inspect; end
- def members; end
- def new(*_arg0); end
- end
-end
-
-# source://mayu-css//lib/mayu/css.rb#15
-class Mayu::CSS::Error < ::StandardError; end
-
-class Mayu::CSS::Export < ::Data
- def composes; end
- def name; end
- def referenced?; end
-
- class << self
- def [](*_arg0); end
- def inspect; end
- def members; end
- def new(*_arg0); end
- end
-end
-
-class Mayu::CSS::ExtTransformResult
- def classes; end
- def code; end
- def elements; end
- def serialized_dependencies; end
- def serialized_exports; end
- def source_map; end
-end
-
-class Mayu::CSS::ImportDependency < ::Data
- def loc; end
- def media; end
- def placeholder; end
- def supports; end
- def url; end
-
- class << self
- def [](*_arg0); end
- def inspect; end
- def members; end
- def new(*_arg0); end
- end
-end
-
-class Mayu::CSS::Loc < ::Data
- def end; end
- def file_path; end
- def start; end
-
- class << self
- def [](*_arg0); end
-
- # source://mayu-css//lib/mayu/css.rb#27
- def from_ext(data); end
-
- def inspect; end
- def members; end
- def new(*_arg0); end
- end
-end
-
-# source://mayu-css//lib/mayu/css.rb#16
-class Mayu::CSS::ParseError < ::Mayu::CSS::Error; end
-
-class Mayu::CSS::Pos < ::Data
- def column; end
- def line; end
-
- class << self
- def [](*_arg0); end
-
- # source://mayu-css//lib/mayu/css.rb#36
- def from_ext(data); end
-
- def inspect; end
- def members; end
- def new(*_arg0); end
- end
-end
-
-class Mayu::CSS::SerializeResult < ::Data
- def license_comments; end
- def rules; end
- def source_map_urls; end
- def sources; end
-
- class << self
- def [](*_arg0); end
-
- # source://mayu-css//lib/mayu/css.rb#93
- def from_ext(data); end
-
- def inspect; end
- def members; end
- def new(*_arg0); end
- end
-end
-
-class Mayu::CSS::TransformResult < ::Data
- def classes; end
- def code; end
-
- # source://mayu-css//lib/mayu/css.rb#84
- def code_with_source_map; end
-
- def dependencies; end
- def elements; end
- def exports; end
-
- # source://mayu-css//lib/mayu/css.rb#78
- def replace_dependencies; end
-
- def source_map; end
-
- class << self
- def [](*_arg0); end
-
- # source://mayu-css//lib/mayu/css.rb#41
- def from_ext(data); end
-
- def inspect; end
- def members; end
- def new(*_arg0); end
- end
-end
-
-class Mayu::CSS::UrlDependency < ::Data
- def loc; end
- def placeholder; end
- def url; end
-
- class << self
- def [](*_arg0); end
- def inspect; end
- def members; end
- def new(*_arg0); end
- end
-end
-
-# source://mayu-css//lib/mayu/css/version.rb#5
-Mayu::CSS::VERSION = T.let(T.unsafe(nil), String)
diff --git a/sorbet/rbi/gems/method_source@1.0.0.rbi b/sorbet/rbi/gems/method_source@1.0.0.rbi
deleted file mode 100644
index fe08676b..00000000
--- a/sorbet/rbi/gems/method_source@1.0.0.rbi
+++ /dev/null
@@ -1,8 +0,0 @@
-# typed: true
-
-# DO NOT EDIT MANUALLY
-# This is an autogenerated file for types exported from the `method_source` gem.
-# Please instead update this file by running `bin/tapioca gem method_source`.
-
-# THIS IS AN EMPTY RBI FILE.
-# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem
diff --git a/sorbet/rbi/gems/mime-types-data@3.2023.0218.1.rbi b/sorbet/rbi/gems/mime-types-data@3.2023.0218.1.rbi
deleted file mode 100644
index 92436f50..00000000
--- a/sorbet/rbi/gems/mime-types-data@3.2023.0218.1.rbi
+++ /dev/null
@@ -1,126 +0,0 @@
-# typed: true
-
-# DO NOT EDIT MANUALLY
-# This is an autogenerated file for types exported from the `mime-types-data` gem.
-# Please instead update this file by running `bin/tapioca gem mime-types-data`.
-
-# source://mime-types-data//lib/mime/types/data.rb#3
-module MIME; end
-
-# source://mime-types-data//lib/mime/types/data.rb#4
-class MIME::Types
- extend ::Enumerable
-
- # source://mime-types/3.4.1/lib/mime/types.rb#75
- def initialize; end
-
- # source://mime-types/3.4.1/lib/mime/types.rb#125
- def [](type_id, complete: T.unsafe(nil), registered: T.unsafe(nil)); end
-
- # source://mime-types/3.4.1/lib/mime/types.rb#167
- def add(*types); end
-
- # source://mime-types/3.4.1/lib/mime/types.rb#188
- def add_type(type, quiet = T.unsafe(nil)); end
-
- # source://mime-types/3.4.1/lib/mime/types.rb#81
- def count; end
-
- # source://mime-types/3.4.1/lib/mime/types.rb#90
- def each; end
-
- # source://mime-types/3.4.1/lib/mime/types.rb#85
- def inspect; end
-
- # source://mime-types/3.4.1/lib/mime/types.rb#153
- def of(filename); end
-
- # source://mime-types/3.4.1/lib/mime/types.rb#153
- def type_for(filename); end
-
- private
-
- # source://mime-types/3.4.1/lib/mime/types.rb#201
- def add_type_variant!(mime_type); end
-
- # source://mime-types/3.4.1/lib/mime/types.rb#211
- def index_extensions!(mime_type); end
-
- # source://mime-types/3.4.1/lib/mime/types.rb#221
- def match(pattern); end
-
- # source://mime-types/3.4.1/lib/mime/types.rb#215
- def prune_matches(matches, complete, registered); end
-
- # source://mime-types/3.4.1/lib/mime/types.rb#205
- def reindex_extensions!(mime_type); end
-
- class << self
- # source://mime-types/3.4.1/lib/mime/types/registry.rb#14
- def [](type_id, complete: T.unsafe(nil), registered: T.unsafe(nil)); end
-
- # source://mime-types/3.4.1/lib/mime/types/registry.rb#39
- def add(*types); end
-
- # source://mime-types/3.4.1/lib/mime/types/registry.rb#19
- def count; end
-
- # source://mime-types/3.4.1/lib/mime/types/registry.rb#24
- def each; end
-
- # source://mime-types/3.4.1/lib/mime/types/logger.rb#12
- def logger; end
-
- # source://mime-types/3.4.1/lib/mime/types/logger.rb#12
- def logger=(_arg0); end
-
- # source://mime-types/3.4.1/lib/mime/types/registry.rb#7
- def new(*_arg0); end
-
- # source://mime-types/3.4.1/lib/mime/types/registry.rb#33
- def of(filename); end
-
- # source://mime-types/3.4.1/lib/mime/types/registry.rb#33
- def type_for(filename); end
-
- private
-
- # source://mime-types/3.4.1/lib/mime/types/registry.rb#75
- def __instances__; end
-
- # source://mime-types/3.4.1/lib/mime/types/registry.rb#55
- def __types__; end
-
- # source://mime-types/3.4.1/lib/mime/types/registry.rb#45
- def lazy_load?; end
-
- # source://mime-types/3.4.1/lib/mime/types/registry.rb#65
- def load_default_mime_types(mode = T.unsafe(nil)); end
-
- # source://mime-types/3.4.1/lib/mime/types/registry.rb#60
- def load_mode; end
-
- # source://mime-types/3.4.1/lib/mime/types/registry.rb#79
- def reindex_extensions(type); end
- end
-end
-
-# source://mime-types-data//lib/mime/types/data.rb#5
-module MIME::Types::Data; end
-
-# The path that will be used for loading the MIME::Types data. The
-# default location is __FILE__/../../../../data, which is where the data
-# lives in the gem installation of the mime-types-data library.
-#
-# The MIME::Types::Loader will load all JSON or columnar files contained
-# in this path.
-#
-# System maintainer note: this is the constant to change when packaging
-# mime-types for your system. It is recommended that the path be
-# something like /usr/share/ruby/mime-types/.
-#
-# source://mime-types-data//lib/mime/types/data.rb#18
-MIME::Types::Data::PATH = T.let(T.unsafe(nil), String)
-
-# source://mime-types-data//lib/mime/types/data.rb#6
-MIME::Types::Data::VERSION = T.let(T.unsafe(nil), String)
diff --git a/sorbet/rbi/gems/mime-types@3.4.1.rbi b/sorbet/rbi/gems/mime-types@3.4.1.rbi
deleted file mode 100644
index c33ee6a9..00000000
--- a/sorbet/rbi/gems/mime-types@3.4.1.rbi
+++ /dev/null
@@ -1,1225 +0,0 @@
-# typed: true
-
-# DO NOT EDIT MANUALLY
-# This is an autogenerated file for types exported from the `mime-types` gem.
-# Please instead update this file by running `bin/tapioca gem mime-types`.
-
-# The namespace for MIME applications, tools, and libraries.
-#
-# source://mime-types//lib/mime/types.rb#4
-module MIME; end
-
-# The definition of one MIME content-type.
-#
-# == Usage
-# require 'mime/types'
-#
-# plaintext = MIME::Types['text/plain'] # => [ text/plain ]
-# text = plaintext.first
-# puts text.media_type # => 'text'
-# puts text.sub_type # => 'plain'
-#
-# puts text.extensions.join(' ') # => 'txt asc c cc h hh cpp hpp dat hlp'
-# puts text.preferred_extension # => 'txt'
-# puts text.friendly # => 'Text Document'
-# puts text.i18n_key # => 'text.plain'
-#
-# puts text.encoding # => quoted-printable
-# puts text.default_encoding # => quoted-printable
-# puts text.binary? # => false
-# puts text.ascii? # => true
-# puts text.obsolete? # => false
-# puts text.registered? # => true
-# puts text.provisional? # => false
-# puts text.complete? # => true
-#
-# puts text # => 'text/plain'
-#
-# puts text == 'text/plain' # => true
-# puts 'text/plain' == text # => true
-# puts text == 'text/x-plain' # => false
-# puts 'text/x-plain' == text # => false
-#
-# puts MIME::Type.simplified('x-appl/x-zip') # => 'x-appl/x-zip'
-# puts MIME::Type.i18n_key('x-appl/x-zip') # => 'x-appl.x-zip'
-#
-# puts text.like?('text/x-plain') # => true
-# puts text.like?(MIME::Type.new('x-text/x-plain')) # => true
-#
-# puts text.xrefs.inspect # => { "rfc" => [ "rfc2046", "rfc3676", "rfc5147" ] }
-# puts text.xref_urls # => [ "http://www.iana.org/go/rfc2046",
-# # "http://www.iana.org/go/rfc3676",
-# # "http://www.iana.org/go/rfc5147" ]
-#
-# xtext = MIME::Type.new('x-text/x-plain')
-# puts xtext.media_type # => 'text'
-# puts xtext.raw_media_type # => 'x-text'
-# puts xtext.sub_type # => 'plain'
-# puts xtext.raw_sub_type # => 'x-plain'
-# puts xtext.complete? # => false
-#
-# puts MIME::Types.any? { |type| type.content_type == 'text/plain' } # => true
-# puts MIME::Types.all?(&:registered?) # => false
-#
-# # Various string representations of MIME types
-# qcelp = MIME::Types['audio/QCELP'].first # => audio/QCELP
-# puts qcelp.content_type # => 'audio/QCELP'
-# puts qcelp.simplified # => 'audio/qcelp'
-#
-# xwingz = MIME::Types['application/x-Wingz'].first # => application/x-Wingz
-# puts xwingz.content_type # => 'application/x-Wingz'
-# puts xwingz.simplified # => 'application/x-wingz'
-#
-# source://mime-types//lib/mime/type.rb#67
-class MIME::Type
- include ::Comparable
-
- # Builds a MIME::Type object from the +content_type+, a MIME Content Type
- # value (e.g., 'text/plain' or 'application/x-eruby'). The constructed object
- # is yielded to an optional block for additional configuration, such as
- # associating extensions and encoding information.
- #
- # * When provided a Hash or a MIME::Type, the MIME::Type will be
- # constructed with #init_with.
- # * When provided an Array, the MIME::Type will be constructed using
- # the first element as the content type and the remaining flattened
- # elements as extensions.
- # * Otherwise, the content_type will be used as a string.
- #
- # Yields the newly constructed +self+ object.
- #
- # @return [Type] a new instance of Type
- # @yield [_self]
- # @yieldparam _self [MIME::Type] the object that the method was called on
- #
- # source://mime-types//lib/mime/type.rb#125
- def initialize(content_type); end
-
- # Compares the +other+ MIME::Type against the exact content type or the
- # simplified type (the simplified type will be used if comparing against
- # something that can be treated as a String with #to_s). In comparisons, this
- # is done against the lowercase version of the MIME::Type.
- #
- # source://mime-types//lib/mime/type.rb#165
- def <=>(other); end
-
- # Merge the +extensions+ provided into this MIME::Type. The extensions added
- # will be merged uniquely.
- #
- # source://mime-types//lib/mime/type.rb#287
- def add_extensions(*extensions); end
-
- # MIME types can be specified to be sent across a network in particular
- # formats. This method returns +false+ when the MIME::Type encoding is
- # set to base64.
- #
- # @return [Boolean]
- #
- # source://mime-types//lib/mime/type.rb#441
- def ascii?; end
-
- # MIME types can be specified to be sent across a network in particular
- # formats. This method returns +true+ when the MIME::Type encoding is set
- # to base64.
- #
- # @return [Boolean]
- #
- # source://mime-types//lib/mime/type.rb#434
- def binary?; end
-
- # Returns +true+ if the MIME::Type specifies an extension list,
- # indicating that it is a complete MIME::Type.
- #
- # @return [Boolean]
- #
- # source://mime-types//lib/mime/type.rb#451
- def complete?; end
-
- # Returns the whole MIME content-type string.
- #
- # The content type is a presentation value from the MIME type registry and
- # should not be used for comparison. The case of the content type is
- # preserved, and extension markers (x-) are kept.
- #
- # text/plain => text/plain
- # x-chemical/x-pdb => x-chemical/x-pdb
- # audio/QCELP => audio/QCELP
- #
- # source://mime-types//lib/mime/type.rb#236
- def content_type; end
-
- # Returns the default encoding for the MIME::Type based on the media type.
- #
- # source://mime-types//lib/mime/type.rb#340
- def default_encoding; end
-
- # The documentation for this MIME::Type.
- #
- # source://mime-types//lib/mime/type.rb#364
- def docs; end
-
- # The documentation for this MIME::Type.
- #
- # source://mime-types//lib/mime/type.rb#364
- def docs=(_arg0); end
-
- # Populates the +coder+ with attributes about this record for
- # serialization. The structure of +coder+ should match the structure used
- # with #init_with.
- #
- # This method should be considered a private implementation detail.
- #
- # source://mime-types//lib/mime/type.rb#485
- def encode_with(coder); end
-
- # Returns the value of attribute encoding.
- #
- # source://mime-types//lib/mime/type.rb#326
- def encoding; end
-
- # source://mime-types//lib/mime/type.rb#329
- def encoding=(enc); end
-
- # Returns +true+ if the +other+ object is a MIME::Type and the content types
- # match.
- #
- # @return [Boolean]
- #
- # source://mime-types//lib/mime/type.rb#223
- def eql?(other); end
-
- # The list of extensions which are known to be used for this MIME::Type.
- # Non-array values will be coerced into an array with #to_a. Array values
- # will be flattened, +nil+ values removed, and made unique.
- #
- # :attr_accessor: extensions
- #
- # source://mime-types//lib/mime/type.rb#275
- def extensions; end
-
- # source://mime-types//lib/mime/type.rb#280
- def extensions=(value); end
-
- # A friendly short description for this MIME::Type.
- #
- # call-seq:
- # text_plain.friendly # => "Text File"
- # text_plain.friendly('en') # => "Text File"
- #
- # source://mime-types//lib/mime/type.rb#371
- def friendly(lang = T.unsafe(nil)); end
-
- # A key suitable for use as a lookup key for translations, such as with
- # the I18n library.
- #
- # call-seq:
- # text_plain.i18n_key # => "text.plain"
- # 3gpp_xml.i18n_key # => "application.vnd-3gpp-bsf-xml"
- # # from application/vnd.3gpp.bsf+xml
- # x_msword.i18n_key # => "application.word"
- # # from application/x-msword
- #
- # source://mime-types//lib/mime/type.rb#396
- def i18n_key; end
-
- # Initialize an empty object from +coder+, which must contain the
- # attributes necessary for initializing an empty object.
- #
- # This method should be considered a private implementation detail.
- #
- # source://mime-types//lib/mime/type.rb#514
- def init_with(coder); end
-
- # source://mime-types//lib/mime/type.rb#530
- def inspect; end
-
- # Indicates that a MIME type is like another type. This differs from
- # == because x- prefixes are removed for this comparison.
- #
- # @return [Boolean]
- #
- # source://mime-types//lib/mime/type.rb#151
- def like?(other); end
-
- # Returns the media type of the simplified MIME::Type.
- #
- # text/plain => text
- # x-chemical/x-pdb => x-chemical
- # audio/QCELP => audio
- #
- # source://mime-types//lib/mime/type.rb#249
- def media_type; end
-
- # Returns +true+ if the media type is obsolete.
- #
- # source://mime-types//lib/mime/type.rb#360
- def obsolete; end
-
- # Returns +true+ if the media type is obsolete.
- #
- # source://mime-types//lib/mime/type.rb#360
- def obsolete=(_arg0); end
-
- # Returns +true+ if the media type is obsolete.
- #
- # source://mime-types//lib/mime/type.rb#360
- def obsolete?; end
-
- # source://mime-types//lib/mime/type.rb#301
- def preferred_extension; end
-
- # source://mime-types//lib/mime/type.rb#306
- def preferred_extension=(value); end
-
- # Compares the +other+ MIME::Type based on how reliable it is before doing a
- # normal <=> comparison. Used by MIME::Types#[] to sort types. The
- # comparisons involved are:
- #
- # 1. self.simplified <=> other.simplified (ensures that we
- # don't try to compare different types)
- # 2. IANA-registered definitions < other definitions.
- # 3. Complete definitions < incomplete definitions.
- # 4. Current definitions < obsolete definitions.
- # 5. Obselete with use-instead names < obsolete without.
- # 6. Obsolete use-instead definitions are compared.
- #
- # While this method is public, its use is strongly discouraged by consumers
- # of mime-types. In mime-types 3, this method is likely to see substantial
- # revision and simplification to ensure current registered content types sort
- # before unregistered or obsolete content types.
- #
- # source://mime-types//lib/mime/type.rb#195
- def priority_compare(other); end
-
- # Indicates whether the MIME type's registration with IANA is provisional.
- #
- # source://mime-types//lib/mime/type.rb#424
- def provisional; end
-
- # Indicates whether the MIME type's registration with IANA is provisional.
- #
- # source://mime-types//lib/mime/type.rb#424
- def provisional=(_arg0); end
-
- # Indicates whether the MIME type's registration with IANA is provisional.
- #
- # @return [Boolean]
- #
- # source://mime-types//lib/mime/type.rb#427
- def provisional?; end
-
- # Returns the media type of the unmodified MIME::Type.
- #
- # text/plain => text
- # x-chemical/x-pdb => x-chemical
- # audio/QCELP => audio
- #
- # source://mime-types//lib/mime/type.rb#255
- def raw_media_type; end
-
- # Returns the media type of the unmodified MIME::Type.
- #
- # text/plain => plain
- # x-chemical/x-pdb => x-pdb
- # audio/QCELP => qcelp
- #
- # source://mime-types//lib/mime/type.rb#267
- def raw_sub_type; end
-
- # Indicates whether the MIME type has been registered with IANA.
- #
- # source://mime-types//lib/mime/type.rb#420
- def registered; end
-
- # Indicates whether the MIME type has been registered with IANA.
- #
- # source://mime-types//lib/mime/type.rb#420
- def registered=(_arg0); end
-
- # Indicates whether the MIME type has been registered with IANA.
- #
- # source://mime-types//lib/mime/type.rb#420
- def registered?; end
-
- # Indicateswhether the MIME type is declared as a signature type.
- #
- # source://mime-types//lib/mime/type.rb#446
- def signature; end
-
- # Indicateswhether the MIME type is declared as a signature type.
- #
- # source://mime-types//lib/mime/type.rb#446
- def signature=(_arg0); end
-
- # Indicateswhether the MIME type is declared as a signature type.
- #
- # source://mime-types//lib/mime/type.rb#446
- def signature?; end
-
- # A simplified form of the MIME content-type string, suitable for
- # case-insensitive comparison, with the content_type converted to lowercase.
- #
- # text/plain => text/plain
- # x-chemical/x-pdb => x-chemical/x-pdb
- # audio/QCELP => audio/qcelp
- #
- # source://mime-types//lib/mime/type.rb#243
- def simplified; end
-
- # Returns the sub-type of the simplified MIME::Type.
- #
- # text/plain => plain
- # x-chemical/x-pdb => pdb
- # audio/QCELP => QCELP
- #
- # source://mime-types//lib/mime/type.rb#261
- def sub_type; end
-
- # Converts the MIME::Type to a hash. The output of this method can also be
- # used to initialize a MIME::Type.
- #
- # source://mime-types//lib/mime/type.rb#476
- def to_h; end
-
- # Converts the MIME::Type to a JSON string.
- #
- # source://mime-types//lib/mime/type.rb#469
- def to_json(*args); end
-
- # Returns the MIME::Type as a string.
- #
- # source://mime-types//lib/mime/type.rb#456
- def to_s; end
-
- # Returns the MIME::Type as a string for implicit conversions. This allows
- # MIME::Type objects to appear on either side of a comparison.
- #
- # 'text/plain' == MIME::Type.new('text/plain')
- #
- # source://mime-types//lib/mime/type.rb#464
- def to_str; end
-
- # source://mime-types//lib/mime/type.rb#352
- def use_instead; end
-
- # Sets the attribute use_instead
- #
- # @param value the value to set the attribute use_instead to.
- #
- # source://mime-types//lib/mime/type.rb#357
- def use_instead=(_arg0); end
-
- # The decoded cross-reference URL list for this MIME::Type.
- #
- # source://mime-types//lib/mime/type.rb#412
- def xref_urls; end
-
- # Returns the value of attribute xrefs.
- #
- # source://mime-types//lib/mime/type.rb#404
- def xrefs; end
-
- # source://mime-types//lib/mime/type.rb#407
- def xrefs=(xrefs); end
-
- private
-
- # source://mime-types//lib/mime/type.rb#583
- def content_type=(type_string); end
-
- # MRI 2.2 and older don't have a method for string interning,
- # so we simply freeze them for keeping a similar interface
- #
- # source://mime-types//lib/mime/type.rb#600
- def intern_string(string); end
-
- # source://mime-types//lib/mime/type.rb#611
- def xref_map(values, helper); end
-
- # source://mime-types//lib/mime/type.rb#619
- def xref_url_for_draft(value); end
-
- # source://mime-types//lib/mime/type.rb#627
- def xref_url_for_person(value); end
-
- # source://mime-types//lib/mime/type.rb#615
- def xref_url_for_rfc(value); end
-
- # source://mime-types//lib/mime/type.rb#623
- def xref_url_for_rfc_errata(value); end
-
- # source://mime-types//lib/mime/type.rb#631
- def xref_url_for_template(value); end
-
- class << self
- # Converts a provided +content_type+ into a translation key suitable for
- # use with the I18n library.
- #
- # source://mime-types//lib/mime/type.rb#550
- def i18n_key(content_type); end
-
- # Return a +MatchData+ object of the +content_type+ against pattern of
- # media types.
- #
- # source://mime-types//lib/mime/type.rb#558
- def match(content_type); end
-
- # MIME media types are case-insensitive, but are typically presented in a
- # case-preserving format in the type registry. This method converts
- # +content_type+ to lowercase.
- #
- # In previous versions of mime-types, this would also remove any extension
- # prefix (x-). This is no longer default behaviour, but may be
- # provided by providing a truth value to +remove_x_prefix+.
- #
- # source://mime-types//lib/mime/type.rb#544
- def simplified(content_type, remove_x_prefix: T.unsafe(nil)); end
-
- private
-
- # source://mime-types//lib/mime/type.rb#569
- def simplify_matchdata(matchdata, remove_x = T.unsafe(nil), joiner: T.unsafe(nil)); end
- end
-end
-
-# source://mime-types//lib/mime/type.rb#106
-MIME::Type::ASCII_ENCODINGS = T.let(T.unsafe(nil), Array)
-
-# source://mime-types//lib/mime/type.rb#105
-MIME::Type::BINARY_ENCODINGS = T.let(T.unsafe(nil), Array)
-
-# A version of MIME::Type that works hand-in-hand with a MIME::Types::Columnar
-# container to load data by columns.
-#
-# When a field is has not yet been loaded, that data will be loaded for all
-# types in the container before forwarding the message to MIME::Type.
-#
-# More information can be found in MIME::Types::Columnar.
-#
-# MIME::Type::Columnar is *not* intended to be created except by
-# MIME::Types::Columnar containers.
-#
-# source://mime-types//lib/mime/type/columnar.rb#15
-class MIME::Type::Columnar < ::MIME::Type
- # @return [Columnar] a new instance of Columnar
- #
- # source://mime-types//lib/mime/type/columnar.rb#16
- def initialize(container, content_type, extensions); end
-
- # source://mime-types//lib/mime/type/columnar.rb#27
- def docs(*args); end
-
- # source://mime-types//lib/mime/type/columnar.rb#27
- def docs=(*args); end
-
- # source://mime-types//lib/mime/type/columnar.rb#43
- def encode_with(coder); end
-
- # source://mime-types//lib/mime/type/columnar.rb#27
- def encoding(*args); end
-
- # source://mime-types//lib/mime/type/columnar.rb#27
- def encoding=(*args); end
-
- # source://mime-types//lib/mime/type/columnar.rb#27
- def friendly(*args); end
-
- # source://mime-types//lib/mime/type/columnar.rb#27
- def obsolete(*args); end
-
- # source://mime-types//lib/mime/type/columnar.rb#27
- def obsolete=(*args); end
-
- # source://mime-types//lib/mime/type/columnar.rb#27
- def obsolete?(*args); end
-
- # source://mime-types//lib/mime/type/columnar.rb#27
- def preferred_extension(*args); end
-
- # source://mime-types//lib/mime/type/columnar.rb#27
- def preferred_extension=(*args); end
-
- # source://mime-types//lib/mime/type/columnar.rb#27
- def provisional(*args); end
-
- # source://mime-types//lib/mime/type/columnar.rb#27
- def provisional=(*args); end
-
- # source://mime-types//lib/mime/type/columnar.rb#27
- def provisional?(*args); end
-
- # source://mime-types//lib/mime/type/columnar.rb#27
- def registered(*args); end
-
- # source://mime-types//lib/mime/type/columnar.rb#27
- def registered=(*args); end
-
- # source://mime-types//lib/mime/type/columnar.rb#27
- def registered?(*args); end
-
- # source://mime-types//lib/mime/type/columnar.rb#27
- def signature(*args); end
-
- # source://mime-types//lib/mime/type/columnar.rb#27
- def signature=(*args); end
-
- # source://mime-types//lib/mime/type/columnar.rb#27
- def signature?(*args); end
-
- # source://mime-types//lib/mime/type/columnar.rb#27
- def use_instead(*args); end
-
- # source://mime-types//lib/mime/type/columnar.rb#27
- def use_instead=(*args); end
-
- # source://mime-types//lib/mime/type/columnar.rb#27
- def xref_urls(*args); end
-
- # source://mime-types//lib/mime/type/columnar.rb#27
- def xrefs(*args); end
-
- # source://mime-types//lib/mime/type/columnar.rb#27
- def xrefs=(*args); end
-end
-
-# source://mime-types//lib/mime/type.rb#104
-MIME::Type::I18N_RE = T.let(T.unsafe(nil), Regexp)
-
-# Reflects a MIME content-type specification that is not correctly
-# formatted (it isn't +type+/+subtype+).
-#
-# source://mime-types//lib/mime/type.rb#71
-class MIME::Type::InvalidContentType < ::ArgumentError
- # :stopdoc:
- #
- # @return [InvalidContentType] a new instance of InvalidContentType
- #
- # source://mime-types//lib/mime/type.rb#72
- def initialize(type_string); end
-
- # source://mime-types//lib/mime/type.rb#76
- def to_s; end
-end
-
-# Reflects an unsupported MIME encoding.
-#
-# source://mime-types//lib/mime/type.rb#84
-class MIME::Type::InvalidEncoding < ::ArgumentError
- # :stopdoc:
- #
- # @return [InvalidEncoding] a new instance of InvalidEncoding
- #
- # source://mime-types//lib/mime/type.rb#85
- def initialize(encoding); end
-
- # source://mime-types//lib/mime/type.rb#89
- def to_s; end
-end
-
-# :stopdoc:
-# TODO verify mime-type character restrictions; I am pretty sure that this is
-# too wide open.
-#
-# source://mime-types//lib/mime/type.rb#103
-MIME::Type::MEDIA_TYPE_RE = T.let(T.unsafe(nil), Regexp)
-
-# The released version of the mime-types library.
-#
-# source://mime-types//lib/mime/type.rb#96
-MIME::Type::VERSION = T.let(T.unsafe(nil), String)
-
-# MIME::Types is a registry of MIME types. It is both a class (created with
-# MIME::Types.new) and a default registry (loaded automatically or through
-# interactions with MIME::Types.[] and MIME::Types.type_for).
-#
-# == The Default mime-types Registry
-#
-# The default mime-types registry is loaded automatically when the library
-# is required (require 'mime/types'), but it may be lazily loaded
-# (loaded on first use) with the use of the environment variable
-# +RUBY_MIME_TYPES_LAZY_LOAD+ having any value other than +false+. The
-# initial startup is about 14× faster (~10 ms vs ~140 ms), but the
-# registry will be loaded at some point in the future.
-#
-# The default mime-types registry can also be loaded from a Marshal cache
-# file specific to the version of MIME::Types being loaded. This will be
-# handled automatically with the use of a file referred to in the
-# environment variable +RUBY_MIME_TYPES_CACHE+. MIME::Types will attempt to
-# load the registry from this cache file (MIME::Type::Cache.load); if it
-# cannot be loaded (because the file does not exist, there is an error, or
-# the data is for a different version of mime-types), the default registry
-# will be loaded from the normal JSON version and then the cache file will
-# be *written* to the location indicated by +RUBY_MIME_TYPES_CACHE+. Cache
-# file loads just over 4½× faster (~30 ms vs ~140 ms).
-# loads.
-#
-# Notes:
-# * The loading of the default registry is *not* atomic; when using a
-# multi-threaded environment, it is recommended that lazy loading is not
-# used and mime-types is loaded as early as possible.
-# * Cache files should be specified per application in a multiprocess
-# environment and should be initialized during deployment or before
-# forking to minimize the chance that the multiple processes will be
-# trying to write to the same cache file at the same time, or that two
-# applications that are on different versions of mime-types would be
-# thrashing the cache.
-# * Unless cache files are preinitialized, the application using the
-# mime-types cache file must have read/write permission to the cache file.
-#
-# == Usage
-# require 'mime/types'
-#
-# plaintext = MIME::Types['text/plain']
-# print plaintext.media_type # => 'text'
-# print plaintext.sub_type # => 'plain'
-#
-# puts plaintext.extensions.join(" ") # => 'asc txt c cc h hh cpp'
-#
-# puts plaintext.encoding # => 8bit
-# puts plaintext.binary? # => false
-# puts plaintext.ascii? # => true
-# puts plaintext.obsolete? # => false
-# puts plaintext.registered? # => true
-# puts plaintext.provisional? # => false
-# puts plaintext == 'text/plain' # => true
-# puts MIME::Type.simplified('x-appl/x-zip') # => 'appl/zip'
-#
-# source://mime-types//lib/mime/types.rb#6
-class MIME::Types
- include ::Enumerable
- extend ::Enumerable
-
- # Creates a new MIME::Types registry.
- #
- # @return [Types] a new instance of Types
- #
- # source://mime-types//lib/mime/types.rb#75
- def initialize; end
-
- # Returns a list of MIME::Type objects, which may be empty. The optional
- # flag parameters are :complete (finds only complete MIME::Type
- # objects) and :registered (finds only MIME::Types that are
- # registered). It is possible for multiple matches to be returned for
- # either type (in the example below, 'text/plain' returns two values --
- # one for the general case, and one for VMS systems).
- #
- # puts "\nMIME::Types['text/plain']"
- # MIME::Types['text/plain'].each { |t| puts t.to_a.join(", ") }
- #
- # puts "\nMIME::Types[/^image/, complete: true]"
- # MIME::Types[/^image/, :complete => true].each do |t|
- # puts t.to_a.join(", ")
- # end
- #
- # If multiple type definitions are returned, returns them sorted as
- # follows:
- # 1. Complete definitions sort before incomplete ones;
- # 2. IANA-registered definitions sort before LTSW-recorded
- # definitions.
- # 3. Current definitions sort before obsolete ones;
- # 4. Obsolete definitions with use-instead clauses sort before those
- # without;
- # 5. Obsolete definitions use-instead clauses are compared.
- # 6. Sort on name.
- #
- # source://mime-types//lib/mime/types.rb#125
- def [](type_id, complete: T.unsafe(nil), registered: T.unsafe(nil)); end
-
- # Add one or more MIME::Type objects to the set of known types. If the
- # type is already known, a warning will be displayed.
- #
- # The last parameter may be the value :silent or +true+ which
- # will suppress duplicate MIME type warnings.
- #
- # source://mime-types//lib/mime/types.rb#167
- def add(*types); end
-
- # Add a single MIME::Type object to the set of known types. If the +type+ is
- # already known, a warning will be displayed. The +quiet+ parameter may be a
- # truthy value to suppress that warning.
- #
- # source://mime-types//lib/mime/types.rb#188
- def add_type(type, quiet = T.unsafe(nil)); end
-
- # Returns the number of known type variants.
- #
- # source://mime-types//lib/mime/types.rb#81
- def count; end
-
- # Iterates through the type variants.
- #
- # source://mime-types//lib/mime/types.rb#90
- def each; end
-
- # source://mime-types//lib/mime/types.rb#85
- def inspect; end
-
- # Return the list of MIME::Types which belongs to the file based on its
- # filename extension. If there is no extension, the filename will be used
- # as the matching criteria on its own.
- #
- # This will always return a merged, flatten, priority sorted, unique array.
- #
- # puts MIME::Types.type_for('citydesk.xml')
- # => [application/xml, text/xml]
- # puts MIME::Types.type_for('citydesk.gif')
- # => [image/gif]
- # puts MIME::Types.type_for(%w(citydesk.xml citydesk.gif))
- # => [application/xml, image/gif, text/xml]
- #
- # source://mime-types//lib/mime/types.rb#153
- def of(filename); end
-
- # Return the list of MIME::Types which belongs to the file based on its
- # filename extension. If there is no extension, the filename will be used
- # as the matching criteria on its own.
- #
- # This will always return a merged, flatten, priority sorted, unique array.
- #
- # puts MIME::Types.type_for('citydesk.xml')
- # => [application/xml, text/xml]
- # puts MIME::Types.type_for('citydesk.gif')
- # => [image/gif]
- # puts MIME::Types.type_for(%w(citydesk.xml citydesk.gif))
- # => [application/xml, image/gif, text/xml]
- #
- # source://mime-types//lib/mime/types.rb#153
- def type_for(filename); end
-
- private
-
- # source://mime-types//lib/mime/types.rb#201
- def add_type_variant!(mime_type); end
-
- # source://mime-types//lib/mime/types.rb#211
- def index_extensions!(mime_type); end
-
- # source://mime-types//lib/mime/types.rb#221
- def match(pattern); end
-
- # source://mime-types//lib/mime/types.rb#215
- def prune_matches(matches, complete, registered); end
-
- # source://mime-types//lib/mime/types.rb#205
- def reindex_extensions!(mime_type); end
-
- class << self
- # MIME::Types#[] against the default MIME::Types registry.
- #
- # source://mime-types//lib/mime/types/registry.rb#14
- def [](type_id, complete: T.unsafe(nil), registered: T.unsafe(nil)); end
-
- # MIME::Types#add against the default MIME::Types registry.
- #
- # source://mime-types//lib/mime/types/registry.rb#39
- def add(*types); end
-
- # MIME::Types#count against the default MIME::Types registry.
- #
- # source://mime-types//lib/mime/types/registry.rb#19
- def count; end
-
- # MIME::Types#each against the default MIME::Types registry.
- #
- # source://mime-types//lib/mime/types/registry.rb#24
- def each; end
-
- # Configure the MIME::Types logger. This defaults to an instance of a
- # logger that passes messages (unformatted) through to Kernel#warn.
- #
- # source://mime-types//lib/mime/types/logger.rb#12
- def logger; end
-
- # Configure the MIME::Types logger. This defaults to an instance of a
- # logger that passes messages (unformatted) through to Kernel#warn.
- #
- # source://mime-types//lib/mime/types/logger.rb#12
- def logger=(_arg0); end
-
- # source://mime-types//lib/mime/types/registry.rb#7
- def new(*_arg0); end
-
- # MIME::Types#type_for against the default MIME::Types registry.
- #
- # source://mime-types//lib/mime/types/registry.rb#33
- def of(filename); end
-
- # MIME::Types#type_for against the default MIME::Types registry.
- #
- # source://mime-types//lib/mime/types/registry.rb#33
- def type_for(filename); end
-
- private
-
- # source://mime-types//lib/mime/types/registry.rb#75
- def __instances__; end
-
- # source://mime-types//lib/mime/types/registry.rb#55
- def __types__; end
-
- # @return [Boolean]
- #
- # source://mime-types//lib/mime/types/registry.rb#45
- def lazy_load?; end
-
- # source://mime-types//lib/mime/types/registry.rb#65
- def load_default_mime_types(mode = T.unsafe(nil)); end
-
- # source://mime-types//lib/mime/types/registry.rb#60
- def load_mode; end
-
- # source://mime-types//lib/mime/types/registry.rb#79
- def reindex_extensions(type); end
- end
-end
-
-# Caching of MIME::Types registries is advisable if you will be loading
-# the default registry relatively frequently. With the class methods on
-# MIME::Types::Cache, any MIME::Types registry can be marshaled quickly
-# and easily.
-#
-# The cache is invalidated on a per-data-version basis; a cache file for
-# version 3.2015.1118 will not be reused with version 3.2015.1201.
-#
-# source://mime-types//lib/mime/types/cache.rb#3
-class MIME::Types::Cache < ::Struct
- def data; end
- def data=(_); end
- def version; end
- def version=(_); end
-
- class << self
- def [](*_arg0); end
- def inspect; end
- def keyword_init?; end
-
- # Attempts to load the cache from the file provided as a parameter or in
- # the environment variable +RUBY_MIME_TYPES_CACHE+. Returns +nil+ if the
- # file does not exist, if the file cannot be loaded, or if the data in
- # the cache version is different than this version.
- #
- # source://mime-types//lib/mime/types/cache.rb#17
- def load(cache_file = T.unsafe(nil)); end
-
- def members; end
- def new(*_arg0); end
-
- # Attempts to save the types provided to the cache file provided.
- #
- # If +types+ is not provided or is +nil+, the cache will contain the
- # current MIME::Types default registry.
- #
- # If +cache_file+ is not provided or is +nil+, the cache will be written
- # to the file specified in the environment variable
- # +RUBY_MIME_TYPES_CACHE+. If there is no cache file specified either
- # directly or through the environment, this method will return +nil+
- #
- # source://mime-types//lib/mime/types/cache.rb#46
- def save(types = T.unsafe(nil), cache_file = T.unsafe(nil)); end
- end
-end
-
-# MIME::Types::Columnar is used to extend a MIME::Types container to load data
-# by columns instead of from JSON or YAML. Column loads of MIME types loaded
-# through the columnar store are synchronized with a Mutex.
-#
-# MIME::Types::Columnar is not intended to be used directly, but will be added
-# to an instance of MIME::Types when it is loaded with
-# MIME::Types::Loader#load_columnar.
-#
-# source://mime-types//lib/mime/types/_columnar.rb#12
-module MIME::Types::Columnar
- # Load the first column data file (type and extensions).
- #
- # source://mime-types//lib/mime/types/_columnar.rb#22
- def load_base_data(path); end
-
- private
-
- # source://mime-types//lib/mime/types/_columnar.rb#122
- def arr(line); end
-
- # source://mime-types//lib/mime/types/_columnar.rb#110
- def dict(line, array: T.unsafe(nil)); end
-
- # source://mime-types//lib/mime/types/_columnar.rb#41
- def each_file_line(name, lookup = T.unsafe(nil)); end
-
- # source://mime-types//lib/mime/types/_columnar.rb#134
- def flag(line); end
-
- # source://mime-types//lib/mime/types/_columnar.rb#70
- def load_docs; end
-
- # source://mime-types//lib/mime/types/_columnar.rb#63
- def load_encoding; end
-
- # source://mime-types//lib/mime/types/_columnar.rb#82
- def load_flags; end
-
- # source://mime-types//lib/mime/types/_columnar.rb#98
- def load_friendly; end
-
- # source://mime-types//lib/mime/types/_columnar.rb#76
- def load_preferred_extension; end
-
- # source://mime-types//lib/mime/types/_columnar.rb#104
- def load_use_instead; end
-
- # source://mime-types//lib/mime/types/_columnar.rb#92
- def load_xrefs; end
-
- # source://mime-types//lib/mime/types/_columnar.rb#130
- def opt(line); end
-
- class << self
- # source://mime-types//lib/mime/types/_columnar.rb#15
- def extended(obj); end
- end
-end
-
-# source://mime-types//lib/mime/types/_columnar.rb#13
-MIME::Types::Columnar::LOAD_MUTEX = T.let(T.unsafe(nil), Thread::Mutex)
-
-# MIME::Types requires a serializable keyed container that returns an empty Set
-# on a key miss. Hash#default_value cannot be used because, while it traverses
-# the Marshal format correctly, it won't survive any other serialization
-# format (plus, a default of a mutable object resuls in a shared mess).
-# Hash#default_proc cannot be used without a wrapper because it prevents
-# Marshal serialization (and doesn't survive the round-trip).
-#
-# source://mime-types//lib/mime/types/container.rb#12
-class MIME::Types::Container
- extend ::Forwardable
-
- # @return [Container] a new instance of Container
- #
- # source://mime-types//lib/mime/types/container.rb#15
- def initialize(hash = T.unsafe(nil)); end
-
- # source://forwardable/1.3.2/forwardable.rb#229
- def ==(*args, **_arg1, &block); end
-
- # source://mime-types//lib/mime/types/container.rb#20
- def [](key); end
-
- # source://mime-types//lib/mime/types/container.rb#24
- def []=(key, value); end
-
- # source://mime-types//lib/mime/types/container.rb#61
- def add(key, value); end
-
- # source://forwardable/1.3.2/forwardable.rb#229
- def count(*args, **_arg1, &block); end
-
- # source://forwardable/1.3.2/forwardable.rb#229
- def each(*args, **_arg1, &block); end
-
- # source://forwardable/1.3.2/forwardable.rb#229
- def each_value(*args, **_arg1, &block); end
-
- # source://forwardable/1.3.2/forwardable.rb#229
- def empty?(*args, **_arg1, &block); end
-
- # source://mime-types//lib/mime/types/container.rb#73
- def encode_with(coder); end
-
- # source://forwardable/1.3.2/forwardable.rb#229
- def flat_map(*args, **_arg1, &block); end
-
- # source://mime-types//lib/mime/types/container.rb#77
- def init_with(coder); end
-
- # source://forwardable/1.3.2/forwardable.rb#229
- def keys(*args, **_arg1, &block); end
-
- # source://mime-types//lib/mime/types/container.rb#65
- def marshal_dump; end
-
- # source://mime-types//lib/mime/types/container.rb#69
- def marshal_load(hash); end
-
- # source://mime-types//lib/mime/types/container.rb#34
- def merge(other); end
-
- # source://mime-types//lib/mime/types/container.rb#38
- def merge!(other); end
-
- # source://forwardable/1.3.2/forwardable.rb#229
- def select(*args, **_arg1, &block); end
-
- # source://mime-types//lib/mime/types/container.rb#46
- def to_hash; end
-
- # source://forwardable/1.3.2/forwardable.rb#229
- def values(*args, **_arg1, &block); end
-
- protected
-
- # Returns the value of attribute container.
- #
- # source://mime-types//lib/mime/types/container.rb#84
- def container; end
-
- # Sets the attribute container
- #
- # @param value the value to set the attribute container to.
- #
- # source://mime-types//lib/mime/types/container.rb#84
- def container=(_arg0); end
-
- # source://mime-types//lib/mime/types/container.rb#86
- def normalize; end
-end
-
-# source://mime-types//lib/mime/types/container.rb#94
-MIME::Types::Container::EMPTY_SET = T.let(T.unsafe(nil), Set)
-
-# This class is responsible for initializing the MIME::Types registry from
-# the data files supplied with the mime-types library.
-#
-# The Loader will use one of the following paths:
-# 1. The +path+ provided in its constructor argument;
-# 2. The value of ENV['RUBY_MIME_TYPES_DATA']; or
-# 3. The value of MIME::Types::Data::PATH.
-#
-# When #load is called, the +path+ will be searched recursively for all YAML
-# (.yml or .yaml) files. By convention, there is one file for each media
-# type (application.yml, audio.yml, etc.), but this is not required.
-#
-# source://mime-types//lib/mime/types/loader.rb#22
-class MIME::Types::Loader
- # Creates a Loader object that can be used to load MIME::Types registries
- # into memory, using YAML, JSON, or Columnar registry format loaders.
- #
- # @return [Loader] a new instance of Loader
- #
- # source://mime-types//lib/mime/types/loader.rb#31
- def initialize(path = T.unsafe(nil), container = T.unsafe(nil)); end
-
- # The MIME::Types container instance that will be loaded. If not provided
- # at initialization, a new MIME::Types instance will be constructed.
- #
- # source://mime-types//lib/mime/types/loader.rb#27
- def container; end
-
- # Loads a MIME::Types registry. Loads from JSON files by default
- # (#load_json).
- #
- # This will load from columnar files (#load_columnar) if columnar:
- # true is provided in +options+ and there are columnar files in +path+.
- #
- # source://mime-types//lib/mime/types/loader.rb#82
- def load(options = T.unsafe(nil)); end
-
- # Loads a MIME::Types registry from columnar files recursively found in
- # +path+.
- #
- # source://mime-types//lib/mime/types/loader.rb#69
- def load_columnar; end
-
- # Loads a MIME::Types registry from JSON files (*.json)
- # recursively found in +path+.
- #
- # It is expected that the JSON objects will be an array of hash objects.
- # The JSON format is the registry format for the MIME types registry
- # shipped with the mime-types library.
- #
- # source://mime-types//lib/mime/types/loader.rb#59
- def load_json; end
-
- # Loads a MIME::Types registry from YAML files (*.yml or
- # *.yaml) recursively found in +path+.
- #
- # It is expected that the YAML objects contained within the registry array
- # will be tagged as !ruby/object:MIME::Type.
- #
- # Note that the YAML format is about 2½ times *slower* than the JSON format.
- #
- # NOTE: The purpose of this format is purely for maintenance reasons.
- #
- # source://mime-types//lib/mime/types/loader.rb#46
- def load_yaml; end
-
- # The path that will be read for the MIME::Types files.
- #
- # source://mime-types//lib/mime/types/loader.rb#24
- def path; end
-
- private
-
- # source://mime-types//lib/mime/types/loader.rb#156
- def columnar_path; end
-
- # source://mime-types//lib/mime/types/loader.rb#152
- def json_path; end
-
- # source://mime-types//lib/mime/types/loader.rb#148
- def yaml_path; end
-
- class << self
- # Loads the default MIME::Type registry.
- #
- # source://mime-types//lib/mime/types/loader.rb#92
- def load(options = T.unsafe(nil)); end
-
- # Loads MIME::Types from a single JSON file.
- #
- # It is expected that the JSON objects will be an array of hash objects.
- # The JSON format is the registry format for the MIME types registry
- # shipped with the mime-types library.
- #
- # source://mime-types//lib/mime/types/loader.rb#126
- def load_from_json(filename); end
-
- # Loads MIME::Types from a single YAML file.
- #
- # It is expected that the YAML objects contained within the registry
- # array will be tagged as !ruby/object:MIME::Type.
- #
- # Note that the YAML format is about 2½ times *slower* than the JSON
- # format.
- #
- # NOTE: The purpose of this format is purely for maintenance reasons.
- #
- # source://mime-types//lib/mime/types/loader.rb#105
- def load_from_yaml(filename); end
-
- private
-
- # @return [Boolean]
- #
- # source://mime-types//lib/mime/types/loader.rb#137
- def old_yaml?; end
-
- # source://mime-types//lib/mime/types/loader.rb#133
- def read_file(filename); end
- end
-end
-
-# The release version of Ruby MIME::Types
-#
-# source://mime-types//lib/mime/types.rb#70
-MIME::Types::VERSION = T.let(T.unsafe(nil), String)
-
-# source://mime-types//lib/mime/types/logger.rb#15
-class MIME::Types::WarnLogger < ::Logger
- # @return [WarnLogger] a new instance of WarnLogger
- #
- # source://mime-types//lib/mime/types/logger.rb#28
- def initialize(_one, _two = T.unsafe(nil), _three = T.unsafe(nil)); end
-end
-
-# source://mime-types//lib/mime/types/logger.rb#16
-class MIME::Types::WarnLogger::WarnLogDevice < ::Logger::LogDevice
- # @return [WarnLogDevice] a new instance of WarnLogDevice
- #
- # source://mime-types//lib/mime/types/logger.rb#17
- def initialize(*_arg0); end
-
- # source://mime-types//lib/mime/types/logger.rb#24
- def close; end
-
- # source://mime-types//lib/mime/types/logger.rb#20
- def write(m); end
-end
diff --git a/sorbet/rbi/gems/minitest-reporters@1.6.0.rbi b/sorbet/rbi/gems/minitest-reporters@1.6.0.rbi
deleted file mode 100644
index e3c3dab2..00000000
--- a/sorbet/rbi/gems/minitest-reporters@1.6.0.rbi
+++ /dev/null
@@ -1,1001 +0,0 @@
-# typed: true
-
-# DO NOT EDIT MANUALLY
-# This is an autogenerated file for types exported from the `minitest-reporters` gem.
-# Please instead update this file by running `bin/tapioca gem minitest-reporters`.
-
-# source://minitest-reporters//lib/minitest/reporters.rb#3
-module Minitest
- class << self
- # source://minitest/5.18.1/lib/minitest.rb#173
- def __run(reporter, options); end
-
- # source://minitest/5.18.1/lib/minitest.rb#94
- def after_run(&block); end
-
- # source://minitest/5.18.1/lib/minitest.rb#66
- def autorun; end
-
- # source://minitest/5.18.1/lib/minitest.rb#19
- def backtrace_filter; end
-
- # source://minitest/5.18.1/lib/minitest.rb#19
- def backtrace_filter=(_arg0); end
-
- # source://minitest/5.18.1/lib/minitest.rb#18
- def cattr_accessor(name); end
-
- # source://minitest/5.18.1/lib/minitest.rb#1073
- def clock_time; end
-
- # source://minitest/5.18.1/lib/minitest.rb#19
- def extensions; end
-
- # source://minitest/5.18.1/lib/minitest.rb#19
- def extensions=(_arg0); end
-
- # source://minitest/5.18.1/lib/minitest.rb#264
- def filter_backtrace(bt); end
-
- # source://minitest/5.18.1/lib/minitest.rb#19
- def info_signal; end
-
- # source://minitest/5.18.1/lib/minitest.rb#19
- def info_signal=(_arg0); end
-
- # source://minitest/5.18.1/lib/minitest.rb#98
- def init_plugins(options); end
-
- # source://minitest/5.18.1/lib/minitest.rb#105
- def load_plugins; end
-
- # source://minitest/5.18.1/lib/minitest.rb#19
- def parallel_executor; end
-
- # source://minitest/5.18.1/lib/minitest.rb#19
- def parallel_executor=(_arg0); end
-
- # source://minitest/5.18.1/lib/minitest.rb#186
- def process_args(args = T.unsafe(nil)); end
-
- # source://minitest/5.18.1/lib/minitest.rb#19
- def reporter; end
-
- # source://minitest/5.18.1/lib/minitest.rb#19
- def reporter=(_arg0); end
-
- # source://minitest/5.18.1/lib/minitest.rb#140
- def run(args = T.unsafe(nil)); end
-
- # source://minitest/5.18.1/lib/minitest.rb#1064
- def run_one_method(klass, method_name); end
-
- # source://minitest/5.18.1/lib/minitest.rb#19
- def seed; end
-
- # source://minitest/5.18.1/lib/minitest.rb#19
- def seed=(_arg0); end
- end
-end
-
-# Filters backtraces of exceptions that may arise when running tests.
-#
-# source://minitest-reporters//lib/minitest/extensible_backtrace_filter.rb#3
-class Minitest::ExtensibleBacktraceFilter
- # Creates a new backtrace filter.
- #
- # @return [ExtensibleBacktraceFilter] a new instance of ExtensibleBacktraceFilter
- #
- # source://minitest-reporters//lib/minitest/extensible_backtrace_filter.rb#21
- def initialize; end
-
- # Adds a filter.
- #
- # @param regex [Regex] the filter
- #
- # source://minitest-reporters//lib/minitest/extensible_backtrace_filter.rb#28
- def add_filter(regex); end
-
- # Filters a backtrace.
- #
- # This will add new lines to the new backtrace until a filtered line is
- # encountered. If there were lines added to the new backtrace, it returns
- # those lines. However, if the first line in the backtrace was filtered,
- # resulting in an empty backtrace, it returns all lines that would have
- # been unfiltered. If that in turn does not contain any lines, it returns
- # the original backtrace.
- #
- # @note This logic is based off of Minitest's #filter_backtrace.
- # @param backtrace [Array] the backtrace to filter
- # @return [Array] the filtered backtrace
- #
- # source://minitest-reporters//lib/minitest/extensible_backtrace_filter.rb#52
- def filter(backtrace); end
-
- # Determines if the string would be filtered.
- #
- # @param str [String]
- # @return [Boolean]
- #
- # source://minitest-reporters//lib/minitest/extensible_backtrace_filter.rb#36
- def filters?(str); end
-
- class << self
- # Returns the default filter.
- #
- # The default filter will filter out all Minitest and minitest-reporters
- # lines.
- #
- # @return [Minitest::ExtensibleBacktraceFilter]
- #
- # source://minitest-reporters//lib/minitest/extensible_backtrace_filter.rb#10
- def default_filter; end
- end
-end
-
-# source://minitest-reporters//lib/minitest/relative_position.rb#2
-module Minitest::RelativePosition
- private
-
- # source://minitest-reporters//lib/minitest/relative_position.rb#14
- def pad(str, size = T.unsafe(nil)); end
-
- # source://minitest-reporters//lib/minitest/relative_position.rb#18
- def pad_mark(str); end
-
- # source://minitest-reporters//lib/minitest/relative_position.rb#22
- def pad_test(str); end
-
- # source://minitest-reporters//lib/minitest/relative_position.rb#10
- def print_with_info_padding(line); end
-end
-
-# source://minitest-reporters//lib/minitest/relative_position.rb#6
-Minitest::RelativePosition::INFO_PADDING = T.let(T.unsafe(nil), Integer)
-
-# source://minitest-reporters//lib/minitest/relative_position.rb#5
-Minitest::RelativePosition::MARK_SIZE = T.let(T.unsafe(nil), Integer)
-
-# source://minitest-reporters//lib/minitest/relative_position.rb#3
-Minitest::RelativePosition::TEST_PADDING = T.let(T.unsafe(nil), Integer)
-
-# source://minitest-reporters//lib/minitest/relative_position.rb#4
-Minitest::RelativePosition::TEST_SIZE = T.let(T.unsafe(nil), Integer)
-
-# source://minitest-reporters//lib/minitest/reporters.rb#7
-module Minitest::Reporters
- class << self
- # source://minitest-reporters//lib/minitest/reporters.rb#61
- def choose_reporters(console_reporters, env); end
-
- # source://minitest-reporters//lib/minitest/reporters.rb#73
- def clock_time; end
-
- # source://minitest-reporters//lib/minitest/reporters.rb#81
- def minitest_version; end
-
- # Returns the value of attribute reporters.
- #
- # source://minitest-reporters//lib/minitest/reporters.rb#22
- def reporters; end
-
- # Sets the attribute reporters
- #
- # @param value the value to set the attribute reporters to.
- #
- # source://minitest-reporters//lib/minitest/reporters.rb#22
- def reporters=(_arg0); end
-
- # source://minitest-reporters//lib/minitest/reporters.rb#25
- def use!(console_reporters = T.unsafe(nil), env = T.unsafe(nil), backtrace_filter = T.unsafe(nil)); end
-
- # source://minitest-reporters//lib/minitest/reporters.rb#43
- def use_around_test_hooks!; end
-
- # source://minitest-reporters//lib/minitest/reporters.rb#85
- def use_old_activesupport_fix!; end
-
- # source://minitest-reporters//lib/minitest/reporters.rb#39
- def use_runner!(console_reporters, env); end
- end
-end
-
-# source://minitest-reporters//lib/minitest/reporters/ansi.rb#3
-module Minitest::Reporters::ANSI; end
-
-# source://minitest-reporters//lib/minitest/reporters/ansi.rb#4
-module Minitest::Reporters::ANSI::Code
- include ::ANSI::Constants
- include ::ANSI::Code
- extend ::ANSI::Constants
- extend ::ANSI::Code
-
- class << self
- # @return [Boolean]
- #
- # source://minitest-reporters//lib/minitest/reporters/ansi.rb#5
- def color?; end
- end
-end
-
-# source://minitest-reporters//lib/minitest/reporters/base_reporter.rb#25
-class Minitest::Reporters::BaseReporter < ::Minitest::StatisticsReporter
- # @return [BaseReporter] a new instance of BaseReporter
- #
- # source://minitest-reporters//lib/minitest/reporters/base_reporter.rb#28
- def initialize(options = T.unsafe(nil)); end
-
- # source://minitest-reporters//lib/minitest/reporters/base_reporter.rb#33
- def add_defaults(defaults); end
-
- # called by our own after hooks
- #
- # source://minitest-reporters//lib/minitest/reporters/base_reporter.rb#55
- def after_test(_test); end
-
- # called by our own before hooks
- #
- # source://minitest-reporters//lib/minitest/reporters/base_reporter.rb#38
- def before_test(test); end
-
- # source://minitest-reporters//lib/minitest/reporters/base_reporter.rb#49
- def record(test); end
-
- # source://minitest-reporters//lib/minitest/reporters/base_reporter.rb#57
- def report; end
-
- # Returns the value of attribute tests.
- #
- # source://minitest-reporters//lib/minitest/reporters/base_reporter.rb#26
- def tests; end
-
- # Sets the attribute tests
- #
- # @param value the value to set the attribute tests to.
- #
- # source://minitest-reporters//lib/minitest/reporters/base_reporter.rb#26
- def tests=(_arg0); end
-
- protected
-
- # source://minitest-reporters//lib/minitest/reporters/base_reporter.rb#66
- def after_suite(test); end
-
- # source://minitest-reporters//lib/minitest/reporters/base_reporter.rb#68
- def before_suite(test); end
-
- # source://minitest-reporters//lib/minitest/reporters/base_reporter.rb#111
- def filter_backtrace(backtrace); end
-
- # source://minitest-reporters//lib/minitest/reporters/base_reporter.rb#119
- def print(*args); end
-
- # source://minitest-reporters//lib/minitest/reporters/base_reporter.rb#93
- def print_colored_status(test); end
-
- # source://minitest-reporters//lib/minitest/reporters/base_reporter.rb#123
- def print_info(e, name = T.unsafe(nil)); end
-
- # source://minitest-reporters//lib/minitest/reporters/base_reporter.rb#115
- def puts(*args); end
-
- # source://minitest-reporters//lib/minitest/reporters/base_reporter.rb#70
- def result(test); end
-
- # source://minitest-reporters//lib/minitest/reporters/base_reporter.rb#82
- def test_class(result); end
-
- # source://minitest-reporters//lib/minitest/reporters/base_reporter.rb#107
- def total_count; end
-
- # source://minitest-reporters//lib/minitest/reporters/base_reporter.rb#103
- def total_time; end
-end
-
-# source://minitest-reporters//lib/minitest/reporters/default_reporter.rb#10
-class Minitest::Reporters::DefaultReporter < ::Minitest::Reporters::BaseReporter
- include ::ANSI::Constants
- include ::ANSI::Code
- include ::Minitest::Reporters::ANSI::Code
- include ::Minitest::RelativePosition
-
- # @return [DefaultReporter] a new instance of DefaultReporter
- #
- # source://minitest-reporters//lib/minitest/reporters/default_reporter.rb#14
- def initialize(options = T.unsafe(nil)); end
-
- # source://minitest-reporters//lib/minitest/reporters/default_reporter.rb#47
- def after_suite(suite); end
-
- # source://minitest-reporters//lib/minitest/reporters/default_reporter.rb#42
- def before_suite(suite); end
-
- # source://minitest-reporters//lib/minitest/reporters/default_reporter.rb#37
- def before_test(test); end
-
- # source://minitest-reporters//lib/minitest/reporters/default_reporter.rb#59
- def on_record(test); end
-
- # source://minitest-reporters//lib/minitest/reporters/default_reporter.rb#94
- def on_report; end
-
- # source://minitest-reporters//lib/minitest/reporters/default_reporter.rb#31
- def on_start; end
-
- # source://minitest-reporters//lib/minitest/reporters/default_reporter.rb#140
- def print_failure(test); end
-
- # source://minitest-reporters//lib/minitest/reporters/default_reporter.rb#53
- def record(test); end
-
- # source://minitest-reporters//lib/minitest/reporters/default_reporter.rb#85
- def record_failure(record); end
-
- # source://minitest-reporters//lib/minitest/reporters/default_reporter.rb#77
- def record_pass(record); end
-
- # source://minitest-reporters//lib/minitest/reporters/default_reporter.rb#81
- def record_skip(record); end
-
- # source://minitest-reporters//lib/minitest/reporters/default_reporter.rb#89
- def report; end
-
- # source://minitest-reporters//lib/minitest/reporters/default_reporter.rb#26
- def start; end
-
- # source://minitest-reporters//lib/minitest/reporters/default_reporter.rb#89
- def to_s; end
-
- private
-
- # @return [Boolean]
- #
- # source://minitest-reporters//lib/minitest/reporters/default_reporter.rb#167
- def color?; end
-
- # source://minitest-reporters//lib/minitest/reporters/default_reporter.rb#189
- def colored_for(result, string); end
-
- # source://minitest-reporters//lib/minitest/reporters/default_reporter.rb#159
- def get_source_location(result); end
-
- # source://minitest-reporters//lib/minitest/reporters/default_reporter.rb#177
- def green(string); end
-
- # source://minitest-reporters//lib/minitest/reporters/default_reporter.rb#206
- def location(exception); end
-
- # source://minitest-reporters//lib/minitest/reporters/default_reporter.rb#216
- def message_for(test); end
-
- # source://minitest-reporters//lib/minitest/reporters/default_reporter.rb#185
- def red(string); end
-
- # source://minitest-reporters//lib/minitest/reporters/default_reporter.rb#155
- def relative_path(path); end
-
- # source://minitest-reporters//lib/minitest/reporters/default_reporter.rb#230
- def result_line; end
-
- # source://minitest-reporters//lib/minitest/reporters/default_reporter.rb#235
- def suite_duration(suite); end
-
- # source://minitest-reporters//lib/minitest/reporters/default_reporter.rb#197
- def suite_result; end
-
- # source://minitest-reporters//lib/minitest/reporters/default_reporter.rb#181
- def yellow(string); end
-end
-
-# A reporter for generating HTML test reports
-# This is recommended to be used with a CI server, where the report is kept as an artifact and is accessible via
-# a shared link
-#
-# The reporter sorts the results alphabetically and then by results
-# so that failing and skipped tests are at the top.
-#
-# When using Minitest Specs, the number prefix is dropped from the name of the test so that it reads well
-#
-# On each test run all files in the reports directory are deleted, this prevents a build up of old reports
-#
-# The report is generated using ERB. A custom ERB template can be provided but it is not required
-# The default ERB template uses JQuery and Bootstrap, both of these are included by referencing the CDN sites
-#
-# source://minitest-reporters//lib/minitest/reporters/html_reporter.rb#20
-class Minitest::Reporters::HtmlReporter < ::Minitest::Reporters::BaseReporter
- # The constructor takes a hash, and uses the following keys:
- # :title - the title that will be used in the report, defaults to 'Test Results'
- # :reports_dir - the directory the reports should be written to, defaults to 'test/html_reports'
- # :erb_template - the path to a custom ERB template, defaults to the supplied ERB template
- # :mode - Useful for debugging, :terse suppresses errors and is the default, :verbose lets errors bubble up
- # :output_filename - the report's filename, defaults to 'index.html'
- #
- # @return [HtmlReporter] a new instance of HtmlReporter
- #
- # source://minitest-reporters//lib/minitest/reporters/html_reporter.rb#60
- def initialize(args = T.unsafe(nil)); end
-
- # Trims off the number prefix on test names when using Minitest Specs
- #
- # source://minitest-reporters//lib/minitest/reporters/html_reporter.rb#48
- def friendly_name(test); end
-
- # The number of tests that passed
- #
- # source://minitest-reporters//lib/minitest/reporters/html_reporter.rb#25
- def passes; end
-
- # The percentage of tests that failed
- #
- # source://minitest-reporters//lib/minitest/reporters/html_reporter.rb#43
- def percent_errors_failures; end
-
- # The percentage of tests that passed, calculated in a way that avoids rounding errors
- #
- # source://minitest-reporters//lib/minitest/reporters/html_reporter.rb#30
- def percent_passes; end
-
- # The percentage of tests that were skipped
- # Keeping old method name with typo for backwards compatibility in custom templates (for now)
- #
- # source://minitest-reporters//lib/minitest/reporters/html_reporter.rb#35
- def percent_skipps; end
-
- # The percentage of tests that were skipped
- #
- # source://minitest-reporters//lib/minitest/reporters/html_reporter.rb#35
- def percent_skips; end
-
- # Called by the framework to generate the report
- #
- # source://minitest-reporters//lib/minitest/reporters/html_reporter.rb#91
- def report; end
-
- # source://minitest-reporters//lib/minitest/reporters/html_reporter.rb#82
- def start; end
-
- # The title of the report
- #
- # source://minitest-reporters//lib/minitest/reporters/html_reporter.rb#22
- def title; end
-
- private
-
- # Test suites are first ordered by evaluating the results of the tests, then by test suite name
- # Test suites which have failing tests are given highest order
- # Tests suites which have skipped tests are given second highest priority
- #
- # source://minitest-reporters//lib/minitest/reporters/html_reporter.rb#142
- def compare_suites(suite_a, suite_b); end
-
- # source://minitest-reporters//lib/minitest/reporters/html_reporter.rb#131
- def compare_suites_by_name(suite_a, suite_b); end
-
- # Tests are first ordered by evaluating the results of the tests, then by tests names
- # Tess which fail are given highest order
- # Tests which are skipped are given second highest priority
- #
- # source://minitest-reporters//lib/minitest/reporters/html_reporter.rb#157
- def compare_tests(test_a, test_b); end
-
- # source://minitest-reporters//lib/minitest/reporters/html_reporter.rb#135
- def compare_tests_by_name(test_a, test_b); end
-
- # source://minitest-reporters//lib/minitest/reporters/html_reporter.rb#127
- def html_file; end
-
- # taken from the JUnit reporter
- #
- # source://minitest-reporters//lib/minitest/reporters/html_reporter.rb#207
- def location(exception); end
-
- # based on message_for(test) from the JUnit reporter
- #
- # source://minitest-reporters//lib/minitest/reporters/html_reporter.rb#190
- def message_for(test); end
-
- # based on analyze_suite from the JUnit reporter
- #
- # source://minitest-reporters//lib/minitest/reporters/html_reporter.rb#175
- def summarize_suite(suite, tests); end
-
- # @return [Boolean]
- #
- # source://minitest-reporters//lib/minitest/reporters/html_reporter.rb#170
- def test_fail_or_error?(test); end
-
- # source://minitest-reporters//lib/minitest/reporters/html_reporter.rb#216
- def total_time_to_hms; end
-end
-
-# A reporter for writing JUnit test reports
-# Intended for easy integration with CI servers - tested on JetBrains TeamCity
-#
-# Inspired by ci_reporter (see https://github.com/nicksieger/ci_reporter)
-# Also inspired by Marc Seeger's attempt at producing a JUnitReporter (see https://github.com/rb2k/minitest-reporters/commit/e13d95b5f884453a9c77f62bc5cba3fa1df30ef5)
-# Also inspired by minitest-ci (see https://github.com/bhenderson/minitest-ci)
-#
-# source://minitest-reporters//lib/minitest/reporters/junit_reporter.rb#16
-class Minitest::Reporters::JUnitReporter < ::Minitest::Reporters::BaseReporter
- # @return [JUnitReporter] a new instance of JUnitReporter
- #
- # source://minitest-reporters//lib/minitest/reporters/junit_reporter.rb#21
- def initialize(reports_dir = T.unsafe(nil), empty = T.unsafe(nil), options = T.unsafe(nil)); end
-
- # source://minitest-reporters//lib/minitest/reporters/junit_reporter.rb#64
- def get_relative_path(result); end
-
- # source://minitest-reporters//lib/minitest/reporters/junit_reporter.rb#35
- def report; end
-
- # Returns the value of attribute reports_path.
- #
- # source://minitest-reporters//lib/minitest/reporters/junit_reporter.rb#19
- def reports_path; end
-
- private
-
- # source://minitest-reporters//lib/minitest/reporters/junit_reporter.rb#168
- def analyze_suite(tests); end
-
- # source://minitest-reporters//lib/minitest/reporters/junit_reporter.rb#181
- def filename_for(suite); end
-
- # source://minitest-reporters//lib/minitest/reporters/junit_reporter.rb#77
- def get_source_location(result); end
-
- # source://minitest-reporters//lib/minitest/reporters/junit_reporter.rb#158
- def location(exception); end
-
- # source://minitest-reporters//lib/minitest/reporters/junit_reporter.rb#142
- def message_for(test); end
-
- # source://minitest-reporters//lib/minitest/reporters/junit_reporter.rb#85
- def parse_xml_for(xml, suite, tests); end
-
- # source://minitest-reporters//lib/minitest/reporters/junit_reporter.rb#119
- def xml_message_for(test); end
-end
-
-# source://minitest-reporters//lib/minitest/reporters/junit_reporter.rb#17
-Minitest::Reporters::JUnitReporter::DEFAULT_REPORTS_DIR = T.let(T.unsafe(nil), String)
-
-# This reporter creates a report providing the average (mean), minimum and
-# maximum times for a test to run. Running this for all your tests will
-# allow you to:
-#
-# 1) Identify the slowest running tests over time as potential candidates
-# for improvements or refactoring.
-# 2) Identify (and fix) regressions in test run speed caused by changes to
-# your tests or algorithms in your code.
-# 3) Provide an abundance of statistics to enjoy.
-#
-# This is achieved by creating a (configurable) 'previous runs' statistics
-# file which is parsed at the end of each run to provide a new
-# (configurable) report. These statistics can be reset at any time by using
-# a simple rake task:
-#
-# rake reset_statistics
-#
-# source://minitest-reporters//lib/minitest/reporters/mean_time_reporter.rb#24
-class Minitest::Reporters::MeanTimeReporter < ::Minitest::Reporters::DefaultReporter
- # @option previous_runs_filename
- # @option show_count
- # @option show_progress
- # @option show_all_runs
- # @option sort_column
- # @option order
- # @option report_filename
- # @param order [Hash] a customizable set of options
- # @param previous_runs_filename [Hash] a customizable set of options
- # @param options [Hash]
- # @param report_filename [Hash] a customizable set of options
- # @param show_count [Hash] a customizable set of options
- # @param show_progress [Hash] a customizable set of options
- # @param show_all_runs [Hash] a customizable set of options
- # @param sort_column [Hash] a customizable set of options
- # @return [Minitest::Reporters::MeanTimeReporter]
- #
- # source://minitest-reporters//lib/minitest/reporters/mean_time_reporter.rb#54
- def initialize(options = T.unsafe(nil)); end
-
- # Copies the suite times from the
- # {Minitest::Reporters::DefaultReporter#after_suite} method, making them
- # available to this class.
- #
- # @return [Hash Float>]
- #
- # source://minitest-reporters//lib/minitest/reporters/mean_time_reporter.rb#65
- def after_suite(suite); end
-
- # source://minitest-reporters//lib/minitest/reporters/mean_time_reporter.rb#90
- def on_record(test); end
-
- # source://minitest-reporters//lib/minitest/reporters/mean_time_reporter.rb#94
- def on_report; end
-
- # source://minitest-reporters//lib/minitest/reporters/mean_time_reporter.rb#86
- def on_start; end
-
- # Runs the {Minitest::Reporters::DefaultReporter#report} method and then
- # enhances it by storing the results to the 'previous_runs_filename' and
- # outputs the parsed results to both the 'report_filename' and the
- # terminal.
- #
- # source://minitest-reporters//lib/minitest/reporters/mean_time_reporter.rb#76
- def report; end
-
- # Resets the 'previous runs' file, essentially removing all previous
- # statistics gathered.
- #
- # @return [void]
- #
- # source://minitest-reporters//lib/minitest/reporters/mean_time_reporter.rb#102
- def reset_statistics!; end
-
- protected
-
- # Returns the value of attribute all_suite_times.
- #
- # source://minitest-reporters//lib/minitest/reporters/mean_time_reporter.rb#108
- def all_suite_times; end
-
- # Sets the attribute all_suite_times
- #
- # @param value the value to set the attribute all_suite_times to.
- #
- # source://minitest-reporters//lib/minitest/reporters/mean_time_reporter.rb#108
- def all_suite_times=(_arg0); end
-
- private
-
- # @return [Boolean] Whether the given :order option is :asc.
- #
- # source://minitest-reporters//lib/minitest/reporters/mean_time_reporter.rb#346
- def asc?; end
-
- # @return [String] A yellow 'Avg:' label.
- #
- # source://minitest-reporters//lib/minitest/reporters/mean_time_reporter.rb#301
- def avg_label; end
-
- # @return [Array String>>] All of the results sorted by
- # the :sort_column option. (Defaults to :avg).
- #
- # source://minitest-reporters//lib/minitest/reporters/mean_time_reporter.rb#172
- def column_sorted_body; end
-
- # Creates a new report file in the 'report_filename'. This file contains
- # a line for each test of the following example format: (this is a single
- # line despite explicit wrapping)
- #
- # Avg: 0.0555555 Min: 0.0498765 Max: 0.0612345 Last: 0.0499421
- # Description: The test name
- #
- # Note however the timings are to 9 decimal places, and padded to 12
- # characters and each label is coloured, Avg (yellow), Min (green),
- # Max (red), Last (multi), and Description (blue). It looks pretty!
- #
- # The 'Last' label is special in that it will be colour coded depending
- # on whether the last run was faster (bright green) or slower (bright red)
- # or inconclusive (purple). This helps to identify changes on a per run
- # basis.
- #
- # @return [void]
- #
- # source://minitest-reporters//lib/minitest/reporters/mean_time_reporter.rb#286
- def create_new_report!; end
-
- # Creates a new 'previous runs' file, or updates the existing one with
- # the latest timings.
- #
- # @return [void]
- #
- # source://minitest-reporters//lib/minitest/reporters/mean_time_reporter.rb#248
- def create_or_update_previous_runs!; end
-
- # @return [Hash Float>]
- #
- # source://minitest-reporters//lib/minitest/reporters/mean_time_reporter.rb#113
- def current_run; end
-
- # @return [Hash] Sets default values for the filenames used by this class,
- # and the number of tests to output to output to the screen after each
- # run.
- #
- # source://minitest-reporters//lib/minitest/reporters/mean_time_reporter.rb#120
- def defaults; end
-
- # @return [String] A blue 'Description:' label.
- #
- # source://minitest-reporters//lib/minitest/reporters/mean_time_reporter.rb#306
- def des_label; end
-
- # @return [Boolean] Whether the given :order option is :desc (default).
- #
- # source://minitest-reporters//lib/minitest/reporters/mean_time_reporter.rb#351
- def desc?; end
-
- # @return [String] A red 'Max:' label.
- #
- # source://minitest-reporters//lib/minitest/reporters/mean_time_reporter.rb#311
- def max_label; end
-
- # @return [String] A green 'Min:' label.
- #
- # source://minitest-reporters//lib/minitest/reporters/mean_time_reporter.rb#316
- def min_label; end
-
- # @return [Hash]
- #
- # source://minitest-reporters//lib/minitest/reporters/mean_time_reporter.rb#189
- def options; end
-
- # @raise [Minitest::Reporters::MeanTimeReporter::InvalidOrder] When the given :order option is invalid.
- # @return [Symbol] The :order option, or by default; :desc.
- #
- # source://minitest-reporters//lib/minitest/reporters/mean_time_reporter.rb#358
- def order; end
-
- # @return [String] All of the column-sorted results sorted by the :order
- # option. (Defaults to :desc).
- #
- # source://minitest-reporters//lib/minitest/reporters/mean_time_reporter.rb#160
- def order_sorted_body; end
-
- # @return [Hash Array]] Hash Array]
- #
- # source://minitest-reporters//lib/minitest/reporters/mean_time_reporter.rb#200
- def previous_run; end
-
- # @return [String] The path to the file which contains all the durations
- # for each test run. The previous runs file is in YAML format, using the
- # test name for the key and an array containing the time taken to run
- # this test for values.
- #
- # source://minitest-reporters//lib/minitest/reporters/mean_time_reporter.rb#208
- def previous_runs_filename; end
-
- # Returns a boolean indicating whether a previous runs file exists.
- #
- # @return [Boolean]
- #
- # source://minitest-reporters//lib/minitest/reporters/mean_time_reporter.rb#215
- def previously_ran?; end
-
- # @param run [Float] The last run time.
- # @param min [Float] The minimum run time.
- # @param max [Float] The maximum run time.
- # @return [Symbol] One of :faster, :slower or :inconclusive.
- #
- # source://minitest-reporters//lib/minitest/reporters/mean_time_reporter.rb#335
- def rate(run, min, max); end
-
- # The report itself. Displays statistics about all runs, ideal for use
- # with the Unix 'head' command. Listed in slowest average descending
- # order.
- #
- # @return [String]
- #
- # source://minitest-reporters//lib/minitest/reporters/mean_time_reporter.rb#146
- def report_body; end
-
- # @return [String] The path to the file which contains the parsed test
- # results. The results file contains a line for each test with the
- # average time of the test, the minimum time the test took to run,
- # the maximum time the test took to run and a description of the test
- # (which is the test name as emitted by Minitest).
- #
- # source://minitest-reporters//lib/minitest/reporters/mean_time_reporter.rb#224
- def report_filename; end
-
- # Added to the top of the report file and to the screen output.
- #
- # @return [String]
- #
- # source://minitest-reporters//lib/minitest/reporters/mean_time_reporter.rb#135
- def report_title; end
-
- # @param rating [Symbol] One of :faster, :slower or :inconclusive.
- # @return [String] A purple 'Last:' label.
- #
- # source://minitest-reporters//lib/minitest/reporters/mean_time_reporter.rb#322
- def run_label(rating); end
-
- # A barbaric way to find out how many runs are in the previous runs file;
- # this method takes the first test listed, and counts its samples
- # trusting (naively) all runs to be the same number of samples. This will
- # produce incorrect averages when new tests are added, so it is advised
- # to restart the statistics by removing the 'previous runs' file. A rake
- # task is provided to make this more convenient.
- #
- # rake reset_statistics
- #
- # @return [Fixnum]
- #
- # source://minitest-reporters//lib/minitest/reporters/mean_time_reporter.rb#238
- def samples; end
-
- # @return [Fixnum] The number of tests to output to output to the screen
- # after each run.
- #
- # source://minitest-reporters//lib/minitest/reporters/mean_time_reporter.rb#195
- def show_count; end
-
- # @raise [Minitest::Reporters::MeanTimeReporter::InvalidSortColumn] When the given :sort_column option is invalid.
- # @return [Symbol] The :sort_column option, or by default; :avg.
- #
- # source://minitest-reporters//lib/minitest/reporters/mean_time_reporter.rb#374
- def sort_column; end
-
- # Writes a number of tests (configured via the 'show_count' option) to the
- # screen after creating the report. See '#create_new_report!' for example
- # output information.
- #
- # @return [void]
- #
- # source://minitest-reporters//lib/minitest/reporters/mean_time_reporter.rb#295
- def write_to_screen!; end
-
- class << self
- # Reset the statistics file for this reporter. Called via a rake task:
- #
- # rake reset_statistics
- #
- # @return [Boolean]
- #
- # source://minitest-reporters//lib/minitest/reporters/mean_time_reporter.rb#33
- def reset_statistics!; end
- end
-end
-
-# source://minitest-reporters//lib/minitest/reporters/mean_time_reporter.rb#25
-class Minitest::Reporters::MeanTimeReporter::InvalidOrder < ::StandardError; end
-
-# source://minitest-reporters//lib/minitest/reporters/mean_time_reporter.rb#26
-class Minitest::Reporters::MeanTimeReporter::InvalidSortColumn < ::StandardError; end
-
-# source://minitest-reporters//lib/minitest/reporters/progress_reporter.rb#12
-class Minitest::Reporters::ProgressReporter < ::Minitest::Reporters::BaseReporter
- include ::Minitest::RelativePosition
- include ::ANSI::Constants
- include ::ANSI::Code
- include ::Minitest::Reporters::ANSI::Code
-
- # @return [ProgressReporter] a new instance of ProgressReporter
- #
- # source://minitest-reporters//lib/minitest/reporters/progress_reporter.rb#18
- def initialize(options = T.unsafe(nil)); end
-
- # source://minitest-reporters//lib/minitest/reporters/progress_reporter.rb#41
- def before_test(test); end
-
- # source://minitest-reporters//lib/minitest/reporters/progress_reporter.rb#49
- def record(test); end
-
- # source://minitest-reporters//lib/minitest/reporters/progress_reporter.rb#70
- def report; end
-
- # source://minitest-reporters//lib/minitest/reporters/progress_reporter.rb#32
- def start; end
-
- private
-
- # source://minitest-reporters//lib/minitest/reporters/progress_reporter.rb#93
- def color; end
-
- # source://minitest-reporters//lib/minitest/reporters/progress_reporter.rb#97
- def color=(color); end
-
- # source://minitest-reporters//lib/minitest/reporters/progress_reporter.rb#89
- def print_test_with_time(test); end
-
- # source://minitest-reporters//lib/minitest/reporters/progress_reporter.rb#85
- def show; end
-end
-
-# source://minitest-reporters//lib/minitest/reporters/progress_reporter.rb#16
-Minitest::Reporters::ProgressReporter::PROGRESS_MARK = T.let(T.unsafe(nil), String)
-
-# Simple reporter designed for RubyMate.
-#
-# source://minitest-reporters//lib/minitest/reporters/ruby_mate_reporter.rb#4
-class Minitest::Reporters::RubyMateReporter < ::Minitest::Reporters::BaseReporter
- include ::Minitest::RelativePosition
-
- # source://minitest-reporters//lib/minitest/reporters/ruby_mate_reporter.rb#15
- def record(test); end
-
- # source://minitest-reporters//lib/minitest/reporters/ruby_mate_reporter.rb#37
- def report; end
-
- # source://minitest-reporters//lib/minitest/reporters/ruby_mate_reporter.rb#9
- def start; end
-
- private
-
- # source://minitest-reporters//lib/minitest/reporters/ruby_mate_reporter.rb#49
- def print_test_with_time(test); end
-end
-
-# source://minitest-reporters//lib/minitest/reporters/ruby_mate_reporter.rb#7
-Minitest::Reporters::RubyMateReporter::INFO_PADDING = T.let(T.unsafe(nil), Integer)
-
-# source://minitest-reporters//lib/minitest/reporters/rubymine_reporter.rb#15
-class Minitest::Reporters::RubyMineReporter < ::Minitest::Reporters::DefaultReporter
- # source://minitest-reporters//lib/minitest/reporters/rubymine_reporter.rb#16
- def initialize(options = T.unsafe(nil)); end
-end
-
-# source://minitest-reporters//lib/minitest/reporters/spec_reporter.rb#9
-class Minitest::Reporters::SpecReporter < ::Minitest::Reporters::BaseReporter
- include ::ANSI::Constants
- include ::ANSI::Code
- include ::Minitest::Reporters::ANSI::Code
- include ::Minitest::RelativePosition
-
- # The constructor takes an `options` hash
- #
- # @option options
- # @param options [Hash]
- # @return [SpecReporter] a new instance of SpecReporter
- #
- # source://minitest-reporters//lib/minitest/reporters/spec_reporter.rb#18
- def initialize(options = T.unsafe(nil)); end
-
- # source://minitest-reporters//lib/minitest/reporters/spec_reporter.rb#50
- def record(test); end
-
- # source://minitest-reporters//lib/minitest/reporters/spec_reporter.rb#29
- def report; end
-
- # source://minitest-reporters//lib/minitest/reporters/spec_reporter.rb#23
- def start; end
-
- protected
-
- # source://minitest-reporters//lib/minitest/reporters/spec_reporter.rb#62
- def after_suite(_suite); end
-
- # source://minitest-reporters//lib/minitest/reporters/spec_reporter.rb#58
- def before_suite(suite); end
-
- # source://minitest-reporters//lib/minitest/reporters/spec_reporter.rb#66
- def print_failure(name, tests); end
-
- # source://minitest-reporters//lib/minitest/reporters/spec_reporter.rb#76
- def record_print_failures_if_any(test); end
-
- # source://minitest-reporters//lib/minitest/reporters/spec_reporter.rb#83
- def record_print_status(test); end
-end
-
-# source://minitest-reporters//lib/minitest/reporters/base_reporter.rb#3
-class Minitest::Reporters::Suite
- # @return [Suite] a new instance of Suite
- #
- # source://minitest-reporters//lib/minitest/reporters/base_reporter.rb#5
- def initialize(name); end
-
- # source://minitest-reporters//lib/minitest/reporters/base_reporter.rb#9
- def ==(other); end
-
- # @return [Boolean]
- #
- # source://minitest-reporters//lib/minitest/reporters/base_reporter.rb#13
- def eql?(other); end
-
- # source://minitest-reporters//lib/minitest/reporters/base_reporter.rb#17
- def hash; end
-
- # Returns the value of attribute name.
- #
- # source://minitest-reporters//lib/minitest/reporters/base_reporter.rb#4
- def name; end
-
- # source://minitest-reporters//lib/minitest/reporters/base_reporter.rb#21
- def to_s; end
-end
-
-# source://minitest-reporters//lib/minitest/reporters/version.rb#3
-Minitest::Reporters::VERSION = T.let(T.unsafe(nil), String)
diff --git a/sorbet/rbi/gems/minitest@5.18.1.rbi b/sorbet/rbi/gems/minitest@5.18.1.rbi
deleted file mode 100644
index f68a238d..00000000
--- a/sorbet/rbi/gems/minitest@5.18.1.rbi
+++ /dev/null
@@ -1,1491 +0,0 @@
-# typed: true
-
-# DO NOT EDIT MANUALLY
-# This is an autogenerated file for types exported from the `minitest` gem.
-# Please instead update this file by running `bin/tapioca gem minitest`.
-
-# :include: README.rdoc
-#
-# source://minitest//lib/minitest/parallel.rb#1
-module Minitest
- class << self
- # Internal run method. Responsible for telling all Runnable
- # sub-classes to run.
- #
- # source://minitest//lib/minitest.rb#173
- def __run(reporter, options); end
-
- # A simple hook allowing you to run a block of code after everything
- # is done running. Eg:
- #
- # Minitest.after_run { p $debugging_info }
- #
- # source://minitest//lib/minitest.rb#94
- def after_run(&block); end
-
- # Registers Minitest to run at process exit
- #
- # source://minitest//lib/minitest.rb#66
- def autorun; end
-
- # source://minitest//lib/minitest.rb#19
- def backtrace_filter; end
-
- # source://minitest//lib/minitest.rb#19
- def backtrace_filter=(_arg0); end
-
- # source://minitest//lib/minitest.rb#18
- def cattr_accessor(name); end
-
- # source://minitest//lib/minitest.rb#1073
- def clock_time; end
-
- # source://minitest//lib/minitest.rb#19
- def extensions; end
-
- # source://minitest//lib/minitest.rb#19
- def extensions=(_arg0); end
-
- # source://minitest//lib/minitest.rb#264
- def filter_backtrace(bt); end
-
- # source://minitest//lib/minitest.rb#19
- def info_signal; end
-
- # source://minitest//lib/minitest.rb#19
- def info_signal=(_arg0); end
-
- # source://minitest//lib/minitest.rb#98
- def init_plugins(options); end
-
- # source://minitest//lib/minitest.rb#105
- def load_plugins; end
-
- # source://minitest//lib/minitest.rb#19
- def parallel_executor; end
-
- # source://minitest//lib/minitest.rb#19
- def parallel_executor=(_arg0); end
-
- # source://minitest//lib/minitest.rb#186
- def process_args(args = T.unsafe(nil)); end
-
- # source://minitest//lib/minitest.rb#19
- def reporter; end
-
- # source://minitest//lib/minitest.rb#19
- def reporter=(_arg0); end
-
- # This is the top-level run method. Everything starts from here. It
- # tells each Runnable sub-class to run, and each of those are
- # responsible for doing whatever they do.
- #
- # The overall structure of a run looks like this:
- #
- # Minitest.autorun
- # Minitest.run(args)
- # Minitest.__run(reporter, options)
- # Runnable.runnables.each
- # runnable.run(reporter, options)
- # self.runnable_methods.each
- # self.run_one_method(self, runnable_method, reporter)
- # Minitest.run_one_method(klass, runnable_method)
- # klass.new(runnable_method).run
- #
- # source://minitest//lib/minitest.rb#140
- def run(args = T.unsafe(nil)); end
-
- # source://minitest//lib/minitest.rb#1064
- def run_one_method(klass, method_name); end
-
- # source://minitest//lib/minitest.rb#19
- def seed; end
-
- # source://minitest//lib/minitest.rb#19
- def seed=(_arg0); end
- end
-end
-
-# Defines the API for Reporters. Subclass this and override whatever
-# you want. Go nuts.
-#
-# source://minitest//lib/minitest.rb#592
-class Minitest::AbstractReporter
- include ::Mutex_m
-
- # source://mutex_m/0.1.2/mutex_m.rb#93
- def lock; end
-
- # source://mutex_m/0.1.2/mutex_m.rb#83
- def locked?; end
-
- # Did this run pass?
- #
- # @return [Boolean]
- #
- # source://minitest//lib/minitest.rb#626
- def passed?; end
-
- # About to start running a test. This allows a reporter to show
- # that it is starting or that we are in the middle of a test run.
- #
- # source://minitest//lib/minitest.rb#605
- def prerecord(klass, name); end
-
- # Output and record the result of the test. Call
- # {result#result_code}[rdoc-ref:Runnable#result_code] to get the
- # result character string. Stores the result of the run if the run
- # did not pass.
- #
- # source://minitest//lib/minitest.rb#614
- def record(result); end
-
- # Outputs the summary of the run.
- #
- # source://minitest//lib/minitest.rb#620
- def report; end
-
- # Starts reporting on the run.
- #
- # source://minitest//lib/minitest.rb#598
- def start; end
-
- # source://mutex_m/0.1.2/mutex_m.rb#78
- def synchronize(&block); end
-
- # source://mutex_m/0.1.2/mutex_m.rb#88
- def try_lock; end
-
- # source://mutex_m/0.1.2/mutex_m.rb#98
- def unlock; end
-end
-
-# Represents run failures.
-#
-# source://minitest//lib/minitest.rb#909
-class Minitest::Assertion < ::Exception
- # source://minitest//lib/minitest.rb#910
- def error; end
-
- # Where was this run before an assertion was raised?
- #
- # source://minitest//lib/minitest.rb#917
- def location; end
-
- # source://minitest//lib/minitest.rb#926
- def result_code; end
-
- # source://minitest//lib/minitest.rb#930
- def result_label; end
-end
-
-# Minitest Assertions. All assertion methods accept a +msg+ which is
-# printed if the assertion fails.
-#
-# Protocol: Nearly everything here boils up to +assert+, which
-# expects to be able to increment an instance accessor named
-# +assertions+. This is not provided by Assertions and must be
-# provided by the thing including Assertions. See Minitest::Runnable
-# for an example.
-#
-# source://minitest//lib/minitest/assertions.rb#18
-module Minitest::Assertions
- # source://minitest//lib/minitest/assertions.rb#188
- def _synchronize; end
-
- # Fails unless +test+ is truthy.
- #
- # source://minitest//lib/minitest/assertions.rb#178
- def assert(test, msg = T.unsafe(nil)); end
-
- # Fails unless +obj+ is empty.
- #
- # source://minitest//lib/minitest/assertions.rb#195
- def assert_empty(obj, msg = T.unsafe(nil)); end
-
- # Fails unless exp == act printing the difference between
- # the two, if possible.
- #
- # If there is no visible difference but the assertion fails, you
- # should suspect that your #== is buggy, or your inspect output is
- # missing crucial details. For nicer structural diffing, set
- # Minitest::Test.make_my_diffs_pretty!
- #
- # For floats use assert_in_delta.
- #
- # See also: Minitest::Assertions.diff
- #
- # source://minitest//lib/minitest/assertions.rb#216
- def assert_equal(exp, act, msg = T.unsafe(nil)); end
-
- # For comparing Floats. Fails unless +exp+ and +act+ are within +delta+
- # of each other.
- #
- # assert_in_delta Math::PI, (22.0 / 7.0), 0.01
- #
- # source://minitest//lib/minitest/assertions.rb#240
- def assert_in_delta(exp, act, delta = T.unsafe(nil), msg = T.unsafe(nil)); end
-
- # For comparing Floats. Fails unless +exp+ and +act+ have a relative
- # error less than +epsilon+.
- #
- # source://minitest//lib/minitest/assertions.rb#252
- def assert_in_epsilon(exp, act, epsilon = T.unsafe(nil), msg = T.unsafe(nil)); end
-
- # Fails unless +collection+ includes +obj+.
- #
- # source://minitest//lib/minitest/assertions.rb#259
- def assert_includes(collection, obj, msg = T.unsafe(nil)); end
-
- # Fails unless +obj+ is an instance of +cls+.
- #
- # source://minitest//lib/minitest/assertions.rb#270
- def assert_instance_of(cls, obj, msg = T.unsafe(nil)); end
-
- # Fails unless +obj+ is a kind of +cls+.
- #
- # source://minitest//lib/minitest/assertions.rb#281
- def assert_kind_of(cls, obj, msg = T.unsafe(nil)); end
-
- # Fails unless +matcher+ =~ +obj+.
- #
- # source://minitest//lib/minitest/assertions.rb#291
- def assert_match(matcher, obj, msg = T.unsafe(nil)); end
-
- # Fails unless +obj+ is nil
- #
- # source://minitest//lib/minitest/assertions.rb#303
- def assert_nil(obj, msg = T.unsafe(nil)); end
-
- # For testing with binary operators. Eg:
- #
- # assert_operator 5, :<=, 4
- #
- # source://minitest//lib/minitest/assertions.rb#313
- def assert_operator(o1, op, o2 = T.unsafe(nil), msg = T.unsafe(nil)); end
-
- # Fails if stdout or stderr do not output the expected results.
- # Pass in nil if you don't care about that streams output. Pass in
- # "" if you require it to be silent. Pass in a regexp if you want
- # to pattern match.
- #
- # assert_output(/hey/) { method_with_output }
- #
- # NOTE: this uses #capture_io, not #capture_subprocess_io.
- #
- # See also: #assert_silent
- #
- # source://minitest//lib/minitest/assertions.rb#331
- def assert_output(stdout = T.unsafe(nil), stderr = T.unsafe(nil)); end
-
- # Fails unless +path+ exists.
- #
- # source://minitest//lib/minitest/assertions.rb#355
- def assert_path_exists(path, msg = T.unsafe(nil)); end
-
- # For testing with pattern matching (only supported with Ruby 3.0 and later)
- #
- # # pass
- # assert_pattern { [1,2,3] => [Integer, Integer, Integer] }
- #
- # # fail "length mismatch (given 3, expected 1)"
- # assert_pattern { [1,2,3] => [Integer] }
- #
- # The bare => pattern will raise a NoMatchingPatternError on failure, which would
- # normally be counted as a test error. This assertion rescues NoMatchingPatternError and
- # generates a test failure. Any other exception will be raised as normal and generate a test
- # error.
- #
- # @raise [NotImplementedError]
- #
- # source://minitest//lib/minitest/assertions.rb#374
- def assert_pattern; end
-
- # For testing with predicates. Eg:
- #
- # assert_predicate str, :empty?
- #
- # This is really meant for specs and is front-ended by assert_operator:
- #
- # str.must_be :empty?
- #
- # source://minitest//lib/minitest/assertions.rb#395
- def assert_predicate(o1, op, msg = T.unsafe(nil)); end
-
- # Fails unless the block raises one of +exp+. Returns the
- # exception matched so you can check the message, attributes, etc.
- #
- # +exp+ takes an optional message on the end to help explain
- # failures and defaults to StandardError if no exception class is
- # passed. Eg:
- #
- # assert_raises(CustomError) { method_with_custom_error }
- #
- # With custom error message:
- #
- # assert_raises(CustomError, 'This should have raised CustomError') { method_with_custom_error }
- #
- # Using the returned object:
- #
- # error = assert_raises(CustomError) do
- # raise CustomError, 'This is really bad'
- # end
- #
- # assert_equal 'This is really bad', error.message
- #
- # source://minitest//lib/minitest/assertions.rb#422
- def assert_raises(*exp); end
-
- # Fails unless +obj+ responds to +meth+.
- #
- # source://minitest//lib/minitest/assertions.rb#453
- def assert_respond_to(obj, meth, msg = T.unsafe(nil)); end
-
- # Fails unless +exp+ and +act+ are #equal?
- #
- # source://minitest//lib/minitest/assertions.rb#463
- def assert_same(exp, act, msg = T.unsafe(nil)); end
-
- # +send_ary+ is a receiver, message and arguments.
- #
- # Fails unless the call returns a true value
- #
- # source://minitest//lib/minitest/assertions.rb#476
- def assert_send(send_ary, m = T.unsafe(nil)); end
-
- # Fails if the block outputs anything to stderr or stdout.
- #
- # See also: #assert_output
- #
- # source://minitest//lib/minitest/assertions.rb#492
- def assert_silent; end
-
- # Fails unless the block throws +sym+
- #
- # source://minitest//lib/minitest/assertions.rb#501
- def assert_throws(sym, msg = T.unsafe(nil)); end
-
- # Captures $stdout and $stderr into strings:
- #
- # out, err = capture_io do
- # puts "Some info"
- # warn "You did a bad thing"
- # end
- #
- # assert_match %r%info%, out
- # assert_match %r%bad%, err
- #
- # NOTE: For efficiency, this method uses StringIO and does not
- # capture IO for subprocesses. Use #capture_subprocess_io for
- # that.
- #
- # source://minitest//lib/minitest/assertions.rb#542
- def capture_io; end
-
- # Captures $stdout and $stderr into strings, using Tempfile to
- # ensure that subprocess IO is captured as well.
- #
- # out, err = capture_subprocess_io do
- # system "echo Some info"
- # system "echo You did a bad thing 1>&2"
- # end
- #
- # assert_match %r%info%, out
- # assert_match %r%bad%, err
- #
- # NOTE: This method is approximately 10x slower than #capture_io so
- # only use it when you need to test the output of a subprocess.
- #
- # source://minitest//lib/minitest/assertions.rb#575
- def capture_subprocess_io; end
-
- # Returns a diff between +exp+ and +act+. If there is no known
- # diff command or if it doesn't make sense to diff the output
- # (single line, short output), then it simply returns a basic
- # comparison between the two.
- #
- # See +things_to_diff+ for more info.
- #
- # source://minitest//lib/minitest/assertions.rb#59
- def diff(exp, act); end
-
- # Returns details for exception +e+
- #
- # source://minitest//lib/minitest/assertions.rb#607
- def exception_details(e, msg); end
-
- # Fails after a given date (in the local time zone). This allows
- # you to put time-bombs in your tests if you need to keep
- # something around until a later date lest you forget about it.
- #
- # source://minitest//lib/minitest/assertions.rb#623
- def fail_after(y, m, d, msg); end
-
- # Fails with +msg+.
- #
- # source://minitest//lib/minitest/assertions.rb#630
- def flunk(msg = T.unsafe(nil)); end
-
- # Returns a proc that will output +msg+ along with the default message.
- #
- # source://minitest//lib/minitest/assertions.rb#638
- def message(msg = T.unsafe(nil), ending = T.unsafe(nil), &default); end
-
- # This returns a human-readable version of +obj+. By default
- # #inspect is called. You can override this to use #pretty_inspect
- # if you want.
- #
- # See Minitest::Test.make_my_diffs_pretty!
- #
- # source://minitest//lib/minitest/assertions.rb#129
- def mu_pp(obj); end
-
- # This returns a diff-able more human-readable version of +obj+.
- # This differs from the regular mu_pp because it expands escaped
- # newlines and makes hex-values (like object_ids) generic. This
- # uses mu_pp to do the first pass and then cleans it up.
- #
- # source://minitest//lib/minitest/assertions.rb#152
- def mu_pp_for_diff(obj); end
-
- # used for counting assertions
- #
- # source://minitest//lib/minitest/assertions.rb#649
- def pass(_msg = T.unsafe(nil)); end
-
- # Fails if +test+ is truthy.
- #
- # source://minitest//lib/minitest/assertions.rb#656
- def refute(test, msg = T.unsafe(nil)); end
-
- # Fails if +obj+ is empty.
- #
- # source://minitest//lib/minitest/assertions.rb#664
- def refute_empty(obj, msg = T.unsafe(nil)); end
-
- # Fails if exp == act.
- #
- # For floats use refute_in_delta.
- #
- # source://minitest//lib/minitest/assertions.rb#675
- def refute_equal(exp, act, msg = T.unsafe(nil)); end
-
- # For comparing Floats. Fails if +exp+ is within +delta+ of +act+.
- #
- # refute_in_delta Math::PI, (22.0 / 7.0)
- #
- # source://minitest//lib/minitest/assertions.rb#687
- def refute_in_delta(exp, act, delta = T.unsafe(nil), msg = T.unsafe(nil)); end
-
- # For comparing Floats. Fails if +exp+ and +act+ have a relative error
- # less than +epsilon+.
- #
- # source://minitest//lib/minitest/assertions.rb#699
- def refute_in_epsilon(a, b, epsilon = T.unsafe(nil), msg = T.unsafe(nil)); end
-
- # Fails if +collection+ includes +obj+.
- #
- # source://minitest//lib/minitest/assertions.rb#706
- def refute_includes(collection, obj, msg = T.unsafe(nil)); end
-
- # Fails if +obj+ is an instance of +cls+.
- #
- # source://minitest//lib/minitest/assertions.rb#717
- def refute_instance_of(cls, obj, msg = T.unsafe(nil)); end
-
- # Fails if +obj+ is a kind of +cls+.
- #
- # source://minitest//lib/minitest/assertions.rb#727
- def refute_kind_of(cls, obj, msg = T.unsafe(nil)); end
-
- # Fails if +matcher+ =~ +obj+.
- #
- # source://minitest//lib/minitest/assertions.rb#735
- def refute_match(matcher, obj, msg = T.unsafe(nil)); end
-
- # Fails if +obj+ is nil.
- #
- # source://minitest//lib/minitest/assertions.rb#745
- def refute_nil(obj, msg = T.unsafe(nil)); end
-
- # Fails if +o1+ is not +op+ +o2+. Eg:
- #
- # refute_operator 1, :>, 2 #=> pass
- # refute_operator 1, :<, 2 #=> fail
- #
- # source://minitest//lib/minitest/assertions.rb#780
- def refute_operator(o1, op, o2 = T.unsafe(nil), msg = T.unsafe(nil)); end
-
- # Fails if +path+ exists.
- #
- # source://minitest//lib/minitest/assertions.rb#789
- def refute_path_exists(path, msg = T.unsafe(nil)); end
-
- # For testing with pattern matching (only supported with Ruby 3.0 and later)
- #
- # # pass
- # refute_pattern { [1,2,3] => [String] }
- #
- # # fail "NoMatchingPatternError expected, but nothing was raised."
- # refute_pattern { [1,2,3] => [Integer, Integer, Integer] }
- #
- # This assertion expects a NoMatchingPatternError exception, and will fail if none is raised. Any
- # other exceptions will be raised as normal and generate a test error.
- #
- # @raise [NotImplementedError]
- #
- # source://minitest//lib/minitest/assertions.rb#762
- def refute_pattern; end
-
- # For testing with predicates.
- #
- # refute_predicate str, :empty?
- #
- # This is really meant for specs and is front-ended by refute_operator:
- #
- # str.wont_be :empty?
- #
- # source://minitest//lib/minitest/assertions.rb#803
- def refute_predicate(o1, op, msg = T.unsafe(nil)); end
-
- # Fails if +obj+ responds to the message +meth+.
- #
- # source://minitest//lib/minitest/assertions.rb#811
- def refute_respond_to(obj, meth, msg = T.unsafe(nil)); end
-
- # Fails if +exp+ is the same (by object identity) as +act+.
- #
- # source://minitest//lib/minitest/assertions.rb#820
- def refute_same(exp, act, msg = T.unsafe(nil)); end
-
- # Skips the current run. If run in verbose-mode, the skipped run
- # gets listed at the end of the run but doesn't cause a failure
- # exit code.
- #
- # @raise [Minitest::Skip]
- #
- # source://minitest//lib/minitest/assertions.rb#833
- def skip(msg = T.unsafe(nil), bt = T.unsafe(nil)); end
-
- # Skips the current run until a given date (in the local time
- # zone). This allows you to put some fixes on hold until a later
- # date, but still holds you accountable and prevents you from
- # forgetting it.
- #
- # source://minitest//lib/minitest/assertions.rb#845
- def skip_until(y, m, d, msg); end
-
- # Was this testcase skipped? Meant for #teardown.
- #
- # @return [Boolean]
- #
- # source://minitest//lib/minitest/assertions.rb#854
- def skipped?; end
-
- # Returns things to diff [expect, butwas], or [nil, nil] if nothing to diff.
- #
- # Criterion:
- #
- # 1. Strings include newlines or escaped newlines, but not both.
- # 2. or: String lengths are > 30 characters.
- # 3. or: Strings are equal to each other (but maybe different encodings?).
- # 4. and: we found a diff executable.
- #
- # source://minitest//lib/minitest/assertions.rb#104
- def things_to_diff(exp, act); end
-
- class << self
- # Returns the diff command to use in #diff. Tries to intelligently
- # figure out what diff to use.
- #
- # source://minitest//lib/minitest/assertions.rb#29
- def diff; end
-
- # Set the diff command to use in #diff.
- #
- # source://minitest//lib/minitest/assertions.rb#47
- def diff=(o); end
- end
-end
-
-# source://minitest//lib/minitest/assertions.rb#201
-Minitest::Assertions::E = T.let(T.unsafe(nil), String)
-
-# source://minitest//lib/minitest/assertions.rb#19
-Minitest::Assertions::UNDEFINED = T.let(T.unsafe(nil), Object)
-
-# The standard backtrace filter for minitest.
-#
-# See Minitest.backtrace_filter=.
-#
-# source://minitest//lib/minitest.rb#1041
-class Minitest::BacktraceFilter
- # Filter +bt+ to something useful. Returns the whole thing if
- # $DEBUG (ruby) or $MT_DEBUG (env).
- #
- # source://minitest//lib/minitest.rb#1049
- def filter(bt); end
-end
-
-# source://minitest//lib/minitest.rb#1043
-Minitest::BacktraceFilter::MT_RE = T.let(T.unsafe(nil), Regexp)
-
-# Dispatch to multiple reporters as one.
-#
-# source://minitest//lib/minitest.rb#858
-class Minitest::CompositeReporter < ::Minitest::AbstractReporter
- # @return [CompositeReporter] a new instance of CompositeReporter
- #
- # source://minitest//lib/minitest.rb#864
- def initialize(*reporters); end
-
- # Add another reporter to the mix.
- #
- # source://minitest//lib/minitest.rb#876
- def <<(reporter); end
-
- # source://minitest//lib/minitest.rb#869
- def io; end
-
- # @return [Boolean]
- #
- # source://minitest//lib/minitest.rb#880
- def passed?; end
-
- # source://minitest//lib/minitest.rb#888
- def prerecord(klass, name); end
-
- # source://minitest//lib/minitest.rb#895
- def record(result); end
-
- # source://minitest//lib/minitest.rb#901
- def report; end
-
- # The list of reporters to dispatch to.
- #
- # source://minitest//lib/minitest.rb#862
- def reporters; end
-
- # The list of reporters to dispatch to.
- #
- # source://minitest//lib/minitest.rb#862
- def reporters=(_arg0); end
-
- # source://minitest//lib/minitest.rb#884
- def start; end
-end
-
-# Provides a simple set of guards that you can use in your tests
-# to skip execution if it is not applicable. These methods are
-# mixed into Test as both instance and class methods so you
-# can use them inside or outside of the test methods.
-#
-# def test_something_for_mri
-# skip "bug 1234" if jruby?
-# # ...
-# end
-#
-# if windows? then
-# # ... lots of test methods ...
-# end
-#
-# source://minitest//lib/minitest.rb#985
-module Minitest::Guard
- # Is this running on jruby?
- #
- # @return [Boolean]
- #
- # source://minitest//lib/minitest.rb#990
- def jruby?(platform = T.unsafe(nil)); end
-
- # Is this running on maglev?
- #
- # @return [Boolean]
- #
- # source://minitest//lib/minitest.rb#997
- def maglev?(platform = T.unsafe(nil)); end
-
- # Is this running on mri?
- #
- # @return [Boolean]
- #
- # source://minitest//lib/minitest.rb#1007
- def mri?(platform = T.unsafe(nil)); end
-
- # Is this running on macOS?
- #
- # @return [Boolean]
- #
- # source://minitest//lib/minitest.rb#1014
- def osx?(platform = T.unsafe(nil)); end
-
- # Is this running on rubinius?
- #
- # @return [Boolean]
- #
- # source://minitest//lib/minitest.rb#1021
- def rubinius?(platform = T.unsafe(nil)); end
-
- # Is this running on windows?
- #
- # @return [Boolean]
- #
- # source://minitest//lib/minitest.rb#1031
- def windows?(platform = T.unsafe(nil)); end
-end
-
-# source://minitest//lib/minitest/parallel.rb#2
-module Minitest::Parallel; end
-
-# The engine used to run multiple tests in parallel.
-#
-# source://minitest//lib/minitest/parallel.rb#7
-class Minitest::Parallel::Executor
- # Create a parallel test executor of with +size+ workers.
- #
- # @return [Executor] a new instance of Executor
- #
- # source://minitest//lib/minitest/parallel.rb#17
- def initialize(size); end
-
- # Add a job to the queue
- #
- # source://minitest//lib/minitest/parallel.rb#43
- def <<(work); end
-
- # Shuts down the pool of workers by signalling them to quit and
- # waiting for them all to finish what they're currently working
- # on.
- #
- # source://minitest//lib/minitest/parallel.rb#50
- def shutdown; end
-
- # The size of the pool of workers.
- #
- # source://minitest//lib/minitest/parallel.rb#12
- def size; end
-
- # Start the executor
- #
- # source://minitest//lib/minitest/parallel.rb#26
- def start; end
-end
-
-# source://minitest//lib/minitest/parallel.rb#56
-module Minitest::Parallel::Test
- # source://minitest//lib/minitest/parallel.rb#57
- def _synchronize; end
-end
-
-# source://minitest//lib/minitest/parallel.rb#59
-module Minitest::Parallel::Test::ClassMethods
- # source://minitest//lib/minitest/parallel.rb#60
- def run_one_method(klass, method_name, reporter); end
-
- # source://minitest//lib/minitest/parallel.rb#64
- def test_order; end
-end
-
-# A very simple reporter that prints the "dots" during the run.
-#
-# This is added to the top-level CompositeReporter at the start of
-# the run. If you want to change the output of minitest via a
-# plugin, pull this out of the composite and replace it with your
-# own.
-#
-# source://minitest//lib/minitest.rb#657
-class Minitest::ProgressReporter < ::Minitest::Reporter
- # source://minitest//lib/minitest.rb#658
- def prerecord(klass, name); end
-
- # source://minitest//lib/minitest.rb#665
- def record(result); end
-end
-
-# Shared code for anything that can get passed to a Reporter. See
-# Minitest::Test & Minitest::Result.
-#
-# source://minitest//lib/minitest.rb#489
-module Minitest::Reportable
- # @raise [NotImplementedError]
- #
- # source://minitest//lib/minitest.rb#509
- def class_name; end
-
- # Did this run error?
- #
- # @return [Boolean]
- #
- # source://minitest//lib/minitest.rb#530
- def error?; end
-
- # The location identifier of this test. Depends on a method
- # existing called class_name.
- #
- # source://minitest//lib/minitest.rb#504
- def location; end
-
- # Did this run pass?
- #
- # Note: skipped runs are not considered passing, but they don't
- # cause the process to exit non-zero.
- #
- # @return [Boolean]
- #
- # source://minitest//lib/minitest.rb#496
- def passed?; end
-
- # Returns ".", "F", or "E" based on the result of the run.
- #
- # source://minitest//lib/minitest.rb#516
- def result_code; end
-
- # Was this run skipped?
- #
- # @return [Boolean]
- #
- # source://minitest//lib/minitest.rb#523
- def skipped?; end
-end
-
-# source://minitest//lib/minitest.rb#633
-class Minitest::Reporter < ::Minitest::AbstractReporter
- # @return [Reporter] a new instance of Reporter
- #
- # source://minitest//lib/minitest.rb#642
- def initialize(io = T.unsafe(nil), options = T.unsafe(nil)); end
-
- # The IO used to report.
- #
- # source://minitest//lib/minitest.rb#635
- def io; end
-
- # The IO used to report.
- #
- # source://minitest//lib/minitest.rb#635
- def io=(_arg0); end
-
- # Command-line options for this run.
- #
- # source://minitest//lib/minitest.rb#640
- def options; end
-
- # Command-line options for this run.
- #
- # source://minitest//lib/minitest.rb#640
- def options=(_arg0); end
-end
-
-# This represents a test result in a clean way that can be
-# marshalled over a wire. Tests can do anything they want to the
-# test instance and can create conditions that cause Marshal.dump to
-# blow up. By using Result.from(a_test) you can be reasonably sure
-# that the test result can be marshalled.
-#
-# source://minitest//lib/minitest.rb#542
-class Minitest::Result < ::Minitest::Runnable
- include ::Minitest::Reportable
-
- # source://minitest//lib/minitest.rb#575
- def class_name; end
-
- # The class name of the test result.
- #
- # source://minitest//lib/minitest.rb#551
- def klass; end
-
- # The class name of the test result.
- #
- # source://minitest//lib/minitest.rb#551
- def klass=(_arg0); end
-
- # The location of the test method.
- #
- # source://minitest//lib/minitest.rb#556
- def source_location; end
-
- # The location of the test method.
- #
- # source://minitest//lib/minitest.rb#556
- def source_location=(_arg0); end
-
- # source://minitest//lib/minitest.rb#579
- def to_s; end
-
- class << self
- # Create a new test result from a Runnable instance.
- #
- # source://minitest//lib/minitest.rb#561
- def from(runnable); end
- end
-end
-
-# re-open
-#
-# source://minitest//lib/minitest.rb#277
-class Minitest::Runnable
- # @return [Runnable] a new instance of Runnable
- #
- # source://minitest//lib/minitest.rb#445
- def initialize(name); end
-
- # Number of assertions executed in this run.
- #
- # source://minitest//lib/minitest.rb#281
- def assertions; end
-
- # Number of assertions executed in this run.
- #
- # source://minitest//lib/minitest.rb#281
- def assertions=(_arg0); end
-
- # source://minitest//lib/minitest.rb#441
- def failure; end
-
- # An assertion raised during the run, if any.
- #
- # source://minitest//lib/minitest.rb#286
- def failures; end
-
- # An assertion raised during the run, if any.
- #
- # source://minitest//lib/minitest.rb#286
- def failures=(_arg0); end
-
- # source://minitest//lib/minitest.rb#427
- def marshal_dump; end
-
- # source://minitest//lib/minitest.rb#437
- def marshal_load(ary); end
-
- # Name of the run.
- #
- # source://minitest//lib/minitest.rb#304
- def name; end
-
- # Set the name of the run.
- #
- # source://minitest//lib/minitest.rb#311
- def name=(o); end
-
- # Did this run pass?
- #
- # Note: skipped runs are not considered passing, but they don't
- # cause the process to exit non-zero.
- #
- # @raise [NotImplementedError]
- # @return [Boolean]
- #
- # source://minitest//lib/minitest.rb#464
- def passed?; end
-
- # Returns a single character string to print based on the result
- # of the run. One of ".", "F",
- # "E" or "S".
- #
- # @raise [NotImplementedError]
- #
- # source://minitest//lib/minitest.rb#473
- def result_code; end
-
- # Runs a single method. Needs to return self.
- #
- # @raise [NotImplementedError]
- #
- # source://minitest//lib/minitest.rb#454
- def run; end
-
- # Was this run skipped? See #passed? for more information.
- #
- # @raise [NotImplementedError]
- # @return [Boolean]
- #
- # source://minitest//lib/minitest.rb#480
- def skipped?; end
-
- # The time it took to run.
- #
- # source://minitest//lib/minitest.rb#291
- def time; end
-
- # The time it took to run.
- #
- # source://minitest//lib/minitest.rb#291
- def time=(_arg0); end
-
- # source://minitest//lib/minitest.rb#293
- def time_it; end
-
- class << self
- # source://minitest//lib/minitest.rb#1083
- def inherited(klass); end
-
- # Returns all instance methods matching the pattern +re+.
- #
- # source://minitest//lib/minitest.rb#318
- def methods_matching(re); end
-
- # source://minitest//lib/minitest.rb#397
- def on_signal(name, action); end
-
- # source://minitest//lib/minitest.rb#322
- def reset; end
-
- # Responsible for running all runnable methods in a given class,
- # each in its own instance. Each instance is passed to the
- # reporter to record.
- #
- # source://minitest//lib/minitest.rb#333
- def run(reporter, options = T.unsafe(nil)); end
-
- # Runs a single method and has the reporter record the result.
- # This was considered internal API but is factored out of run so
- # that subclasses can specialize the running of an individual
- # test. See Minitest::ParallelTest::ClassMethods for an example.
- #
- # source://minitest//lib/minitest.rb#369
- def run_one_method(klass, method_name, reporter); end
-
- # Each subclass of Runnable is responsible for overriding this
- # method to return all runnable methods. See #methods_matching.
- #
- # @raise [NotImplementedError]
- #
- # source://minitest//lib/minitest.rb#414
- def runnable_methods; end
-
- # Returns all subclasses of Runnable.
- #
- # source://minitest//lib/minitest.rb#421
- def runnables; end
-
- # Defines the order to run tests (:random by default). Override
- # this or use a convenience method to change it for your tests.
- #
- # source://minitest//lib/minitest.rb#378
- def test_order; end
-
- # source://minitest//lib/minitest.rb#382
- def with_info_handler(reporter, &block); end
- end
-end
-
-# source://minitest//lib/minitest.rb#395
-Minitest::Runnable::SIGNALS = T.let(T.unsafe(nil), Hash)
-
-# Assertion raised when skipping a run.
-#
-# source://minitest//lib/minitest.rb#938
-class Minitest::Skip < ::Minitest::Assertion
- # source://minitest//lib/minitest.rb#939
- def result_label; end
-end
-
-# A reporter that gathers statistics about a test run. Does not do
-# any IO because meant to be used as a parent class for a reporter
-# that does.
-#
-# If you want to create an entirely different type of output (eg,
-# CI, HTML, etc), this is the place to start.
-#
-# Example:
-#
-# class JenkinsCIReporter < StatisticsReporter
-# def report
-# super # Needed to calculate some statistics
-#
-# print "
- #
- # first
- # second
- #
- #
- # eohtml
- # assert_equal('second', doc.html.body.p[1].text)
- #
- # source://nokogiri//lib/nokogiri.rb#91
- def Slop(*args, &block); end
-
- # Parse XML. Convenience method for Nokogiri::XML::Document.parse
- #
- # source://nokogiri//lib/nokogiri/xml.rb#7
- def XML(thing, url = T.unsafe(nil), encoding = T.unsafe(nil), options = T.unsafe(nil), &block); end
-
- # Create a Nokogiri::XSLT::Stylesheet with +stylesheet+.
- #
- # Example:
- #
- # xslt = Nokogiri::XSLT(File.read(ARGV[0]))
- #
- # source://nokogiri//lib/nokogiri/xslt.rb#13
- def XSLT(stylesheet, modules = T.unsafe(nil)); end
-
- # source://nokogiri//lib/nokogiri.rb#96
- def install_default_aliases; end
-
- # @return [Boolean]
- #
- # source://nokogiri//lib/nokogiri/version/info.rb#205
- def jruby?; end
-
- # source://nokogiri//lib/nokogiri/version/info.rb#210
- def libxml2_patches; end
-
- # Create a new Nokogiri::XML::DocumentFragment
- #
- # source://nokogiri//lib/nokogiri.rb#68
- def make(input = T.unsafe(nil), opts = T.unsafe(nil), &blk); end
-
- # Parse an HTML or XML document. +string+ contains the document.
- #
- # source://nokogiri//lib/nokogiri.rb#42
- def parse(string, url = T.unsafe(nil), encoding = T.unsafe(nil), options = T.unsafe(nil)); end
-
- # @return [Boolean]
- #
- # source://nokogiri//lib/nokogiri/version/info.rb#200
- def uses_gumbo?; end
-
- # @return [Boolean]
- #
- # source://nokogiri//lib/nokogiri/version/info.rb#192
- def uses_libxml?(requirement = T.unsafe(nil)); end
- end
-end
-
-# Translate a CSS selector into an XPath 1.0 query
-#
-# source://nokogiri//lib/nokogiri/css.rb#6
-module Nokogiri::CSS
- class << self
- # TODO: Deprecate this method ahead of 2.0 and delete it in 2.0.
- # It is not used by Nokogiri and shouldn't be part of the public API.
- #
- # source://nokogiri//lib/nokogiri/css.rb#10
- def parse(selector); end
-
- # :call-seq:
- # xpath_for(selector) → String
- # xpath_for(selector [, prefix:] [, visitor:] [, ns:]) → String
- #
- # Translate a CSS selector to the equivalent XPath query.
- #
- # [Parameters]
- # - +selector+ (String) The CSS selector to be translated into XPath
- #
- # - +prefix:+ (String)
- #
- # The XPath prefix for the query, see Nokogiri::XML::XPath for some options. Default is
- # +XML::XPath::GLOBAL_SEARCH_PREFIX+.
- #
- # - +visitor:+ (Nokogiri::CSS::XPathVisitor)
- #
- # The visitor class to use to transform the AST into XPath. Default is
- # +Nokogiri::CSS::XPathVisitor.new+.
- #
- # - +ns:+ (Hash)
- #
- # The namespaces that are referenced in the query, if any. This is a hash where the keys are
- # the namespace prefix and the values are the namespace URIs. Default is an empty Hash.
- #
- # [Returns] (String) The equivalent XPath query for +selector+
- #
- # 💡 Note that translated queries are cached for performance concerns.
- #
- # @raise [TypeError]
- #
- # source://nokogiri//lib/nokogiri/css.rb#42
- def xpath_for(selector, options = T.unsafe(nil)); end
- end
-end
-
-# source://nokogiri//lib/nokogiri/css/node.rb#5
-class Nokogiri::CSS::Node
- # Create a new Node with +type+ and +value+
- #
- # @return [Node] a new instance of Node
- #
- # source://nokogiri//lib/nokogiri/css/node.rb#14
- def initialize(type, value); end
-
- # Accept +visitor+
- #
- # source://nokogiri//lib/nokogiri/css/node.rb#20
- def accept(visitor); end
-
- # Find a node by type using +types+
- #
- # source://nokogiri//lib/nokogiri/css/node.rb#32
- def find_by_type(types); end
-
- # Convert to array
- #
- # source://nokogiri//lib/nokogiri/css/node.rb#49
- def to_a; end
-
- # Convert to_type
- #
- # source://nokogiri//lib/nokogiri/css/node.rb#42
- def to_type; end
-
- # Convert this CSS node to xpath with +prefix+ using +visitor+
- #
- # source://nokogiri//lib/nokogiri/css/node.rb#26
- def to_xpath(prefix, visitor); end
-
- # Get the type of this node
- #
- # source://nokogiri//lib/nokogiri/css/node.rb#9
- def type; end
-
- # Get the type of this node
- #
- # source://nokogiri//lib/nokogiri/css/node.rb#9
- def type=(_arg0); end
-
- # Get the value of this node
- #
- # source://nokogiri//lib/nokogiri/css/node.rb#11
- def value; end
-
- # Get the value of this node
- #
- # source://nokogiri//lib/nokogiri/css/node.rb#11
- def value=(_arg0); end
-end
-
-# source://nokogiri//lib/nokogiri/css/node.rb#6
-Nokogiri::CSS::Node::ALLOW_COMBINATOR_ON_SELF = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/css/parser_extras.rb#7
-class Nokogiri::CSS::Parser < ::Racc::Parser
- # Create a new CSS parser with respect to +namespaces+
- #
- # @return [Parser] a new instance of Parser
- #
- # source://nokogiri//lib/nokogiri/css/parser_extras.rb#60
- def initialize(namespaces = T.unsafe(nil)); end
-
- # reduce 0 omitted
- #
- # source://nokogiri//lib/nokogiri/css/parser.rb#361
- def _reduce_1(val, _values, result); end
-
- # source://nokogiri//lib/nokogiri/css/parser.rb#407
- def _reduce_10(val, _values, result); end
-
- # source://nokogiri//lib/nokogiri/css/parser.rb#412
- def _reduce_11(val, _values, result); end
-
- # reduce 12 omitted
- #
- # source://nokogiri//lib/nokogiri/css/parser.rb#424
- def _reduce_13(val, _values, result); end
-
- # source://nokogiri//lib/nokogiri/css/parser.rb#429
- def _reduce_14(val, _values, result); end
-
- # source://nokogiri//lib/nokogiri/css/parser.rb#434
- def _reduce_15(val, _values, result); end
-
- # reduce 16 omitted
- #
- # source://nokogiri//lib/nokogiri/css/parser.rb#441
- def _reduce_17(val, _values, result); end
-
- # source://nokogiri//lib/nokogiri/css/parser.rb#446
- def _reduce_18(val, _values, result); end
-
- # source://nokogiri//lib/nokogiri/css/parser.rb#451
- def _reduce_19(val, _values, result); end
-
- # source://nokogiri//lib/nokogiri/css/parser.rb#367
- def _reduce_2(val, _values, result); end
-
- # reduce 20 omitted
- #
- # source://nokogiri//lib/nokogiri/css/parser.rb#458
- def _reduce_21(val, _values, result); end
-
- # reduce 22 omitted
- #
- # source://nokogiri//lib/nokogiri/css/parser.rb#465
- def _reduce_23(val, _values, result); end
-
- # source://nokogiri//lib/nokogiri/css/parser.rb#470
- def _reduce_24(val, _values, result); end
-
- # source://nokogiri//lib/nokogiri/css/parser.rb#475
- def _reduce_25(val, _values, result); end
-
- # source://nokogiri//lib/nokogiri/css/parser.rb#482
- def _reduce_26(val, _values, result); end
-
- # reduce 27 omitted
- #
- # source://nokogiri//lib/nokogiri/css/parser.rb#489
- def _reduce_28(val, _values, result); end
-
- # source://nokogiri//lib/nokogiri/css/parser.rb#495
- def _reduce_29(val, _values, result); end
-
- # source://nokogiri//lib/nokogiri/css/parser.rb#372
- def _reduce_3(val, _values, result); end
-
- # source://nokogiri//lib/nokogiri/css/parser.rb#501
- def _reduce_30(val, _values, result); end
-
- # source://nokogiri//lib/nokogiri/css/parser.rb#507
- def _reduce_31(val, _values, result); end
-
- # source://nokogiri//lib/nokogiri/css/parser.rb#512
- def _reduce_32(val, _values, result); end
-
- # reduce 33 omitted
- #
- # source://nokogiri//lib/nokogiri/css/parser.rb#519
- def _reduce_34(val, _values, result); end
-
- # source://nokogiri//lib/nokogiri/css/parser.rb#525
- def _reduce_35(val, _values, result); end
-
- # source://nokogiri//lib/nokogiri/css/parser.rb#531
- def _reduce_36(val, _values, result); end
-
- # source://nokogiri//lib/nokogiri/css/parser.rb#537
- def _reduce_37(val, _values, result); end
-
- # source://nokogiri//lib/nokogiri/css/parser.rb#543
- def _reduce_38(val, _values, result); end
-
- # source://nokogiri//lib/nokogiri/css/parser.rb#549
- def _reduce_39(val, _values, result); end
-
- # source://nokogiri//lib/nokogiri/css/parser.rb#377
- def _reduce_4(val, _values, result); end
-
- # source://nokogiri//lib/nokogiri/css/parser.rb#554
- def _reduce_40(val, _values, result); end
-
- # source://nokogiri//lib/nokogiri/css/parser.rb#559
- def _reduce_41(val, _values, result); end
-
- # source://nokogiri//lib/nokogiri/css/parser.rb#564
- def _reduce_42(val, _values, result); end
-
- # reduce 44 omitted
- #
- # source://nokogiri//lib/nokogiri/css/parser.rb#573
- def _reduce_45(val, _values, result); end
-
- # reduce 46 omitted
- #
- # source://nokogiri//lib/nokogiri/css/parser.rb#590
- def _reduce_47(val, _values, result); end
-
- # source://nokogiri//lib/nokogiri/css/parser.rb#600
- def _reduce_48(val, _values, result); end
-
- # source://nokogiri//lib/nokogiri/css/parser.rb#616
- def _reduce_49(val, _values, result); end
-
- # source://nokogiri//lib/nokogiri/css/parser.rb#382
- def _reduce_5(val, _values, result); end
-
- # source://nokogiri//lib/nokogiri/css/parser.rb#636
- def _reduce_50(val, _values, result); end
-
- # source://nokogiri//lib/nokogiri/css/parser.rb#642
- def _reduce_51(val, _values, result); end
-
- # reduce 53 omitted
- #
- # source://nokogiri//lib/nokogiri/css/parser.rb#651
- def _reduce_54(val, _values, result); end
-
- # source://nokogiri//lib/nokogiri/css/parser.rb#657
- def _reduce_55(val, _values, result); end
-
- # source://nokogiri//lib/nokogiri/css/parser.rb#663
- def _reduce_56(val, _values, result); end
-
- # source://nokogiri//lib/nokogiri/css/parser.rb#669
- def _reduce_57(val, _values, result); end
-
- # source://nokogiri//lib/nokogiri/css/parser.rb#675
- def _reduce_58(val, _values, result); end
-
- # source://nokogiri//lib/nokogiri/css/parser.rb#387
- def _reduce_6(val, _values, result); end
-
- # reduce 63 omitted
- #
- # source://nokogiri//lib/nokogiri/css/parser.rb#691
- def _reduce_64(val, _values, result); end
-
- # source://nokogiri//lib/nokogiri/css/parser.rb#696
- def _reduce_65(val, _values, result); end
-
- # source://nokogiri//lib/nokogiri/css/parser.rb#701
- def _reduce_66(val, _values, result); end
-
- # source://nokogiri//lib/nokogiri/css/parser.rb#706
- def _reduce_67(val, _values, result); end
-
- # reduce 68 omitted
- #
- # source://nokogiri//lib/nokogiri/css/parser.rb#713
- def _reduce_69(val, _values, result); end
-
- # source://nokogiri//lib/nokogiri/css/parser.rb#392
- def _reduce_7(val, _values, result); end
-
- # source://nokogiri//lib/nokogiri/css/parser.rb#718
- def _reduce_70(val, _values, result); end
-
- # source://nokogiri//lib/nokogiri/css/parser.rb#723
- def _reduce_71(val, _values, result); end
-
- # source://nokogiri//lib/nokogiri/css/parser.rb#728
- def _reduce_72(val, _values, result); end
-
- # source://nokogiri//lib/nokogiri/css/parser.rb#733
- def _reduce_73(val, _values, result); end
-
- # source://nokogiri//lib/nokogiri/css/parser.rb#738
- def _reduce_74(val, _values, result); end
-
- # source://nokogiri//lib/nokogiri/css/parser.rb#743
- def _reduce_75(val, _values, result); end
-
- # source://nokogiri//lib/nokogiri/css/parser.rb#748
- def _reduce_76(val, _values, result); end
-
- # source://nokogiri//lib/nokogiri/css/parser.rb#397
- def _reduce_8(val, _values, result); end
-
- # source://nokogiri//lib/nokogiri/css/parser.rb#402
- def _reduce_9(val, _values, result); end
-
- # reduce 81 omitted
- #
- # source://nokogiri//lib/nokogiri/css/parser.rb#764
- def _reduce_none(val, _values, result); end
-
- # source://nokogiri//lib/nokogiri/css/parser_extras.rb#89
- def cache_key(query, prefix, visitor); end
-
- # source://nokogiri//lib/nokogiri/css/parser_extras.rb#71
- def next_token; end
-
- # On CSS parser error, raise an exception
- #
- # @raise [SyntaxError]
- #
- # source://nokogiri//lib/nokogiri/css/parser_extras.rb#84
- def on_error(error_token_id, error_value, value_stack); end
-
- # source://nokogiri//lib/nokogiri/css/parser_extras.rb#66
- def parse(string); end
-
- # source://nokogiri//lib/nokogiri/css/parser.rb#26
- def unescape_css_identifier(identifier); end
-
- # source://nokogiri//lib/nokogiri/css/parser.rb#30
- def unescape_css_string(str); end
-
- # Get the xpath for +string+ using +options+
- #
- # source://nokogiri//lib/nokogiri/css/parser_extras.rb#76
- def xpath_for(string, prefix, visitor); end
-
- class << self
- # Get the css selector in +string+ from the cache
- #
- # source://nokogiri//lib/nokogiri/css/parser_extras.rb#25
- def [](string); end
-
- # Set the css selector in +string+ in the cache to +value+
- #
- # source://nokogiri//lib/nokogiri/css/parser_extras.rb#32
- def []=(string, value); end
-
- # Return a thread-local boolean indicating whether the CSS-to-XPath cache is active. (Default is `true`.)
- #
- # @return [Boolean]
- #
- # source://nokogiri//lib/nokogiri/css/parser_extras.rb#15
- def cache_on?; end
-
- # Clear the cache
- #
- # source://nokogiri//lib/nokogiri/css/parser_extras.rb#39
- def clear_cache(create_new_object = T.unsafe(nil)); end
-
- # Set a thread-local boolean to turn cacheing on and off. Truthy values turn the cache on, falsey values turn the cache off.
- #
- # source://nokogiri//lib/nokogiri/css/parser_extras.rb#20
- def set_cache(value); end
-
- # Execute +block+ without cache
- #
- # source://nokogiri//lib/nokogiri/css/parser_extras.rb#50
- def without_cache(&block); end
- end
-end
-
-# source://nokogiri//lib/nokogiri/css/parser_extras.rb#8
-Nokogiri::CSS::Parser::CACHE_SWITCH_NAME = T.let(T.unsafe(nil), Symbol)
-
-# source://nokogiri//lib/nokogiri/css/parser.rb#279
-Nokogiri::CSS::Parser::Racc_arg = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/css/parser.rb#355
-Nokogiri::CSS::Parser::Racc_debug_parser = T.let(T.unsafe(nil), FalseClass)
-
-# source://nokogiri//lib/nokogiri/css/parser.rb#295
-Nokogiri::CSS::Parser::Racc_token_to_s_table = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/css/syntax_error.rb#6
-class Nokogiri::CSS::SyntaxError < ::Nokogiri::SyntaxError; end
-
-# source://nokogiri//lib/nokogiri/css/tokenizer.rb#11
-class Nokogiri::CSS::Tokenizer
- # source://nokogiri//lib/nokogiri/css/tokenizer.rb#57
- def _next_token; end
-
- # source://nokogiri//lib/nokogiri/css/tokenizer.rb#26
- def action; end
-
- # Returns the value of attribute filename.
- #
- # source://nokogiri//lib/nokogiri/css/tokenizer.rb#17
- def filename; end
-
- # Returns the value of attribute lineno.
- #
- # source://nokogiri//lib/nokogiri/css/tokenizer.rb#16
- def lineno; end
-
- # source://nokogiri//lib/nokogiri/css/tokenizer.rb#36
- def load_file(filename); end
-
- # source://nokogiri//lib/nokogiri/css/tokenizer.rb#49
- def next_token; end
-
- # source://nokogiri//lib/nokogiri/css/tokenizer.rb#30
- def scan(str); end
-
- # source://nokogiri//lib/nokogiri/css/tokenizer.rb#43
- def scan_file(filename); end
-
- # source://nokogiri//lib/nokogiri/css/tokenizer.rb#20
- def scan_setup(str); end
-
- # source://nokogiri//lib/nokogiri/css/tokenizer.rb#30
- def scan_str(str); end
-
- # Returns the value of attribute state.
- #
- # source://nokogiri//lib/nokogiri/css/tokenizer.rb#18
- def state; end
-
- # Sets the attribute state
- #
- # @param value the value to set the attribute state to.
- #
- # source://nokogiri//lib/nokogiri/css/tokenizer.rb#18
- def state=(_arg0); end
-end
-
-# source://nokogiri//lib/nokogiri/css/tokenizer.rb#14
-class Nokogiri::CSS::Tokenizer::ScanError < ::StandardError; end
-
-# When translating CSS selectors to XPath queries with Nokogiri::CSS.xpath_for, the XPathVisitor
-# class allows for changing some of the behaviors related to builtin xpath functions and quirks
-# of HTML5.
-#
-# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#9
-class Nokogiri::CSS::XPathVisitor
- # :call-seq:
- # new() → XPathVisitor
- # new(builtins:, doctype:) → XPathVisitor
- #
- # [Parameters]
- # - +builtins:+ (BuiltinsConfig) Determine when to use Nokogiri's built-in xpath functions for performance improvements.
- # - +doctype:+ (DoctypeConfig) Make document-type-specific accommodations for CSS queries.
- #
- # [Returns] XPathVisitor
- #
- # @return [XPathVisitor] a new instance of XPathVisitor
- #
- # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#57
- def initialize(builtins: T.unsafe(nil), doctype: T.unsafe(nil)); end
-
- # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#267
- def accept(node); end
-
- # :call-seq: config() → Hash
- #
- # [Returns]
- # a Hash representing the configuration of the XPathVisitor, suitable for use as
- # part of the CSS cache key.
- #
- # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#74
- def config; end
-
- # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#263
- def visit_attrib_name(node); end
-
- # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#154
- def visit_attribute_condition(node); end
-
- # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#234
- def visit_child_selector(node); end
-
- # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#215
- def visit_class_condition(node); end
-
- # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#219
- def visit_combinator(node); end
-
- # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#240
- def visit_conditional_selector(node); end
-
- # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#234
- def visit_descendant_selector(node); end
-
- # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#234
- def visit_direct_adjacent_selector(node); end
-
- # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#245
- def visit_element_name(node); end
-
- # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#234
- def visit_following_selector(node); end
-
- # :stopdoc:
- #
- # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#79
- def visit_function(node); end
-
- # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#149
- def visit_id(node); end
-
- # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#140
- def visit_not(node); end
-
- # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#190
- def visit_pseudo_class(node); end
-
- private
-
- # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#328
- def css_class(hay, needle); end
-
- # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#273
- def html5_element_name_needs_namespace_handling(node); end
-
- # @return [Boolean]
- #
- # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#318
- def is_of_type_pseudo_class?(node); end
-
- # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#280
- def nth(node, options = T.unsafe(nil)); end
-
- # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#304
- def read_a_and_positive_b(values); end
-end
-
-# Enum to direct XPathVisitor when to use Nokogiri builtin XPath functions.
-#
-# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#13
-module Nokogiri::CSS::XPathVisitor::BuiltinsConfig; end
-
-# Always use Nokogiri builtin functions whenever possible. This is probably only useful for testing.
-#
-# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#19
-Nokogiri::CSS::XPathVisitor::BuiltinsConfig::ALWAYS = T.let(T.unsafe(nil), Symbol)
-
-# Never use Nokogiri builtin functions, always generate vanilla XPath 1.0 queries. This is
-# the default when calling Nokogiri::CSS.xpath_for directly.
-#
-# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#16
-Nokogiri::CSS::XPathVisitor::BuiltinsConfig::NEVER = T.let(T.unsafe(nil), Symbol)
-
-# Only use Nokogiri builtin functions when they will be faster than vanilla XPath. This is
-# the behavior chosen when searching for CSS selectors on a Nokogiri document, fragment, or
-# node.
-#
-# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#24
-Nokogiri::CSS::XPathVisitor::BuiltinsConfig::OPTIMAL = T.let(T.unsafe(nil), Symbol)
-
-# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#27
-Nokogiri::CSS::XPathVisitor::BuiltinsConfig::VALUES = T.let(T.unsafe(nil), Array)
-
-# Enum to direct XPathVisitor when to tweak the XPath query to suit the nature of the document
-# being searched. Note that searches for CSS selectors from a Nokogiri document, fragment, or
-# node will choose the correct option automatically.
-#
-# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#33
-module Nokogiri::CSS::XPathVisitor::DoctypeConfig; end
-
-# The document being searched is an HTML4 document.
-#
-# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#38
-Nokogiri::CSS::XPathVisitor::DoctypeConfig::HTML4 = T.let(T.unsafe(nil), Symbol)
-
-# The document being searched is an HTML5 document.
-#
-# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#41
-Nokogiri::CSS::XPathVisitor::DoctypeConfig::HTML5 = T.let(T.unsafe(nil), Symbol)
-
-# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#44
-Nokogiri::CSS::XPathVisitor::DoctypeConfig::VALUES = T.let(T.unsafe(nil), Array)
-
-# The document being searched is an XML document. This is the default.
-#
-# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#35
-Nokogiri::CSS::XPathVisitor::DoctypeConfig::XML = T.let(T.unsafe(nil), Symbol)
-
-# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#10
-Nokogiri::CSS::XPathVisitor::WILDCARD_NAMESPACES = T.let(T.unsafe(nil), TrueClass)
-
-# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#339
-module Nokogiri::CSS::XPathVisitorAlwaysUseBuiltins
- class << self
- # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#340
- def new; end
- end
-end
-
-# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#349
-module Nokogiri::CSS::XPathVisitorOptimallyUseBuiltins
- class << self
- # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#350
- def new; end
- end
-end
-
-# Some classes in Nokogiri are namespaced as a group, for example
-# Document, DocumentFragment, and Builder.
-#
-# It's sometimes necessary to look up the related class, e.g.:
-#
-# XML::Builder → XML::Document
-# HTML4::Builder → HTML4::Document
-# HTML5::Document → HTML5::DocumentFragment
-#
-# This module is included into those key classes who need to do this.
-#
-# source://nokogiri//lib/nokogiri/class_resolver.rb#19
-module Nokogiri::ClassResolver
- # :call-seq:
- # related_class(class_name) → Class
- #
- # Find a class constant within the
- #
- # Some examples:
- #
- # Nokogiri::XML::Document.new.related_class("DocumentFragment")
- # # => Nokogiri::XML::DocumentFragment
- # Nokogiri::HTML4::Document.new.related_class("DocumentFragment")
- # # => Nokogiri::HTML4::DocumentFragment
- #
- # Note this will also work for subclasses that follow the same convention, e.g.:
- #
- # Loofah::HTML::Document.new.related_class("DocumentFragment")
- # # => Loofah::HTML::DocumentFragment
- #
- # And even if it's a subclass, this will iterate through the superclasses:
- #
- # class ThisIsATopLevelClass < Nokogiri::HTML4::Builder ; end
- # ThisIsATopLevelClass.new.related_class("Document")
- # # => Nokogiri::HTML4::Document
- #
- # source://nokogiri//lib/nokogiri/class_resolver.rb#46
- def related_class(class_name); end
-end
-
-# #related_class restricts matching namespaces to those matching this set.
-#
-# source://nokogiri//lib/nokogiri/class_resolver.rb#21
-Nokogiri::ClassResolver::VALID_NAMESPACES = T.let(T.unsafe(nil), Set)
-
-# source://nokogiri//lib/nokogiri/decorators/slop.rb#4
-module Nokogiri::Decorators; end
-
-# The Slop decorator implements method missing such that a methods may be
-# used instead of XPath or CSS. See Nokogiri.Slop
-#
-# source://nokogiri//lib/nokogiri/decorators/slop.rb#8
-module Nokogiri::Decorators::Slop
- # look for node with +name+. See Nokogiri.Slop
- #
- # source://nokogiri//lib/nokogiri/decorators/slop.rb#14
- def method_missing(name, *args, &block); end
-
- private
-
- # @return [Boolean]
- #
- # source://nokogiri//lib/nokogiri/decorators/slop.rb#37
- def respond_to_missing?(name, include_private = T.unsafe(nil)); end
-end
-
-# The default XPath search context for Slop
-#
-# source://nokogiri//lib/nokogiri/decorators/slop.rb#10
-Nokogiri::Decorators::Slop::XPATH_PREFIX = T.let(T.unsafe(nil), String)
-
-# source://nokogiri//lib/nokogiri/encoding_handler.rb#5
-class Nokogiri::EncodingHandler
- # Returns the value of attribute name.
- def name; end
-
- class << self
- def [](_arg0); end
- def alias(_arg0, _arg1); end
- def clear_aliases!; end
- def delete(_arg0); end
-
- # source://nokogiri//lib/nokogiri/encoding_handler.rb#15
- def install_default_aliases; end
- end
-end
-
-# Popular encoding aliases not known by all iconv implementations that Nokogiri should support.
-#
-# source://nokogiri//lib/nokogiri/encoding_handler.rb#7
-Nokogiri::EncodingHandler::USEFUL_ALIASES = T.let(T.unsafe(nil), Hash)
-
-# source://nokogiri//lib/nokogiri/gumbo.rb#4
-module Nokogiri::Gumbo
- class << self
- def fragment(_arg0, _arg1, _arg2, _arg3, _arg4, _arg5); end
- def parse(_arg0, _arg1, _arg2, _arg3, _arg4, _arg5); end
- end
-end
-
-# The default maximum number of attributes per element.
-#
-# source://nokogiri//lib/nokogiri/gumbo.rb#6
-Nokogiri::Gumbo::DEFAULT_MAX_ATTRIBUTES = T.let(T.unsafe(nil), Integer)
-
-# The default maximum number of errors for parsing a document or a fragment.
-#
-# source://nokogiri//lib/nokogiri/gumbo.rb#9
-Nokogiri::Gumbo::DEFAULT_MAX_ERRORS = T.let(T.unsafe(nil), Integer)
-
-# The default maximum depth of the DOM tree produced by parsing a document
-# or fragment.
-#
-# source://nokogiri//lib/nokogiri/gumbo.rb#13
-Nokogiri::Gumbo::DEFAULT_MAX_TREE_DEPTH = T.let(T.unsafe(nil), Integer)
-
-# 💡 This module/namespace is an alias for Nokogiri::HTML4 as of v1.12.0. Before v1.12.0,
-# Nokogiri::HTML4 did not exist, and this was the module/namespace for all HTML-related
-# classes.
-#
-# source://nokogiri//lib/nokogiri/html.rb#8
-Nokogiri::HTML = Nokogiri::HTML4
-
-# Since v1.12.0
-#
-# 💡 Before v1.12.0, Nokogiri::HTML4 did not exist, and Nokogiri::HTML was the module/namespace
-# for parsing HTML.
-#
-# source://nokogiri//lib/nokogiri/html4.rb#19
-module Nokogiri::HTML4
- class << self
- # Parse a fragment from +string+ in to a NodeSet.
- #
- # source://nokogiri//lib/nokogiri/html4.rb#29
- def fragment(string, encoding = T.unsafe(nil), options = T.unsafe(nil), &block); end
-
- # Parse HTML. Convenience method for Nokogiri::HTML4::Document.parse
- #
- # source://nokogiri//lib/nokogiri/html4.rb#23
- def parse(input, url = T.unsafe(nil), encoding = T.unsafe(nil), options = T.unsafe(nil), &block); end
- end
-end
-
-# Nokogiri HTML builder is used for building HTML documents. It is very
-# similar to the Nokogiri::XML::Builder. In fact, you should go read the
-# documentation for Nokogiri::XML::Builder before reading this
-# documentation.
-#
-# == Synopsis:
-#
-# Create an HTML document with a body that has an onload attribute, and a
-# span tag with a class of "bold" that has content of "Hello world".
-#
-# builder = Nokogiri::HTML4::Builder.new do |doc|
-# doc.html {
-# doc.body(:onload => 'some_func();') {
-# doc.span.bold {
-# doc.text "Hello world"
-# }
-# }
-# }
-# end
-# puts builder.to_html
-#
-# The HTML builder inherits from the XML builder, so make sure to read the
-# Nokogiri::XML::Builder documentation.
-#
-# source://nokogiri//lib/nokogiri/html.rb#31
-class Nokogiri::HTML4::Builder < ::Nokogiri::XML::Builder
- # Convert the builder to HTML
- #
- # source://nokogiri//lib/nokogiri/html4/builder.rb#32
- def to_html; end
-end
-
-# source://nokogiri//lib/nokogiri/html4/document.rb#8
-class Nokogiri::HTML4::Document < ::Nokogiri::XML::Document
- # Create a Nokogiri::XML::DocumentFragment from +tags+
- #
- # source://nokogiri//lib/nokogiri/html4/document.rb#149
- def fragment(tags = T.unsafe(nil)); end
-
- # Get the meta tag encoding for this document. If there is no meta tag,
- # then nil is returned.
- #
- # source://nokogiri//lib/nokogiri/html4/document.rb#12
- def meta_encoding; end
-
- # Set the meta tag encoding for this document.
- #
- # If an meta encoding tag is already present, its content is
- # replaced with the given text.
- #
- # Otherwise, this method tries to create one at an appropriate
- # place supplying head and/or html elements as necessary, which
- # is inside a head element if any, and before any text node or
- # content element (typically ) if any.
- #
- # The result when trying to set an encoding that is different
- # from the document encoding is undefined.
- #
- # Beware in CRuby, that libxml2 automatically inserts a meta tag
- # into a head element.
- #
- # source://nokogiri//lib/nokogiri/html4/document.rb#36
- def meta_encoding=(encoding); end
-
- # Serialize Node using +options+. Save options can also be set using a block.
- #
- # See also Nokogiri::XML::Node::SaveOptions and Node@Serialization+and+Generating+Output.
- #
- # These two statements are equivalent:
- #
- # node.serialize(:encoding => 'UTF-8', :save_with => FORMAT | AS_XML)
- #
- # or
- #
- # node.serialize(:encoding => 'UTF-8') do |config|
- # config.format.as_xml
- # end
- #
- # source://nokogiri//lib/nokogiri/html4/document.rb#142
- def serialize(options = T.unsafe(nil)); end
-
- # Get the title string of this document. Return nil if there is
- # no title tag.
- #
- # source://nokogiri//lib/nokogiri/html4/document.rb#70
- def title; end
-
- # Set the title string of this document.
- #
- # If a title element is already present, its content is replaced
- # with the given text.
- #
- # Otherwise, this method tries to create one at an appropriate
- # place supplying head and/or html elements as necessary, which
- # is inside a head element if any, right after a meta
- # encoding/charset tag if any, and before any text node or
- # content element (typically ) if any.
- #
- # source://nokogiri//lib/nokogiri/html4/document.rb#85
- def title=(text); end
-
- def type; end
-
- # :call-seq:
- # xpath_doctype() → Nokogiri::CSS::XPathVisitor::DoctypeConfig
- #
- # [Returns] The document type which determines CSS-to-XPath translation.
- #
- # See XPathVisitor for more information.
- #
- # source://nokogiri//lib/nokogiri/html4/document.rb#159
- def xpath_doctype; end
-
- private
-
- # source://nokogiri//lib/nokogiri/html4/document.rb#60
- def meta_content_type; end
-
- # source://nokogiri//lib/nokogiri/html4/document.rb#103
- def set_metadata_element(element); end
-
- class << self
- def new(*_arg0); end
-
- # Parse HTML. +string_or_io+ may be a String, or any object that
- # responds to _read_ and _close_ such as an IO, or StringIO.
- # +url+ is resource where this document is located. +encoding+ is the
- # encoding that should be used when processing the document. +options+
- # is a number that sets options in the parser, such as
- # Nokogiri::XML::ParseOptions::RECOVER. See the constants in
- # Nokogiri::XML::ParseOptions.
- #
- # @yield [options]
- #
- # source://nokogiri//lib/nokogiri/html4/document.rb#172
- def parse(string_or_io, url = T.unsafe(nil), encoding = T.unsafe(nil), options = T.unsafe(nil)); end
-
- def read_io(_arg0, _arg1, _arg2, _arg3); end
- def read_memory(_arg0, _arg1, _arg2, _arg3); end
- end
-end
-
-# source://nokogiri//lib/nokogiri/html4/document_fragment.rb#5
-class Nokogiri::HTML4::DocumentFragment < ::Nokogiri::XML::DocumentFragment
- # @return [DocumentFragment] a new instance of DocumentFragment
- # @yield [options]
- #
- # source://nokogiri//lib/nokogiri/html4/document_fragment.rb#27
- def initialize(document, tags = T.unsafe(nil), ctx = T.unsafe(nil), options = T.unsafe(nil)); end
-
- class << self
- # Create a Nokogiri::XML::DocumentFragment from +tags+, using +encoding+
- #
- # source://nokogiri//lib/nokogiri/html4/document_fragment.rb#8
- def parse(tags, encoding = T.unsafe(nil), options = T.unsafe(nil), &block); end
- end
-end
-
-# source://nokogiri//lib/nokogiri/html4/element_description.rb#5
-class Nokogiri::HTML4::ElementDescription
- # Is this element a block element?
- #
- # @return [Boolean]
- #
- # source://nokogiri//lib/nokogiri/html4/element_description.rb#8
- def block?; end
-
- def default_sub_element; end
-
- # @return [Boolean]
- def deprecated?; end
-
- def deprecated_attributes; end
- def description; end
- def empty?; end
-
- # @return [Boolean]
- def implied_end_tag?; end
-
- # @return [Boolean]
- def implied_start_tag?; end
-
- def inline?; end
-
- # Inspection information
- #
- # source://nokogiri//lib/nokogiri/html4/element_description.rb#20
- def inspect; end
-
- def name; end
- def optional_attributes; end
- def required_attributes; end
-
- # @return [Boolean]
- def save_end_tag?; end
-
- def sub_elements; end
-
- # Convert this description to a string
- #
- # source://nokogiri//lib/nokogiri/html4/element_description.rb#14
- def to_s; end
-
- private
-
- # source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#32
- def default_desc; end
-
- class << self
- def [](_arg0); end
- end
-end
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#436
-Nokogiri::HTML4::ElementDescription::ACTION_ATTR = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#423
-Nokogiri::HTML4::ElementDescription::ALIGN_ATTR = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#239
-Nokogiri::HTML4::ElementDescription::ALT_ATTR = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#246
-Nokogiri::HTML4::ElementDescription::APPLET_ATTRS = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#258
-Nokogiri::HTML4::ElementDescription::AREA_ATTRS = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#212
-Nokogiri::HTML4::ElementDescription::ATTRS = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#221
-Nokogiri::HTML4::ElementDescription::A_ATTRS = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#268
-Nokogiri::HTML4::ElementDescription::BASEFONT_ATTRS = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#546
-Nokogiri::HTML4::ElementDescription::BGCOLOR_ATTR = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#171
-Nokogiri::HTML4::ElementDescription::BLOCK = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#437
-Nokogiri::HTML4::ElementDescription::BLOCKLI_ELT = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#271
-Nokogiri::HTML4::ElementDescription::BODY_ATTRS = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#270
-Nokogiri::HTML4::ElementDescription::BODY_CONTENTS = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#272
-Nokogiri::HTML4::ElementDescription::BODY_DEPR = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#280
-Nokogiri::HTML4::ElementDescription::BUTTON_ATTRS = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#213
-Nokogiri::HTML4::ElementDescription::CELLHALIGN = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#214
-Nokogiri::HTML4::ElementDescription::CELLVALIGN = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#242
-Nokogiri::HTML4::ElementDescription::CLEAR_ATTRS = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#292
-Nokogiri::HTML4::ElementDescription::COL_ATTRS = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#293
-Nokogiri::HTML4::ElementDescription::COL_ELT = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#297
-Nokogiri::HTML4::ElementDescription::COMPACT_ATTR = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#295
-Nokogiri::HTML4::ElementDescription::COMPACT_ATTRS = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#439
-Nokogiri::HTML4::ElementDescription::CONTENT_ATTR = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#199
-Nokogiri::HTML4::ElementDescription::COREATTRS = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#218
-Nokogiri::HTML4::ElementDescription::CORE_ATTRS = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#217
-Nokogiri::HTML4::ElementDescription::CORE_I18N_ATTRS = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#549
-Nokogiri::HTML4::ElementDescription::DIR_ATTR = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#296
-Nokogiri::HTML4::ElementDescription::DL_CONTENTS = T.let(T.unsafe(nil), Array)
-
-# This is filled in down below.
-#
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#30
-Nokogiri::HTML4::ElementDescription::DefaultDescriptions = T.let(T.unsafe(nil), Hash)
-
-# Methods are defined protected by method_defined? because at
-# this point the C-library or Java library is already loaded,
-# and we don't want to clobber any methods that have been
-# defined there.
-#
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#11
-Nokogiri::HTML4::ElementDescription::Desc = Struct
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#294
-Nokogiri::HTML4::ElementDescription::EDIT_ATTRS = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#377
-Nokogiri::HTML4::ElementDescription::EMBED_ATTRS = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#192
-Nokogiri::HTML4::ElementDescription::EMPTY = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#201
-Nokogiri::HTML4::ElementDescription::EVENTS = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#299
-Nokogiri::HTML4::ElementDescription::FIELDSET_CONTENTS = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#190
-Nokogiri::HTML4::ElementDescription::FLOW = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#245
-Nokogiri::HTML4::ElementDescription::FLOW_PARAM = T.let(T.unsafe(nil), Array)
-
-# Attributes defined and categorized
-#
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#136
-Nokogiri::HTML4::ElementDescription::FONTSTYLE = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#300
-Nokogiri::HTML4::ElementDescription::FONT_ATTRS = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#170
-Nokogiri::HTML4::ElementDescription::FORMCTRL = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#318
-Nokogiri::HTML4::ElementDescription::FORM_ATTRS = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#301
-Nokogiri::HTML4::ElementDescription::FORM_CONTENTS = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#339
-Nokogiri::HTML4::ElementDescription::FRAMESET_ATTRS = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#340
-Nokogiri::HTML4::ElementDescription::FRAMESET_CONTENTS = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#328
-Nokogiri::HTML4::ElementDescription::FRAME_ATTRS = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#168
-Nokogiri::HTML4::ElementDescription::HEADING = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#341
-Nokogiri::HTML4::ElementDescription::HEAD_ATTRS = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#342
-Nokogiri::HTML4::ElementDescription::HEAD_CONTENTS = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#241
-Nokogiri::HTML4::ElementDescription::HREF_ATTRS = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#352
-Nokogiri::HTML4::ElementDescription::HR_DEPR = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#216
-Nokogiri::HTML4::ElementDescription::HTML_ATTRS = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#197
-Nokogiri::HTML4::ElementDescription::HTML_CDATA = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#354
-Nokogiri::HTML4::ElementDescription::HTML_CONTENT = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#194
-Nokogiri::HTML4::ElementDescription::HTML_FLOW = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#195
-Nokogiri::HTML4::ElementDescription::HTML_INLINE = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#196
-Nokogiri::HTML4::ElementDescription::HTML_PCDATA = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#200
-Nokogiri::HTML4::ElementDescription::I18N = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#219
-Nokogiri::HTML4::ElementDescription::I18N_ATTRS = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#355
-Nokogiri::HTML4::ElementDescription::IFRAME_ATTRS = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#368
-Nokogiri::HTML4::ElementDescription::IMG_ATTRS = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#189
-Nokogiri::HTML4::ElementDescription::INLINE = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#243
-Nokogiri::HTML4::ElementDescription::INLINE_P = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#398
-Nokogiri::HTML4::ElementDescription::INPUT_ATTRS = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#298
-Nokogiri::HTML4::ElementDescription::LABEL_ATTR = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#421
-Nokogiri::HTML4::ElementDescription::LABEL_ATTRS = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#484
-Nokogiri::HTML4::ElementDescription::LANGUAGE_ATTR = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#422
-Nokogiri::HTML4::ElementDescription::LEGEND_ATTRS = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#424
-Nokogiri::HTML4::ElementDescription::LINK_ATTRS = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#169
-Nokogiri::HTML4::ElementDescription::LIST = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#547
-Nokogiri::HTML4::ElementDescription::LI_ELT = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#434
-Nokogiri::HTML4::ElementDescription::MAP_CONTENTS = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#438
-Nokogiri::HTML4::ElementDescription::META_ATTRS = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#191
-Nokogiri::HTML4::ElementDescription::MODIFIER = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#435
-Nokogiri::HTML4::ElementDescription::NAME_ATTR = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#441
-Nokogiri::HTML4::ElementDescription::NOFRAMES_CONTENT = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#443
-Nokogiri::HTML4::ElementDescription::OBJECT_ATTRS = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#442
-Nokogiri::HTML4::ElementDescription::OBJECT_CONTENTS = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#459
-Nokogiri::HTML4::ElementDescription::OBJECT_DEPR = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#460
-Nokogiri::HTML4::ElementDescription::OL_ATTRS = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#462
-Nokogiri::HTML4::ElementDescription::OPTGROUP_ATTRS = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#463
-Nokogiri::HTML4::ElementDescription::OPTION_ATTRS = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#461
-Nokogiri::HTML4::ElementDescription::OPTION_ELT = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#464
-Nokogiri::HTML4::ElementDescription::PARAM_ATTRS = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#167
-Nokogiri::HTML4::ElementDescription::PCDATA = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#137
-Nokogiri::HTML4::ElementDescription::PHRASE = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#466
-Nokogiri::HTML4::ElementDescription::PRE_CONTENT = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#420
-Nokogiri::HTML4::ElementDescription::PROMPT_ATTRS = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#269
-Nokogiri::HTML4::ElementDescription::QUOTE_ATTRS = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#238
-Nokogiri::HTML4::ElementDescription::ROWS_COLS_ATTR = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#483
-Nokogiri::HTML4::ElementDescription::SCRIPT_ATTRS = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#486
-Nokogiri::HTML4::ElementDescription::SELECT_ATTRS = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#485
-Nokogiri::HTML4::ElementDescription::SELECT_CONTENT = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#149
-Nokogiri::HTML4::ElementDescription::SPECIAL = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#240
-Nokogiri::HTML4::ElementDescription::SRC_ALT_ATTRS = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#497
-Nokogiri::HTML4::ElementDescription::STYLE_ATTRS = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#498
-Nokogiri::HTML4::ElementDescription::TABLE_ATTRS = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#510
-Nokogiri::HTML4::ElementDescription::TABLE_CONTENTS = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#509
-Nokogiri::HTML4::ElementDescription::TABLE_DEPR = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#520
-Nokogiri::HTML4::ElementDescription::TALIGN_ATTRS = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#237
-Nokogiri::HTML4::ElementDescription::TARGET_ATTR = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#533
-Nokogiri::HTML4::ElementDescription::TEXTAREA_ATTRS = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#522
-Nokogiri::HTML4::ElementDescription::TH_TD_ATTR = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#521
-Nokogiri::HTML4::ElementDescription::TH_TD_DEPR = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#545
-Nokogiri::HTML4::ElementDescription::TR_CONTENTS = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#519
-Nokogiri::HTML4::ElementDescription::TR_ELT = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#440
-Nokogiri::HTML4::ElementDescription::TYPE_ATTR = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#548
-Nokogiri::HTML4::ElementDescription::UL_DEPR = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#353
-Nokogiri::HTML4::ElementDescription::VERSION_ATTR = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#465
-Nokogiri::HTML4::ElementDescription::WIDTH_ATTR = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#14
-class Nokogiri::HTML4::EncodingReader
- # @return [EncodingReader] a new instance of EncodingReader
- #
- # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#82
- def initialize(io); end
-
- # This method is used by the C extension so that
- # Nokogiri::HTML4::Document#read_io() does not leak memory when
- # EncodingFound is raised.
- #
- # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#91
- def encoding_found; end
-
- # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#93
- def read(len); end
-
- class << self
- # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#59
- def detect_encoding(chunk); end
- end
-end
-
-# source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#15
-class Nokogiri::HTML4::EncodingReader::EncodingFound < ::StandardError
- # @return [EncodingFound] a new instance of EncodingFound
- #
- # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#18
- def initialize(encoding); end
-
- # Returns the value of attribute found_encoding.
- #
- # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#16
- def found_encoding; end
-end
-
-# source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#46
-class Nokogiri::HTML4::EncodingReader::JumpSAXHandler < ::Nokogiri::HTML4::EncodingReader::SAXHandler
- # @return [JumpSAXHandler] a new instance of JumpSAXHandler
- #
- # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#47
- def initialize(jumptag); end
-
- # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#52
- def start_element(name, attrs = T.unsafe(nil)); end
-end
-
-# source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#24
-class Nokogiri::HTML4::EncodingReader::SAXHandler < ::Nokogiri::XML::SAX::Document
- # @return [SAXHandler] a new instance of SAXHandler
- #
- # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#27
- def initialize; end
-
- # Returns the value of attribute encoding.
- #
- # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#25
- def encoding; end
-
- # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#32
- def start_element(name, attrs = T.unsafe(nil)); end
-end
-
-# source://nokogiri//lib/nokogiri/html4/entity_lookup.rb#5
-class Nokogiri::HTML4::EntityDescription < ::Struct; end
-
-# source://nokogiri//lib/nokogiri/html4/entity_lookup.rb#7
-class Nokogiri::HTML4::EntityLookup
- # Look up entity with +name+
- #
- # source://nokogiri//lib/nokogiri/html4/entity_lookup.rb#10
- def [](name); end
-
- def get(_arg0); end
-end
-
-# Instance of Nokogiri::HTML4::EntityLookup
-#
-# source://nokogiri//lib/nokogiri/html4.rb#35
-Nokogiri::HTML4::NamedCharacters = T.let(T.unsafe(nil), Nokogiri::HTML4::EntityLookup)
-
-# Nokogiri lets you write a SAX parser to process HTML but get HTML correction features.
-#
-# See Nokogiri::HTML4::SAX::Parser for a basic example of using a SAX parser with HTML.
-#
-# For more information on SAX parsers, see Nokogiri::XML::SAX
-#
-# source://nokogiri//lib/nokogiri/html4/sax/parser_context.rb#5
-module Nokogiri::HTML4::SAX; end
-
-# This class lets you perform SAX style parsing on HTML with HTML error correction.
-#
-# Here is a basic usage example:
-#
-# class MyDoc < Nokogiri::XML::SAX::Document
-# def start_element name, attributes = []
-# puts "found a #{name}"
-# end
-# end
-#
-# parser = Nokogiri::HTML4::SAX::Parser.new(MyDoc.new)
-# parser.parse(File.read(ARGV[0], mode: 'rb'))
-#
-# For more information on SAX parsers, see Nokogiri::XML::SAX
-#
-# source://nokogiri//lib/nokogiri/html4/sax/parser.rb#27
-class Nokogiri::HTML4::SAX::Parser < ::Nokogiri::XML::SAX::Parser
- # Parse a file with +filename+
- #
- # @raise [ArgumentError]
- # @yield [ctx]
- #
- # source://nokogiri//lib/nokogiri/html4/sax/parser.rb#51
- def parse_file(filename, encoding = T.unsafe(nil)); end
-
- # Parse given +io+
- #
- # @yield [ctx]
- #
- # source://nokogiri//lib/nokogiri/html4/sax/parser.rb#41
- def parse_io(io, encoding = T.unsafe(nil)); end
-
- # Parse html stored in +data+ using +encoding+
- #
- # @raise [TypeError]
- # @yield [ctx]
- #
- # source://nokogiri//lib/nokogiri/html4/sax/parser.rb#30
- def parse_memory(data, encoding = T.unsafe(nil)); end
-end
-
-# Context for HTML SAX parsers. This class is usually not instantiated by the user. Instead,
-# you should be looking at Nokogiri::HTML4::SAX::Parser
-#
-# source://nokogiri//lib/nokogiri/html4/sax/parser_context.rb#9
-class Nokogiri::HTML4::SAX::ParserContext < ::Nokogiri::XML::SAX::ParserContext
- def parse_with(_arg0); end
-
- class << self
- def file(_arg0, _arg1); end
- def memory(_arg0, _arg1); end
-
- # source://nokogiri//lib/nokogiri/html4/sax/parser_context.rb#10
- def new(thing, encoding = T.unsafe(nil)); end
- end
-end
-
-# source://nokogiri//lib/nokogiri/html4/sax/push_parser.rb#6
-class Nokogiri::HTML4::SAX::PushParser < ::Nokogiri::XML::SAX::PushParser
- # @return [PushParser] a new instance of PushParser
- #
- # source://nokogiri//lib/nokogiri/html4/sax/push_parser.rb#11
- def initialize(doc = T.unsafe(nil), file_name = T.unsafe(nil), encoding = T.unsafe(nil)); end
-
- # Write a +chunk+ of HTML to the PushParser. Any callback methods
- # that can be called will be called immediately.
- #
- # source://nokogiri//lib/nokogiri/html4/sax/push_parser.rb#23
- def <<(chunk, last_chunk = T.unsafe(nil)); end
-
- # The Nokogiri::HTML4::SAX::Document on which the PushParser will be
- # operating
- #
- # source://nokogiri//lib/nokogiri/html4/sax/push_parser.rb#9
- def document; end
-
- # The Nokogiri::HTML4::SAX::Document on which the PushParser will be
- # operating
- #
- # source://nokogiri//lib/nokogiri/html4/sax/push_parser.rb#9
- def document=(_arg0); end
-
- # Finish the parsing. This method is only necessary for
- # Nokogiri::HTML4::SAX::Document#end_document to be called.
- #
- # source://nokogiri//lib/nokogiri/html4/sax/push_parser.rb#31
- def finish; end
-
- # Write a +chunk+ of HTML to the PushParser. Any callback methods
- # that can be called will be called immediately.
- #
- # source://nokogiri//lib/nokogiri/html4/sax/push_parser.rb#23
- def write(chunk, last_chunk = T.unsafe(nil)); end
-
- private
-
- def initialize_native(_arg0, _arg1, _arg2); end
- def native_write(_arg0, _arg1); end
-end
-
-# == Usage
-#
-# ⚠ HTML5 functionality is not available when running JRuby.
-#
-# Parse an HTML5 document:
-#
-# doc = Nokogiri.HTML5(string)
-#
-# Parse an HTML5 fragment:
-#
-# fragment = Nokogiri::HTML5.fragment(string)
-#
-# == Parsing options
-#
-# The document and fragment parsing methods support options that are different from Nokogiri's.
-#
-# - Nokogiri.HTML5(html, url = nil, encoding = nil, options = {})
-# - Nokogiri::HTML5.parse(html, url = nil, encoding = nil, options = {})
-# - Nokogiri::HTML5::Document.parse(html, url = nil, encoding = nil, options = {})
-# - Nokogiri::HTML5.fragment(html, encoding = nil, options = {})
-# - Nokogiri::HTML5::DocumentFragment.parse(html, encoding = nil, options = {})
-#
-# The three currently supported options are +:max_errors+, +:max_tree_depth+ and
-# +:max_attributes+, described below.
-#
-# === Error reporting
-#
-# Nokogiri contains an experimental HTML5 parse error reporting facility. By default, no parse
-# errors are reported but this can be configured by passing the +:max_errors+ option to
-# {HTML5.parse} or {HTML5.fragment}.
-#
-# For example, this script:
-#
-# doc = Nokogiri::HTML5.parse('Hi there!', max_errors: 10)
-# doc.errors.each do |err|
-# puts(err)
-# end
-#
-# Emits:
-#
-# 1:1: ERROR: Expected a doctype token
-# Hi there!
-# ^
-# 1:1: ERROR: Start tag of nonvoid HTML element ends with '/>', use '>'.
-# Hi there!
-# ^
-# 1:17: ERROR: End tag ends with '/>', use '>'.
-# Hi there!
-# ^
-# 1:17: ERROR: End tag contains attributes.
-# Hi there!
-# ^
-#
-# Using max_errors: -1 results in an unlimited number of errors being returned.
-#
-# The errors returned by {HTML5::Document#errors} are instances of {Nokogiri::XML::SyntaxError}.
-#
-# The {https://html.spec.whatwg.org/multipage/parsing.html#parse-errors HTML standard} defines a
-# number of standard parse error codes. These error codes only cover the "tokenization" stage of
-# parsing HTML. The parse errors in the "tree construction" stage do not have standardized error
-# codes (yet).
-#
-# As a convenience to Nokogiri users, the defined error codes are available via
-# {Nokogiri::XML::SyntaxError#str1} method.
-#
-# doc = Nokogiri::HTML5.parse('Hi there!', max_errors: 10)
-# doc.errors.each do |err|
-# puts("#{err.line}:#{err.column}: #{err.str1}")
-# end
-# # => 1:1: generic-parser
-# # 1:1: non-void-html-element-start-tag-with-trailing-solidus
-# # 1:17: end-tag-with-trailing-solidus
-# # 1:17: end-tag-with-attributes
-#
-# Note that the first error is +generic-parser+ because it's an error from the tree construction
-# stage and doesn't have a standardized error code.
-#
-# For the purposes of semantic versioning, the error messages, error locations, and error codes
-# are not part of Nokogiri's public API. That is, these are subject to change without Nokogiri's
-# major version number changing. These may be stabilized in the future.
-#
-# === Maximum tree depth
-#
-# The maximum depth of the DOM tree parsed by the various parsing methods is configurable by the
-# +:max_tree_depth+ option. If the depth of the tree would exceed this limit, then an
-# {::ArgumentError} is thrown.
-#
-# This limit (which defaults to Nokogiri::Gumbo::DEFAULT_MAX_TREE_DEPTH = 400) can be
-# removed by giving the option max_tree_depth: -1.
-#
-# html = '' + '' * 1000
-# doc = Nokogiri.HTML5(html)
-# # raises ArgumentError: Document tree depth limit exceeded
-# doc = Nokogiri.HTML5(html, max_tree_depth: -1)
-#
-# === Attribute limit per element
-#
-# The maximum number of attributes per DOM element is configurable by the +:max_attributes+
-# option. If a given element would exceed this limit, then an {::ArgumentError} is thrown.
-#
-# This limit (which defaults to
Nokogiri::Gumbo::DEFAULT_MAX_ATTRIBUTES = 400) can be
-# removed by giving the option
max_attributes: -1.
-#
-# html = '
'
-# # "
"
-# doc = Nokogiri.HTML5(html)
-# # raises ArgumentError: Attributes per element limit exceeded
-# doc = Nokogiri.HTML5(html, max_attributes: -1)
-#
-# == HTML Serialization
-#
-# After parsing HTML, it may be serialized using any of the {Nokogiri::XML::Node} serialization
-# methods. In particular, {XML::Node#serialize}, {XML::Node#to_html}, and {XML::Node#to_s} will
-# serialize a given node and its children. (This is the equivalent of JavaScript's
-# +Element.outerHTML+.) Similarly, {XML::Node#inner_html} will serialize the children of a given
-# node. (This is the equivalent of JavaScript's +Element.innerHTML+.)
-#
-# doc = Nokogiri::HTML5("
Hello world!")
-# puts doc.serialize
-# # =>
Hello world!
-#
-# Due to quirks in how HTML is parsed and serialized, it's possible for a DOM tree to be
-# serialized and then re-parsed, resulting in a different DOM. Mostly, this happens with DOMs
-# produced from invalid HTML. Unfortunately, even valid HTML may not survive serialization and
-# re-parsing.
-#
-# In particular, a newline at the start of +pre+, +listing+, and +textarea+ elements is ignored by
-# the parser.
-#
-# doc = Nokogiri::HTML5(<<-EOF)
-#
-#
-# Content
-# EOF
-# puts doc.at('/html/body/pre').serialize
-# # =>
Content
-#
-# In this case, the original HTML is semantically equivalent to the serialized version. If the
-# +pre+, +listing+, or +textarea+ content starts with two newlines, the first newline will be
-# stripped on the first parse and the second newline will be stripped on the second, leading to
-# semantically different DOMs. Passing the parameter
preserve_newline: true will cause
-# two or more newlines to be preserved. (A single leading newline will still be removed.)
-#
-# doc = Nokogiri::HTML5(<<-EOF)
-#
-#
-#
-# Content
-# EOF
-# puts doc.at('/html/body/listing').serialize(preserve_newline: true)
-# # =>
-# #
-# # Content
-#
-# == Encodings
-#
-# Nokogiri always parses HTML5 using {https://en.wikipedia.org/wiki/UTF-8 UTF-8}; however, the
-# encoding of the input can be explicitly selected via the optional +encoding+ parameter. This is
-# most useful when the input comes not from a string but from an IO object.
-#
-# When serializing a document or node, the encoding of the output string can be specified via the
-# +:encoding+ options. Characters that cannot be encoded in the selected encoding will be encoded
-# as {https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references HTML numeric
-# entities}.
-#
-# frag = Nokogiri::HTML5.fragment('
아는 길도 물어가라')
-# puts html
-# # =>
아는 길도 물어가라
-# frag = Nokogiri::HTML5.fragment(html)
-# puts frag.serialize
-# # =>
아는 길도 물어가라
-#
-# (There's a {https://bugs.ruby-lang.org/issues/15033 bug} in all current versions of Ruby that
-# can cause the entity encoding to fail. Of the mandated supported encodings for HTML, the only
-# encoding I'm aware of that has this bug is
'ISO-2022-JP'. We recommend avoiding this
-# encoding.)
-#
-# == Notes
-#
-# * The {Nokogiri::HTML5.fragment} function takes a string and parses it
-# as a HTML5 document. The ++, ++, and ++ elements are
-# removed from this document, and any children of these elements that remain
-# are returned as a {Nokogiri::HTML5::DocumentFragment}.
-#
-# * The {Nokogiri::HTML5.parse} function takes a string and passes it to the
-#
gumbo_parse_with_options method, using the default options.
-# The resulting Gumbo parse tree is then walked.
-#
-# * Instead of uppercase element names, lowercase element names are produced.
-#
-# * Instead of returning +unknown+ as the element name for unknown tags, the
-# original tag name is returned verbatim.
-#
-# Since v1.12.0
-#
-# source://nokogiri//lib/nokogiri/html5/document.rb#23
-module Nokogiri::HTML5
- class << self
- # Parse a fragment from +string+. Convenience method for
- # {Nokogiri::HTML5::DocumentFragment.parse}.
- #
- # source://nokogiri//lib/nokogiri/html5.rb#238
- def fragment(string, encoding = T.unsafe(nil), **options); end
-
- # Fetch and parse a HTML document from the web, following redirects,
- # handling https, and determining the character encoding using HTML5
- # rules. +uri+ may be a +String+ or a +URI+. +options+ contains
- # http headers and special options. Everything which is not a
- # special option is considered a header. Special options include:
- # * :follow_limit => number of redirects which are followed
- # * :basic_auth => [username, password]
- #
- # source://nokogiri//lib/nokogiri/html5.rb#249
- def get(uri, options = T.unsafe(nil)); end
-
- # Parse an HTML 5 document. Convenience method for {Nokogiri::HTML5::Document.parse}
- #
- # source://nokogiri//lib/nokogiri/html5.rb#232
- def parse(string, url = T.unsafe(nil), encoding = T.unsafe(nil), **options, &block); end
-
- # source://nokogiri//lib/nokogiri/html5.rb#260
- def read_and_encode(string, encoding); end
-
- private
-
- # source://nokogiri//lib/nokogiri/html5.rb#286
- def get_impl(uri, options = T.unsafe(nil)); end
-
- # Charset sniffing is a complex and controversial topic that understandably isn't done _by
- # default_ by the Ruby Net::HTTP library. This being said, it is a very real problem for
- # consumers of HTML as the default for HTML is iso-8859-1, most "good" producers use utf-8, and
- # the Gumbo parser *only* supports utf-8.
- #
- # Accordingly, Nokogiri::HTML4::Document.parse provides limited encoding detection. Following
- # this lead, Nokogiri::HTML5 attempts to do likewise, while attempting to more closely follow
- # the HTML5 standard.
- #
- # http://bugs.ruby-lang.org/issues/2567
- # http://www.w3.org/TR/html5/syntax.html#determining-the-character-encoding
- #
- # source://nokogiri//lib/nokogiri/html5.rb#347
- def reencode(body, content_type = T.unsafe(nil)); end
- end
-end
-
-# Since v1.12.0
-#
-# 💡 HTML5 functionality is not available when running JRuby.
-#
-# source://nokogiri//lib/nokogiri/html5/document.rb#39
-class Nokogiri::HTML5::Document < ::Nokogiri::HTML4::Document
- # @return [Document] a new instance of Document
- #
- # source://nokogiri//lib/nokogiri/html5/document.rb#129
- def initialize(*args); end
-
- # :call-seq:
- # fragment() → Nokogiri::HTML5::DocumentFragment
- # fragment(markup) → Nokogiri::HTML5::DocumentFragment
- #
- # Parse a HTML5 document fragment from +markup+, returning a Nokogiri::HTML5::DocumentFragment.
- #
- # [Properties]
- # - +markup+ (String) The HTML5 markup fragment to be parsed
- #
- # [Returns]
- # Nokogiri::HTML5::DocumentFragment. This object's children will be empty if `markup` is not passed, is empty, or is `nil`.
- #
- # source://nokogiri//lib/nokogiri/html5/document.rb#147
- def fragment(markup = T.unsafe(nil)); end
-
- # Get the parser's quirks mode value. See HTML5::QuirksMode.
- #
- # This method returns `nil` if the parser was not invoked (e.g., `Nokogiri::HTML5::Document.new`).
- #
- # Since v1.14.0
- #
- # source://nokogiri//lib/nokogiri/html5/document.rb#49
- def quirks_mode; end
-
- # source://nokogiri//lib/nokogiri/html5/document.rb#151
- def to_xml(options = T.unsafe(nil), &block); end
-
- # Get the url name for this document, as passed into Document.parse, Document.read_io, or
- # Document.read_memory
- #
- # source://nokogiri//lib/nokogiri/html5/document.rb#42
- def url; end
-
- # :call-seq:
- # xpath_doctype() → Nokogiri::CSS::XPathVisitor::DoctypeConfig
- #
- # [Returns] The document type which determines CSS-to-XPath translation.
- #
- # See CSS::XPathVisitor for more information.
- #
- # source://nokogiri//lib/nokogiri/html5/document.rb#163
- def xpath_doctype; end
-
- class << self
- # :call-seq:
- # parse(input)
- # parse(input, url=nil, encoding=nil, **options)
- # parse(input, url=nil, encoding=nil) { |options| ... }
- #
- # Parse HTML5 input.
- #
- # [Parameters]
- # - +input+ may be a String, or any object that responds to _read_ and _close_ such as an
- # IO, or StringIO.
- #
- # - +url+ (optional) is a String indicating the canonical URI where this document is located.
- #
- # - +encoding+ (optional) is the encoding that should be used when processing
- # the document.
- #
- # - +options+ (optional) is a configuration Hash (or keyword arguments) to set options
- # during parsing. The three currently supported options are +:max_errors+,
- # +:max_tree_depth+ and +:max_attributes+, described at Nokogiri::HTML5.
- #
- # ⚠ Note that these options are different than those made available by
- # Nokogiri::XML::Document and Nokogiri::HTML4::Document.
- #
- # - +block+ (optional) is passed a configuration Hash on which parse options may be set. See
- # Nokogiri::HTML5 for more information and usage.
- #
- # [Returns] Nokogiri::HTML5::Document
- #
- # @yield [options]
- #
- # source://nokogiri//lib/nokogiri/html5/document.rb#80
- def parse(string_or_io, url = T.unsafe(nil), encoding = T.unsafe(nil), **options, &block); end
-
- # Create a new document from an IO object.
- #
- # 💡 Most users should prefer Document.parse to this method.
- #
- # @raise [ArgumentError]
- #
- # source://nokogiri//lib/nokogiri/html5/document.rb#101
- def read_io(io, url = T.unsafe(nil), encoding = T.unsafe(nil), **options); end
-
- # Create a new document from a String.
- #
- # 💡 Most users should prefer Document.parse to this method.
- #
- # @raise [ArgumentError]
- #
- # source://nokogiri//lib/nokogiri/html5/document.rb#110
- def read_memory(string, url = T.unsafe(nil), encoding = T.unsafe(nil), **options); end
-
- private
-
- # source://nokogiri//lib/nokogiri/html5/document.rb#118
- def do_parse(string_or_io, url, encoding, options); end
- end
-end
-
-# Since v1.12.0
-#
-# 💡 HTML5 functionality is not available when running JRuby.
-#
-# source://nokogiri//lib/nokogiri/html5/document_fragment.rb#27
-class Nokogiri::HTML5::DocumentFragment < ::Nokogiri::HTML4::DocumentFragment
- # Create a document fragment.
- #
- # @return [DocumentFragment] a new instance of DocumentFragment
- #
- # source://nokogiri//lib/nokogiri/html5/document_fragment.rb#39
- def initialize(doc, tags = T.unsafe(nil), ctx = T.unsafe(nil), options = T.unsafe(nil)); end
-
- # Returns the value of attribute document.
- #
- # source://nokogiri//lib/nokogiri/html5/document_fragment.rb#28
- def document; end
-
- # Sets the attribute document
- #
- # @param value the value to set the attribute document to.
- #
- # source://nokogiri//lib/nokogiri/html5/document_fragment.rb#28
- def document=(_arg0); end
-
- # Returns the value of attribute errors.
- #
- # source://nokogiri//lib/nokogiri/html5/document_fragment.rb#29
- def errors; end
-
- # Sets the attribute errors
- #
- # @param value the value to set the attribute errors to.
- #
- # source://nokogiri//lib/nokogiri/html5/document_fragment.rb#29
- def errors=(_arg0); end
-
- # source://nokogiri//lib/nokogiri/html5/document_fragment.rb#65
- def extract_params(params); end
-
- # Get the parser's quirks mode value. See HTML5::QuirksMode.
- #
- # This method returns `nil` if the parser was not invoked (e.g., `Nokogiri::HTML5::DocumentFragment.new(doc)`).
- #
- # Since v1.14.0
- #
- # source://nokogiri//lib/nokogiri/html5/document_fragment.rb#36
- def quirks_mode; end
-
- # source://nokogiri//lib/nokogiri/html5/document_fragment.rb#51
- def serialize(options = T.unsafe(nil), &block); end
-
- class << self
- # Parse a document fragment from +tags+, returning a Nodeset.
- #
- # source://nokogiri//lib/nokogiri/html5/document_fragment.rb#58
- def parse(tags, encoding = T.unsafe(nil), options = T.unsafe(nil)); end
- end
-end
-
-# Since v1.12.0
-#
-# 💡 HTML5 functionality is not available when running JRuby.
-#
-# source://nokogiri//lib/nokogiri/html5/node.rb#30
-module Nokogiri::HTML5::Node
- # source://nokogiri//lib/nokogiri/html5/node.rb#70
- def fragment(tags); end
-
- # source://nokogiri//lib/nokogiri/html5/node.rb#31
- def inner_html(options = T.unsafe(nil)); end
-
- # @yield [config]
- #
- # source://nokogiri//lib/nokogiri/html5/node.rb#39
- def write_to(io, *options); end
-
- private
-
- # HTML elements can have attributes that contain colons.
- # Nokogiri::XML::Node#[]= treats names with colons as a prefixed QName
- # and tries to create an attribute in a namespace. This is especially
- # annoying with attribute names like xml:lang since libxml2 will
- # actually create the xml namespace if it doesn't exist already.
- #
- # source://nokogiri//lib/nokogiri/html5/node.rb#83
- def add_child_node_and_reparent_attrs(node); end
-end
-
-# Enum for the HTML5 parser quirks mode values. Values returned by HTML5::Document#quirks_mode
-#
-# See https://dom.spec.whatwg.org/#concept-document-quirks for more information on HTML5 quirks
-# mode.
-#
-# Since v1.14.0
-#
-# source://nokogiri//lib/nokogiri/html5/document.rb#30
-module Nokogiri::HTML5::QuirksMode; end
-
-# The document was parsed in "limited-quirks" mode
-#
-# source://nokogiri//lib/nokogiri/html5/document.rb#33
-Nokogiri::HTML5::QuirksMode::LIMITED_QUIRKS = T.let(T.unsafe(nil), Integer)
-
-# The document was parsed in "no-quirks" mode
-#
-# source://nokogiri//lib/nokogiri/html5/document.rb#31
-Nokogiri::HTML5::QuirksMode::NO_QUIRKS = T.let(T.unsafe(nil), Integer)
-
-# The document was parsed in "quirks" mode
-#
-# source://nokogiri//lib/nokogiri/html5/document.rb#32
-Nokogiri::HTML5::QuirksMode::QUIRKS = T.let(T.unsafe(nil), Integer)
-
-Nokogiri::LIBXML2_PATCHES = T.let(T.unsafe(nil), Array)
-Nokogiri::LIBXML_COMPILED_VERSION = T.let(T.unsafe(nil), String)
-Nokogiri::LIBXML_ICONV_ENABLED = T.let(T.unsafe(nil), TrueClass)
-Nokogiri::LIBXML_LOADED_VERSION = T.let(T.unsafe(nil), String)
-Nokogiri::LIBXML_MEMORY_MANAGEMENT = T.let(T.unsafe(nil), String)
-Nokogiri::LIBXSLT_COMPILED_VERSION = T.let(T.unsafe(nil), String)
-Nokogiri::LIBXSLT_DATETIME_ENABLED = T.let(T.unsafe(nil), TrueClass)
-Nokogiri::LIBXSLT_LOADED_VERSION = T.let(T.unsafe(nil), String)
-Nokogiri::LIBXSLT_PATCHES = T.let(T.unsafe(nil), Array)
-Nokogiri::OTHER_LIBRARY_VERSIONS = T.let(T.unsafe(nil), String)
-Nokogiri::PACKAGED_LIBRARIES = T.let(T.unsafe(nil), TrueClass)
-Nokogiri::PRECOMPILED_LIBRARIES = T.let(T.unsafe(nil), TrueClass)
-
-# source://nokogiri//lib/nokogiri/syntax_error.rb#4
-class Nokogiri::SyntaxError < ::StandardError; end
-
-module Nokogiri::Test
- class << self
- def __foreign_error_handler; end
- end
-end
-
-# The version of Nokogiri you are using
-#
-# source://nokogiri//lib/nokogiri/version/constant.rb#5
-Nokogiri::VERSION = T.let(T.unsafe(nil), String)
-
-# Detailed version info about Nokogiri and the installed extension dependencies.
-#
-# source://nokogiri//lib/nokogiri/version/info.rb#222
-Nokogiri::VERSION_INFO = T.let(T.unsafe(nil), Hash)
-
-# source://nokogiri//lib/nokogiri/version/info.rb#7
-class Nokogiri::VersionInfo
- include ::Singleton
- extend ::Singleton::SingletonClassMethods
-
- # source://nokogiri//lib/nokogiri/version/info.rb#33
- def compiled_libxml_version; end
-
- # source://nokogiri//lib/nokogiri/version/info.rb#44
- def compiled_libxslt_version; end
-
- # source://nokogiri//lib/nokogiri/version/info.rb#22
- def engine; end
-
- # @return [Boolean]
- #
- # source://nokogiri//lib/nokogiri/version/info.rb#10
- def jruby?; end
-
- # @return [Boolean]
- #
- # source://nokogiri//lib/nokogiri/version/info.rb#48
- def libxml2?; end
-
- # @return [Boolean]
- #
- # source://nokogiri//lib/nokogiri/version/info.rb#52
- def libxml2_has_iconv?; end
-
- # @return [Boolean]
- #
- # source://nokogiri//lib/nokogiri/version/info.rb#68
- def libxml2_precompiled?; end
-
- # @return [Boolean]
- #
- # source://nokogiri//lib/nokogiri/version/info.rb#60
- def libxml2_using_packaged?; end
-
- # @return [Boolean]
- #
- # source://nokogiri//lib/nokogiri/version/info.rb#64
- def libxml2_using_system?; end
-
- # @return [Boolean]
- #
- # source://nokogiri//lib/nokogiri/version/info.rb#56
- def libxslt_has_datetime?; end
-
- # source://nokogiri//lib/nokogiri/version/info.rb#26
- def loaded_libxml_version; end
-
- # source://nokogiri//lib/nokogiri/version/info.rb#37
- def loaded_libxslt_version; end
-
- # source://nokogiri//lib/nokogiri/version/info.rb#18
- def ruby_minor; end
-
- # source://nokogiri//lib/nokogiri/version/info.rb#88
- def to_hash; end
-
- # source://nokogiri//lib/nokogiri/version/info.rb#180
- def to_markdown; end
-
- # source://nokogiri//lib/nokogiri/version/info.rb#72
- def warnings; end
-
- # @return [Boolean]
- #
- # source://nokogiri//lib/nokogiri/version/info.rb#14
- def windows?; end
-
- class << self
- private
-
- def allocate; end
- def new(*_arg0); end
- end
-end
-
-# source://nokogiri//lib/nokogiri/xml.rb#12
-module Nokogiri::XML
- class << self
- # Parse an XML document using the Nokogiri::XML::Reader API. See
- # Nokogiri::XML::Reader for mor information
- #
- # @yield [options]
- #
- # source://nokogiri//lib/nokogiri/xml.rb#23
- def Reader(string_or_io, url = T.unsafe(nil), encoding = T.unsafe(nil), options = T.unsafe(nil)); end
-
- # Create a new Nokogiri::XML::RelaxNG document from +string_or_io+.
- # See Nokogiri::XML::RelaxNG for an example.
- #
- # source://nokogiri//lib/nokogiri/xml/relax_ng.rb#9
- def RelaxNG(string_or_io, options = T.unsafe(nil)); end
-
- # Create a new Nokogiri::XML::Schema object using a +string_or_io+
- # object.
- #
- # source://nokogiri//lib/nokogiri/xml/schema.rb#9
- def Schema(string_or_io, options = T.unsafe(nil)); end
-
- # Parse a fragment from +string+ in to a NodeSet.
- #
- # source://nokogiri//lib/nokogiri/xml.rb#42
- def fragment(string, options = T.unsafe(nil), &block); end
-
- # Parse XML. Convenience method for Nokogiri::XML::Document.parse
- #
- # source://nokogiri//lib/nokogiri/xml.rb#36
- def parse(thing, url = T.unsafe(nil), encoding = T.unsafe(nil), options = T.unsafe(nil), &block); end
- end
-end
-
-# source://nokogiri//lib/nokogiri/xml/attr.rb#6
-class Nokogiri::XML::Attr < ::Nokogiri::XML::Node
- def content=(_arg0); end
-
- # :call-seq: deconstruct_keys(array_of_names) → Hash
- #
- # Returns a hash describing the Attr, to use in pattern matching.
- #
- # Valid keys and their values:
- # - +name+ → (String) The name of the attribute.
- # - +value+ → (String) The value of the attribute.
- # - +namespace+ → (Namespace, nil) The Namespace of the attribute, or +nil+ if there is no namespace.
- #
- # ⚡ This is an experimental feature, available since v1.14.0
- #
- # *Example*
- #
- # doc = Nokogiri::XML.parse(<<~XML)
- #
- #
- #
- #
- # XML
- #
- # attributes = doc.root.elements.first.attribute_nodes
- # # => [#(Attr:0x35c { name = "foo", value = "abc" }),
- # # #(Attr:0x370 {
- # # name = "bar",
- # # namespace = #(Namespace:0x384 {
- # # prefix = "noko",
- # # href = "http://nokogiri.org/ns/noko"
- # # }),
- # # value = "def"
- # # })]
- #
- # attributes.first.deconstruct_keys([:name, :value, :namespace])
- # # => {:name=>"foo", :value=>"abc", :namespace=>nil}
- #
- # attributes.last.deconstruct_keys([:name, :value, :namespace])
- # # => {:name=>"bar",
- # # :value=>"def",
- # # :namespace=>
- # # #(Namespace:0x384 {
- # # prefix = "noko",
- # # href = "http://nokogiri.org/ns/noko"
- # # })}
- #
- # source://nokogiri//lib/nokogiri/xml/attr.rb#55
- def deconstruct_keys(keys); end
-
- def to_s; end
- def value; end
- def value=(_arg0); end
-
- private
-
- # source://nokogiri//lib/nokogiri/xml/attr.rb#61
- def inspect_attributes; end
-
- class << self
- def new(*_arg0); end
- end
-end
-
-# Represents an attribute declaration in a DTD
-#
-# source://nokogiri//lib/nokogiri/xml/attribute_decl.rb#7
-class Nokogiri::XML::AttributeDecl < ::Nokogiri::XML::Node
- def attribute_type; end
- def default; end
- def enumeration; end
-
- private
-
- # source://nokogiri//lib/nokogiri/xml/attribute_decl.rb#17
- def inspect_attributes; end
-end
-
-# Nokogiri builder can be used for building XML and HTML documents.
-#
-# == Synopsis:
-#
-# builder = Nokogiri::XML::Builder.new do |xml|
-# xml.root {
-# xml.products {
-# xml.widget {
-# xml.id_ "10"
-# xml.name "Awesome widget"
-# }
-# }
-# }
-# end
-# puts builder.to_xml
-#
-# Will output:
-#
-#
-#
-#
-#
-# 10
-# Awesome widget
-#
-#
-#
-#
-#
-# === Builder scope
-#
-# The builder allows two forms. When the builder is supplied with a block
-# that has a parameter, the outside scope is maintained. This means you
-# can access variables that are outside your builder. If you don't need
-# outside scope, you can use the builder without the "xml" prefix like
-# this:
-#
-# builder = Nokogiri::XML::Builder.new do
-# root {
-# products {
-# widget {
-# id_ "10"
-# name "Awesome widget"
-# }
-# }
-# }
-# end
-#
-# == Special Tags
-#
-# The builder works by taking advantage of method_missing. Unfortunately
-# some methods are defined in ruby that are difficult or dangerous to
-# remove. You may want to create tags with the name "type", "class", and
-# "id" for example. In that case, you can use an underscore to
-# disambiguate your tag name from the method call.
-#
-# Here is an example of using the underscore to disambiguate tag names from
-# ruby methods:
-#
-# @objects = [Object.new, Object.new, Object.new]
-#
-# builder = Nokogiri::XML::Builder.new do |xml|
-# xml.root {
-# xml.objects {
-# @objects.each do |o|
-# xml.object {
-# xml.type_ o.type
-# xml.class_ o.class.name
-# xml.id_ o.id
-# }
-# end
-# }
-# }
-# end
-# puts builder.to_xml
-#
-# The underscore may be used with any tag name, and the last underscore
-# will just be removed. This code will output the following XML:
-#
-#
-#
-#
-#
-#
-#
-#
-#
-#
-# == Tag Attributes
-#
-# Tag attributes may be supplied as method arguments. Here is our
-# previous example, but using attributes rather than tags:
-#
-# @objects = [Object.new, Object.new, Object.new]
-#
-# builder = Nokogiri::XML::Builder.new do |xml|
-# xml.root {
-# xml.objects {
-# @objects.each do |o|
-# xml.object(:type => o.type, :class => o.class, :id => o.id)
-# end
-# }
-# }
-# end
-# puts builder.to_xml
-#
-# === Tag Attribute Short Cuts
-#
-# A couple attribute short cuts are available when building tags. The
-# short cuts are available by special method calls when building a tag.
-#
-# This example builds an "object" tag with the class attribute "classy"
-# and the id of "thing":
-#
-# builder = Nokogiri::XML::Builder.new do |xml|
-# xml.root {
-# xml.objects {
-# xml.object.classy.thing!
-# }
-# }
-# end
-# puts builder.to_xml
-#
-# Which will output:
-#
-#
-#
-#
-#
-#
-#
-#
-# All other options are still supported with this syntax, including
-# blocks and extra tag attributes.
-#
-# == Namespaces
-#
-# Namespaces are added similarly to attributes. Nokogiri::XML::Builder
-# assumes that when an attribute starts with "xmlns", it is meant to be
-# a namespace:
-#
-# builder = Nokogiri::XML::Builder.new { |xml|
-# xml.root('xmlns' => 'default', 'xmlns:foo' => 'bar') do
-# xml.tenderlove
-# end
-# }
-# puts builder.to_xml
-#
-# Will output XML like this:
-#
-#
-#
-#
-#
-#
-# === Referencing declared namespaces
-#
-# Tags that reference non-default namespaces (i.e. a tag "foo:bar") can be
-# built by using the Nokogiri::XML::Builder#[] method.
-#
-# For example:
-#
-# builder = Nokogiri::XML::Builder.new do |xml|
-# xml.root('xmlns:foo' => 'bar') {
-# xml.objects {
-# xml['foo'].object.classy.thing!
-# }
-# }
-# end
-# puts builder.to_xml
-#
-# Will output this XML:
-#
-#
-#
-#
-#
-#
-#
-#
-# Note the "foo:object" tag.
-#
-# === Namespace inheritance
-#
-# In the Builder context, children will inherit their parent's namespace. This is the same
-# behavior as if the underlying {XML::Document} set +namespace_inheritance+ to +true+:
-#
-# result = Nokogiri::XML::Builder.new do |xml|
-# xml["soapenv"].Envelope("xmlns:soapenv" => "http://schemas.xmlsoap.org/soap/envelope/") do
-# xml.Header
-# end
-# end
-# result.doc.to_xml
-# # =>
-# #
-# #
-# #
-#
-# Users may turn this behavior off by passing a keyword argument +namespace_inheritance:false+
-# to the initializer:
-#
-# result = Nokogiri::XML::Builder.new(namespace_inheritance: false) do |xml|
-# xml["soapenv"].Envelope("xmlns:soapenv" => "http://schemas.xmlsoap.org/soap/envelope/") do
-# xml.Header
-# xml["soapenv"].Body # users may explicitly opt into the namespace
-# end
-# end
-# result.doc.to_xml
-# # =>
-# #
-# #
-# #
-# #
-#
-# For more information on namespace inheritance, please see {XML::Document#namespace_inheritance}
-#
-#
-# == Document Types
-#
-# To create a document type (DTD), use the Builder#doc method to get
-# the current context document. Then call Node#create_internal_subset to
-# create the DTD node.
-#
-# For example, this Ruby:
-#
-# builder = Nokogiri::XML::Builder.new do |xml|
-# xml.doc.create_internal_subset(
-# 'html',
-# "-//W3C//DTD HTML 4.01 Transitional//EN",
-# "http://www.w3.org/TR/html4/loose.dtd"
-# )
-# xml.root do
-# xml.foo
-# end
-# end
-#
-# puts builder.to_xml
-#
-# Will output this xml:
-#
-#
-#
-#
-#
-#
-#
-# source://nokogiri//lib/nokogiri/xml/builder.rb#264
-class Nokogiri::XML::Builder
- include ::Nokogiri::ClassResolver
-
- # Create a new Builder object. +options+ are sent to the top level
- # Document that is being built.
- #
- # Building a document with a particular encoding for example:
- #
- # Nokogiri::XML::Builder.new(:encoding => 'UTF-8') do |xml|
- # ...
- # end
- #
- # @return [Builder] a new instance of Builder
- #
- # source://nokogiri//lib/nokogiri/xml/builder.rb#307
- def initialize(options = T.unsafe(nil), root = T.unsafe(nil), &block); end
-
- # Append the given raw XML +string+ to the document
- #
- # source://nokogiri//lib/nokogiri/xml/builder.rb#390
- def <<(string); end
-
- # Build a tag that is associated with namespace +ns+. Raises an
- # ArgumentError if +ns+ has not been defined higher in the tree.
- #
- # source://nokogiri//lib/nokogiri/xml/builder.rb#358
- def [](ns); end
-
- # source://nokogiri//lib/nokogiri/xml/builder.rb#278
- def arity; end
-
- # source://nokogiri//lib/nokogiri/xml/builder.rb#278
- def arity=(_arg0); end
-
- # Create a CDATA Node with content of +string+
- #
- # source://nokogiri//lib/nokogiri/xml/builder.rb#345
- def cdata(string); end
-
- # Create a Comment Node with content of +string+
- #
- # source://nokogiri//lib/nokogiri/xml/builder.rb#351
- def comment(string); end
-
- # A context object for use when the block has no arguments
- #
- # source://nokogiri//lib/nokogiri/xml/builder.rb#276
- def context; end
-
- # A context object for use when the block has no arguments
- #
- # source://nokogiri//lib/nokogiri/xml/builder.rb#276
- def context=(_arg0); end
-
- # The current Document object being built
- #
- # source://nokogiri//lib/nokogiri/xml/builder.rb#270
- def doc; end
-
- # The current Document object being built
- #
- # source://nokogiri//lib/nokogiri/xml/builder.rb#270
- def doc=(_arg0); end
-
- # source://nokogiri//lib/nokogiri/xml/builder.rb#394
- def method_missing(method, *args, &block); end
-
- # The parent of the current node being built
- #
- # source://nokogiri//lib/nokogiri/xml/builder.rb#273
- def parent; end
-
- # The parent of the current node being built
- #
- # source://nokogiri//lib/nokogiri/xml/builder.rb#273
- def parent=(_arg0); end
-
- # Create a Text Node with content of +string+
- #
- # source://nokogiri//lib/nokogiri/xml/builder.rb#339
- def text(string); end
-
- # Convert this Builder object to XML
- #
- # source://nokogiri//lib/nokogiri/xml/builder.rb#377
- def to_xml(*args); end
-
- private
-
- # Insert +node+ as a child of the current Node
- #
- # source://nokogiri//lib/nokogiri/xml/builder.rb#423
- def insert(node, &block); end
-
- class << self
- # Create a builder with an existing root object. This is for use when
- # you have an existing document that you would like to augment with
- # builder methods. The builder context created will start with the
- # given +root+ node.
- #
- # For example:
- #
- # doc = Nokogiri::XML(File.read('somedoc.xml'))
- # Nokogiri::XML::Builder.with(doc.at_css('some_tag')) do |xml|
- # # ... Use normal builder methods here ...
- # xml.awesome # add the "awesome" tag below "some_tag"
- # end
- #
- # source://nokogiri//lib/nokogiri/xml/builder.rb#294
- def with(root, &block); end
- end
-end
-
-# source://nokogiri//lib/nokogiri/xml/builder.rb#267
-Nokogiri::XML::Builder::DEFAULT_DOCUMENT_OPTIONS = T.let(T.unsafe(nil), Hash)
-
-# source://nokogiri//lib/nokogiri/xml/builder.rb#442
-class Nokogiri::XML::Builder::NodeBuilder
- # @return [NodeBuilder] a new instance of NodeBuilder
- #
- # source://nokogiri//lib/nokogiri/xml/builder.rb#443
- def initialize(node, doc_builder); end
-
- # source://nokogiri//lib/nokogiri/xml/builder.rb#452
- def [](k); end
-
- # source://nokogiri//lib/nokogiri/xml/builder.rb#448
- def []=(k, v); end
-
- # source://nokogiri//lib/nokogiri/xml/builder.rb#456
- def method_missing(method, *args, &block); end
-end
-
-# source://nokogiri//lib/nokogiri/xml/cdata.rb#5
-class Nokogiri::XML::CDATA < ::Nokogiri::XML::Text
- # Get the name of this CDATA node
- #
- # source://nokogiri//lib/nokogiri/xml/cdata.rb#8
- def name; end
-
- class << self
- def new(*_arg0); end
- end
-end
-
-# source://nokogiri//lib/nokogiri/xml/character_data.rb#5
-class Nokogiri::XML::CharacterData < ::Nokogiri::XML::Node
- include ::Nokogiri::XML::PP::CharacterData
-end
-
-class Nokogiri::XML::Comment < ::Nokogiri::XML::CharacterData
- class << self
- def new(*_arg0); end
- end
-end
-
-# source://nokogiri//lib/nokogiri/xml/dtd.rb#5
-class Nokogiri::XML::DTD < ::Nokogiri::XML::Node
- def attributes; end
-
- # source://nokogiri//lib/nokogiri/xml/dtd.rb#17
- def each; end
-
- def elements; end
- def entities; end
- def external_id; end
-
- # @return [Boolean]
- #
- # source://nokogiri//lib/nokogiri/xml/dtd.rb#27
- def html5_dtd?; end
-
- # @return [Boolean]
- #
- # source://nokogiri//lib/nokogiri/xml/dtd.rb#23
- def html_dtd?; end
-
- # source://nokogiri//lib/nokogiri/xml/dtd.rb#13
- def keys; end
-
- def notations; end
- def system_id; end
- def validate(_arg0); end
-end
-
-# Nokogiri::XML::Document is the main entry point for dealing with XML documents. The Document
-# is created by parsing an XML document. See Nokogiri::XML::Document.parse for more information
-# on parsing.
-#
-# For searching a Document, see Nokogiri::XML::Searchable#css and
-# Nokogiri::XML::Searchable#xpath
-#
-# source://nokogiri//lib/nokogiri/xml/document.rb#14
-class Nokogiri::XML::Document < ::Nokogiri::XML::Node
- # @return [Document] a new instance of Document
- #
- # source://nokogiri//lib/nokogiri/xml/document.rb#178
- def initialize(*args); end
-
- # source://nokogiri//lib/nokogiri/xml/document.rb#394
- def <<(node_or_tags); end
-
- # source://nokogiri//lib/nokogiri/xml/document.rb#394
- def add_child(node_or_tags); end
-
- def canonicalize(*_arg0); end
- def clone(*_arg0); end
-
- # :call-seq:
- # collect_namespaces() → Hash
- #
- # Recursively get all namespaces from this node and its subtree and return them as a
- # hash.
- #
- # ⚠ This method will not handle duplicate namespace prefixes, since the return value is a hash.
- #
- # Note that this method does an xpath lookup for nodes with namespaces, and as a result the
- # order (and which duplicate prefix "wins") may be dependent on the implementation of the
- # underlying XML library.
- #
- # *Example:* Basic usage
- #
- # Given this document:
- #
- #
- #
- #
- #
- # This method will return:
- #
- # {"xmlns:foo"=>"bar", "xmlns"=>"default", "xmlns:hello"=>"world"}
- #
- # *Example:* Duplicate prefixes
- #
- # Given this document:
- #
- #
- #
- #
- #
- # The hash returned will be something like:
- #
- # {"xmlns:foo" => "baz"}
- #
- # source://nokogiri//lib/nokogiri/xml/document.rb#317
- def collect_namespaces; end
-
- # Create a CDATA Node containing +string+
- #
- # source://nokogiri//lib/nokogiri/xml/document.rb#262
- def create_cdata(string, &block); end
-
- # Create a Comment Node containing +string+
- #
- # source://nokogiri//lib/nokogiri/xml/document.rb#267
- def create_comment(string, &block); end
-
- # :call-seq:
- # create_element(name, *contents_or_attrs, &block) → Nokogiri::XML::Element
- #
- # Create a new Element with `name` belonging to this document, optionally setting contents or
- # attributes.
- #
- # This method is _not_ the most user-friendly option if your intention is to add a node to the
- # document tree. Prefer one of the Nokogiri::XML::Node methods like Node#add_child,
- # Node#add_next_sibling, Node#replace, etc. which will both create an element (or subtree) and
- # place it in the document tree.
- #
- # Arguments may be passed to initialize the element:
- #
- # - a Hash argument will be used to set attributes
- # - a non-Hash object that responds to \#to_s will be used to set the new node's contents
- #
- # A block may be passed to mutate the node.
- #
- # [Parameters]
- # - `name` (String)
- # - `contents_or_attrs` (\#to_s, Hash)
- # [Yields] `node` (Nokogiri::XML::Element)
- # [Returns] Nokogiri::XML::Element
- #
- # *Example:* An empty element without attributes
- #
- # doc.create_element("div")
- # # =>
- #
- # *Example:* An element with contents
- #
- # doc.create_element("div", "contents")
- # # => contents
- #
- # *Example:* An element with attributes
- #
- # doc.create_element("div", {"class" => "container"})
- # # =>
- #
- # *Example:* An element with contents and attributes
- #
- # doc.create_element("div", "contents", {"class" => "container"})
- # # => contents
- #
- # *Example:* Passing a block to mutate the element
- #
- # doc.create_element("div") { |node| node["class"] = "blue" if before_noon? }
- #
- # source://nokogiri//lib/nokogiri/xml/document.rb#232
- def create_element(name, *contents_or_attrs, &block); end
-
- def create_entity(*_arg0); end
-
- # Create a Text Node with +string+
- #
- # source://nokogiri//lib/nokogiri/xml/document.rb#257
- def create_text_node(string, &block); end
-
- # :call-seq: deconstruct_keys(array_of_names) → Hash
- #
- # Returns a hash describing the Document, to use in pattern matching.
- #
- # Valid keys and their values:
- # - +root+ → (Node, nil) The root node of the Document, or +nil+ if the document is empty.
- #
- # In the future, other keys may allow accessing things like doctype and processing
- # instructions. If you have a use case and would like this functionality, please let us know
- # by opening an issue or a discussion on the github project.
- #
- # ⚡ This is an experimental feature, available since v1.14.0
- #
- # *Example*
- #
- # doc = Nokogiri::XML.parse(<<~XML)
- #
- #
- #
- #
- # XML
- #
- # doc.deconstruct_keys([:root])
- # # => {:root=>
- # # #(Element:0x35c {
- # # name = "root",
- # # children = [
- # # #(Text "\n" + " "),
- # # #(Element:0x370 { name = "child", children = [ #(Text "\n")] }),
- # # #(Text "\n")]
- # # })}
- #
- # *Example* of an empty document
- #
- # doc = Nokogiri::XML::Document.new
- #
- # doc.deconstruct_keys([:root])
- # # => {:root=>nil}
- #
- # source://nokogiri//lib/nokogiri/xml/document.rb#458
- def deconstruct_keys(keys); end
-
- # Apply any decorators to +node+
- #
- # source://nokogiri//lib/nokogiri/xml/document.rb#365
- def decorate(node); end
-
- # Get the list of decorators given +key+
- #
- # source://nokogiri//lib/nokogiri/xml/document.rb#324
- def decorators(key); end
-
- # A reference to +self+
- #
- # source://nokogiri//lib/nokogiri/xml/document.rb#277
- def document; end
-
- def dup(*_arg0); end
- def encoding; end
- def encoding=(_arg0); end
-
- # The errors found while parsing a document.
- #
- # [Returns] Array
- #
- # source://nokogiri//lib/nokogiri/xml/document.rb#128
- def errors; end
-
- # The errors found while parsing a document.
- #
- # [Returns] Array
- #
- # source://nokogiri//lib/nokogiri/xml/document.rb#128
- def errors=(_arg0); end
-
- # Create a Nokogiri::XML::DocumentFragment from +tags+
- # Returns an empty fragment if +tags+ is nil.
- #
- # source://nokogiri//lib/nokogiri/xml/document.rb#386
- def fragment(tags = T.unsafe(nil)); end
-
- # The name of this document. Always returns "document"
- #
- # source://nokogiri//lib/nokogiri/xml/document.rb#272
- def name; end
-
- # When `true`, reparented elements without a namespace will inherit their new parent's
- # namespace (if one exists). Defaults to `false`.
- #
- # [Returns] Boolean
- #
- # *Example:* Default behavior of namespace inheritance
- #
- # xml = <<~EOF
- #
- #
- #
- #
- # EOF
- # doc = Nokogiri::XML(xml)
- # parent = doc.at_xpath("//foo:parent", "foo" => "http://nokogiri.org/default_ns/test/foo")
- # parent.add_child("")
- # doc.to_xml
- # # =>
- # #
- # #
- # #
- # #
- # #
- #
- # *Example:* Setting namespace inheritance to `true`
- #
- # xml = <<~EOF
- #
- #
- #
- #
- # EOF
- # doc = Nokogiri::XML(xml)
- # doc.namespace_inheritance = true
- # parent = doc.at_xpath("//foo:parent", "foo" => "http://nokogiri.org/default_ns/test/foo")
- # parent.add_child("")
- # doc.to_xml
- # # =>
- # #
- # #
- # #
- # #
- # #
- #
- # Since v1.12.4
- #
- # source://nokogiri//lib/nokogiri/xml/document.rb#175
- def namespace_inheritance; end
-
- # When `true`, reparented elements without a namespace will inherit their new parent's
- # namespace (if one exists). Defaults to `false`.
- #
- # [Returns] Boolean
- #
- # *Example:* Default behavior of namespace inheritance
- #
- # xml = <<~EOF
- #
- #
- #
- #
- # EOF
- # doc = Nokogiri::XML(xml)
- # parent = doc.at_xpath("//foo:parent", "foo" => "http://nokogiri.org/default_ns/test/foo")
- # parent.add_child("")
- # doc.to_xml
- # # =>
- # #
- # #
- # #
- # #
- # #
- #
- # *Example:* Setting namespace inheritance to `true`
- #
- # xml = <<~EOF
- #
- #
- #
- #
- # EOF
- # doc = Nokogiri::XML(xml)
- # doc.namespace_inheritance = true
- # parent = doc.at_xpath("//foo:parent", "foo" => "http://nokogiri.org/default_ns/test/foo")
- # parent.add_child("")
- # doc.to_xml
- # # =>
- # #
- # #
- # #
- # #
- # #
- #
- # Since v1.12.4
- #
- # source://nokogiri//lib/nokogiri/xml/document.rb#175
- def namespace_inheritance=(_arg0); end
-
- # Get the hash of namespaces on the root Nokogiri::XML::Node
- #
- # source://nokogiri//lib/nokogiri/xml/document.rb#379
- def namespaces; end
-
- def remove_namespaces!; end
- def root; end
- def root=(_arg0); end
-
- # Explore a document with shortcut methods. See Nokogiri::Slop for details.
- #
- # Note that any nodes that have been instantiated before #slop!
- # is called will not be decorated with sloppy behavior. So, if you're in
- # irb, the preferred idiom is:
- #
- # irb> doc = Nokogiri::Slop my_markup
- #
- # and not
- #
- # irb> doc = Nokogiri::HTML my_markup
- # ... followed by irb's implicit inspect (and therefore instantiation of every node) ...
- # irb> doc.slop!
- # ... which does absolutely nothing.
- #
- # source://nokogiri//lib/nokogiri/xml/document.rb#354
- def slop!; end
-
- # source://nokogiri//lib/nokogiri/xml/node.rb#1280
- def to_xml(*args, &block); end
-
- def url; end
-
- # Validate this Document against it's DTD. Returns a list of errors on
- # the document or +nil+ when there is no DTD.
- #
- # source://nokogiri//lib/nokogiri/xml/document.rb#332
- def validate; end
-
- def version; end
-
- # :call-seq:
- # xpath_doctype() → Nokogiri::CSS::XPathVisitor::DoctypeConfig
- #
- # [Returns] The document type which determines CSS-to-XPath translation.
- #
- # See XPathVisitor for more information.
- #
- # source://nokogiri//lib/nokogiri/xml/document.rb#414
- def xpath_doctype; end
-
- private
-
- # source://nokogiri//lib/nokogiri/xml/document.rb#466
- def inspect_attributes; end
-
- class << self
- def new(*_arg0); end
-
- # Parse an XML file.
- #
- # +string_or_io+ may be a String, or any object that responds to
- # _read_ and _close_ such as an IO, or StringIO.
- #
- # +url+ (optional) is the URI where this document is located.
- #
- # +encoding+ (optional) is the encoding that should be used when processing
- # the document.
- #
- # +options+ (optional) is a configuration object that sets options during
- # parsing, such as Nokogiri::XML::ParseOptions::RECOVER. See the
- # Nokogiri::XML::ParseOptions for more information.
- #
- # +block+ (optional) is passed a configuration object on which
- # parse options may be set.
- #
- # By default, Nokogiri treats documents as untrusted, and so
- # does not attempt to load DTDs or access the network. See
- # Nokogiri::XML::ParseOptions for a complete list of options;
- # and that module's DEFAULT_XML constant for what's set (and not
- # set) by default.
- #
- # Nokogiri.XML() is a convenience method which will call this method.
- #
- # @yield [options]
- #
- # source://nokogiri//lib/nokogiri/xml/document.rb#48
- def parse(string_or_io, url = T.unsafe(nil), encoding = T.unsafe(nil), options = T.unsafe(nil)); end
-
- def read_io(_arg0, _arg1, _arg2, _arg3); end
- def read_memory(_arg0, _arg1, _arg2, _arg3); end
-
- private
-
- # @return [Boolean]
- #
- # source://nokogiri//lib/nokogiri/xml/document.rb#83
- def empty_doc?(string_or_io); end
- end
-end
-
-# source://nokogiri//lib/nokogiri/xml/document.rb#464
-Nokogiri::XML::Document::IMPLIED_XPATH_CONTEXTS = T.let(T.unsafe(nil), Array)
-
-# source://nokogiri//lib/nokogiri/xml/document.rb#19
-Nokogiri::XML::Document::NCNAME_CHAR = T.let(T.unsafe(nil), String)
-
-# source://nokogiri//lib/nokogiri/xml/document.rb#20
-Nokogiri::XML::Document::NCNAME_RE = T.let(T.unsafe(nil), Regexp)
-
-# See http://www.w3.org/TR/REC-xml-names/#ns-decl for more details. Note that we're not
-# attempting to handle unicode characters partly because libxml2 doesn't handle unicode
-# characters in NCNAMEs.
-#
-# source://nokogiri//lib/nokogiri/xml/document.rb#18
-Nokogiri::XML::Document::NCNAME_START_CHAR = T.let(T.unsafe(nil), String)
-
-# source://nokogiri//lib/nokogiri/xml/document_fragment.rb#6
-class Nokogiri::XML::DocumentFragment < ::Nokogiri::XML::Node
- # Create a new DocumentFragment from +tags+.
- #
- # If +ctx+ is present, it is used as a context node for the
- # subtree created, e.g., namespaces will be resolved relative
- # to +ctx+.
- #
- # @return [DocumentFragment] a new instance of DocumentFragment
- # @yield [options]
- #
- # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#19
- def initialize(document, tags = T.unsafe(nil), ctx = T.unsafe(nil), options = T.unsafe(nil)); end
-
- # call-seq: css *rules, [namespace-bindings, custom-pseudo-class]
- #
- # Search this fragment for CSS +rules+. +rules+ must be one or more CSS
- # selectors. For example:
- #
- # For more information see Nokogiri::XML::Searchable#css
- #
- # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#102
- def css(*args); end
-
- # :call-seq: deconstruct() → Array
- #
- # Returns the root nodes of this document fragment as an array, to use in pattern matching.
- #
- # 💡 Note that text nodes are returned as well as elements. If you wish to operate only on
- # root elements, you should deconstruct the array returned by
- # DocumentFragment#elements.
- #
- # ⚡ This is an experimental feature, available since v1.14.0
- #
- # *Example*
- #
- # frag = Nokogiri::HTML5.fragment(<<~HTML)
- # Start
- # This is a shortcut for you.
- # End
- # HTML
- #
- # frag.deconstruct
- # # => [#(Element:0x35c { name = "div", children = [ #(Text "Start")] }),
- # # #(Text "\n" + "This is a "),
- # # #(Element:0x370 {
- # # name = "a",
- # # attributes = [ #(Attr:0x384 { name = "href", value = "#jump" })],
- # # children = [ #(Text "shortcut")]
- # # }),
- # # #(Text " for you.\n"),
- # # #(Element:0x398 { name = "div", children = [ #(Text "End")] }),
- # # #(Text "\n")]
- #
- # *Example* only the elements, not the text nodes.
- #
- # frag.elements.deconstruct
- # # => [#(Element:0x35c { name = "div", children = [ #(Text "Start")] }),
- # # #(Element:0x370 {
- # # name = "a",
- # # attributes = [ #(Attr:0x384 { name = "href", value = "#jump" })],
- # # children = [ #(Text "shortcut")]
- # # }),
- # # #(Element:0x398 { name = "div", children = [ #(Text "End")] })]
- #
- # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#190
- def deconstruct; end
-
- # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#42
- def dup; end
-
- # A list of Nokogiri::XML::SyntaxError found when parsing a document
- #
- # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#136
- def errors; end
-
- # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#140
- def errors=(things); end
-
- # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#144
- def fragment(data); end
-
- # return the name for DocumentFragment
- #
- # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#54
- def name; end
-
- # call-seq: search *paths, [namespace-bindings, xpath-variable-bindings, custom-handler-class]
- #
- # Search this fragment for +paths+. +paths+ must be one or more XPath or CSS queries.
- #
- # For more information see Nokogiri::XML::Searchable#search
- #
- # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#121
- def search(*rules); end
-
- # Convert this DocumentFragment to a string
- #
- # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#60
- def serialize; end
-
- # Convert this DocumentFragment to html
- # See Nokogiri::XML::NodeSet#to_html
- #
- # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#67
- def to_html(*args); end
-
- # Convert this DocumentFragment to a string
- #
- # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#60
- def to_s; end
-
- # Convert this DocumentFragment to xhtml
- # See Nokogiri::XML::NodeSet#to_xhtml
- #
- # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#79
- def to_xhtml(*args); end
-
- # Convert this DocumentFragment to xml
- # See Nokogiri::XML::NodeSet#to_xml
- #
- # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#91
- def to_xml(*args); end
-
- private
-
- # fix for issue 770
- #
- # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#197
- def namespace_declarations(ctx); end
-
- class << self
- def new(*_arg0); end
-
- # Create a Nokogiri::XML::DocumentFragment from +tags+
- #
- # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#9
- def parse(tags, options = T.unsafe(nil), &block); end
- end
-end
-
-class Nokogiri::XML::Element < ::Nokogiri::XML::Node; end
-
-# Represents the allowed content in an Element Declaration inside a DTD:
-#
-#
-#
-# ]>
-#
-#
-# ElementContent represents the binary tree inside the tag shown above that lists the
-# possible content for the div1 tag.
-#
-# source://nokogiri//lib/nokogiri/xml/element_content.rb#16
-class Nokogiri::XML::ElementContent
- include ::Nokogiri::XML::PP::Node
-
- # Get the children of this ElementContent node
- #
- # source://nokogiri//lib/nokogiri/xml/element_content.rb#35
- def children; end
-
- # Returns the value of attribute document.
- #
- # source://nokogiri//lib/nokogiri/xml/element_content.rb#31
- def document; end
-
- def name; end
- def occur; end
- def prefix; end
- def type; end
-
- private
-
- def c1; end
- def c2; end
-
- # source://nokogiri//lib/nokogiri/xml/element_content.rb#41
- def inspect_attributes; end
-end
-
-# source://nokogiri//lib/nokogiri/xml/element_content.rb#21
-Nokogiri::XML::ElementContent::ELEMENT = T.let(T.unsafe(nil), Integer)
-
-# source://nokogiri//lib/nokogiri/xml/element_content.rb#28
-Nokogiri::XML::ElementContent::MULT = T.let(T.unsafe(nil), Integer)
-
-# Possible content occurrences
-#
-# source://nokogiri//lib/nokogiri/xml/element_content.rb#26
-Nokogiri::XML::ElementContent::ONCE = T.let(T.unsafe(nil), Integer)
-
-# source://nokogiri//lib/nokogiri/xml/element_content.rb#27
-Nokogiri::XML::ElementContent::OPT = T.let(T.unsafe(nil), Integer)
-
-# source://nokogiri//lib/nokogiri/xml/element_content.rb#23
-Nokogiri::XML::ElementContent::OR = T.let(T.unsafe(nil), Integer)
-
-# Possible definitions of type
-#
-# source://nokogiri//lib/nokogiri/xml/element_content.rb#20
-Nokogiri::XML::ElementContent::PCDATA = T.let(T.unsafe(nil), Integer)
-
-# source://nokogiri//lib/nokogiri/xml/element_content.rb#29
-Nokogiri::XML::ElementContent::PLUS = T.let(T.unsafe(nil), Integer)
-
-# source://nokogiri//lib/nokogiri/xml/element_content.rb#22
-Nokogiri::XML::ElementContent::SEQ = T.let(T.unsafe(nil), Integer)
-
-# source://nokogiri//lib/nokogiri/xml/element_decl.rb#5
-class Nokogiri::XML::ElementDecl < ::Nokogiri::XML::Node
- def content; end
- def element_type; end
- def prefix; end
-
- private
-
- # source://nokogiri//lib/nokogiri/xml/element_decl.rb#12
- def inspect_attributes; end
-end
-
-# source://nokogiri//lib/nokogiri/xml/entity_decl.rb#5
-class Nokogiri::XML::EntityDecl < ::Nokogiri::XML::Node
- def content; end
- def entity_type; end
- def external_id; end
- def original_content; end
- def system_id; end
-
- private
-
- # source://nokogiri//lib/nokogiri/xml/entity_decl.rb#18
- def inspect_attributes; end
-
- class << self
- # source://nokogiri//lib/nokogiri/xml/entity_decl.rb#12
- def new(name, doc, *args); end
- end
-end
-
-Nokogiri::XML::EntityDecl::EXTERNAL_GENERAL_PARSED = T.let(T.unsafe(nil), Integer)
-Nokogiri::XML::EntityDecl::EXTERNAL_GENERAL_UNPARSED = T.let(T.unsafe(nil), Integer)
-Nokogiri::XML::EntityDecl::EXTERNAL_PARAMETER = T.let(T.unsafe(nil), Integer)
-Nokogiri::XML::EntityDecl::INTERNAL_GENERAL = T.let(T.unsafe(nil), Integer)
-Nokogiri::XML::EntityDecl::INTERNAL_PARAMETER = T.let(T.unsafe(nil), Integer)
-Nokogiri::XML::EntityDecl::INTERNAL_PREDEFINED = T.let(T.unsafe(nil), Integer)
-
-# source://nokogiri//lib/nokogiri/xml/entity_reference.rb#5
-class Nokogiri::XML::EntityReference < ::Nokogiri::XML::Node
- # source://nokogiri//lib/nokogiri/xml/entity_reference.rb#6
- def children; end
-
- # source://nokogiri//lib/nokogiri/xml/entity_reference.rb#15
- def inspect_attributes; end
-
- class << self
- def new(*_arg0); end
- end
-end
-
-# source://nokogiri//lib/nokogiri/xml/namespace.rb#6
-class Nokogiri::XML::Namespace
- include ::Nokogiri::XML::PP::Node
-
- # :call-seq: deconstruct_keys(array_of_names) → Hash
- #
- # Returns a hash describing the Namespace, to use in pattern matching.
- #
- # Valid keys and their values:
- # - +prefix+ → (String, nil) The namespace's prefix, or +nil+ if there is no prefix (e.g., default namespace).
- # - +href+ → (String) The namespace's URI
- #
- # ⚡ This is an experimental feature, available since v1.14.0
- #
- # *Example*
- #
- # doc = Nokogiri::XML.parse(<<~XML)
- #
- #
- #
- #
- #
- # XML
- #
- # doc.root.elements.first.namespace
- # # => #(Namespace:0x35c { href = "http://nokogiri.org/ns/default" })
- #
- # doc.root.elements.first.namespace.deconstruct_keys([:prefix, :href])
- # # => {:prefix=>nil, :href=>"http://nokogiri.org/ns/default"}
- #
- # doc.root.elements.last.namespace
- # # => #(Namespace:0x370 {
- # # prefix = "noko",
- # # href = "http://nokogiri.org/ns/noko"
- # # })
- #
- # doc.root.elements.last.namespace.deconstruct_keys([:prefix, :href])
- # # => {:prefix=>"noko", :href=>"http://nokogiri.org/ns/noko"}
- #
- # source://nokogiri//lib/nokogiri/xml/namespace.rb#47
- def deconstruct_keys(keys); end
-
- # Returns the value of attribute document.
- #
- # source://nokogiri//lib/nokogiri/xml/namespace.rb#8
- def document; end
-
- def href; end
- def prefix; end
-
- private
-
- # source://nokogiri//lib/nokogiri/xml/namespace.rb#53
- def inspect_attributes; end
-end
-
-# Nokogiri::XML::Node is the primary API you'll use to interact with your Document.
-#
-# == Attributes
-#
-# A Nokogiri::XML::Node may be treated similarly to a hash with regard to attributes. For
-# example:
-#
-# node = Nokogiri::XML::DocumentFragment.parse("link").at_css("a")
-# node.to_html # => "link"
-# node['href'] # => "#foo"
-# node.keys # => ["href", "id"]
-# node.values # => ["#foo", "link"]
-# node['class'] = 'green' # => "green"
-# node.to_html # => "link"
-#
-# See the method group entitled Node@Working+With+Node+Attributes for the full set of methods.
-#
-# == Navigation
-#
-# Nokogiri::XML::Node also has methods that let you move around your tree:
-#
-# [#parent, #children, #next, #previous]
-# Navigate up, down, or through siblings.
-#
-# See the method group entitled Node@Traversing+Document+Structure for the full set of methods.
-#
-# == Serialization
-#
-# When printing or otherwise emitting a document or a node (and its subtree), there are a few
-# methods you might want to use:
-#
-# [#content, #text, #inner_text, #to_str]
-# These methods will all **emit plaintext**,
-# meaning that entities will be replaced (e.g., +<+ will be replaced with +<+), meaning
-# that any sanitizing will likely be un-done in the output.
-#
-# [#to_s, #to_xml, #to_html, #inner_html]
-# These methods will all **emit properly-escaped markup**, meaning that it's suitable for
-# consumption by browsers, parsers, etc.
-#
-# See the method group entitled Node@Serialization+and+Generating+Output for the full set of methods.
-#
-# == Searching
-#
-# You may search this node's subtree using methods like #xpath and #css.
-#
-# See the method group entitled Node@Searching+via+XPath+or+CSS+Queries for the full set of methods.
-#
-# source://nokogiri//lib/nokogiri/xml/node.rb#56
-class Nokogiri::XML::Node
- include ::Nokogiri::HTML5::Node
- include ::Nokogiri::XML::PP::Node
- include ::Nokogiri::XML::Searchable
- include ::Nokogiri::ClassResolver
- include ::Enumerable
-
- # :call-seq:
- # new(name, document) -> Nokogiri::XML::Node
- # new(name, document) { |node| ... } -> Nokogiri::XML::Node
- #
- # Create a new node with +name+ that belongs to +document+.
- #
- # If you intend to add a node to a document tree, it's likely that you will prefer one of the
- # Nokogiri::XML::Node methods like #add_child, #add_next_sibling, #replace, etc. which will
- # both create an element (or subtree) and place it in the document tree.
- #
- # Another alternative, if you are concerned about performance, is
- # Nokogiri::XML::Document#create_element which accepts additional arguments for contents or
- # attributes but (like this method) avoids parsing markup.
- #
- # [Parameters]
- # - +name+ (String)
- # - +document+ (Nokogiri::XML::Document) The document to which the the returned node will belong.
- # [Yields] Nokogiri::XML::Node
- # [Returns] Nokogiri::XML::Node
- #
- # @return [Node] a new instance of Node
- #
- # source://nokogiri//lib/nokogiri/xml/node.rb#126
- def initialize(name, document); end
-
- # Add +node_or_tags+ as a child of this Node.
- #
- # +node_or_tags+ can be a Nokogiri::XML::Node, a ::DocumentFragment, a ::NodeSet, or a String
- # containing markup.
- #
- # Returns +self+, to support chaining of calls (e.g., root << child1 << child2)
- #
- # Also see related method +add_child+.
- #
- # source://nokogiri//lib/nokogiri/xml/node.rb#256
- def <<(node_or_tags); end
-
- # Compare two Node objects with respect to their Document. Nodes from
- # different documents cannot be compared.
- #
- # source://nokogiri//lib/nokogiri/xml/node.rb#1256
- def <=>(other); end
-
- # Test to see if this Node is equal to +other+
- #
- # source://nokogiri//lib/nokogiri/xml/node.rb#1246
- def ==(other); end
-
- # :call-seq: [](name) → (String, nil)
- #
- # Fetch an attribute from this node.
- #
- # ⚠ Note that attributes with namespaces cannot be accessed with this method. To access
- # namespaced attributes, use #attribute_with_ns.
- #
- # [Returns] (String, nil) value of the attribute +name+, or +nil+ if no matching attribute exists
- #
- # *Example*
- #
- # doc = Nokogiri::XML("")
- # child = doc.at_css("child")
- # child["size"] # => "large"
- # child["class"] # => "big wide tall"
- #
- # *Example:* Namespaced attributes will not be returned.
- #
- # ⚠ Note namespaced attributes may be accessed with #attribute or #attribute_with_ns
- #
- # doc = Nokogiri::XML(<<~EOF)
- #
- #
- #
- # EOF
- # doc.at_css("child")["size"] # => nil
- # doc.at_css("child").attribute("size").value # => "broad"
- # doc.at_css("child").attribute_with_ns("size", "http://example.com/widths").value
- # # => "broad"
- #
- # source://nokogiri//lib/nokogiri/xml/node.rb#512
- def [](name); end
-
- # :call-seq: []=(name, value) → value
- #
- # Update the attribute +name+ to +value+, or create the attribute if it does not exist.
- #
- # ⚠ Note that attributes with namespaces cannot be accessed with this method. To access
- # namespaced attributes for update, use #attribute_with_ns. To add a namespaced attribute,
- # see the example below.
- #
- # [Returns] +value+
- #
- # *Example*
- #
- # doc = Nokogiri::XML("")
- # child = doc.at_css("child")
- # child["size"] = "broad"
- # child.to_html
- # # => ""
- #
- # *Example:* Add a namespaced attribute.
- #
- # doc = Nokogiri::XML(<<~EOF)
- #
- #
- #
- # EOF
- # child = doc.at_css("child")
- # child["size"] = "broad"
- # ns = doc.root.namespace_definitions.find { |ns| ns.prefix == "width" }
- # child.attribute("size").namespace = ns
- # doc.to_html
- # # => "\n" +
- # # " \n" +
- # # "\n"
- #
- # source://nokogiri//lib/nokogiri/xml/node.rb#550
- def []=(name, value); end
-
- # Accept a visitor. This method calls "visit" on +visitor+ with self.
- #
- # source://nokogiri//lib/nokogiri/xml/node.rb#1240
- def accept(visitor); end
-
- # Add +node_or_tags+ as a child of this Node.
- #
- # +node_or_tags+ can be a Nokogiri::XML::Node, a ::DocumentFragment, a ::NodeSet, or a String
- # containing markup.
- #
- # Returns the reparented node (if +node_or_tags+ is a Node), or NodeSet (if +node_or_tags+ is
- # a DocumentFragment, NodeSet, or String).
- #
- # Also see related method +<<+.
- #
- # source://nokogiri//lib/nokogiri/xml/node.rb#148
- def add_child(node_or_tags); end
-
- # :call-seq: add_class(names) → self
- #
- # Ensure HTML CSS classes are present on +self+. Any CSS classes in +names+ that already exist
- # in the "class" attribute are _not_ added. Note that any existing duplicates in the
- # "class" attribute are not removed. Compare with #append_class.
- #
- # This is a convenience function and is equivalent to:
- #
- # node.kwattr_add("class", names)
- #
- # See related: #kwattr_add, #classes, #append_class, #remove_class
- #
- # [Parameters]
- # - +names+ (String, Array)
- #
- # CSS class names to be added to the Node's "class" attribute. May be a string containing
- # whitespace-delimited names, or an Array of String names. Any class names already present
- # will not be added. Any class names not present will be added. If no "class" attribute
- # exists, one is created.
- #
- # [Returns] +self+ (Node) for ease of chaining method calls.
- #
- # *Example:* Ensure that the node has CSS class "section"
- #
- # node # =>
- # node.add_class("section") # =>
- # node.add_class("section") # => # duplicate not added
- #
- # *Example:* Ensure that the node has CSS classes "section" and "header", via a String argument
- #
- # Note that the CSS class "section" is not added because it is already present.
- # Note also that the pre-existing duplicate CSS class "section" is not removed.
- #
- # node # =>
- # node.add_class("section header") # =>
- #
- # *Example:* Ensure that the node has CSS classes "section" and "header", via an Array argument
- #
- # node # =>
- # node.add_class(["section", "header"]) # =>
- #
- # source://nokogiri//lib/nokogiri/xml/node.rb#715
- def add_class(names); end
-
- def add_namespace(_arg0, _arg1); end
- def add_namespace_definition(_arg0, _arg1); end
-
- # Insert +node_or_tags+ after this Node (as a sibling).
- #
- # +node_or_tags+ can be a Nokogiri::XML::Node, a ::DocumentFragment, a ::NodeSet, or a String
- # containing markup.
- #
- # Returns the reparented node (if +node_or_tags+ is a Node), or NodeSet (if +node_or_tags+ is
- # a DocumentFragment, NodeSet, or String).
- #
- # Also see related method +after+.
- #
- # @raise [ArgumentError]
- #
- # source://nokogiri//lib/nokogiri/xml/node.rb#288
- def add_next_sibling(node_or_tags); end
-
- # Insert +node_or_tags+ before this Node (as a sibling).
- #
- # +node_or_tags+ can be a Nokogiri::XML::Node, a ::DocumentFragment, a ::NodeSet, or a String
- # containing markup.
- #
- # Returns the reparented node (if +node_or_tags+ is a Node), or NodeSet (if +node_or_tags+ is
- # a DocumentFragment, NodeSet, or String).
- #
- # Also see related method +before+.
- #
- # @raise [ArgumentError]
- #
- # source://nokogiri//lib/nokogiri/xml/node.rb#271
- def add_previous_sibling(node_or_tags); end
-
- # Insert +node_or_tags+ after this node (as a sibling).
- #
- # +node_or_tags+ can be a Nokogiri::XML::Node, a Nokogiri::XML::DocumentFragment, or a String
- # containing markup.
- #
- # Returns +self+, to support chaining of calls.
- #
- # Also see related method +add_next_sibling+.
- #
- # source://nokogiri//lib/nokogiri/xml/node.rb#318
- def after(node_or_tags); end
-
- # Get a list of ancestor Node for this Node. If +selector+ is given,
- # the ancestors must match +selector+
- #
- # source://nokogiri//lib/nokogiri/xml/node.rb#1209
- def ancestors(selector = T.unsafe(nil)); end
-
- # :call-seq: append_class(names) → self
- #
- # Add HTML CSS classes to +self+, regardless of duplication. Compare with #add_class.
- #
- # This is a convenience function and is equivalent to:
- #
- # node.kwattr_append("class", names)
- #
- # See related: #kwattr_append, #classes, #add_class, #remove_class
- #
- # [Parameters]
- # - +names+ (String, Array)
- #
- # CSS class names to be appended to the Node's "class" attribute. May be a string containing
- # whitespace-delimited names, or an Array of String names. All class names passed in will be
- # appended to the "class" attribute even if they are already present in the attribute
- # value. If no "class" attribute exists, one is created.
- #
- # [Returns] +self+ (Node) for ease of chaining method calls.
- #
- # *Example:* Append "section" to the node's CSS "class" attribute
- #
- # node # =>
- # node.append_class("section") # =>
- # node.append_class("section") # => # duplicate added!
- #
- # *Example:* Append "section" and "header" to the noded's CSS "class" attribute, via a String argument
- #
- # Note that the CSS class "section" is appended even though it is already present
- #
- # node # =>
- # node.append_class("section header") # =>
- #
- # *Example:* Append "section" and "header" to the node's CSS "class" attribute, via an Array argument
- #
- # node # =>
- # node.append_class(["section", "header"]) # =>
- # node.append_class(["section", "header"]) # =>
- #
- # source://nokogiri//lib/nokogiri/xml/node.rb#759
- def append_class(names); end
-
- # :call-seq: [](name) → (String, nil)
- #
- # Fetch an attribute from this node.
- #
- # ⚠ Note that attributes with namespaces cannot be accessed with this method. To access
- # namespaced attributes, use #attribute_with_ns.
- #
- # [Returns] (String, nil) value of the attribute +name+, or +nil+ if no matching attribute exists
- #
- # *Example*
- #
- # doc = Nokogiri::XML("")
- # child = doc.at_css("child")
- # child["size"] # => "large"
- # child["class"] # => "big wide tall"
- #
- # *Example:* Namespaced attributes will not be returned.
- #
- # ⚠ Note namespaced attributes may be accessed with #attribute or #attribute_with_ns
- #
- # doc = Nokogiri::XML(<<~EOF)
- #
- #
- #
- # EOF
- # doc.at_css("child")["size"] # => nil
- # doc.at_css("child").attribute("size").value # => "broad"
- # doc.at_css("child").attribute_with_ns("size", "http://example.com/widths").value
- # # => "broad"
- #
- # source://nokogiri//lib/nokogiri/xml/node.rb#512
- def attr(name); end
-
- def attribute(_arg0); end
- def attribute_nodes; end
- def attribute_with_ns(_arg0, _arg1); end
-
- # :call-seq: attributes() → Hash
- #
- # Fetch this node's attributes.
- #
- # ⚠ Because the keys do not include any namespace information for the attribute, in case of a
- # simple name collision, not all attributes will be returned. In this case, you will need to
- # use #attribute_nodes.
- #
- # [Returns]
- # Hash containing attributes belonging to +self+. The hash keys are String attribute
- # names (without the namespace), and the hash values are Nokogiri::XML::Attr.
- #
- # *Example* with no namespaces:
- #
- # doc = Nokogiri::XML("")
- # doc.at_css("child").attributes
- # # => {"size"=>#(Attr:0x550 { name = "size", value = "large" }),
- # # "class"=>#(Attr:0x564 { name = "class", value = "big wide tall" })}
- #
- # *Example* with a namespace:
- #
- # doc = Nokogiri::XML("")
- # doc.at_css("child").attributes
- # # => {"size"=>
- # # #(Attr:0x550 {
- # # name = "size",
- # # namespace = #(Namespace:0x564 {
- # # prefix = "desc",
- # # href = "http://example.com/sizes"
- # # }),
- # # value = "large"
- # # })}
- #
- # *Example* with an attribute name collision:
- #
- # ⚠ Note that only one of the attributes is returned in the Hash.
- #
- # doc = Nokogiri::XML(<<~EOF)
- #
- #
- #
- # EOF
- # doc.at_css("child").attributes
- # # => {"size"=>
- # # #(Attr:0x550 {
- # # name = "size",
- # # namespace = #(Namespace:0x564 {
- # # prefix = "height",
- # # href = "http://example.com/heights"
- # # }),
- # # value = "tall"
- # # })}
- #
- # source://nokogiri//lib/nokogiri/xml/node.rb#609
- def attributes; end
-
- # Insert +node_or_tags+ before this node (as a sibling).
- #
- # +node_or_tags+ can be a Nokogiri::XML::Node, a ::DocumentFragment, a ::NodeSet, or a String
- # containing markup.
- #
- # Returns +self+, to support chaining of calls.
- #
- # Also see related method +add_previous_sibling+.
- #
- # source://nokogiri//lib/nokogiri/xml/node.rb#304
- def before(node_or_tags); end
-
- def blank?; end
-
- # source://nokogiri//lib/nokogiri/xml/node.rb#1407
- def canonicalize(mode = T.unsafe(nil), inclusive_namespaces = T.unsafe(nil), with_comments = T.unsafe(nil)); end
-
- # Returns true if this is a CDATA
- #
- # @return [Boolean]
- #
- # source://nokogiri//lib/nokogiri/xml/node.rb#1130
- def cdata?; end
-
- def child; end
- def children; end
-
- # Set the content for this Node +node_or_tags+
- #
- # +node_or_tags+ can be a Nokogiri::XML::Node, a Nokogiri::XML::DocumentFragment, or a String
- # containing markup.
- #
- # Also see related method +inner_html=+
- #
- # source://nokogiri//lib/nokogiri/xml/node.rb#349
- def children=(node_or_tags); end
-
- # :call-seq: classes() → Array
- #
- # Fetch CSS class names of a Node.
- #
- # This is a convenience function and is equivalent to:
- #
- # node.kwattr_values("class")
- #
- # See related: #kwattr_values, #add_class, #append_class, #remove_class
- #
- # [Returns]
- # The CSS classes (Array of String) present in the Node's "class" attribute. If the
- # attribute is empty or non-existent, the return value is an empty array.
- #
- # *Example*
- #
- # node # =>
- # node.classes # => ["section", "title", "header"]
- #
- # source://nokogiri//lib/nokogiri/xml/node.rb#669
- def classes; end
-
- def clone(*_arg0); end
-
- # Returns true if this is a Comment
- #
- # @return [Boolean]
- #
- # source://nokogiri//lib/nokogiri/xml/node.rb#1125
- def comment?; end
-
- def content; end
-
- # Set the Node's content to a Text node containing +string+. The string gets XML escaped, not
- # interpreted as markup.
- #
- # source://nokogiri//lib/nokogiri/xml/node.rb#411
- def content=(string); end
-
- def create_external_subset(_arg0, _arg1, _arg2); end
- def create_internal_subset(_arg0, _arg1, _arg2); end
-
- # Get the path to this node as a CSS expression
- #
- # source://nokogiri//lib/nokogiri/xml/node.rb#1200
- def css_path; end
-
- # :call-seq: deconstruct_keys(array_of_names) → Hash
- #
- # Returns a hash describing the Node, to use in pattern matching.
- #
- # Valid keys and their values:
- # - +name+ → (String) The name of this node, or "text" if it is a Text node.
- # - +namespace+ → (Namespace, nil) The namespace of this node, or nil if there is no namespace.
- # - +attributes+ → (Array) The attributes of this node.
- # - +children+ → (Array) The children of this node. 💡 Note this includes text nodes.
- # - +elements+ → (Array) The child elements of this node. 💡 Note this does not include text nodes.
- # - +content+ → (String) The contents of all the text nodes in this node's subtree. See #content.
- # - +inner_html+ → (String) The inner markup for the children of this node. See #inner_html.
- #
- # ⚡ This is an experimental feature, available since v1.14.0
- #
- # *Example*
- #
- # doc = Nokogiri::XML.parse(<<~XML)
- #
- #
- # First
- # Second
- #
- # XML
- #
- # doc.root.deconstruct_keys([:name, :namespace])
- # # => {:name=>"parent",
- # # :namespace=>
- # # #(Namespace:0x35c { href = "http://nokogiri.org/ns/default" })}
- #
- # doc.root.deconstruct_keys([:inner_html, :content])
- # # => {:content=>"\n" + " First\n" + " Second\n",
- # # :inner_html=>
- # # "\n" +
- # # " First\n" +
- # # " Second\n"}
- #
- # doc.root.elements.first.deconstruct_keys([:attributes])
- # # => {:attributes=>
- # # [#(Attr:0x370 { name = "foo", value = "abc" }),
- # # #(Attr:0x384 {
- # # name = "bar",
- # # namespace = #(Namespace:0x398 {
- # # prefix = "noko",
- # # href = "http://nokogiri.org/ns/noko"
- # # }),
- # # value = "def"
- # # })]}
- #
- # source://nokogiri//lib/nokogiri/xml/node.rb#1468
- def deconstruct_keys(keys); end
-
- # Decorate this node with the decorators set up in this node's Document
- #
- # source://nokogiri//lib/nokogiri/xml/node.rb#132
- def decorate!; end
-
- # Adds a default namespace supplied as a string +url+ href, to self.
- # The consequence is as an xmlns attribute with supplied argument were
- # present in parsed XML. A default namespace set with this method will
- # now show up in #attributes, but when this node is serialized to XML an
- # "xmlns" attribute will appear. See also #namespace and #namespace=
- #
- # source://nokogiri//lib/nokogiri/xml/node.rb#427
- def default_namespace=(url); end
-
- # Remove the attribute named +name+
- #
- # source://nokogiri//lib/nokogiri/xml/node.rb#643
- def delete(name); end
-
- # Fetch the Nokogiri::HTML4::ElementDescription for this node. Returns
- # nil on XML documents and on unknown tags.
- #
- # source://nokogiri//lib/nokogiri/xml/node.rb#1167
- def description; end
-
- # Do xinclude substitution on the subtree below node. If given a block, a
- # Nokogiri::XML::ParseOptions object initialized from +options+, will be
- # passed to it, allowing more convenient modification of the parser options.
- #
- # @yield [options]
- #
- # source://nokogiri//lib/nokogiri/xml/node.rb#454
- def do_xinclude(options = T.unsafe(nil)); end
-
- def document; end
-
- # Returns true if this is a Document
- #
- # @return [Boolean]
- #
- # source://nokogiri//lib/nokogiri/xml/node.rb#1145
- def document?; end
-
- def dup(*_arg0); end
-
- # Iterate over each attribute name and value pair for this Node.
- #
- # source://nokogiri//lib/nokogiri/xml/node.rb#635
- def each; end
-
- # Returns true if this is an Element node
- #
- # @return [Boolean]
- #
- # source://nokogiri//lib/nokogiri/xml/node.rb#1181
- def elem?; end
-
- # Returns true if this is an Element node
- #
- # @return [Boolean]
- #
- # source://nokogiri//lib/nokogiri/xml/node.rb#1181
- def element?; end
-
- def element_children; end
- def elements; end
- def encode_special_chars(_arg0); end
- def external_subset; end
- def first_element_child; end
-
- # Create a DocumentFragment containing +tags+ that is relative to _this_
- # context node.
- #
- # source://nokogiri//lib/nokogiri/html5/node.rb#70
- def fragment(tags); end
-
- # Returns true if this is a DocumentFragment
- #
- # @return [Boolean]
- #
- # source://nokogiri//lib/nokogiri/xml/node.rb#1160
- def fragment?; end
-
- # :call-seq: [](name) → (String, nil)
- #
- # Fetch an attribute from this node.
- #
- # ⚠ Note that attributes with namespaces cannot be accessed with this method. To access
- # namespaced attributes, use #attribute_with_ns.
- #
- # [Returns] (String, nil) value of the attribute +name+, or +nil+ if no matching attribute exists
- #
- # *Example*
- #
- # doc = Nokogiri::XML("")
- # child = doc.at_css("child")
- # child["size"] # => "large"
- # child["class"] # => "big wide tall"
- #
- # *Example:* Namespaced attributes will not be returned.
- #
- # ⚠ Note namespaced attributes may be accessed with #attribute or #attribute_with_ns
- #
- # doc = Nokogiri::XML(<<~EOF)
- #
- #
- #
- # EOF
- # doc.at_css("child")["size"] # => nil
- # doc.at_css("child").attribute("size").value # => "broad"
- # doc.at_css("child").attribute_with_ns("size", "http://example.com/widths").value
- # # => "broad"
- #
- # source://nokogiri//lib/nokogiri/xml/node.rb#512
- def get_attribute(name); end
-
- def has_attribute?(_arg0); end
-
- # Returns true if this is an HTML4::Document or HTML5::Document node
- #
- # @return [Boolean]
- #
- # source://nokogiri//lib/nokogiri/xml/node.rb#1140
- def html?; end
-
- # Get the inner_html for this node's Node#children
- #
- # source://nokogiri//lib/nokogiri/html5/node.rb#31
- def inner_html(options = T.unsafe(nil)); end
-
- # Set the content for this Node to +node_or_tags+.
- #
- # +node_or_tags+ can be a Nokogiri::XML::Node, a Nokogiri::XML::DocumentFragment, or a String
- # containing markup.
- #
- # ⚠ Please note that despite the name, this method will *not* always parse a String argument
- # as HTML. A String argument will be parsed with the +DocumentFragment+ parser related to this
- # node's document.
- #
- # For example, if the document is an HTML4::Document then the string will be parsed as HTML4
- # using HTML4::DocumentFragment; but if the document is an XML::Document then it will
- # parse the string as XML using XML::DocumentFragment.
- #
- # Also see related method +children=+
- #
- # source://nokogiri//lib/nokogiri/xml/node.rb#338
- def inner_html=(node_or_tags); end
-
- # :section:
- def inner_text; end
-
- def internal_subset; end
- def key?(_arg0); end
-
- # Get the attribute names for this Node.
- #
- # source://nokogiri//lib/nokogiri/xml/node.rb#629
- def keys; end
-
- # :call-seq:
- # kwattr_add(attribute_name, keywords) → self
- #
- # Ensure that values are present in a keyword attribute.
- #
- # Any values in +keywords+ that already exist in the Node's attribute values are _not_
- # added. Note that any existing duplicates in the attribute values are not removed. Compare
- # with #kwattr_append.
- #
- # A "keyword attribute" is a node attribute that contains a set of space-delimited
- # values. Perhaps the most familiar example of this is the HTML "class" attribute used to
- # contain CSS classes. But other keyword attributes exist, for instance
- # {the "rel" attribute}[https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel].
- #
- # See also #add_class, #kwattr_values, #kwattr_append, #kwattr_remove
- #
- # [Parameters]
- # - +attribute_name+ (String) The name of the keyword attribute to be modified.
- # - +keywords+ (String, Array)
- # Keywords to be added to the attribute named +attribute_name+. May be a string containing
- # whitespace-delimited values, or an Array of String values. Any values already present will
- # not be added. Any values not present will be added. If the named attribute does not exist,
- # it is created.
- #
- # [Returns] +self+ (Nokogiri::XML::Node) for ease of chaining method calls.
- #
- # *Example:* Ensure that a +Node+ has "nofollow" in its +rel+ attribute.
- #
- # Note that duplicates are not added.
- #
- # node # =>
- # node.kwattr_add("rel", "nofollow") # =>
- # node.kwattr_add("rel", "nofollow") # =>
- #
- # *Example:* Ensure that a +Node+ has "nofollow" and "noreferrer" in its +rel+ attribute, via a
- # String argument.
- #
- # Note that "nofollow" is not added because it is already present. Note also that the
- # pre-existing duplicate "nofollow" is not removed.
- #
- # node # =>
- # node.kwattr_add("rel", "nofollow noreferrer") # =>
- #
- # *Example:* Ensure that a +Node+ has "nofollow" and "noreferrer" in its +rel+ attribute, via
- # an Array argument.
- #
- # node # =>
- # node.kwattr_add("rel", ["nofollow", "noreferrer"]) # =>
- #
- # Since v1.11.0
- #
- # source://nokogiri//lib/nokogiri/xml/node.rb#892
- def kwattr_add(attribute_name, keywords); end
-
- # :call-seq:
- # kwattr_append(attribute_name, keywords) → self
- #
- # Add keywords to a Node's keyword attribute, regardless of duplication. Compare with
- # #kwattr_add.
- #
- # A "keyword attribute" is a node attribute that contains a set of space-delimited
- # values. Perhaps the most familiar example of this is the HTML "class" attribute used to
- # contain CSS classes. But other keyword attributes exist, for instance
- # {the "rel" attribute}[https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel].
- #
- # See also #append_class, #kwattr_values, #kwattr_add, #kwattr_remove
- #
- # [Parameters]
- # - +attribute_name+ (String) The name of the keyword attribute to be modified.
- # - +keywords+ (String, Array)
- # Keywords to be added to the attribute named +attribute_name+. May be a string containing
- # whitespace-delimited values, or an Array of String values. All values passed in will be
- # appended to the named attribute even if they are already present in the attribute. If the
- # named attribute does not exist, it is created.
- #
- # [Returns] +self+ (Node) for ease of chaining method calls.
- #
- # *Example:* Append "nofollow" to the +rel+ attribute.
- #
- # Note that duplicates are added.
- #
- # node # =>