` element with the given class.
#
-# source://haml//lib/haml/parser.rb#18
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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.
+# @param [String] new - Hash literal including dynamic values.
+# @param [String] old - 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
+# pkg:gem/haml#lib/haml/parser.rb:236
class Haml::Parser::DynamicAttributes < ::Struct
- # Returns the value of attribute new
- #
- # @return [Object] the current value of new
+ # pkg:gem/haml#lib/haml/parser.rb:236
def new; end
- # Sets the attribute new
- #
- # @param value [Object] the value to set the attribute new to.
- # @return [Object] the newly set value
+ # pkg:gem/haml#lib/haml/parser.rb:236
def new=(_); end
- # Returns the value of attribute old
- #
- # @return [Object] the current value of old
+ # pkg:gem/haml#lib/haml/parser.rb:236
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
+ # pkg:gem/haml#lib/haml/parser.rb:236
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
+ # pkg:gem/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
+ # pkg:gem/haml#lib/haml/parser.rb:253
def stripped_old; end
class << self
+ # pkg:gem/haml#lib/haml/parser.rb:236
def [](*_arg0); end
+
+ # pkg:gem/haml#lib/haml/parser.rb:236
def inspect; end
+
+ # pkg:gem/haml#lib/haml/parser.rb:236
def keyword_init?; end
+
+ # pkg:gem/haml#lib/haml/parser.rb:236
def members; end
+
+ # pkg:gem/haml#lib/haml/parser.rb:236
def new(*_arg0); end
end
end
# Designates an XHTML/XML element.
#
-# source://haml//lib/haml/parser.rb#15
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/haml#lib/haml/parser.rb:36
Haml::Parser::FLAT_SCRIPT = T.let(T.unsafe(nil), String)
-# source://haml//lib/haml/parser.rb#93
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/haml#lib/haml/parser.rb:207
class Haml::Parser::Line < ::Struct
- # Returns the value of attribute eod
- #
- # @return [Object] the current value of eod
+ # pkg:gem/haml#lib/haml/parser.rb:207
def eod; end
- # Sets the attribute eod
- #
- # @param value [Object] the value to set the attribute eod to.
- # @return [Object] the newly set value
+ # pkg:gem/haml#lib/haml/parser.rb:207
def eod=(_); end
- # Returns the value of attribute eod
- #
- # @return [Object] the current value of eod
+ # pkg:gem/haml#lib/haml/parser.rb:208
def eod?; end
- # Returns the value of attribute full
- #
- # @return [Object] the current value of full
+ # pkg:gem/haml#lib/haml/parser.rb:207
def full; end
- # Sets the attribute full
- #
- # @param value [Object] the value to set the attribute full to.
- # @return [Object] the newly set value
+ # pkg:gem/haml#lib/haml/parser.rb:207
def full=(_); end
- # Returns the value of attribute index
- #
- # @return [Object] the current value of index
+ # pkg:gem/haml#lib/haml/parser.rb:207
def index; end
- # Sets the attribute index
- #
- # @param value [Object] the value to set the attribute index to.
- # @return [Object] the newly set value
+ # pkg:gem/haml#lib/haml/parser.rb:207
def index=(_); end
- # Returns the value of attribute parser
- #
- # @return [Object] the current value of parser
+ # pkg:gem/haml#lib/haml/parser.rb:207
def parser; end
- # Sets the attribute parser
- #
- # @param value [Object] the value to set the attribute parser to.
- # @return [Object] the newly set value
+ # pkg:gem/haml#lib/haml/parser.rb:207
def parser=(_); end
- # source://haml//lib/haml/parser.rb#215
+ # pkg:gem/haml#lib/haml/parser.rb:215
def strip!(from); end
- # @private
- #
- # source://haml//lib/haml/parser.rb#211
+ # pkg:gem/haml#lib/haml/parser.rb:211
def tabs; end
- # Returns the value of attribute text
- #
- # @return [Object] the current value of text
+ # pkg:gem/haml#lib/haml/parser.rb:207
def text; end
- # Sets the attribute text
- #
- # @param value [Object] the value to set the attribute text to.
- # @return [Object] the newly set value
+ # pkg:gem/haml#lib/haml/parser.rb:207
def text=(_); end
- # Returns the value of attribute whitespace
- #
- # @return [Object] the current value of whitespace
+ # pkg:gem/haml#lib/haml/parser.rb:207
def whitespace; end
- # Sets the attribute whitespace
- #
- # @param value [Object] the value to set the attribute whitespace to.
- # @return [Object] the newly set value
+ # pkg:gem/haml#lib/haml/parser.rb:207
def whitespace=(_); end
class << self
+ # pkg:gem/haml#lib/haml/parser.rb:207
def [](*_arg0); end
+
+ # pkg:gem/haml#lib/haml/parser.rb:207
def inspect; end
+
+ # pkg:gem/haml#lib/haml/parser.rb:207
def keyword_init?; end
+
+ # pkg:gem/haml#lib/haml/parser.rb:207
def members; end
+
+ # pkg:gem/haml#lib/haml/parser.rb:207
def new(*_arg0); end
end
end
# Used for scanning old attributes, substituting the first '{'
#
-# source://haml//lib/haml/parser.rb#97
+# pkg:gem/haml#lib/haml/parser.rb:97
Haml::Parser::METHOD_CALL_PREFIX = T.let(T.unsafe(nil), String)
-# source://haml//lib/haml/parser.rb#81
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/haml#lib/haml/parser.rb:51
Haml::Parser::PLAIN_TEXT = T.let(T.unsafe(nil), Integer)
# @private
#
-# source://haml//lib/haml/parser.rb#223
+# pkg:gem/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
+ # pkg:gem/haml#lib/haml/parser.rb:224
def initialize(*args); end
- # Returns the value of attribute children
- #
- # @return [Object] the current value of children
+ # pkg:gem/haml#lib/haml/parser.rb:223
def children; end
- # Sets the attribute children
- #
- # @param value [Object] the value to set the attribute children to.
- # @return [Object] the newly set value
+ # pkg:gem/haml#lib/haml/parser.rb:223
def children=(_); end
- # source://haml//lib/haml/parser.rb#229
+ # pkg:gem/haml#lib/haml/parser.rb:229
def inspect; end
- # Returns the value of attribute line
- #
- # @return [Object] the current value of line
+ # pkg:gem/haml#lib/haml/parser.rb:223
def line; end
- # Sets the attribute line
- #
- # @param value [Object] the value to set the attribute line to.
- # @return [Object] the newly set value
+ # pkg:gem/haml#lib/haml/parser.rb:223
def line=(_); end
- # Returns the value of attribute parent
- #
- # @return [Object] the current value of parent
+ # pkg:gem/haml#lib/haml/parser.rb:223
def parent; end
- # Sets the attribute parent
- #
- # @param value [Object] the value to set the attribute parent to.
- # @return [Object] the newly set value
+ # pkg:gem/haml#lib/haml/parser.rb:223
def parent=(_); end
- # Returns the value of attribute type
- #
- # @return [Object] the current value of type
+ # pkg:gem/haml#lib/haml/parser.rb:223
def type; end
- # Sets the attribute type
- #
- # @param value [Object] the value to set the attribute type to.
- # @return [Object] the newly set value
+ # pkg:gem/haml#lib/haml/parser.rb:223
def type=(_); end
- # Returns the value of attribute value
- #
- # @return [Object] the current value of value
+ # pkg:gem/haml#lib/haml/parser.rb:223
def value; end
- # Sets the attribute value
- #
- # @param value [Object] the value to set the attribute value to.
- # @return [Object] the newly set value
+ # pkg:gem/haml#lib/haml/parser.rb:223
def value=(_); end
class << self
+ # pkg:gem/haml#lib/haml/parser.rb:223
def [](*_arg0); end
+
+ # pkg:gem/haml#lib/haml/parser.rb:223
def inspect; end
+
+ # pkg:gem/haml#lib/haml/parser.rb:223
def keyword_init?; end
+
+ # pkg:gem/haml#lib/haml/parser.rb:223
def members; end
+
+ # pkg:gem/haml#lib/haml/parser.rb:223
def new(*_arg0); end
end
end
-# source://haml//lib/haml/parser.rb#952
+# pkg:gem/haml#lib/haml/parser.rb:952
class Haml::Parser::ParserOptions
- # @return [ParserOptions] a new instance of ParserOptions
- #
- # source://haml//lib/haml/parser.rb#980
+ # pkg:gem/haml#lib/haml/parser.rb:980
def initialize(values = T.unsafe(nil)); end
- # source://haml//lib/haml/parser.rb#964
+ # pkg:gem/haml#lib/haml/parser.rb:964
def autoclose; end
- # source://haml//lib/haml/parser.rb#964
+ # pkg:gem/haml#lib/haml/parser.rb:964
def escape_html; end
- # source://haml//lib/haml/parser.rb#964
+ # pkg:gem/haml#lib/haml/parser.rb:964
def filename; end
- # source://haml//lib/haml/parser.rb#964
+ # pkg:gem/haml#lib/haml/parser.rb:964
def line; end
- # source://haml//lib/haml/parser.rb#964
+ # pkg:gem/haml#lib/haml/parser.rb:964
def mime_type; end
- # source://haml//lib/haml/parser.rb#964
+ # pkg:gem/haml#lib/haml/parser.rb:964
def preserve; end
- # source://haml//lib/haml/parser.rb#964
+ # pkg:gem/haml#lib/haml/parser.rb:964
def remove_whitespace; end
- # source://haml//lib/haml/parser.rb#964
+ # pkg:gem/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
+# pkg:gem/haml#lib/haml/parser.rb:954
Haml::Parser::ParserOptions::AVAILABLE_OPTIONS = T.let(T.unsafe(nil), Array)
-# source://haml//lib/haml/parser.rb#967
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/haml#lib/haml/parser.rb:55
Haml::Parser::SPECIAL_CHARACTERS = T.let(T.unsafe(nil), Array)
-# source://haml//lib/haml/parser.rb#82
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/haml#lib/haml/ruby_expression.rb:5
class Haml::RubyExpression < ::Ripper
private
- # @raise [ParseError]
- #
- # source://haml//lib/haml/ruby_expression.rb#28
+ # pkg:gem/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
+ # pkg:gem/haml#lib/haml/ruby_expression.rb:15
def string_literal?(code); end
- # @return [Boolean]
- #
- # source://haml//lib/haml/ruby_expression.rb#8
+ # pkg:gem/haml#lib/haml/ruby_expression.rb:8
def syntax_error?(code); end
end
end
-# source://haml//lib/haml/ruby_expression.rb#6
+# pkg:gem/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
+# pkg:gem/haml#lib/haml/string_splitter.rb:9
class Haml::StringSplitter < ::Temple::Filter
- # source://haml//lib/haml/string_splitter.rb#88
+ # pkg:gem/haml#lib/haml/string_splitter.rb:88
def on_dynamic(code); end
private
- # @return [Boolean]
- #
- # source://haml//lib/haml/string_splitter.rb#106
+ # pkg:gem/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
+ # pkg:gem/haml#lib/haml/string_splitter.rb:13
def compile(code); end
private
- # source://haml//lib/haml/string_splitter.rb#41
+ # pkg:gem/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
+ # pkg:gem/haml#lib/haml/string_splitter.rb:59
def escape_quotes(beg_str, end_str); end
- # source://haml//lib/haml/string_splitter.rb#68
+ # pkg:gem/haml#lib/haml/string_splitter.rb:68
def shift_balanced_embexpr(tokens); end
- # source://haml//lib/haml/string_splitter.rb#27
+ # pkg:gem/haml#lib/haml/string_splitter.rb:27
def strip_quotes!(tokens); end
end
end
-# source://haml//lib/haml/string_splitter.rb#117
+# pkg:gem/haml#lib/haml/string_splitter.rb:117
class Haml::StringSplitter::SyntaxChecker < ::Ripper
private
- # @raise [ParseError]
- #
- # source://haml//lib/haml/string_splitter.rb#129
+ # pkg:gem/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
+ # pkg:gem/haml#lib/haml/string_splitter.rb:120
def syntax_error?(code); end
end
end
-# source://haml//lib/haml/string_splitter.rb#118
+# pkg:gem/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
@@ -1384,52 +1270,52 @@ class Haml::StringSplitter::SyntaxChecker::ParseError < ::StandardError; end
# It's not particularly interesting,
# except in that it's a subclass of {Haml::Error}.
#
-# source://haml//lib/haml/error.rb#59
+# pkg:gem/haml#lib/haml/error.rb:59
class Haml::SyntaxError < ::Haml::Error; end
-# source://haml//lib/haml/template.rb#0
+# pkg:gem/haml#lib/haml/template.rb:7
class Haml::Template < ::Temple::Templates::Tilt
extend ::Haml::TemplateExtension
end
-# source://haml//lib/haml/template.rb#12
+# pkg:gem/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
+ # pkg:gem/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
+# pkg:gem/haml#lib/haml/engine.rb:50
class Haml::TempleEngine < ::Haml::Engine
- # source://haml//lib/haml/engine.rb#51
+ # pkg:gem/haml#lib/haml/engine.rb:51
def compile(template); end
- # source://haml//lib/haml/engine.rb#55
+ # pkg:gem/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
+# pkg:gem/haml#lib/haml/temple_line_counter.rb:5
module Haml::TempleLineCounter
class << self
- # source://haml//lib/haml/temple_line_counter.rb#8
+ # pkg:gem/haml#lib/haml/temple_line_counter.rb:8
def count_lines(exp); end
end
end
-# source://haml//lib/haml/temple_line_counter.rb#6
+# pkg:gem/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
+# pkg:gem/haml#lib/haml/util.rb:14
module Haml::Util
extend ::Haml::Util
@@ -1449,7 +1335,7 @@ module Haml::Util
# 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
+ # pkg:gem/haml#lib/haml/util.rb:172
def balance(scanner, start, finish, count = T.unsafe(nil)); end
# Checks that the encoding of a string is valid
@@ -1458,12 +1344,12 @@ module Haml::Util
# 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
+ # @return [String] `str`, potentially with encoding gotchas like BOMs removed
#
- # source://haml//lib/haml/util.rb#65
+ # pkg:gem/haml#lib/haml/util.rb:66
def check_encoding(str); end
# Like {\#check\_encoding}, but also checks for a Ruby-style `-# coding:` comment
@@ -1480,18 +1366,16 @@ module Haml::Util
# 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
+ # @return [String] The original string encoded properly
+ # @raise [ArgumentError] if the document declares an unknown encoding
#
- # source://haml//lib/haml/util.rb#112
+ # pkg:gem/haml#lib/haml/util.rb:113
def check_haml_encoding(str, &block); end
- # @return [Boolean]
- #
- # source://haml//lib/haml/util.rb#200
+ # pkg:gem/haml#lib/haml/util.rb:201
def contains_interpolation?(str); end
# Scans through a string looking for the interoplation-opening `#{`
@@ -1502,10 +1386,10 @@ module Haml::Util
# 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
+ # @return [String] The text remaining in the scanner after all `#{`s have been processed
#
- # source://haml//lib/haml/util.rb#150
+ # pkg:gem/haml#lib/haml/util.rb:151
def handle_interpolation(str); end
# Formats a string for use in error messages about indentation.
@@ -1513,17 +1397,17 @@ module Haml::Util
# @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
+ # pkg:gem/haml#lib/haml/util.rb:188
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]
+ # @param obj {Object}
+ # @return {String}
#
- # source://haml//lib/haml/util.rb#129
+ # pkg:gem/haml#lib/haml/util.rb:130
def inspect_obj(obj); end
# Whether or not ActionView's XSS protection is available and enabled,
@@ -1532,17 +1416,17 @@ module Haml::Util
#
# @return [Boolean]
#
- # source://haml//lib/haml/util.rb#51
+ # pkg:gem/haml#lib/haml/util.rb:52
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
+ # pkg:gem/haml#lib/haml/util.rb:38
def silence_warnings; end
- # source://haml//lib/haml/util.rb#204
+ # pkg:gem/haml#lib/haml/util.rb:205
def unescape_interpolation(str, escape_html = T.unsafe(nil)); end
private
@@ -1550,31 +1434,33 @@ module Haml::Util
# 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,
+ # @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
+ # pkg:gem/haml#lib/haml/util.rb:237
def parse_haml_magic_comment(str); end
- # source://haml//lib/haml/util.rb#248
+ # pkg:gem/haml#lib/haml/util.rb:249
def try_parse_haml_emacs_magic_comment(scanner); end
class << self
+ # pkg:gem/haml#lib/haml/util.rb:20
def escape_html(_arg0); end
# TODO: Remove unescape_interpolation's workaround and get rid of `respond_to?`.
#
- # source://haml//lib/haml/util.rb#29
+ # pkg:gem/haml#lib/haml/util.rb:30
def escape_html_safe(html); end
end
end
-# source://haml//lib/haml/version.rb#3
+# pkg:gem/haml#lib/haml/version.rb:3
Haml::VERSION = T.let(T.unsafe(nil), String)
-# source://haml//lib/haml/whitespace.rb#3
+# pkg:gem/haml#lib/haml/whitespace.rb:3
class Haml::Whitespace < ::Temple::Filter
- # source://haml//lib/haml/whitespace.rb#4
+ # pkg:gem/haml#lib/haml/whitespace.rb:4
def on_whitespace; end
end
diff --git a/sorbet/rbi/gems/i18n@1.12.0.rbi b/sorbet/rbi/gems/i18n@1.14.8.rbi
similarity index 60%
rename from sorbet/rbi/gems/i18n@1.12.0.rbi
rename to sorbet/rbi/gems/i18n@1.14.8.rbi
index 616f21d..2fd9c08 100644
--- a/sorbet/rbi/gems/i18n@1.12.0.rbi
+++ b/sorbet/rbi/gems/i18n@1.14.8.rbi
@@ -4,95 +4,296 @@
# This is an autogenerated file for types exported from the `i18n` gem.
# Please instead update this file by running `bin/tapioca gem i18n`.
-# source://i18n//lib/i18n/gettext/po_parser.rb#15
+
+# pkg:gem/i18n#lib/i18n/gettext/po_parser.rb:15
module GetText; end
-# source://i18n//lib/i18n/gettext/po_parser.rb#17
+# pkg:gem/i18n#lib/i18n/gettext/po_parser.rb:17
class GetText::PoParser < ::Racc::Parser
- # source://i18n//lib/i18n/gettext/po_parser.rb#19
+ # pkg:gem/i18n#lib/i18n/gettext/po_parser.rb:19
def _(x); end
+ # pkg:gem/i18n#lib/i18n/gettext/po_parser.rb:282
def _reduce_10(val, _values, result); end
+
+ # pkg:gem/i18n#lib/i18n/gettext/po_parser.rb:295
def _reduce_12(val, _values, result); end
+
+ # pkg:gem/i18n#lib/i18n/gettext/po_parser.rb:302
def _reduce_13(val, _values, result); end
+
+ # pkg:gem/i18n#lib/i18n/gettext/po_parser.rb:309
def _reduce_14(val, _values, result); end
+
+ # pkg:gem/i18n#lib/i18n/gettext/po_parser.rb:316
def _reduce_15(val, _values, result); end
+
+ # pkg:gem/i18n#lib/i18n/gettext/po_parser.rb:235
def _reduce_5(val, _values, result); end
+
+ # pkg:gem/i18n#lib/i18n/gettext/po_parser.rb:246
def _reduce_8(val, _values, result); end
+
+ # pkg:gem/i18n#lib/i18n/gettext/po_parser.rb:264
def _reduce_9(val, _values, result); end
- # source://i18n//lib/i18n/gettext/po_parser.rb#323
+ # pkg:gem/i18n#lib/i18n/gettext/po_parser.rb:323
def _reduce_none(val, _values, result); end
+ # pkg:gem/i18n#lib/i18n/gettext/po_parser.rb:23
def next_token; end
+
+ # pkg:gem/i18n#lib/i18n/gettext/po_parser.rb:23
def on_comment(comment); end
+
+ # pkg:gem/i18n#lib/i18n/gettext/po_parser.rb:23
def on_message(msgid, msgstr); end
+
+ # pkg:gem/i18n#lib/i18n/gettext/po_parser.rb:23
def parse(str, data, ignore_fuzzy = T.unsafe(nil)); end
+
+ # pkg:gem/i18n#lib/i18n/gettext/po_parser.rb:23
def unescape(orig); end
end
-# source://i18n//lib/i18n/gettext/po_parser.rb#184
+# pkg:gem/i18n#lib/i18n/gettext/po_parser.rb:184
GetText::PoParser::Racc_arg = T.let(T.unsafe(nil), Array)
-# source://i18n//lib/i18n/gettext/po_parser.rb#221
+# pkg:gem/i18n#lib/i18n/gettext/po_parser.rb:221
GetText::PoParser::Racc_debug_parser = T.let(T.unsafe(nil), TrueClass)
-# source://i18n//lib/i18n/gettext/po_parser.rb#200
+# pkg:gem/i18n#lib/i18n/gettext/po_parser.rb:200
GetText::PoParser::Racc_token_to_s_table = T.let(T.unsafe(nil), Array)
+# This module allows you to easily cache all responses from the backend - thus
+# speeding up the I18n aspects of your application quite a bit.
+#
+# To enable caching you can simply include the Cache module to the Simple
+# backend - or whatever other backend you are using:
+#
+# I18n::Backend::Simple.send(:include, I18n::Backend::Cache)
+#
+# You will also need to set a cache store implementation that you want to use:
+#
+# I18n.cache_store = ActiveSupport::Cache.lookup_store(:memory_store)
+#
+# You can use any cache implementation you want that provides the same API as
+# ActiveSupport::Cache (only the methods #fetch and #write are being used).
+#
+# The cache_key implementation by default assumes you pass values that return
+# a valid key from #hash (see
+# https://www.ruby-doc.org/core/classes/Object.html#M000337). However, you can
+# configure your own digest method via which responds to #hexdigest (see
+# https://ruby-doc.org/stdlib/libdoc/openssl/rdoc/OpenSSL/Digest.html):
+#
+# I18n.cache_key_digest = OpenSSL::Digest::SHA256.new
+#
+# If you use a lambda as a default value in your translation like this:
+#
+# I18n.t(:"date.order", :default => lambda {[:month, :day, :year]})
+#
+# Then you will always have a cache miss, because each time this method
+# is called the lambda will have a different hash value. If you know
+# the result of the lambda is a constant as in the example above, then
+# to cache this you can make the lambda a constant, like this:
+#
+# DEFAULT_DATE_ORDER = lambda {[:month, :day, :year]}
+# ...
+# I18n.t(:"date.order", :default => DEFAULT_DATE_ORDER)
+#
+# If the lambda may result in different values for each call then consider
+# also using the Memoize backend.
+#
+# The Cascade module adds the ability to do cascading lookups to backends that
+# are compatible to the Simple backend.
+#
+# By cascading lookups we mean that for any key that can not be found the
+# Cascade module strips one segment off the scope part of the key and then
+# tries to look up the key in that scope.
+#
+# E.g. when a lookup for the key :"foo.bar.baz" does not yield a result then
+# the segment :bar will be stripped off the scope part :"foo.bar" and the new
+# scope :foo will be used to look up the key :baz. If that does not succeed
+# then the remaining scope segment :foo will be omitted, too, and again the
+# key :baz will be looked up (now with no scope).
+#
+# To enable a cascading lookup one passes the :cascade option:
+#
+# I18n.t(:'foo.bar.baz', :cascade => true)
+#
+# This will return the first translation found for :"foo.bar.baz", :"foo.baz"
+# or :baz in this order.
+#
+# The cascading lookup takes precedence over resolving any given defaults.
+# I.e. defaults will kick in after the cascading lookups haven't succeeded.
+#
+# This behavior is useful for libraries like ActiveRecord validations where
+# the library wants to give users a bunch of more or less fine-grained options
+# of scopes for a particular key.
+#
+# Thanks to Clemens Kofler for the initial idea and implementation! See
+# http://github.com/clemens/i18n-cascading-backend
+# I18n locale fallbacks are useful when you want your application to use
+# translations from other locales when translations for the current locale are
+# missing. E.g. you might want to use :en translations when translations in
+# your applications main locale :de are missing.
+#
+# To enable locale fallbacks you can simply include the Fallbacks module to
+# the Simple backend - or whatever other backend you are using:
+#
+# I18n::Backend::Simple.include(I18n::Backend::Fallbacks)
+# The InterpolationCompiler module contains optimizations that can tremendously
+# speed up the interpolation process on the Simple backend.
+#
+# It works by defining a pre-compiled method on stored translation Strings that
+# already bring all the knowledge about contained interpolation variables etc.
+# so that the actual recurring interpolation will be very fast.
+#
+# To enable pre-compiled interpolations you can simply include the
+# InterpolationCompiler module to the Simple backend:
+#
+# I18n::Backend::Simple.include(I18n::Backend::InterpolationCompiler)
+#
+# Note that InterpolationCompiler does not yield meaningful results and consequently
+# should not be used with Ruby 1.9 (YARV) but improves performance everywhere else
+# (jRuby, Rubinius).
+# Memoize module simply memoizes the values returned by lookup using
+# a flat hash and can tremendously speed up the lookup process in a backend.
+#
+# To enable it you can simply include the Memoize module to your backend:
+#
+# I18n::Backend::Simple.include(I18n::Backend::Memoize)
+#
+# Notice that it's the responsibility of the backend to define whenever the
+# cache should be cleaned.
+# I18n translation metadata is useful when you want to access information
+# about how a translation was looked up, pluralized or interpolated in
+# your application.
+#
+# msg = I18n.t(:message, :default => 'Hi!', :scope => :foo)
+# msg.translation_metadata
+# # => { :key => :message, :scope => :foo, :default => 'Hi!' }
+#
+# If a :count option was passed to #translate it will be set to the metadata.
+# Likewise, if any interpolation variables were passed they will also be set.
+#
+# To enable translation metadata you can simply include the Metadata module
+# into the Simple backend class - or whatever other backend you are using:
+#
+# I18n::Backend::Simple.include(I18n::Backend::Metadata)
+#
+# I18n Pluralization are useful when you want your application to
+# customize pluralization rules.
+#
+# To enable locale specific pluralizations you can simply include the
+# Pluralization module to the Simple backend - or whatever other backend you
+# are using.
+#
+# I18n::Backend::Simple.include(I18n::Backend::Pluralization)
+#
+# You also need to make sure to provide pluralization algorithms to the
+# backend, i.e. include them to your I18n.load_path accordingly.
+# heavily based on Masao Mutoh's gettext String interpolation extension
+# http://github.com/mutoh/gettext/blob/f6566738b981fe0952548c421042ad1e0cdfb31e/lib/gettext/core_ext/string.rb
+# Locale Fallbacks
+#
+# Extends the I18n module to hold a fallbacks instance which is set to an
+# instance of I18n::Locale::Fallbacks by default but can be swapped with a
+# different implementation.
+#
+# Locale fallbacks will compute a number of fallback locales for a given locale.
+# For example:
+#
+#
+# I18n.fallbacks[:"es-MX"] # => [:"es-MX", :es, :en]
+#
+# Locale fallbacks always fall back to
+#
+# * all parent locales of a given locale (e.g. :es for :"es-MX") first,
+# * the current default locales and all of their parents second
+#
+# The default locales are set to [] by default but can be set to something else.
+#
+# One can additionally add any number of additional fallback locales manually.
+# These will be added before the default locales to the fallback chain. For
+# example:
+#
+# # using a custom locale as default fallback locale
+#
+# I18n.fallbacks = I18n::Locale::Fallbacks.new(:"en-GB", :"de-AT" => :de, :"de-CH" => :de)
+# I18n.fallbacks[:"de-AT"] # => [:"de-AT", :de, :"en-GB", :en]
+# I18n.fallbacks[:"de-CH"] # => [:"de-CH", :de, :"en-GB", :en]
+#
+# # mapping fallbacks to an existing instance
+#
+# # people speaking Catalan also speak Spanish as spoken in Spain
+# fallbacks = I18n.fallbacks
+# fallbacks.map(:ca => :"es-ES")
+# fallbacks[:ca] # => [:ca, :"es-ES", :es, :"en-US", :en]
+#
+# # people speaking Arabian as spoken in Palestine also speak Hebrew as spoken in Israel
+# fallbacks.map(:"ar-PS" => :"he-IL")
+# fallbacks[:"ar-PS"] # => [:"ar-PS", :ar, :"he-IL", :he, :"en-US", :en]
+# fallbacks[:"ar-EG"] # => [:"ar-EG", :ar, :"en-US", :en]
+#
+# # people speaking Sami as spoken in Finland also speak Swedish and Finnish as spoken in Finland
+# fallbacks.map(:sms => [:"se-FI", :"fi-FI"])
+# fallbacks[:sms] # => [:sms, :"se-FI", :se, :"fi-FI", :fi, :"en-US", :en]
+# RFC 4646/47 compliant Locale tag implementation that parses locale tags to
+# subtags such as language, script, region, variant etc.
+#
+# For more information see by http://en.wikipedia.org/wiki/IETF_language_tag
+#
+# Rfc4646::Parser does not implement grandfathered tags.
# Simple Locale tag implementation that computes subtags by simply splitting
# the locale tag at '-' occurrences.
#
-# source://i18n//lib/i18n/version.rb#3
+# pkg:gem/i18n#lib/i18n/version.rb:3
module I18n
extend ::I18n::Base
class << self
- # source://i18n//lib/i18n/backend/cache.rb#64
+ # pkg:gem/i18n#lib/i18n/backend/cache.rb:64
def cache_key_digest; end
- # source://i18n//lib/i18n/backend/cache.rb#68
+ # pkg:gem/i18n#lib/i18n/backend/cache.rb:68
def cache_key_digest=(key_digest); end
- # source://i18n//lib/i18n/backend/cache.rb#56
+ # pkg:gem/i18n#lib/i18n/backend/cache.rb:56
def cache_namespace; end
- # source://i18n//lib/i18n/backend/cache.rb#60
+ # pkg:gem/i18n#lib/i18n/backend/cache.rb:60
def cache_namespace=(namespace); end
- # source://i18n//lib/i18n/backend/cache.rb#48
+ # pkg:gem/i18n#lib/i18n/backend/cache.rb:48
def cache_store; end
- # source://i18n//lib/i18n/backend/cache.rb#52
+ # pkg:gem/i18n#lib/i18n/backend/cache.rb:52
def cache_store=(store); end
# Returns the current fallbacks implementation. Defaults to +I18n::Locale::Fallbacks+.
#
- # source://i18n//lib/i18n/backend/fallbacks.rb#17
+ # pkg:gem/i18n#lib/i18n/backend/fallbacks.rb:17
def fallbacks; end
# Sets the current fallbacks implementation. Use this to set a different fallbacks implementation.
#
- # source://i18n//lib/i18n/backend/fallbacks.rb#23
+ # pkg:gem/i18n#lib/i18n/backend/fallbacks.rb:23
def fallbacks=(fallbacks); end
# Return String or raises MissingInterpolationArgument exception.
# Missing argument's logic is handled by I18n.config.missing_interpolation_argument_handler.
#
- # @raise [ReservedInterpolationKey]
- #
- # source://i18n//lib/i18n/interpolate/ruby.rb#16
+ # pkg:gem/i18n#lib/i18n/interpolate/ruby.rb:23
def interpolate(string, values); end
- # source://i18n//lib/i18n/interpolate/ruby.rb#22
+ # pkg:gem/i18n#lib/i18n/interpolate/ruby.rb:29
def interpolate_hash(string, values); end
- # source://i18n//lib/i18n.rb#37
+ # pkg:gem/i18n#lib/i18n.rb:38
def new_double_nested_cache; end
- # @return [Boolean]
- #
- # source://i18n//lib/i18n/backend/cache.rb#72
+ # pkg:gem/i18n#lib/i18n/backend/cache.rb:72
def perform_caching?; end
# Marks a key as reserved. Reserved keys are used internally,
@@ -100,70 +301,60 @@ module I18n
# extra keys as I18n options, you should call I18n.reserve_key
# before any I18n.translate (etc) calls are made.
#
- # source://i18n//lib/i18n.rb#45
+ # pkg:gem/i18n#lib/i18n.rb:46
def reserve_key(key); end
- # source://i18n//lib/i18n.rb#50
+ # pkg:gem/i18n#lib/i18n.rb:51
def reserved_keys_pattern; end
end
end
-# source://i18n//lib/i18n/exceptions.rb#16
+# pkg:gem/i18n#lib/i18n/exceptions.rb:14
class I18n::ArgumentError < ::ArgumentError; end
-# source://i18n//lib/i18n/backend.rb#4
+# pkg:gem/i18n#lib/i18n/backend.rb:4
module I18n::Backend; end
-# source://i18n//lib/i18n/backend/base.rb#8
+# pkg:gem/i18n#lib/i18n/backend/base.rb:8
module I18n::Backend::Base
include ::I18n::Backend::Transliterator
# Returns an array of locales for which translations are available
# ignoring the reserved translation meta data key :i18n.
#
- # @raise [NotImplementedError]
- #
- # source://i18n//lib/i18n/backend/base.rb#94
+ # pkg:gem/i18n#lib/i18n/backend/base.rb:97
def available_locales; end
- # source://i18n//lib/i18n/backend/base.rb#102
+ # pkg:gem/i18n#lib/i18n/backend/base.rb:105
def eager_load!; end
- # @return [Boolean]
- #
- # source://i18n//lib/i18n/backend/base.rb#68
+ # pkg:gem/i18n#lib/i18n/backend/base.rb:71
def exists?(locale, key, options = T.unsafe(nil)); end
# Accepts a list of paths to translation files. Loads translations from
# plain Ruby (*.rb), YAML files (*.yml), or JSON files (*.json). See #load_rb, #load_yml, and #load_json
# for details.
#
- # source://i18n//lib/i18n/backend/base.rb#14
+ # pkg:gem/i18n#lib/i18n/backend/base.rb:14
def load_translations(*filenames); end
# Acts the same as +strftime+, but uses a localized version of the
# format string. Takes a key from the date/time formats translations as
# a format argument (
e.g.,
:short in
:'date.formats').
#
- # @raise [ArgumentError]
- #
- # source://i18n//lib/i18n/backend/base.rb#75
+ # pkg:gem/i18n#lib/i18n/backend/base.rb:78
def localize(locale, object, format = T.unsafe(nil), options = T.unsafe(nil)); end
- # source://i18n//lib/i18n/backend/base.rb#98
+ # pkg:gem/i18n#lib/i18n/backend/base.rb:101
def reload!; end
# This method receives a locale, a data hash and options for storing translations.
# Should be implemented
#
- # @raise [NotImplementedError]
- #
- # source://i18n//lib/i18n/backend/base.rb#24
+ # pkg:gem/i18n#lib/i18n/backend/base.rb:24
def store_translations(locale, data, options = T.unsafe(nil)); end
- # @raise [I18n::ArgumentError]
- #
- # source://i18n//lib/i18n/backend/base.rb#28
+ # pkg:gem/i18n#lib/i18n/backend/base.rb:28
def translate(locale, key, options = T.unsafe(nil)); end
protected
@@ -174,7 +365,7 @@ module I18n::Backend::Base
# ann: 'good', john: 'big'
# #=> { people: { ann: "Ann is good", john: "John is big" } }
#
- # source://i18n//lib/i18n/backend/base.rb#202
+ # pkg:gem/i18n#lib/i18n/backend/base.rb:217
def deep_interpolate(locale, data, values = T.unsafe(nil)); end
# Evaluates defaults.
@@ -182,12 +373,10 @@ module I18n::Backend::Base
# first translation that can be resolved. Otherwise it tries to resolve
# the translation directly.
#
- # source://i18n//lib/i18n/backend/base.rb#125
+ # pkg:gem/i18n#lib/i18n/backend/base.rb:128
def default(locale, object, subject, options = T.unsafe(nil)); end
- # @return [Boolean]
- #
- # source://i18n//lib/i18n/backend/base.rb#108
+ # pkg:gem/i18n#lib/i18n/backend/base.rb:111
def eager_loaded?; end
# Interpolates values into a given subject.
@@ -198,10 +387,10 @@ module I18n::Backend::Base
#
# if the given subject is an array then:
# each element of the array is recursively interpolated (until it finds a string)
- # method interpolates ["yes, %{user}", ["maybe no, %{user}, "no, %{user}"]], :user => "bartuz"
- # # => "["yes, bartuz",["maybe no, bartuz", "no, bartuz"]]"
+ # method interpolates ["yes, %{user}", ["maybe no, %{user}", "no, %{user}"]], :user => "bartuz"
+ # # => ["yes, bartuz", ["maybe no, bartuz", "no, bartuz"]]
#
- # source://i18n//lib/i18n/backend/base.rb#186
+ # pkg:gem/i18n#lib/i18n/backend/base.rb:201
def interpolate(locale, subject, values = T.unsafe(nil)); end
# Loads a single translations file by delegating to #load_rb or
@@ -209,43 +398,36 @@ module I18n::Backend::Base
# data to the existing translations. Raises I18n::UnknownFileType
# for all other file extensions.
#
- # @raise [UnknownFileType]
- #
- # source://i18n//lib/i18n/backend/base.rb#225
+ # pkg:gem/i18n#lib/i18n/backend/base.rb:240
def load_file(filename); end
# Loads a JSON translations file. The data must have locales as
# toplevel keys.
#
- # source://i18n//lib/i18n/backend/base.rb#261
+ # pkg:gem/i18n#lib/i18n/backend/base.rb:276
def load_json(filename); end
# Loads a plain Ruby translations file. eval'ing the file must yield
# a Hash containing translation data with locales as toplevel keys.
#
- # source://i18n//lib/i18n/backend/base.rb#239
+ # pkg:gem/i18n#lib/i18n/backend/base.rb:254
def load_rb(filename); end
- # Loads a YAML translations file. The data must have locales as
- # toplevel keys.
- #
- # source://i18n//lib/i18n/backend/base.rb#246
+ # pkg:gem/i18n#lib/i18n/backend/base.rb:272
def load_yaml(filename); end
# Loads a YAML translations file. The data must have locales as
# toplevel keys.
#
- # source://i18n//lib/i18n/backend/base.rb#246
+ # pkg:gem/i18n#lib/i18n/backend/base.rb:261
def load_yml(filename); end
# The method which actually looks up for the translation in the store.
#
- # @raise [NotImplementedError]
- #
- # source://i18n//lib/i18n/backend/base.rb#113
+ # pkg:gem/i18n#lib/i18n/backend/base.rb:116
def lookup(locale, key, scope = T.unsafe(nil), options = T.unsafe(nil)); end
- # source://i18n//lib/i18n/backend/base.rb#293
+ # pkg:gem/i18n#lib/i18n/backend/base.rb:308
def pluralization_key(entry, count); end
# Picks a translation from a pluralized mnemonic subkey according to English
@@ -257,9 +439,7 @@ module I18n::Backend::Base
# not standard with regards to the CLDR pluralization rules.
# Other backends can implement more flexible or complex pluralization rules.
#
- # @raise [InvalidPluralizationData]
- #
- # source://i18n//lib/i18n/backend/base.rb#167
+ # pkg:gem/i18n#lib/i18n/backend/base.rb:182
def pluralize(locale, entry, count); end
# Resolves a translation.
@@ -267,64 +447,57 @@ module I18n::Backend::Base
# given options. If it is a Proc then it will be evaluated. All other
# subjects will be returned directly.
#
- # source://i18n//lib/i18n/backend/base.rb#142
+ # pkg:gem/i18n#lib/i18n/backend/base.rb:150
def resolve(locale, object, subject, options = T.unsafe(nil)); end
- # Resolves a translation.
- # If the given subject is a Symbol, it will be translated with the
- # given options. If it is a Proc then it will be evaluated. All other
- # subjects will be returned directly.
- #
- # source://i18n//lib/i18n/backend/base.rb#142
+ # pkg:gem/i18n#lib/i18n/backend/base.rb:172
def resolve_entry(locale, object, subject, options = T.unsafe(nil)); end
- # @return [Boolean]
- #
- # source://i18n//lib/i18n/backend/base.rb#117
+ # pkg:gem/i18n#lib/i18n/backend/base.rb:120
def subtrees?; end
- # source://i18n//lib/i18n/backend/base.rb#274
+ # pkg:gem/i18n#lib/i18n/backend/base.rb:289
def translate_localization_format(locale, object, format, options); end
end
# TODO Should the cache be cleared if new translations are stored?
#
-# source://i18n//lib/i18n/backend/cache.rb#79
+# pkg:gem/i18n#lib/i18n/backend/cache.rb:79
module I18n::Backend::Cache
- # source://i18n//lib/i18n/backend/cache.rb#80
+ # pkg:gem/i18n#lib/i18n/backend/cache.rb:80
def translate(locale, key, options = T.unsafe(nil)); end
protected
- # source://i18n//lib/i18n/backend/cache.rb#93
+ # pkg:gem/i18n#lib/i18n/backend/cache.rb:93
def _fetch(cache_key, &block); end
- # source://i18n//lib/i18n/backend/cache.rb#101
+ # pkg:gem/i18n#lib/i18n/backend/cache.rb:101
def cache_key(locale, key, options); end
- # source://i18n//lib/i18n/backend/cache.rb#86
+ # pkg:gem/i18n#lib/i18n/backend/cache.rb:86
def fetch(cache_key, &block); end
private
- # source://i18n//lib/i18n/backend/cache.rb#108
+ # pkg:gem/i18n#lib/i18n/backend/cache.rb:108
def digest_item(key); end
end
# Overwrites the Base load_file method to cache loaded file contents.
#
-# source://i18n//lib/i18n/backend/cache_file.rb#8
+# pkg:gem/i18n#lib/i18n/backend/cache_file.rb:8
module I18n::Backend::CacheFile
# Optionally provide path_roots array to normalize filename paths,
# to make the cached i18n data portable across environments.
#
- # source://i18n//lib/i18n/backend/cache_file.rb#11
+ # pkg:gem/i18n#lib/i18n/backend/cache_file.rb:11
def path_roots; end
# Optionally provide path_roots array to normalize filename paths,
# to make the cached i18n data portable across environments.
#
- # source://i18n//lib/i18n/backend/cache_file.rb#11
+ # pkg:gem/i18n#lib/i18n/backend/cache_file.rb:11
def path_roots=(_arg0); end
protected
@@ -332,18 +505,18 @@ module I18n::Backend::CacheFile
# Track loaded translation files in the `i18n.load_file` scope,
# and skip loading the file if its contents are still up-to-date.
#
- # source://i18n//lib/i18n/backend/cache_file.rb#17
+ # pkg:gem/i18n#lib/i18n/backend/cache_file.rb:17
def load_file(filename); end
# Translate absolute filename to relative path for i18n key.
#
- # source://i18n//lib/i18n/backend/cache_file.rb#28
+ # pkg:gem/i18n#lib/i18n/backend/cache_file.rb:28
def normalized_path(file); end
end
-# source://i18n//lib/i18n/backend/cascade.rb#35
+# pkg:gem/i18n#lib/i18n/backend/cascade.rb:35
module I18n::Backend::Cascade
- # source://i18n//lib/i18n/backend/cascade.rb#36
+ # pkg:gem/i18n#lib/i18n/backend/cascade.rb:36
def lookup(locale, key, scope = T.unsafe(nil), options = T.unsafe(nil)); end
end
@@ -362,72 +535,62 @@ end
# The implementation assumes that all backends added to the Chain implement
# a lookup method with the same API as Simple backend does.
#
-# source://i18n//lib/i18n/backend/chain.rb#19
+# Fallback translations using the :default option are only used by the last backend of a chain.
+#
+# pkg:gem/i18n#lib/i18n/backend/chain.rb:21
class I18n::Backend::Chain
include ::I18n::Backend::Transliterator
include ::I18n::Backend::Base
include ::I18n::Backend::Chain::Implementation
end
-# source://i18n//lib/i18n/backend/chain.rb#20
+# pkg:gem/i18n#lib/i18n/backend/chain.rb:22
module I18n::Backend::Chain::Implementation
include ::I18n::Backend::Transliterator
include ::I18n::Backend::Base
- # source://i18n//lib/i18n/backend/chain.rb#25
+ # pkg:gem/i18n#lib/i18n/backend/chain.rb:27
def initialize(*backends); end
- # source://i18n//lib/i18n/backend/chain.rb#50
+ # pkg:gem/i18n#lib/i18n/backend/chain.rb:52
def available_locales; end
- # Returns the value of attribute backends.
- #
- # source://i18n//lib/i18n/backend/chain.rb#23
+ # pkg:gem/i18n#lib/i18n/backend/chain.rb:25
def backends; end
- # Sets the attribute backends
- #
- # @param value the value to set the attribute backends to.
- #
- # source://i18n//lib/i18n/backend/chain.rb#23
+ # pkg:gem/i18n#lib/i18n/backend/chain.rb:25
def backends=(_arg0); end
- # source://i18n//lib/i18n/backend/chain.rb#42
+ # pkg:gem/i18n#lib/i18n/backend/chain.rb:44
def eager_load!; end
- # @return [Boolean]
- #
- # source://i18n//lib/i18n/backend/chain.rb#74
+ # pkg:gem/i18n#lib/i18n/backend/chain.rb:76
def exists?(locale, key, options = T.unsafe(nil)); end
- # @return [Boolean]
- #
- # source://i18n//lib/i18n/backend/chain.rb#29
+ # pkg:gem/i18n#lib/i18n/backend/chain.rb:31
def initialized?; end
- # source://i18n//lib/i18n/backend/chain.rb#80
+ # pkg:gem/i18n#lib/i18n/backend/chain.rb:82
def localize(locale, object, format = T.unsafe(nil), options = T.unsafe(nil)); end
- # source://i18n//lib/i18n/backend/chain.rb#38
+ # pkg:gem/i18n#lib/i18n/backend/chain.rb:40
def reload!; end
- # source://i18n//lib/i18n/backend/chain.rb#46
+ # pkg:gem/i18n#lib/i18n/backend/chain.rb:48
def store_translations(locale, data, options = T.unsafe(nil)); end
- # source://i18n//lib/i18n/backend/chain.rb#54
+ # pkg:gem/i18n#lib/i18n/backend/chain.rb:56
def translate(locale, key, default_options = T.unsafe(nil)); end
protected
- # source://i18n//lib/i18n/backend/chain.rb#90
+ # pkg:gem/i18n#lib/i18n/backend/chain.rb:92
def init_translations; end
- # @return [Boolean]
- #
- # source://i18n//lib/i18n/backend/chain.rb#106
+ # pkg:gem/i18n#lib/i18n/backend/chain.rb:108
def namespace_lookup?(result, options); end
- # source://i18n//lib/i18n/backend/chain.rb#96
+ # pkg:gem/i18n#lib/i18n/backend/chain.rb:98
def translations; end
private
@@ -437,21 +600,19 @@ module I18n::Backend::Chain::Implementation
# it is wise to have our own copy. We underscore it
# to not pollute the namespace of the including class.
#
- # source://i18n//lib/i18n/backend/chain.rb#115
+ # pkg:gem/i18n#lib/i18n/backend/chain.rb:117
def _deep_merge(hash, other_hash); end
end
-# source://i18n//lib/i18n/backend/fallbacks.rb#30
+# pkg:gem/i18n#lib/i18n/backend/fallbacks.rb:30
module I18n::Backend::Fallbacks
- # @return [Boolean]
- #
- # source://i18n//lib/i18n/backend/fallbacks.rb#94
+ # pkg:gem/i18n#lib/i18n/backend/fallbacks.rb:98
def exists?(locale, key, options = T.unsafe(nil)); end
- # source://i18n//lib/i18n/backend/fallbacks.rb#85
+ # pkg:gem/i18n#lib/i18n/backend/fallbacks.rb:89
def extract_non_symbol_default!(options); end
- # source://i18n//lib/i18n/backend/fallbacks.rb#67
+ # pkg:gem/i18n#lib/i18n/backend/fallbacks.rb:67
def resolve_entry(locale, object, subject, options = T.unsafe(nil)); end
# Overwrites the Base backend translate method so that it will try each
@@ -465,14 +626,14 @@ module I18n::Backend::Fallbacks
# it's a Symbol. When the default contains a String, Proc or Hash
# it is evaluated last after all the fallback locales have been tried.
#
- # source://i18n//lib/i18n/backend/fallbacks.rb#41
+ # pkg:gem/i18n#lib/i18n/backend/fallbacks.rb:41
def translate(locale, key, options = T.unsafe(nil)); end
private
# Overwrite on_fallback to add specified logic when the fallback succeeds.
#
- # source://i18n//lib/i18n/backend/fallbacks.rb#110
+ # pkg:gem/i18n#lib/i18n/backend/fallbacks.rb:114
def on_fallback(_original_locale, _fallback_locale, _key, _options); end
end
@@ -485,14 +646,14 @@ end
# You can check both backends above for some examples.
# This module also keeps all links in a hash so they can be properly resolved when flattened.
#
-# source://i18n//lib/i18n/backend/flatten.rb#13
+# pkg:gem/i18n#lib/i18n/backend/flatten.rb:13
module I18n::Backend::Flatten
# Flatten keys for nested Hashes by chaining up keys:
#
# >> { "a" => { "b" => { "c" => "d", "e" => "f" }, "g" => "h" }, "i" => "j"}.wind
# => { "a.b.c" => "d", "a.b.e" => "f", "a.g" => "h", "i" => "j" }
#
- # source://i18n//lib/i18n/backend/flatten.rb#59
+ # pkg:gem/i18n#lib/i18n/backend/flatten.rb:59
def flatten_keys(hash, escape, prev_key = T.unsafe(nil), &block); end
# Receives a hash of translations (where the key is a locale and
@@ -502,53 +663,53 @@ module I18n::Backend::Flatten
# Nested hashes are included in the flattened hash just if subtree
# is true and Symbols are automatically stored as links.
#
- # source://i18n//lib/i18n/backend/flatten.rb#74
+ # pkg:gem/i18n#lib/i18n/backend/flatten.rb:74
def flatten_translations(locale, data, escape, subtree); end
# Store flattened links.
#
- # source://i18n//lib/i18n/backend/flatten.rb#50
+ # pkg:gem/i18n#lib/i18n/backend/flatten.rb:50
def links; end
# Shortcut to I18n::Backend::Flatten.normalize_flat_keys
# and then resolve_links.
#
- # source://i18n//lib/i18n/backend/flatten.rb#44
+ # pkg:gem/i18n#lib/i18n/backend/flatten.rb:44
def normalize_flat_keys(locale, key, scope, separator); end
protected
- # source://i18n//lib/i18n/backend/flatten.rb#112
+ # pkg:gem/i18n#lib/i18n/backend/flatten.rb:112
def escape_default_separator(key); end
- # source://i18n//lib/i18n/backend/flatten.rb#106
+ # pkg:gem/i18n#lib/i18n/backend/flatten.rb:106
def find_link(locale, key); end
- # source://i18n//lib/i18n/backend/flatten.rb#93
+ # pkg:gem/i18n#lib/i18n/backend/flatten.rb:93
def resolve_link(locale, key); end
- # source://i18n//lib/i18n/backend/flatten.rb#89
+ # pkg:gem/i18n#lib/i18n/backend/flatten.rb:89
def store_link(locale, key, link); end
class << self
# Receives a string and escape the default separator.
#
- # source://i18n//lib/i18n/backend/flatten.rb#38
+ # pkg:gem/i18n#lib/i18n/backend/flatten.rb:38
def escape_default_separator(key); end
# normalize_keys the flatten way. This method is significantly faster
# and creates way less objects than the one at I18n.normalize_keys.
# It also handles escaping the translation keys.
#
- # source://i18n//lib/i18n/backend/flatten.rb#20
+ # pkg:gem/i18n#lib/i18n/backend/flatten.rb:20
def normalize_flat_keys(locale, key, scope, separator); end
end
end
-# source://i18n//lib/i18n/backend/flatten.rb#15
+# pkg:gem/i18n#lib/i18n/backend/flatten.rb:15
I18n::Backend::Flatten::FLATTEN_SEPARATOR = T.let(T.unsafe(nil), String)
-# source://i18n//lib/i18n/backend/flatten.rb#14
+# pkg:gem/i18n#lib/i18n/backend/flatten.rb:14
I18n::Backend::Flatten::SEPARATOR_ESCAPE_CHAR = T.let(T.unsafe(nil), String)
# Experimental support for using Gettext po files to store translations.
@@ -576,100 +737,95 @@ I18n::Backend::Flatten::SEPARATOR_ESCAPE_CHAR = T.let(T.unsafe(nil), String)
#
# Without it strings containing periods (".") will not be translated.
#
-# source://i18n//lib/i18n/backend/gettext.rb#33
+# pkg:gem/i18n#lib/i18n/backend/gettext.rb:33
module I18n::Backend::Gettext
protected
- # source://i18n//lib/i18n/backend/gettext.rb#41
+ # pkg:gem/i18n#lib/i18n/backend/gettext.rb:41
def load_po(filename); end
- # source://i18n//lib/i18n/backend/gettext.rb#51
+ # pkg:gem/i18n#lib/i18n/backend/gettext.rb:51
def normalize(locale, data); end
- # source://i18n//lib/i18n/backend/gettext.rb#68
+ # pkg:gem/i18n#lib/i18n/backend/gettext.rb:68
def normalize_pluralization(locale, key, value); end
- # source://i18n//lib/i18n/backend/gettext.rb#47
+ # pkg:gem/i18n#lib/i18n/backend/gettext.rb:47
def parse(filename); end
end
-# source://i18n//lib/i18n/backend/gettext.rb#34
+# pkg:gem/i18n#lib/i18n/backend/gettext.rb:34
class I18n::Backend::Gettext::PoData < ::Hash
- # source://i18n//lib/i18n/backend/gettext.rb#35
+ # pkg:gem/i18n#lib/i18n/backend/gettext.rb:35
def set_comment(msgid_or_sym, comment); end
end
-# source://i18n//lib/i18n/backend/interpolation_compiler.rb#20
+# pkg:gem/i18n#lib/i18n/backend/interpolation_compiler.rb:20
module I18n::Backend::InterpolationCompiler
- # source://i18n//lib/i18n/backend/interpolation_compiler.rb#99
+ # pkg:gem/i18n#lib/i18n/backend/interpolation_compiler.rb:98
def interpolate(locale, string, values); end
- # source://i18n//lib/i18n/backend/interpolation_compiler.rb#109
+ # pkg:gem/i18n#lib/i18n/backend/interpolation_compiler.rb:108
def store_translations(locale, data, options = T.unsafe(nil)); end
protected
- # source://i18n//lib/i18n/backend/interpolation_compiler.rb#115
+ # pkg:gem/i18n#lib/i18n/backend/interpolation_compiler.rb:114
def compile_all_strings_in(data); end
end
-# source://i18n//lib/i18n/backend/interpolation_compiler.rb#21
+# pkg:gem/i18n#lib/i18n/backend/interpolation_compiler.rb:21
module I18n::Backend::InterpolationCompiler::Compiler
extend ::I18n::Backend::InterpolationCompiler::Compiler
- # source://i18n//lib/i18n/backend/interpolation_compiler.rb#27
+ # pkg:gem/i18n#lib/i18n/backend/interpolation_compiler.rb:26
def compile_if_an_interpolation(string); end
- # @return [Boolean]
- #
- # source://i18n//lib/i18n/backend/interpolation_compiler.rb#39
+ # pkg:gem/i18n#lib/i18n/backend/interpolation_compiler.rb:39
def interpolated_str?(str); end
protected
- # source://i18n//lib/i18n/backend/interpolation_compiler.rb#60
+ # pkg:gem/i18n#lib/i18n/backend/interpolation_compiler.rb:59
def compile_interpolation_token(key); end
- # source://i18n//lib/i18n/backend/interpolation_compiler.rb#49
+ # pkg:gem/i18n#lib/i18n/backend/interpolation_compiler.rb:49
def compiled_interpolation_body(str); end
- # source://i18n//lib/i18n/backend/interpolation_compiler.rb#73
+ # pkg:gem/i18n#lib/i18n/backend/interpolation_compiler.rb:72
def direct_key(key); end
- # source://i18n//lib/i18n/backend/interpolation_compiler.rb#93
+ # pkg:gem/i18n#lib/i18n/backend/interpolation_compiler.rb:92
def escape_key_sym(key); end
- # source://i18n//lib/i18n/backend/interpolation_compiler.rb#89
+ # pkg:gem/i18n#lib/i18n/backend/interpolation_compiler.rb:88
def escape_plain_str(str); end
- # source://i18n//lib/i18n/backend/interpolation_compiler.rb#55
- def handle_interpolation_token(interpolation, matchdata); end
+ # pkg:gem/i18n#lib/i18n/backend/interpolation_compiler.rb:55
+ def handle_interpolation_token(token); end
- # source://i18n//lib/i18n/backend/interpolation_compiler.rb#69
+ # pkg:gem/i18n#lib/i18n/backend/interpolation_compiler.rb:68
def interpolate_key(key); end
- # source://i18n//lib/i18n/backend/interpolation_compiler.rb#64
+ # pkg:gem/i18n#lib/i18n/backend/interpolation_compiler.rb:63
def interpolate_or_raise_missing(key); end
- # source://i18n//lib/i18n/backend/interpolation_compiler.rb#81
+ # pkg:gem/i18n#lib/i18n/backend/interpolation_compiler.rb:80
def missing_key(key); end
- # source://i18n//lib/i18n/backend/interpolation_compiler.rb#77
+ # pkg:gem/i18n#lib/i18n/backend/interpolation_compiler.rb:76
def nil_key(key); end
- # source://i18n//lib/i18n/backend/interpolation_compiler.rb#85
+ # pkg:gem/i18n#lib/i18n/backend/interpolation_compiler.rb:84
def reserved_key(key); end
# tokenize("foo %{bar} baz %%{buz}") # => ["foo ", "%{bar}", " baz ", "%%{buz}"]
#
- # source://i18n//lib/i18n/backend/interpolation_compiler.rb#45
+ # pkg:gem/i18n#lib/i18n/backend/interpolation_compiler.rb:45
def tokenize(str); end
end
-# source://i18n//lib/i18n/backend/interpolation_compiler.rb#25
-I18n::Backend::InterpolationCompiler::Compiler::INTERPOLATION_SYNTAX_PATTERN = T.let(T.unsafe(nil), Regexp)
-
-# source://i18n//lib/i18n/backend/interpolation_compiler.rb#24
+# pkg:gem/i18n#lib/i18n/backend/interpolation_compiler.rb:24
I18n::Backend::InterpolationCompiler::Compiler::TOKENIZER = T.let(T.unsafe(nil), Regexp)
# This is a basic backend for key value stores. It receives on
@@ -717,7 +873,7 @@ I18n::Backend::InterpolationCompiler::Compiler::TOKENIZER = T.let(T.unsafe(nil),
#
# This is useful if you are using a KeyValue backend chained to a Simple backend.
#
-# source://i18n//lib/i18n/backend/key_value.rb#69
+# pkg:gem/i18n#lib/i18n/backend/key_value.rb:69
class I18n::Backend::KeyValue
include ::I18n::Backend::Flatten
include ::I18n::Backend::Transliterator
@@ -725,143 +881,115 @@ class I18n::Backend::KeyValue
include ::I18n::Backend::KeyValue::Implementation
end
-# source://i18n//lib/i18n/backend/key_value.rb#70
+# pkg:gem/i18n#lib/i18n/backend/key_value.rb:70
module I18n::Backend::KeyValue::Implementation
include ::I18n::Backend::Flatten
include ::I18n::Backend::Transliterator
include ::I18n::Backend::Base
- # source://i18n//lib/i18n/backend/key_value.rb#75
+ # pkg:gem/i18n#lib/i18n/backend/key_value.rb:75
def initialize(store, subtrees = T.unsafe(nil)); end
- # source://i18n//lib/i18n/backend/key_value.rb#102
+ # pkg:gem/i18n#lib/i18n/backend/key_value.rb:102
def available_locales; end
- # @return [Boolean]
- #
- # source://i18n//lib/i18n/backend/key_value.rb#79
+ # pkg:gem/i18n#lib/i18n/backend/key_value.rb:79
def initialized?; end
- # Returns the value of attribute store.
- #
- # source://i18n//lib/i18n/backend/key_value.rb#71
+ # pkg:gem/i18n#lib/i18n/backend/key_value.rb:71
def store; end
- # Sets the attribute store
- #
- # @param value the value to set the attribute store to.
- #
- # source://i18n//lib/i18n/backend/key_value.rb#71
+ # pkg:gem/i18n#lib/i18n/backend/key_value.rb:71
def store=(_arg0); end
- # source://i18n//lib/i18n/backend/key_value.rb#83
+ # pkg:gem/i18n#lib/i18n/backend/key_value.rb:83
def store_translations(locale, data, options = T.unsafe(nil)); end
protected
- # source://i18n//lib/i18n/backend/key_value.rb#124
+ # pkg:gem/i18n#lib/i18n/backend/key_value.rb:124
def init_translations; end
- # source://i18n//lib/i18n/backend/key_value.rb#136
+ # pkg:gem/i18n#lib/i18n/backend/key_value.rb:136
def lookup(locale, key, scope = T.unsafe(nil), options = T.unsafe(nil)); end
- # source://i18n//lib/i18n/backend/key_value.rb#150
+ # pkg:gem/i18n#lib/i18n/backend/key_value.rb:150
def pluralize(locale, entry, count); end
- # @return [Boolean]
- #
- # source://i18n//lib/i18n/backend/key_value.rb#132
+ # pkg:gem/i18n#lib/i18n/backend/key_value.rb:132
def subtrees?; end
# Queries the translations from the key-value store and converts
# them into a hash such as the one returned from loading the
# haml files
#
- # source://i18n//lib/i18n/backend/key_value.rb#115
+ # pkg:gem/i18n#lib/i18n/backend/key_value.rb:115
def translations; end
end
-# source://i18n//lib/i18n/backend/key_value.rb#161
+# pkg:gem/i18n#lib/i18n/backend/key_value.rb:161
class I18n::Backend::KeyValue::SubtreeProxy
- # @return [SubtreeProxy] a new instance of SubtreeProxy
- #
- # source://i18n//lib/i18n/backend/key_value.rb#162
+ # pkg:gem/i18n#lib/i18n/backend/key_value.rb:162
def initialize(master_key, store); end
- # source://i18n//lib/i18n/backend/key_value.rb#172
+ # pkg:gem/i18n#lib/i18n/backend/key_value.rb:172
def [](key); end
- # @return [Boolean]
- #
- # source://i18n//lib/i18n/backend/key_value.rb#168
+ # pkg:gem/i18n#lib/i18n/backend/key_value.rb:168
def has_key?(key); end
- # source://i18n//lib/i18n/backend/key_value.rb#196
+ # pkg:gem/i18n#lib/i18n/backend/key_value.rb:196
def inspect; end
- # @return [Boolean]
- #
- # source://i18n//lib/i18n/backend/key_value.rb#188
+ # pkg:gem/i18n#lib/i18n/backend/key_value.rb:188
def instance_of?(klass); end
- # @return [Boolean]
- #
- # source://i18n//lib/i18n/backend/key_value.rb#183
+ # pkg:gem/i18n#lib/i18n/backend/key_value.rb:183
def is_a?(klass); end
- # @return [Boolean]
- #
- # source://i18n//lib/i18n/backend/key_value.rb#183
+ # pkg:gem/i18n#lib/i18n/backend/key_value.rb:186
def kind_of?(klass); end
- # @return [Boolean]
- #
- # source://i18n//lib/i18n/backend/key_value.rb#192
+ # pkg:gem/i18n#lib/i18n/backend/key_value.rb:192
def nil?; end
end
-# source://i18n//lib/i18n/backend/lazy_loadable.rb#65
+# pkg:gem/i18n#lib/i18n/backend/lazy_loadable.rb:65
class I18n::Backend::LazyLoadable < ::I18n::Backend::Simple
- # @return [LazyLoadable] a new instance of LazyLoadable
- #
- # source://i18n//lib/i18n/backend/lazy_loadable.rb#66
+ # pkg:gem/i18n#lib/i18n/backend/lazy_loadable.rb:66
def initialize(lazy_load: T.unsafe(nil)); end
# Parse the load path and extract all locales.
#
- # source://i18n//lib/i18n/backend/lazy_loadable.rb#99
+ # pkg:gem/i18n#lib/i18n/backend/lazy_loadable.rb:99
def available_locales; end
# Eager loading is not supported in the lazy context.
#
- # source://i18n//lib/i18n/backend/lazy_loadable.rb#90
+ # pkg:gem/i18n#lib/i18n/backend/lazy_loadable.rb:90
def eager_load!; end
# Returns whether the current locale is initialized.
#
- # @return [Boolean]
- #
- # source://i18n//lib/i18n/backend/lazy_loadable.rb#71
+ # pkg:gem/i18n#lib/i18n/backend/lazy_loadable.rb:71
def initialized?; end
- # source://i18n//lib/i18n/backend/lazy_loadable.rb#107
+ # pkg:gem/i18n#lib/i18n/backend/lazy_loadable.rb:107
def lookup(locale, key, scope = T.unsafe(nil), options = T.unsafe(nil)); end
# Clean up translations and uninitialize all locales.
#
- # source://i18n//lib/i18n/backend/lazy_loadable.rb#80
+ # pkg:gem/i18n#lib/i18n/backend/lazy_loadable.rb:80
def reload!; end
protected
# Load translations from files that belong to the current locale.
#
- # @raise [InvalidFilenames]
- #
- # source://i18n//lib/i18n/backend/lazy_loadable.rb#121
+ # pkg:gem/i18n#lib/i18n/backend/lazy_loadable.rb:121
def init_translations; end
- # source://i18n//lib/i18n/backend/lazy_loadable.rb#133
+ # pkg:gem/i18n#lib/i18n/backend/lazy_loadable.rb:133
def initialized_locales; end
private
@@ -869,36 +997,30 @@ class I18n::Backend::LazyLoadable < ::I18n::Backend::Simple
# Checks if a filename is named in correspondence to the translations it loaded.
# The locale extracted from the path must be the single locale loaded in the translations.
#
- # @raise [FilenameIncorrect]
- #
- # source://i18n//lib/i18n/backend/lazy_loadable.rb#175
+ # pkg:gem/i18n#lib/i18n/backend/lazy_loadable.rb:175
def assert_file_named_correctly!(file, translations); end
# Select all files from I18n load path that belong to current locale.
# These files must start with the locale identifier (ie. "en", "pt-BR"),
# followed by an "_" demarcation to separate proceeding text.
#
- # source://i18n//lib/i18n/backend/lazy_loadable.rb#167
+ # pkg:gem/i18n#lib/i18n/backend/lazy_loadable.rb:167
def filenames_for_current_locale; end
- # @return [Boolean]
- #
- # source://i18n//lib/i18n/backend/lazy_loadable.rb#139
+ # pkg:gem/i18n#lib/i18n/backend/lazy_loadable.rb:139
def lazy_load?; end
# Loads each file supplied and asserts that the file only loads
# translations as expected by the name. The method returns a list of
# errors corresponding to offending files.
#
- # source://i18n//lib/i18n/backend/lazy_loadable.rb#152
+ # pkg:gem/i18n#lib/i18n/backend/lazy_loadable.rb:152
def load_translations_and_collect_file_errors(files); end
end
-# source://i18n//lib/i18n/backend/lazy_loadable.rb#143
+# pkg:gem/i18n#lib/i18n/backend/lazy_loadable.rb:143
class I18n::Backend::LazyLoadable::FilenameIncorrect < ::StandardError
- # @return [FilenameIncorrect] a new instance of FilenameIncorrect
- #
- # source://i18n//lib/i18n/backend/lazy_loadable.rb#144
+ # pkg:gem/i18n#lib/i18n/backend/lazy_loadable.rb:144
def initialize(file, expected_locale, unexpected_locales); end
end
@@ -952,91 +1074,105 @@ end
#
# I18n.backend = I18n::Backend::LazyLoadable.new(lazy_load: false) # default
#
-# source://i18n//lib/i18n/backend/lazy_loadable.rb#55
+# pkg:gem/i18n#lib/i18n/backend/lazy_loadable.rb:55
class I18n::Backend::LocaleExtractor
class << self
- # source://i18n//lib/i18n/backend/lazy_loadable.rb#57
+ # pkg:gem/i18n#lib/i18n/backend/lazy_loadable.rb:57
def locale_from_path(path); end
end
end
-# source://i18n//lib/i18n/backend/memoize.rb#14
+# pkg:gem/i18n#lib/i18n/backend/memoize.rb:14
module I18n::Backend::Memoize
- # source://i18n//lib/i18n/backend/memoize.rb#15
+ # pkg:gem/i18n#lib/i18n/backend/memoize.rb:15
def available_locales; end
- # source://i18n//lib/i18n/backend/memoize.rb#29
+ # pkg:gem/i18n#lib/i18n/backend/memoize.rb:29
def eager_load!; end
- # source://i18n//lib/i18n/backend/memoize.rb#24
+ # pkg:gem/i18n#lib/i18n/backend/memoize.rb:24
def reload!; end
- # source://i18n//lib/i18n/backend/memoize.rb#19
+ # pkg:gem/i18n#lib/i18n/backend/memoize.rb:19
def store_translations(locale, data, options = T.unsafe(nil)); end
protected
- # source://i18n//lib/i18n/backend/memoize.rb#37
+ # pkg:gem/i18n#lib/i18n/backend/memoize.rb:37
def lookup(locale, key, scope = T.unsafe(nil), options = T.unsafe(nil)); end
- # source://i18n//lib/i18n/backend/memoize.rb#44
+ # pkg:gem/i18n#lib/i18n/backend/memoize.rb:44
def memoized_lookup; end
- # source://i18n//lib/i18n/backend/memoize.rb#48
+ # pkg:gem/i18n#lib/i18n/backend/memoize.rb:48
def reset_memoizations!(locale = T.unsafe(nil)); end
end
-# source://i18n//lib/i18n/backend/metadata.rb#21
+# pkg:gem/i18n#lib/i18n/backend/metadata.rb:21
module I18n::Backend::Metadata
- # source://i18n//lib/i18n/backend/metadata.rb#52
+ # pkg:gem/i18n#lib/i18n/backend/metadata.rb:52
def interpolate(locale, entry, values = T.unsafe(nil)); end
- # source://i18n//lib/i18n/backend/metadata.rb#57
+ # pkg:gem/i18n#lib/i18n/backend/metadata.rb:57
def pluralize(locale, entry, count); end
- # source://i18n//lib/i18n/backend/metadata.rb#40
+ # pkg:gem/i18n#lib/i18n/backend/metadata.rb:40
def translate(locale, key, options = T.unsafe(nil)); end
protected
- # source://i18n//lib/i18n/backend/metadata.rb#63
+ # pkg:gem/i18n#lib/i18n/backend/metadata.rb:63
def with_metadata(metadata, &block); end
class << self
- # @private
- #
- # source://i18n//lib/i18n/backend/metadata.rb#23
+ # pkg:gem/i18n#lib/i18n/backend/metadata.rb:23
def included(base); end
end
end
-# source://i18n//lib/i18n/backend/pluralization.rb#16
+# pkg:gem/i18n#lib/i18n/backend/pluralization.rb:16
module I18n::Backend::Pluralization
# Overwrites the Base backend translate method so that it will check the
# translation meta data space (:i18n) for a locale specific pluralization
- # rule and use it to pluralize the given entry. I.e. the library expects
+ # rule and use it to pluralize the given entry. I.e., the library expects
# pluralization rules to be stored at I18n.t(:'i18n.plural.rule')
#
# Pluralization rules are expected to respond to #call(count) and
- # return a pluralization key. Valid keys depend on the translation data
- # hash (entry) but it is generally recommended to follow CLDR's style,
- # i.e., return one of the keys :zero, :one, :few, :many, :other.
- #
- # The :zero key is always picked directly when count equals 0 AND the
- # translation data has the key :zero. This way translators are free to
- # either pick a special :zero translation even for languages where the
- # pluralizer does not return a :zero key.
- #
- # source://i18n//lib/i18n/backend/pluralization.rb#31
+ # return a pluralization key. Valid keys depend on the pluralization
+ # rules for the locale, as defined in the CLDR.
+ # As of v41, 6 locale-specific plural categories are defined:
+ # :few, :many, :one, :other, :two, :zero
+ #
+ # n.b., The :one plural category does not imply the number 1.
+ # Instead, :one is a category for any number that behaves like 1 in
+ # that locale. For example, in some locales, :one is used for numbers
+ # that end in "1" (like 1, 21, 151) but that don't end in
+ # 11 (like 11, 111, 10311).
+ # Similar notes apply to the :two, and :zero plural categories.
+ #
+ # If you want to have different strings for the categories of count == 0
+ # (e.g. "I don't have any cars") or count == 1 (e.g. "I have a single car")
+ # use the explicit `"0"` and `"1"` keys.
+ # https://unicode-org.github.io/cldr/ldml/tr35-numbers.html#Explicit_0_1_rules
+ #
+ # pkg:gem/i18n#lib/i18n/backend/pluralization.rb:39
def pluralize(locale, entry, count); end
protected
- # source://i18n//lib/i18n/backend/pluralization.rb#50
+ # pkg:gem/i18n#lib/i18n/backend/pluralization.rb:81
def pluralizer(locale); end
- # source://i18n//lib/i18n/backend/pluralization.rb#46
+ # pkg:gem/i18n#lib/i18n/backend/pluralization.rb:77
def pluralizers; end
+
+ private
+
+ # Normalizes categories of 0.0 and 1.0
+ # and returns the symbolic version
+ #
+ # pkg:gem/i18n#lib/i18n/backend/pluralization.rb:89
+ def symbolic_count(count); end
end
# A simple backend that reads translations from YAML files and stores them in
@@ -1045,43 +1181,41 @@ end
# The implementation is provided by a Implementation module allowing to easily
# extend Simple backend's behavior by including modules. E.g.:
#
-# module I18n::Backend::Pluralization
-# def pluralize(*args)
-# # extended pluralization logic
-# super
-# end
-# end
+# module I18n::Backend::Pluralization
+# def pluralize(*args)
+# # extended pluralization logic
+# super
+# end
+# end
#
-# I18n::Backend::Simple.include(I18n::Backend::Pluralization)
+# I18n::Backend::Simple.include(I18n::Backend::Pluralization)
#
-# source://i18n//lib/i18n/backend/simple.rb#21
+# pkg:gem/i18n#lib/i18n/backend/simple.rb:21
class I18n::Backend::Simple
include ::I18n::Backend::Transliterator
include ::I18n::Backend::Base
include ::I18n::Backend::Simple::Implementation
end
-# source://i18n//lib/i18n/backend/simple.rb#22
+# pkg:gem/i18n#lib/i18n/backend/simple.rb:22
module I18n::Backend::Simple::Implementation
include ::I18n::Backend::Transliterator
include ::I18n::Backend::Base
# Get available locales from the translations hash
#
- # source://i18n//lib/i18n/backend/simple.rb#46
+ # pkg:gem/i18n#lib/i18n/backend/simple.rb:49
def available_locales; end
- # source://i18n//lib/i18n/backend/simple.rb#61
+ # pkg:gem/i18n#lib/i18n/backend/simple.rb:64
def eager_load!; end
- # @return [Boolean]
- #
- # source://i18n//lib/i18n/backend/simple.rb#25
+ # pkg:gem/i18n#lib/i18n/backend/simple.rb:28
def initialized?; end
# Clean up translations hash and set initialized to false on reload!
#
- # source://i18n//lib/i18n/backend/simple.rb#55
+ # pkg:gem/i18n#lib/i18n/backend/simple.rb:58
def reload!; end
# Stores translations for the given locale in memory.
@@ -1089,15 +1223,15 @@ module I18n::Backend::Simple::Implementation
# translations will be overwritten by new ones only at the deepest
# level of the hash.
#
- # source://i18n//lib/i18n/backend/simple.rb#33
+ # pkg:gem/i18n#lib/i18n/backend/simple.rb:36
def store_translations(locale, data, options = T.unsafe(nil)); end
- # source://i18n//lib/i18n/backend/simple.rb#66
+ # pkg:gem/i18n#lib/i18n/backend/simple.rb:69
def translations(do_init: T.unsafe(nil)); end
protected
- # source://i18n//lib/i18n/backend/simple.rb#76
+ # pkg:gem/i18n#lib/i18n/backend/simple.rb:83
def init_translations; end
# Looks up a translation from the translations hash. Returns nil if
@@ -1106,318 +1240,208 @@ module I18n::Backend::Simple::Implementation
# into multiple keys, i.e.
currency.format is regarded the same as
#
%w(currency format).
#
- # source://i18n//lib/i18n/backend/simple.rb#86
+ # pkg:gem/i18n#lib/i18n/backend/simple.rb:93
def lookup(locale, key, scope = T.unsafe(nil), options = T.unsafe(nil)); end
end
-# source://i18n//lib/i18n/backend/transliterator.rb#6
+# Mutex to ensure that concurrent translations loading will be thread-safe
+#
+# pkg:gem/i18n#lib/i18n/backend/simple.rb:26
+I18n::Backend::Simple::Implementation::MUTEX = T.let(T.unsafe(nil), Thread::Mutex)
+
+# pkg:gem/i18n#lib/i18n/backend/transliterator.rb:6
module I18n::Backend::Transliterator
# Given a locale and a UTF-8 string, return the locale's ASCII
# approximation for the string.
#
- # source://i18n//lib/i18n/backend/transliterator.rb#11
+ # pkg:gem/i18n#lib/i18n/backend/transliterator.rb:11
def transliterate(locale, string, replacement = T.unsafe(nil)); end
class << self
# Get a transliterator instance.
#
- # source://i18n//lib/i18n/backend/transliterator.rb#19
+ # pkg:gem/i18n#lib/i18n/backend/transliterator.rb:19
def get(rule = T.unsafe(nil)); end
end
end
-# source://i18n//lib/i18n/backend/transliterator.rb#7
+# pkg:gem/i18n#lib/i18n/backend/transliterator.rb:7
I18n::Backend::Transliterator::DEFAULT_REPLACEMENT_CHAR = T.let(T.unsafe(nil), String)
# A transliterator which accepts a Hash of characters as its translation
# rule.
#
-# source://i18n//lib/i18n/backend/transliterator.rb#42
+# pkg:gem/i18n#lib/i18n/backend/transliterator.rb:42
class I18n::Backend::Transliterator::HashTransliterator
- # @return [HashTransliterator] a new instance of HashTransliterator
- #
- # source://i18n//lib/i18n/backend/transliterator.rb#74
+ # pkg:gem/i18n#lib/i18n/backend/transliterator.rb:74
def initialize(rule = T.unsafe(nil)); end
- # source://i18n//lib/i18n/backend/transliterator.rb#80
+ # pkg:gem/i18n#lib/i18n/backend/transliterator.rb:80
def transliterate(string, replacement = T.unsafe(nil)); end
private
# Add transliteration rules to the approximations hash.
#
- # source://i18n//lib/i18n/backend/transliterator.rb#100
+ # pkg:gem/i18n#lib/i18n/backend/transliterator.rb:100
def add(hash); end
- # source://i18n//lib/i18n/backend/transliterator.rb#93
+ # pkg:gem/i18n#lib/i18n/backend/transliterator.rb:93
def add_default_approximations; end
- # source://i18n//lib/i18n/backend/transliterator.rb#89
+ # pkg:gem/i18n#lib/i18n/backend/transliterator.rb:89
def approximations; end
end
-# source://i18n//lib/i18n/backend/transliterator.rb#43
+# pkg:gem/i18n#lib/i18n/backend/transliterator.rb:43
I18n::Backend::Transliterator::HashTransliterator::DEFAULT_APPROXIMATIONS = T.let(T.unsafe(nil), Hash)
# A transliterator which accepts a Proc as its transliteration rule.
#
-# source://i18n//lib/i18n/backend/transliterator.rb#30
+# pkg:gem/i18n#lib/i18n/backend/transliterator.rb:30
class I18n::Backend::Transliterator::ProcTransliterator
- # @return [ProcTransliterator] a new instance of ProcTransliterator
- #
- # source://i18n//lib/i18n/backend/transliterator.rb#31
+ # pkg:gem/i18n#lib/i18n/backend/transliterator.rb:31
def initialize(rule); end
- # source://i18n//lib/i18n/backend/transliterator.rb#35
+ # pkg:gem/i18n#lib/i18n/backend/transliterator.rb:35
def transliterate(string, replacement = T.unsafe(nil)); end
end
-# source://i18n//lib/i18n.rb#54
+# pkg:gem/i18n#lib/i18n.rb:55
module I18n::Base
- # source://i18n//lib/i18n.rb#69
+ # pkg:gem/i18n#lib/i18n.rb:70
def available_locales; end
- # source://i18n//lib/i18n.rb#73
+ # pkg:gem/i18n#lib/i18n.rb:70
def available_locales=(value); end
- # @return [Boolean]
- #
- # source://i18n//lib/i18n.rb#355
+ # pkg:gem/i18n#lib/i18n.rb:387
def available_locales_initialized?; end
- # source://i18n//lib/i18n.rb#69
+ # pkg:gem/i18n#lib/i18n.rb:70
def backend; end
- # source://i18n//lib/i18n.rb#73
+ # pkg:gem/i18n#lib/i18n.rb:70
def backend=(value); end
# Gets I18n configuration object.
#
- # source://i18n//lib/i18n.rb#56
+ # pkg:gem/i18n#lib/i18n.rb:57
def config; end
# Sets I18n configuration object.
#
- # source://i18n//lib/i18n.rb#61
+ # pkg:gem/i18n#lib/i18n.rb:63
def config=(value); end
- # source://i18n//lib/i18n.rb#69
+ # pkg:gem/i18n#lib/i18n.rb:70
def default_locale; end
- # source://i18n//lib/i18n.rb#73
+ # pkg:gem/i18n#lib/i18n.rb:70
def default_locale=(value); end
- # source://i18n//lib/i18n.rb#69
+ # pkg:gem/i18n#lib/i18n.rb:70
def default_separator; end
- # source://i18n//lib/i18n.rb#73
+ # pkg:gem/i18n#lib/i18n.rb:70
def default_separator=(value); end
# Tells the backend to load translations now. Used in situations like the
# Rails production environment. Backends can implement whatever strategy
# is useful.
#
- # source://i18n//lib/i18n.rb#90
+ # pkg:gem/i18n#lib/i18n.rb:92
def eager_load!; end
- # source://i18n//lib/i18n.rb#69
+ # pkg:gem/i18n#lib/i18n.rb:70
def enforce_available_locales; end
# Raises an InvalidLocale exception when the passed locale is not available.
#
- # source://i18n//lib/i18n.rb#349
+ # pkg:gem/i18n#lib/i18n.rb:381
def enforce_available_locales!(locale); end
- # source://i18n//lib/i18n.rb#73
+ # pkg:gem/i18n#lib/i18n.rb:70
def enforce_available_locales=(value); end
- # source://i18n//lib/i18n.rb#69
+ # pkg:gem/i18n#lib/i18n.rb:70
def exception_handler; end
- # source://i18n//lib/i18n.rb#73
+ # pkg:gem/i18n#lib/i18n.rb:70
def exception_handler=(value); end
# Returns true if a translation exists for a given key, otherwise returns false.
#
- # @raise [Disabled]
- # @return [Boolean]
- #
- # source://i18n//lib/i18n.rb#235
+ # pkg:gem/i18n#lib/i18n.rb:266
def exists?(key, _locale = T.unsafe(nil), locale: T.unsafe(nil), **options); end
- # Localizes certain objects, such as dates and numbers to local formatting.
+ # Returns an array of interpolation keys for the given translation key
#
- # @raise [Disabled]
+ # *Examples*
#
- # source://i18n//lib/i18n.rb#304
+ # Suppose we have the following:
+ # I18n.t 'example.zero' == 'Zero interpolations'
+ # I18n.t 'example.one' == 'One interpolation %{foo}'
+ # I18n.t 'example.two' == 'Two interpolations %{foo} %{bar}'
+ # I18n.t 'example.three' == ['One %{foo}', 'Two %{bar}', 'Three %{baz}']
+ # I18n.t 'example.one', locale: :other == 'One interpolation %{baz}'
+ #
+ # Then we can expect the following results:
+ # I18n.interpolation_keys('example.zero') #=> []
+ # I18n.interpolation_keys('example.one') #=> ['foo']
+ # I18n.interpolation_keys('example.two') #=> ['foo', 'bar']
+ # I18n.interpolation_keys('example.three') #=> ['foo', 'bar', 'baz']
+ # I18n.interpolation_keys('one', scope: 'example', locale: :other) #=> ['baz']
+ # I18n.interpolation_keys('does-not-exist') #=> []
+ # I18n.interpolation_keys('example') #=> []
+ #
+ # pkg:gem/i18n#lib/i18n.rb:255
+ def interpolation_keys(key, **options); end
+
+ # pkg:gem/i18n#lib/i18n.rb:344
def l(object, locale: T.unsafe(nil), format: T.unsafe(nil), **options); end
- # source://i18n//lib/i18n.rb#69
+ # pkg:gem/i18n#lib/i18n.rb:70
def load_path; end
- # source://i18n//lib/i18n.rb#73
+ # pkg:gem/i18n#lib/i18n.rb:70
def load_path=(value); end
- # source://i18n//lib/i18n.rb#69
+ # pkg:gem/i18n#lib/i18n.rb:70
def locale; end
- # source://i18n//lib/i18n.rb#73
+ # pkg:gem/i18n#lib/i18n.rb:70
def locale=(value); end
# Returns true when the passed locale, which can be either a String or a
# Symbol, is in the list of available locales. Returns false otherwise.
#
- # @return [Boolean]
- #
- # source://i18n//lib/i18n.rb#344
+ # pkg:gem/i18n#lib/i18n.rb:376
def locale_available?(locale); end
# Localizes certain objects, such as dates and numbers to local formatting.
#
- # @raise [Disabled]
- #
- # source://i18n//lib/i18n.rb#304
+ # pkg:gem/i18n#lib/i18n.rb:336
def localize(object, locale: T.unsafe(nil), format: T.unsafe(nil), **options); end
# Merges the given locale, key and scope into a single array of keys.
# Splits keys that contain dots into multiple keys. Makes sure all
# keys are Symbols.
#
- # source://i18n//lib/i18n.rb#332
+ # pkg:gem/i18n#lib/i18n.rb:364
def normalize_keys(locale, key, scope, separator = T.unsafe(nil)); end
# Tells the backend to reload translations. Used in situations like the
# Rails development environment. Backends can implement whatever strategy
# is useful.
#
- # source://i18n//lib/i18n.rb#82
+ # pkg:gem/i18n#lib/i18n.rb:84
def reload!; end
- # Translates, pluralizes and interpolates a given key using a given locale,
- # scope, and default, as well as interpolation values.
- #
- # *LOOKUP*
- #
- # Translation data is organized as a nested hash using the upper-level keys
- # as namespaces.
E.g., ActionView ships with the translation:
- #
:date => {:formats => {:short => "%b %d"}}.
- #
- # Translations can be looked up at any level of this hash using the key argument
- # and the scope option.
E.g., in this example
I18n.t :date
- # returns the whole translations hash
{:formats => {:short => "%b %d"}}.
- #
- # Key can be either a single key or a dot-separated key (both Strings and Symbols
- # work).
E.g., the short format can be looked up using both:
- # I18n.t 'date.formats.short'
- # I18n.t :'date.formats.short'
- #
- # Scope can be either a single key, a dot-separated key or an array of keys
- # or dot-separated keys. Keys and scopes can be combined freely. So these
- # examples will all look up the same short date format:
- # I18n.t 'date.formats.short'
- # I18n.t 'formats.short', :scope => 'date'
- # I18n.t 'short', :scope => 'date.formats'
- # I18n.t 'short', :scope => %w(date formats)
- #
- # *INTERPOLATION*
- #
- # Translations can contain interpolation variables which will be replaced by
- # values passed to #translate as part of the options hash, with the keys matching
- # the interpolation variable names.
- #
- #
E.g., with a translation
:foo => "foo %{bar}" the option
- # value for the key +bar+ will be interpolated into the translation:
- # I18n.t :foo, :bar => 'baz' # => 'foo baz'
- #
- # *PLURALIZATION*
- #
- # Translation data can contain pluralized translations. Pluralized translations
- # are arrays of singular/plural versions of translations like
['Foo', 'Foos'].
- #
- # Note that
I18n::Backend::Simple only supports an algorithm for English
- # pluralization rules. Other algorithms can be supported by custom backends.
- #
- # This returns the singular version of a pluralized translation:
- # I18n.t :foo, :count => 1 # => 'Foo'
- #
- # These both return the plural version of a pluralized translation:
- # I18n.t :foo, :count => 0 # => 'Foos'
- # I18n.t :foo, :count => 2 # => 'Foos'
- #
- # The
:count option can be used both for pluralization and interpolation.
- #
E.g., with the translation
- #
:foo => ['%{count} foo', '%{count} foos'], count will
- # be interpolated to the pluralized translation:
- # I18n.t :foo, :count => 1 # => '1 foo'
- #
- # *DEFAULTS*
- #
- # This returns the translation for
:foo or
default if no translation was found:
- # I18n.t :foo, :default => 'default'
- #
- # This returns the translation for
:foo or the translation for
:bar if no
- # translation for
:foo was found:
- # I18n.t :foo, :default => :bar
- #
- # Returns the translation for
:foo or the translation for
:bar
- # or
default if no translations for
:foo and
:bar were found.
- # I18n.t :foo, :default => [:bar, 'default']
- #
- # *BULK LOOKUP*
- #
- # This returns an array with the translations for
:foo and
:bar.
- # I18n.t [:foo, :bar]
- #
- # Can be used with dot-separated nested keys:
- # I18n.t [:'baz.foo', :'baz.bar']
- #
- # Which is the same as using a scope option:
- # I18n.t [:foo, :bar], :scope => :baz
- #
- # *LAMBDAS*
- #
- # Both translations and defaults can be given as Ruby lambdas. Lambdas will be
- # called and passed the key and options.
- #
- # E.g. assuming the key
:salutation resolves to:
- # lambda { |key, options| options[:gender] == 'm' ? "Mr. #{options[:name]}" : "Mrs. #{options[:name]}" }
- #
- # Then
I18n.t(:salutation, :gender => 'w', :name => 'Smith') will result in "Mrs. Smith".
- #
- # Note that the string returned by lambda will go through string interpolation too,
- # so the following lambda would give the same result:
- # lambda { |key, options| options[:gender] == 'm' ? "Mr. %{name}" : "Mrs. %{name}" }
- #
- # It is recommended to use/implement lambdas in an "idempotent" way. E.g. when
- # a cache layer is put in front of I18n.translate it will generate a cache key
- # from the argument values passed to #translate. Therefore your lambdas should
- # always return the same translations/values per unique combination of argument
- # values.
- #
- # *Ruby 2.7+ keyword arguments warning*
- #
- # This method uses keyword arguments.
- # There is a breaking change in ruby that produces warning with ruby 2.7 and won't work as expected with ruby 3.0
- # The "hash" parameter must be passed as keyword argument.
- #
- # Good:
- # I18n.t(:salutation, :gender => 'w', :name => 'Smith')
- # I18n.t(:salutation, **{ :gender => 'w', :name => 'Smith' })
- # I18n.t(:salutation, **any_hash)
- #
- # Bad:
- # I18n.t(:salutation, { :gender => 'w', :name => 'Smith' })
- # I18n.t(:salutation, any_hash)
- #
- # @raise [Disabled]
- #
- # source://i18n//lib/i18n.rb#210
+ # pkg:gem/i18n#lib/i18n.rb:227
def t(key = T.unsafe(nil), throw: T.unsafe(nil), raise: T.unsafe(nil), locale: T.unsafe(nil), **options); end
- # Wrapper for translate that adds :raise => true. With
- # this option, if no translation is found, it will raise I18n::MissingTranslationData
- #
- # source://i18n//lib/i18n.rb#229
+ # pkg:gem/i18n#lib/i18n.rb:234
def t!(key, **options); end
# Translates, pluralizes and interpolates a given key using a given locale,
@@ -1490,7 +1514,7 @@ module I18n::Base
# or default if no translations for :foo and :bar were found.
# I18n.t :foo, :default => [:bar, 'default']
#
- # *BULK LOOKUP*
+ # BULK LOOKUP
#
# This returns an array with the translations for :foo and :bar.
# I18n.t [:foo, :bar]
@@ -1509,7 +1533,7 @@ module I18n::Base
# E.g. assuming the key :salutation resolves to:
# lambda { |key, options| options[:gender] == 'm' ? "Mr. #{options[:name]}" : "Mrs. #{options[:name]}" }
#
- # Then I18n.t(:salutation, :gender => 'w', :name => 'Smith') will result in "Mrs. Smith".
+ # Then I18n.t(:salutation, :gender => 'w', :name => 'Smith') will result in "Mrs. Smith".
#
# Note that the string returned by lambda will go through string interpolation too,
# so the following lambda would give the same result:
@@ -1521,7 +1545,7 @@ module I18n::Base
# always return the same translations/values per unique combination of argument
# values.
#
- # *Ruby 2.7+ keyword arguments warning*
+ # Ruby 2.7+ keyword arguments warning
#
# This method uses keyword arguments.
# There is a breaking change in ruby that produces warning with ruby 2.7 and won't work as expected with ruby 3.0
@@ -1536,15 +1560,13 @@ module I18n::Base
# I18n.t(:salutation, { :gender => 'w', :name => 'Smith' })
# I18n.t(:salutation, any_hash)
#
- # @raise [Disabled]
- #
- # source://i18n//lib/i18n.rb#210
+ # pkg:gem/i18n#lib/i18n.rb:212
def translate(key = T.unsafe(nil), throw: T.unsafe(nil), raise: T.unsafe(nil), locale: T.unsafe(nil), **options); end
# Wrapper for translate that adds :raise => true. With
# this option, if no translation is found, it will raise I18n::MissingTranslationData
#
- # source://i18n//lib/i18n.rb#229
+ # pkg:gem/i18n#lib/i18n.rb:231
def translate!(key, **options); end
# Transliterates UTF-8 characters to ASCII. By default this method will
@@ -1599,12 +1621,12 @@ module I18n::Base
# I18n.transliterate("Jürgen", :locale => :en) # => "Jurgen"
# I18n.transliterate("Jürgen", :locale => :de) # => "Juergen"
#
- # source://i18n//lib/i18n.rb#293
+ # pkg:gem/i18n#lib/i18n.rb:325
def transliterate(key, throw: T.unsafe(nil), raise: T.unsafe(nil), locale: T.unsafe(nil), replacement: T.unsafe(nil), **options); end
# Executes block with given I18n.locale set.
#
- # source://i18n//lib/i18n.rb#315
+ # pkg:gem/i18n#lib/i18n.rb:347
def with_locale(tmp_locale = T.unsafe(nil)); end
private
@@ -1628,100 +1650,101 @@ module I18n::Base
# I18n.exception_handler = I18nExceptionHandler.new # an object
# I18n.exception_handler.call(exception, locale, key, options) # will be called like this
#
- # source://i18n//lib/i18n.rb#391
+ # pkg:gem/i18n#lib/i18n.rb:423
def handle_exception(handling, exception, locale, key, options); end
- # source://i18n//lib/i18n.rb#409
+ # pkg:gem/i18n#lib/i18n.rb:465
+ def interpolation_keys_from_translation(translation); end
+
+ # pkg:gem/i18n#lib/i18n.rb:441
def normalize_key(key, separator); end
- # source://i18n//lib/i18n.rb#361
+ # pkg:gem/i18n#lib/i18n.rb:393
def translate_key(key, throw, raise, locale, backend, options); end
end
-# source://i18n//lib/i18n/config.rb#6
+# pkg:gem/i18n#lib/i18n/config.rb:6
class I18n::Config
# Returns an array of locales for which translations are available.
# Unless you explicitly set these through I18n.available_locales=
# the call will be delegated to the backend.
#
- # source://i18n//lib/i18n/config.rb#43
+ # pkg:gem/i18n#lib/i18n/config.rb:43
def available_locales; end
# Sets the available locales.
#
- # source://i18n//lib/i18n/config.rb#57
+ # pkg:gem/i18n#lib/i18n/config.rb:57
def available_locales=(locales); end
# Returns true if the available_locales have been initialized
#
- # @return [Boolean]
- #
- # source://i18n//lib/i18n/config.rb#64
+ # pkg:gem/i18n#lib/i18n/config.rb:64
def available_locales_initialized?; end
# Caches the available locales list as both strings and symbols in a Set, so
# that we can have faster lookups to do the available locales enforce check.
#
- # source://i18n//lib/i18n/config.rb#50
+ # pkg:gem/i18n#lib/i18n/config.rb:50
def available_locales_set; end
# Returns the current backend. Defaults to +Backend::Simple+.
#
- # source://i18n//lib/i18n/config.rb#20
+ # pkg:gem/i18n#lib/i18n/config.rb:20
def backend; end
# Sets the current backend. Used to set a custom backend.
#
- # source://i18n//lib/i18n/config.rb#25
+ # pkg:gem/i18n#lib/i18n/config.rb:25
def backend=(backend); end
# Clears the available locales set so it can be recomputed again after I18n
# gets reloaded.
#
- # source://i18n//lib/i18n/config.rb#70
+ # pkg:gem/i18n#lib/i18n/config.rb:70
def clear_available_locales_set; end
# Returns the current default locale. Defaults to :'en'
#
- # source://i18n//lib/i18n/config.rb#30
+ # pkg:gem/i18n#lib/i18n/config.rb:30
def default_locale; end
# Sets the current default locale. Used to set a custom default locale.
#
- # source://i18n//lib/i18n/config.rb#35
+ # pkg:gem/i18n#lib/i18n/config.rb:35
def default_locale=(locale); end
# Returns the current default scope separator. Defaults to '.'
#
- # source://i18n//lib/i18n/config.rb#75
+ # pkg:gem/i18n#lib/i18n/config.rb:75
def default_separator; end
# Sets the current default scope separator.
#
- # source://i18n//lib/i18n/config.rb#80
+ # pkg:gem/i18n#lib/i18n/config.rb:80
def default_separator=(separator); end
- # source://i18n//lib/i18n/config.rb#141
+ # pkg:gem/i18n#lib/i18n/config.rb:141
def enforce_available_locales; end
- # source://i18n//lib/i18n/config.rb#145
+ # pkg:gem/i18n#lib/i18n/config.rb:145
def enforce_available_locales=(enforce_available_locales); end
# Returns the current exception handler. Defaults to an instance of
# I18n::ExceptionHandler.
#
- # source://i18n//lib/i18n/config.rb#86
+ # pkg:gem/i18n#lib/i18n/config.rb:86
def exception_handler; end
# Sets the exception handler.
#
- # source://i18n//lib/i18n/config.rb#91
+ # pkg:gem/i18n#lib/i18n/config.rb:91
def exception_handler=(exception_handler); end
# Returns the current interpolation patterns. Defaults to
# I18n::DEFAULT_INTERPOLATION_PATTERNS.
#
- # source://i18n//lib/i18n/config.rb#151
+ # pkg:gem/i18n#lib/i18n/config.rb:151
def interpolation_patterns; end
# Sets the current interpolation patterns. Used to set a interpolation
@@ -1731,7 +1754,7 @@ class I18n::Config
#
# I18n.config.interpolation_patterns << /\{\{(\w+)\}\}/
#
- # source://i18n//lib/i18n/config.rb#161
+ # pkg:gem/i18n#lib/i18n/config.rb:161
def interpolation_patterns=(interpolation_patterns); end
# Allow clients to register paths providing translation data sources. The
@@ -1743,30 +1766,30 @@ class I18n::Config
# register translation files like this:
# I18n.load_path << 'path/to/locale/en.yml'
#
- # source://i18n//lib/i18n/config.rb#126
+ # pkg:gem/i18n#lib/i18n/config.rb:126
def load_path; end
# Sets the load path instance. Custom implementations are expected to
# behave like a Ruby Array.
#
- # source://i18n//lib/i18n/config.rb#132
+ # pkg:gem/i18n#lib/i18n/config.rb:132
def load_path=(load_path); end
# The only configuration value that is not global and scoped to thread is :locale.
# It defaults to the default_locale.
#
- # source://i18n//lib/i18n/config.rb#9
+ # pkg:gem/i18n#lib/i18n/config.rb:9
def locale; end
# Sets the current locale pseudo-globally, i.e. in the Thread.current hash.
#
- # source://i18n//lib/i18n/config.rb#14
+ # pkg:gem/i18n#lib/i18n/config.rb:14
def locale=(locale); end
# Returns the current handler for situations when interpolation argument
# is missing. MissingInterpolationArgument will be raised by default.
#
- # source://i18n//lib/i18n/config.rb#97
+ # pkg:gem/i18n#lib/i18n/config.rb:97
def missing_interpolation_argument_handler; end
# Sets the missing interpolation argument handler. It can be any
@@ -1781,34 +1804,32 @@ class I18n::Config
# "#{key} is missing"
# end
#
- # source://i18n//lib/i18n/config.rb#114
+ # pkg:gem/i18n#lib/i18n/config.rb:114
def missing_interpolation_argument_handler=(exception_handler); end
end
-# source://i18n//lib/i18n/interpolate/ruby.rb#5
+# pkg:gem/i18n#lib/i18n/interpolate/ruby.rb:7
I18n::DEFAULT_INTERPOLATION_PATTERNS = T.let(T.unsafe(nil), Array)
-# source://i18n//lib/i18n/exceptions.rb#18
+# pkg:gem/i18n#lib/i18n/exceptions.rb:16
class I18n::Disabled < ::I18n::ArgumentError
- # @return [Disabled] a new instance of Disabled
- #
- # source://i18n//lib/i18n/exceptions.rb#19
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:17
def initialize(method); end
end
-# source://i18n//lib/i18n.rb#35
+# pkg:gem/i18n#lib/i18n.rb:36
I18n::EMPTY_HASH = T.let(T.unsafe(nil), Hash)
-# source://i18n//lib/i18n/exceptions.rb#6
+# pkg:gem/i18n#lib/i18n/exceptions.rb:4
class I18n::ExceptionHandler
- # source://i18n//lib/i18n/exceptions.rb#7
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:5
def call(exception, _locale, _key, _options); end
end
-# source://i18n//lib/i18n/gettext.rb#4
+# pkg:gem/i18n#lib/i18n/gettext.rb:4
module I18n::Gettext
class << self
- # source://i18n//lib/i18n/gettext.rb#21
+ # pkg:gem/i18n#lib/i18n/gettext.rb:21
def extract_scope(msgid, separator); end
# returns an array of plural keys for the given locale or the whole hash
@@ -1816,12 +1837,12 @@ module I18n::Gettext
# integer-index based style
# TODO move this information to the pluralization module
#
- # source://i18n//lib/i18n/gettext.rb#17
+ # pkg:gem/i18n#lib/i18n/gettext.rb:17
def plural_keys(*args); end
end
end
-# source://i18n//lib/i18n/gettext.rb#6
+# pkg:gem/i18n#lib/i18n/gettext.rb:6
I18n::Gettext::CONTEXT_SEPARATOR = T.let(T.unsafe(nil), String)
# Implements classical Gettext style accessors. To use this include the
@@ -1829,7 +1850,7 @@ I18n::Gettext::CONTEXT_SEPARATOR = T.let(T.unsafe(nil), String)
#
# include I18n::Gettext::Helpers
#
-# source://i18n//lib/i18n/gettext/helpers.rb#11
+# pkg:gem/i18n#lib/i18n/gettext/helpers.rb:11
module I18n::Gettext::Helpers
# Makes dynamic translation messages readable for the gettext parser.
# _(fruit) cannot be understood by the gettext parser. To help the parser find all your translations,
@@ -1837,460 +1858,398 @@ module I18n::Gettext::Helpers
# * msgid: the message id.
# * Returns: msgid.
#
- # source://i18n//lib/i18n/gettext/helpers.rb#17
+ # pkg:gem/i18n#lib/i18n/gettext/helpers.rb:17
def N_(msgsid); end
- # source://i18n//lib/i18n/gettext/helpers.rb#21
+ # pkg:gem/i18n#lib/i18n/gettext/helpers.rb:24
def _(msgid, options = T.unsafe(nil)); end
- # source://i18n//lib/i18n/gettext/helpers.rb#21
+ # pkg:gem/i18n#lib/i18n/gettext/helpers.rb:21
def gettext(msgid, options = T.unsafe(nil)); end
- # source://i18n//lib/i18n/gettext/helpers.rb#38
+ # pkg:gem/i18n#lib/i18n/gettext/helpers.rb:41
def n_(msgid, msgid_plural, n = T.unsafe(nil)); end
- # source://i18n//lib/i18n/gettext/helpers.rb#38
+ # pkg:gem/i18n#lib/i18n/gettext/helpers.rb:38
def ngettext(msgid, msgid_plural, n = T.unsafe(nil)); end
- # Method signatures:
- # npgettext('Fruits', 'apple', 'apples', 2)
- # npgettext('Fruits', ['apple', 'apples'], 2)
- #
- # source://i18n//lib/i18n/gettext/helpers.rb#61
+ # pkg:gem/i18n#lib/i18n/gettext/helpers.rb:72
def np_(msgctxt, msgid, msgid_plural, n = T.unsafe(nil)); end
# Method signatures:
# npgettext('Fruits', 'apple', 'apples', 2)
# npgettext('Fruits', ['apple', 'apples'], 2)
#
- # source://i18n//lib/i18n/gettext/helpers.rb#61
+ # pkg:gem/i18n#lib/i18n/gettext/helpers.rb:61
def npgettext(msgctxt, msgid, msgid_plural, n = T.unsafe(nil)); end
- # Method signatures:
- # nsgettext('Fruits|apple', 'apples', 2)
- # nsgettext(['Fruits|apple', 'apples'], 2)
- #
- # source://i18n//lib/i18n/gettext/helpers.rb#46
+ # pkg:gem/i18n#lib/i18n/gettext/helpers.rb:56
def ns_(msgid, msgid_plural, n = T.unsafe(nil), separator = T.unsafe(nil)); end
# Method signatures:
# nsgettext('Fruits|apple', 'apples', 2)
# nsgettext(['Fruits|apple', 'apples'], 2)
#
- # source://i18n//lib/i18n/gettext/helpers.rb#46
+ # pkg:gem/i18n#lib/i18n/gettext/helpers.rb:46
def nsgettext(msgid, msgid_plural, n = T.unsafe(nil), separator = T.unsafe(nil)); end
- # source://i18n//lib/i18n/gettext/helpers.rb#32
+ # pkg:gem/i18n#lib/i18n/gettext/helpers.rb:36
def p_(msgctxt, msgid); end
- # source://i18n//lib/i18n/gettext/helpers.rb#32
+ # pkg:gem/i18n#lib/i18n/gettext/helpers.rb:32
def pgettext(msgctxt, msgid); end
- # source://i18n//lib/i18n/gettext/helpers.rb#26
+ # pkg:gem/i18n#lib/i18n/gettext/helpers.rb:30
def s_(msgid, separator = T.unsafe(nil)); end
- # source://i18n//lib/i18n/gettext/helpers.rb#26
+ # pkg:gem/i18n#lib/i18n/gettext/helpers.rb:26
def sgettext(msgid, separator = T.unsafe(nil)); end
end
-# source://i18n//lib/i18n/gettext.rb#5
+# pkg:gem/i18n#lib/i18n/gettext.rb:5
I18n::Gettext::PLURAL_SEPARATOR = T.let(T.unsafe(nil), String)
-# source://i18n//lib/i18n/interpolate/ruby.rb#10
+# pkg:gem/i18n#lib/i18n/interpolate/ruby.rb:12
I18n::INTERPOLATION_PATTERN = T.let(T.unsafe(nil), Regexp)
-# source://i18n//lib/i18n/exceptions.rb#124
+# pkg:gem/i18n#lib/i18n/interpolate/ruby.rb:15
+I18n::INTERPOLATION_PATTERNS_CACHE = T.let(T.unsafe(nil), Hash)
+
+# pkg:gem/i18n#lib/i18n/exceptions.rb:132
class I18n::InvalidFilenames < ::I18n::ArgumentError
- # @return [InvalidFilenames] a new instance of InvalidFilenames
- #
- # source://i18n//lib/i18n/exceptions.rb#126
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:134
def initialize(file_errors); end
end
-# source://i18n//lib/i18n/exceptions.rb#125
+# pkg:gem/i18n#lib/i18n/exceptions.rb:133
I18n::InvalidFilenames::NUMBER_OF_ERRORS_SHOWN = T.let(T.unsafe(nil), Integer)
-# source://i18n//lib/i18n/exceptions.rb#32
+# pkg:gem/i18n#lib/i18n/exceptions.rb:30
class I18n::InvalidLocale < ::I18n::ArgumentError
- # @return [InvalidLocale] a new instance of InvalidLocale
- #
- # source://i18n//lib/i18n/exceptions.rb#34
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:32
def initialize(locale); end
- # Returns the value of attribute locale.
- #
- # source://i18n//lib/i18n/exceptions.rb#33
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:31
def locale; end
end
-# source://i18n//lib/i18n/exceptions.rb#40
+# pkg:gem/i18n#lib/i18n/exceptions.rb:38
class I18n::InvalidLocaleData < ::I18n::ArgumentError
- # @return [InvalidLocaleData] a new instance of InvalidLocaleData
- #
- # source://i18n//lib/i18n/exceptions.rb#42
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:40
def initialize(filename, exception_message); end
- # Returns the value of attribute filename.
- #
- # source://i18n//lib/i18n/exceptions.rb#41
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:39
def filename; end
end
-# source://i18n//lib/i18n/exceptions.rb#82
+# pkg:gem/i18n#lib/i18n/exceptions.rb:90
class I18n::InvalidPluralizationData < ::I18n::ArgumentError
- # @return [InvalidPluralizationData] a new instance of InvalidPluralizationData
- #
- # source://i18n//lib/i18n/exceptions.rb#84
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:92
def initialize(entry, count, key); end
- # Returns the value of attribute count.
- #
- # source://i18n//lib/i18n/exceptions.rb#83
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:91
def count; end
- # Returns the value of attribute entry.
- #
- # source://i18n//lib/i18n/exceptions.rb#83
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:91
def entry; end
- # Returns the value of attribute key.
- #
- # source://i18n//lib/i18n/exceptions.rb#83
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:91
def key; end
end
-# source://i18n//lib/i18n/backend/key_value.rb#21
+# pkg:gem/i18n#lib/i18n/backend/key_value.rb:21
I18n::JSON = ActiveSupport::JSON
-# source://i18n//lib/i18n/locale.rb#4
+# pkg:gem/i18n#lib/i18n/locale.rb:4
module I18n::Locale; end
-# source://i18n//lib/i18n/locale/fallbacks.rb#48
+# pkg:gem/i18n#lib/i18n/locale/fallbacks.rb:48
class I18n::Locale::Fallbacks < ::Hash
- # @return [Fallbacks] a new instance of Fallbacks
- #
- # source://i18n//lib/i18n/locale/fallbacks.rb#49
+ # pkg:gem/i18n#lib/i18n/locale/fallbacks.rb:49
def initialize(*mappings); end
- # @raise [InvalidLocale]
- #
- # source://i18n//lib/i18n/locale/fallbacks.rb#60
+ # pkg:gem/i18n#lib/i18n/locale/fallbacks.rb:60
def [](locale); end
- # Returns the value of attribute defaults.
- #
- # source://i18n//lib/i18n/locale/fallbacks.rb#58
+ # pkg:gem/i18n#lib/i18n/locale/fallbacks.rb:58
def defaults; end
- # source://i18n//lib/i18n/locale/fallbacks.rb#55
+ # pkg:gem/i18n#lib/i18n/locale/fallbacks.rb:55
def defaults=(defaults); end
- # source://i18n//lib/i18n/locale/fallbacks.rb#67
+ # pkg:gem/i18n#lib/i18n/locale/fallbacks.rb:82
+ def empty?; end
+
+ # pkg:gem/i18n#lib/i18n/locale/fallbacks.rb:86
+ def inspect; end
+
+ # pkg:gem/i18n#lib/i18n/locale/fallbacks.rb:67
def map(*args, &block); end
protected
- # source://i18n//lib/i18n/locale/fallbacks.rb#84
+ # pkg:gem/i18n#lib/i18n/locale/fallbacks.rb:92
def compute(tags, include_defaults = T.unsafe(nil), exclude = T.unsafe(nil)); end
end
-# source://i18n//lib/i18n/locale/tag.rb#5
+# pkg:gem/i18n#lib/i18n/locale/tag.rb:5
module I18n::Locale::Tag
class << self
# Returns the current locale tag implementation. Defaults to +I18n::Locale::Tag::Simple+.
#
- # source://i18n//lib/i18n/locale/tag.rb#12
+ # pkg:gem/i18n#lib/i18n/locale/tag.rb:12
def implementation; end
# Sets the current locale tag implementation. Use this to set a different locale tag implementation.
#
- # source://i18n//lib/i18n/locale/tag.rb#17
+ # pkg:gem/i18n#lib/i18n/locale/tag.rb:17
def implementation=(implementation); end
# Factory method for locale tags. Delegates to the current locale tag implementation.
#
- # source://i18n//lib/i18n/locale/tag.rb#22
+ # pkg:gem/i18n#lib/i18n/locale/tag.rb:22
def tag(tag); end
end
end
-# source://i18n//lib/i18n/locale/tag/parents.rb#4
+# pkg:gem/i18n#lib/i18n/locale/tag/parents.rb:4
module I18n::Locale::Tag::Parents
- # source://i18n//lib/i18n/locale/tag/parents.rb#5
+ # pkg:gem/i18n#lib/i18n/locale/tag/parents.rb:5
def parent; end
- # source://i18n//lib/i18n/locale/tag/parents.rb#18
+ # pkg:gem/i18n#lib/i18n/locale/tag/parents.rb:18
def parents; end
- # source://i18n//lib/i18n/locale/tag/parents.rb#14
+ # pkg:gem/i18n#lib/i18n/locale/tag/parents.rb:14
def self_and_parents; end
end
-# source://i18n//lib/i18n/locale/tag/rfc4646.rb#12
+# pkg:gem/i18n#lib/i18n/locale/tag/rfc4646.rb:12
I18n::Locale::Tag::RFC4646_FORMATS = T.let(T.unsafe(nil), Hash)
-# source://i18n//lib/i18n/locale/tag/rfc4646.rb#11
+# pkg:gem/i18n#lib/i18n/locale/tag/rfc4646.rb:11
I18n::Locale::Tag::RFC4646_SUBTAGS = T.let(T.unsafe(nil), Array)
-# source://i18n//lib/i18n/locale/tag/rfc4646.rb#14
+# pkg:gem/i18n#lib/i18n/locale/tag/rfc4646.rb:14
class I18n::Locale::Tag::Rfc4646 < ::Struct
include ::I18n::Locale::Tag::Parents
- # source://i18n//lib/i18n/locale/tag/rfc4646.rb#35
+ # pkg:gem/i18n#lib/i18n/locale/tag/rfc4646.rb:35
def language; end
- # source://i18n//lib/i18n/locale/tag/rfc4646.rb#35
+ # pkg:gem/i18n#lib/i18n/locale/tag/rfc4646.rb:35
def region; end
- # source://i18n//lib/i18n/locale/tag/rfc4646.rb#35
+ # pkg:gem/i18n#lib/i18n/locale/tag/rfc4646.rb:35
def script; end
- # source://i18n//lib/i18n/locale/tag/rfc4646.rb#46
+ # pkg:gem/i18n#lib/i18n/locale/tag/rfc4646.rb:46
def to_a; end
- # source://i18n//lib/i18n/locale/tag/rfc4646.rb#42
+ # pkg:gem/i18n#lib/i18n/locale/tag/rfc4646.rb:42
def to_s; end
- # source://i18n//lib/i18n/locale/tag/rfc4646.rb#38
+ # pkg:gem/i18n#lib/i18n/locale/tag/rfc4646.rb:38
def to_sym; end
- # source://i18n//lib/i18n/locale/tag/rfc4646.rb#35
+ # pkg:gem/i18n#lib/i18n/locale/tag/rfc4646.rb:35
def variant; end
class << self
- # source://i18n//lib/i18n/locale/tag/rfc4646.rb#23
+ # pkg:gem/i18n#lib/i18n/locale/tag/rfc4646.rb:23
def parser; end
- # source://i18n//lib/i18n/locale/tag/rfc4646.rb#27
+ # pkg:gem/i18n#lib/i18n/locale/tag/rfc4646.rb:27
def parser=(parser); end
# Parses the given tag and returns a Tag instance if it is valid.
# Returns false if the given tag is not valid according to RFC 4646.
#
- # source://i18n//lib/i18n/locale/tag/rfc4646.rb#18
+ # pkg:gem/i18n#lib/i18n/locale/tag/rfc4646.rb:18
def tag(tag); end
end
end
-# source://i18n//lib/i18n/locale/tag/rfc4646.rb#50
+# pkg:gem/i18n#lib/i18n/locale/tag/rfc4646.rb:50
module I18n::Locale::Tag::Rfc4646::Parser
class << self
- # source://i18n//lib/i18n/locale/tag/rfc4646.rb#63
+ # pkg:gem/i18n#lib/i18n/locale/tag/rfc4646.rb:63
def match(tag); end
end
end
-# source://i18n//lib/i18n/locale/tag/rfc4646.rb#51
+# pkg:gem/i18n#lib/i18n/locale/tag/rfc4646.rb:51
I18n::Locale::Tag::Rfc4646::Parser::PATTERN = T.let(T.unsafe(nil), Regexp)
-# source://i18n//lib/i18n/locale/tag/simple.rb#6
+# pkg:gem/i18n#lib/i18n/locale/tag/simple.rb:6
class I18n::Locale::Tag::Simple
include ::I18n::Locale::Tag::Parents
- # @return [Simple] a new instance of Simple
- #
- # source://i18n//lib/i18n/locale/tag/simple.rb#17
+ # pkg:gem/i18n#lib/i18n/locale/tag/simple.rb:17
def initialize(*tag); end
- # source://i18n//lib/i18n/locale/tag/simple.rb#21
+ # pkg:gem/i18n#lib/i18n/locale/tag/simple.rb:21
def subtags; end
- # Returns the value of attribute tag.
- #
- # source://i18n//lib/i18n/locale/tag/simple.rb#15
+ # pkg:gem/i18n#lib/i18n/locale/tag/simple.rb:15
def tag; end
- # source://i18n//lib/i18n/locale/tag/simple.rb#33
+ # pkg:gem/i18n#lib/i18n/locale/tag/simple.rb:33
def to_a; end
- # source://i18n//lib/i18n/locale/tag/simple.rb#29
+ # pkg:gem/i18n#lib/i18n/locale/tag/simple.rb:29
def to_s; end
- # source://i18n//lib/i18n/locale/tag/simple.rb#25
+ # pkg:gem/i18n#lib/i18n/locale/tag/simple.rb:25
def to_sym; end
class << self
- # source://i18n//lib/i18n/locale/tag/simple.rb#8
+ # pkg:gem/i18n#lib/i18n/locale/tag/simple.rb:8
def tag(tag); end
end
end
-# source://i18n//lib/i18n/middleware.rb#4
+# pkg:gem/i18n#lib/i18n/middleware.rb:4
class I18n::Middleware
- # @return [Middleware] a new instance of Middleware
- #
- # source://i18n//lib/i18n/middleware.rb#6
+ # pkg:gem/i18n#lib/i18n/middleware.rb:6
def initialize(app); end
- # source://i18n//lib/i18n/middleware.rb#10
+ # pkg:gem/i18n#lib/i18n/middleware.rb:10
def call(env); end
end
-# source://i18n//lib/i18n/exceptions.rb#90
+# pkg:gem/i18n#lib/i18n/exceptions.rb:98
class I18n::MissingInterpolationArgument < ::I18n::ArgumentError
- # @return [MissingInterpolationArgument] a new instance of MissingInterpolationArgument
- #
- # source://i18n//lib/i18n/exceptions.rb#92
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:100
def initialize(key, values, string); end
- # Returns the value of attribute key.
- #
- # source://i18n//lib/i18n/exceptions.rb#91
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:99
def key; end
- # Returns the value of attribute string.
- #
- # source://i18n//lib/i18n/exceptions.rb#91
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:99
def string; end
- # Returns the value of attribute values.
- #
- # source://i18n//lib/i18n/exceptions.rb#91
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:99
def values; end
end
-# source://i18n//lib/i18n/exceptions.rb#48
+# pkg:gem/i18n#lib/i18n/exceptions.rb:46
class I18n::MissingTranslation < ::I18n::ArgumentError
include ::I18n::MissingTranslation::Base
end
-# source://i18n//lib/i18n/exceptions.rb#49
+# pkg:gem/i18n#lib/i18n/exceptions.rb:47
module I18n::MissingTranslation::Base
- # source://i18n//lib/i18n/exceptions.rb#54
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:52
def initialize(locale, key, options = T.unsafe(nil)); end
- # Returns the value of attribute key.
- #
- # source://i18n//lib/i18n/exceptions.rb#52
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:50
def key; end
- # source://i18n//lib/i18n/exceptions.rb#59
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:57
def keys; end
- # Returns the value of attribute locale.
- #
- # source://i18n//lib/i18n/exceptions.rb#52
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:50
def locale; end
- # source://i18n//lib/i18n/exceptions.rb#65
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:63
def message; end
- # Returns the value of attribute options.
- #
- # source://i18n//lib/i18n/exceptions.rb#52
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:72
+ def normalized_option(key); end
+
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:50
def options; end
- # source://i18n//lib/i18n/exceptions.rb#70
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:78
def to_exception; end
- # source://i18n//lib/i18n/exceptions.rb#65
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:76
def to_s; end
end
-# source://i18n//lib/i18n/exceptions.rb#50
+# pkg:gem/i18n#lib/i18n/exceptions.rb:48
I18n::MissingTranslation::Base::PERMITTED_KEYS = T.let(T.unsafe(nil), Array)
-# source://i18n//lib/i18n/exceptions.rb#78
+# pkg:gem/i18n#lib/i18n/exceptions.rb:86
class I18n::MissingTranslationData < ::I18n::ArgumentError
include ::I18n::MissingTranslation::Base
end
-# source://i18n//lib/i18n.rb#19
+# pkg:gem/i18n#lib/i18n.rb:19
I18n::RESERVED_KEYS = T.let(T.unsafe(nil), Array)
-# source://i18n//lib/i18n/exceptions.rb#98
+# pkg:gem/i18n#lib/i18n/exceptions.rb:106
class I18n::ReservedInterpolationKey < ::I18n::ArgumentError
- # @return [ReservedInterpolationKey] a new instance of ReservedInterpolationKey
- #
- # source://i18n//lib/i18n/exceptions.rb#100
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:108
def initialize(key, string); end
- # Returns the value of attribute key.
- #
- # source://i18n//lib/i18n/exceptions.rb#99
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:107
def key; end
- # Returns the value of attribute string.
- #
- # source://i18n//lib/i18n/exceptions.rb#99
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:107
def string; end
end
-# source://i18n//lib/i18n/tests.rb#4
+# pkg:gem/i18n#lib/i18n/tests.rb:4
module I18n::Tests; end
-# source://i18n//lib/i18n/tests/localization.rb#3
+# pkg:gem/i18n#lib/i18n/tests/localization.rb:3
module I18n::Tests::Localization
class << self
- # @private
- #
- # source://i18n//lib/i18n/tests/localization.rb#9
+ # pkg:gem/i18n#lib/i18n/tests/localization.rb:9
def included(base); end
end
end
-# source://i18n//lib/i18n/exceptions.rb#106
+# pkg:gem/i18n#lib/i18n/exceptions.rb:114
class I18n::UnknownFileType < ::I18n::ArgumentError
- # @return [UnknownFileType] a new instance of UnknownFileType
- #
- # source://i18n//lib/i18n/exceptions.rb#108
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:116
def initialize(type, filename); end
- # Returns the value of attribute filename.
- #
- # source://i18n//lib/i18n/exceptions.rb#107
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:115
def filename; end
- # Returns the value of attribute type.
- #
- # source://i18n//lib/i18n/exceptions.rb#107
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:115
def type; end
end
-# source://i18n//lib/i18n/exceptions.rb#114
+# pkg:gem/i18n#lib/i18n/exceptions.rb:122
class I18n::UnsupportedMethod < ::I18n::ArgumentError
- # @return [UnsupportedMethod] a new instance of UnsupportedMethod
- #
- # source://i18n//lib/i18n/exceptions.rb#116
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:124
def initialize(method, backend_klass, msg); end
- # Returns the value of attribute backend_klass.
- #
- # source://i18n//lib/i18n/exceptions.rb#115
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:123
def backend_klass; end
- # Returns the value of attribute method.
- #
- # source://i18n//lib/i18n/exceptions.rb#115
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:123
def method; end
- # Returns the value of attribute msg.
- #
- # source://i18n//lib/i18n/exceptions.rb#115
+ # pkg:gem/i18n#lib/i18n/exceptions.rb:123
def msg; end
end
-# source://i18n//lib/i18n/utils.rb#4
+# pkg:gem/i18n#lib/i18n/utils.rb:4
module I18n::Utils
class << self
- # source://i18n//lib/i18n/utils.rb#18
+ # pkg:gem/i18n#lib/i18n/utils.rb:18
def deep_merge(hash, other_hash, &block); end
- # source://i18n//lib/i18n/utils.rb#22
+ # pkg:gem/i18n#lib/i18n/utils.rb:22
def deep_merge!(hash, other_hash, &block); end
- # source://i18n//lib/i18n/utils.rb#34
+ # pkg:gem/i18n#lib/i18n/utils.rb:34
def deep_symbolize_keys(hash); end
- # source://i18n//lib/i18n/utils.rb#7
+ # pkg:gem/i18n#lib/i18n/utils.rb:7
def except(hash, *keys); end
private
- # source://i18n//lib/i18n/utils.rb#43
+ # pkg:gem/i18n#lib/i18n/utils.rb:43
def deep_symbolize_keys_in_object(value); end
end
end
-# source://i18n//lib/i18n/version.rb#4
+# pkg:gem/i18n#lib/i18n/version.rb:4
I18n::VERSION = T.let(T.unsafe(nil), String)
diff --git a/sorbet/rbi/gems/io-console@0.8.2.rbi b/sorbet/rbi/gems/io-console@0.8.2.rbi
new file mode 100644
index 0000000..73616ab
--- /dev/null
+++ b/sorbet/rbi/gems/io-console@0.8.2.rbi
@@ -0,0 +1,9 @@
+# typed: true
+
+# DO NOT EDIT MANUALLY
+# This is an autogenerated file for types exported from the `io-console` gem.
+# Please instead update this file by running `bin/tapioca gem io-console`.
+
+
+# THIS IS AN EMPTY RBI FILE.
+# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem
diff --git a/sorbet/rbi/gems/jaro_winkler@1.5.4.rbi b/sorbet/rbi/gems/jaro_winkler@1.7.0.rbi
similarity index 63%
rename from sorbet/rbi/gems/jaro_winkler@1.5.4.rbi
rename to sorbet/rbi/gems/jaro_winkler@1.7.0.rbi
index 97aee8c..0ddb7ca 100644
--- a/sorbet/rbi/gems/jaro_winkler@1.5.4.rbi
+++ b/sorbet/rbi/gems/jaro_winkler@1.7.0.rbi
@@ -4,16 +4,22 @@
# This is an autogenerated file for types exported from the `jaro_winkler` gem.
# Please instead update this file by running `bin/tapioca gem jaro_winkler`.
-# source://jaro_winkler//lib/jaro_winkler/version.rb#3
+
+# pkg:gem/jaro_winkler#lib/jaro_winkler/version.rb:3
module JaroWinkler
class << self
def distance(*_arg0); end
def jaro_distance(*_arg0); end
+ def jaro_similarity(*_arg0); end
+ def similarity(*_arg0); end
end
end
+# pkg:gem/jaro_winkler#lib/jaro_winkler.rb:7
class JaroWinkler::Error < ::RuntimeError; end
+
+# pkg:gem/jaro_winkler#lib/jaro_winkler.rb:7
class JaroWinkler::InvalidWeightError < ::JaroWinkler::Error; end
-# source://jaro_winkler//lib/jaro_winkler/version.rb#4
+# pkg:gem/jaro_winkler#lib/jaro_winkler/version.rb:4
JaroWinkler::VERSION = T.let(T.unsafe(nil), String)
diff --git a/sorbet/rbi/gems/json@2.6.3.rbi b/sorbet/rbi/gems/json@2.19.5.rbi
similarity index 60%
rename from sorbet/rbi/gems/json@2.6.3.rbi
rename to sorbet/rbi/gems/json@2.19.5.rbi
index 259116a..30abc77 100644
--- a/sorbet/rbi/gems/json@2.6.3.rbi
+++ b/sorbet/rbi/gems/json@2.19.5.rbi
@@ -1,26 +1,23 @@
-# typed: true
+# typed: false
# 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.
#
+# \JSON is easy for us humans to read and write,
+# and equally simple for machines to read (parse) and write (generate).
+#
+# \JSON is language-independent, making it an ideal interchange format
+# for applications in differing programming languages
+# and on differing operating systems.
+#
+# == \JSON Values
+#
# A \JSON value is one of the following:
# - Double-quoted text: "foo".
# - Number: +1+, +1.0+, +2.0e2+.
@@ -142,6 +139,24 @@ end
#
# ---
#
+# Option +allow_duplicate_key+ specifies whether duplicate keys in objects
+# should be ignored or cause an error to be raised:
+#
+# When not specified:
+# # The last value is used and a deprecation warning emitted.
+# JSON.parse('{"a": 1, "a":2}') => {"a" => 2}
+# # warning: detected duplicate keys in JSON object.
+# # This will raise an error in json 3.0 unless enabled via `allow_duplicate_key: true`
+#
+# When set to `+true+`
+# # The last value is used.
+# JSON.parse('{"a": 1, "a":2}') => {"a" => 2}
+#
+# When set to `+false+`, the future default:
+# JSON.parse('{"a": 1, "a":2}') => duplicate key at line 1 column 1 (JSON::ParserError)
+#
+# ---
+#
# Option +allow_nan+ (boolean) specifies whether to allow
# NaN, Infinity, and MinusInfinity in +source+;
# defaults to +false+.
@@ -158,8 +173,47 @@ end
# ruby = JSON.parse(source, {allow_nan: true})
# ruby # => [NaN, Infinity, -Infinity]
#
+# ---
+#
+# Option +allow_trailing_comma+ (boolean) specifies whether to allow
+# trailing commas in objects and arrays;
+# defaults to +false+.
+#
+# With the default, +false+:
+# JSON.parse('[1,]') # unexpected character: ']' at line 1 column 4 (JSON::ParserError)
+#
+# When enabled:
+# JSON.parse('[1,]', allow_trailing_comma: true) # => [1]
+#
+# ---
+#
+# Option +allow_control_characters+ (boolean) specifies whether to allow
+# unescaped ASCII control characters, such as newlines, in strings;
+# defaults to +false+.
+#
+# With the default, +false+:
+# JSON.parse(%{"Hello\nWorld"}) # invalid ASCII control character in string (JSON::ParserError)
+#
+# When enabled:
+# JSON.parse(%{"Hello\nWorld"}, allow_control_characters: true) # => "Hello\nWorld"
+#
+# ---
+#
+# Option +allow_invalid_escape+ (boolean) specifies whether to ignore backslahes that are followed
+# by an invalid escape character in strings;
+# defaults to +false+.
+#
+# With the default, +false+:
+# JSON.parse('"Hell\o"') # invalid escape character in string (JSON::ParserError)
+#
+# When enabled:
+# JSON.parse('"Hell\o"', allow_invalid_escape: true) # => "Hello"
+#
# ====== Output Options
#
+# Option +freeze+ (boolean) specifies whether the returned objects will be frozen;
+# defaults to +false+.
+#
# Option +symbolize_names+ (boolean) specifies whether returned \Hash keys
# should be Symbols;
# defaults to +false+ (use Strings).
@@ -284,8 +338,27 @@ end
# JSON.generate(JSON::MinusInfinity)
#
# Allow:
-# ruby = [Float::NaN, Float::Infinity, Float::MinusInfinity]
-# JSON.generate(ruby, allow_nan: true) # => '[NaN,Infinity,-Infinity]'
+# ruby = [Float::NAN, Float::INFINITY, JSON::NaN, JSON::Infinity, JSON::MinusInfinity]
+# JSON.generate(ruby, allow_nan: true) # => '[NaN,Infinity,NaN,Infinity,-Infinity]'
+#
+# ---
+#
+# Option +allow_duplicate_key+ (boolean) specifies whether
+# hashes with duplicate keys should be allowed or produce an error.
+# defaults to emit a deprecation warning.
+#
+# With the default, (not set):
+# Warning[:deprecated] = true
+# JSON.generate({ foo: 1, "foo" => 2 })
+# # warning: detected duplicate key "foo" in {foo: 1, "foo" => 2}.
+# # This will raise an error in json 3.0 unless enabled via `allow_duplicate_key: true`
+# # => '{"foo":1,"foo":2}'
+#
+# With false
+# JSON.generate({ foo: 1, "foo" => 2 }, allow_duplicate_key: false)
+# # detected duplicate key "foo" in {foo: 1, "foo" => 2} (JSON::GeneratorError)
+#
+# In version 3.0, false will become the default.
#
# ---
#
@@ -300,6 +373,15 @@ end
# # Raises JSON::NestingError (nesting of 2 is too deep):
# JSON.generate(obj, max_nesting: 2)
#
+# ====== Escaping Options
+#
+# Options +script_safe+ (boolean) specifies wether '\u2028', '\u2029'
+# and '/' should be escaped as to make the JSON object safe to interpolate in script
+# tags.
+#
+# Options +ascii_only+ (boolean) specifies wether all characters outside the ASCII range
+# should be escaped.
+#
# ====== Output Options
#
# The default formatting options generate the most compact
@@ -357,6 +439,9 @@ end
#
# == \JSON Additions
#
+# Note that JSON Additions must only be used with trusted data, and is
+# deprecated.
+#
# When you "round trip" a non-\String object from Ruby to \JSON and back,
# you have a new \String, instead of the object you began with:
# ruby0 = Range.new(0, 2)
@@ -384,13 +469,13 @@ end
# json1 = JSON.generate(ruby)
# ruby1 = JSON.parse(json1, create_additions: true)
# # Make a nice display.
-# display = <" (String)
# With custom addition: # (Foo)
+#
+# pkg:gem/json#lib/json/version.rb:3
module JSON
private
@@ -617,8 +704,8 @@ module JSON
# 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
+ # pkg:gem/json#lib/json/common.rb:932
+ def dump(obj, anIO = T.unsafe(nil), limit = T.unsafe(nil), kwargs = T.unsafe(nil)); end
# :call-seq:
# JSON.fast_generate(obj, opts) -> new_string
@@ -634,21 +721,18 @@ module JSON
# # Raises SystemStackError (stack level too deep):
# JSON.fast_generate(a)
#
- # source://json//json/common.rb#335
+ # pkg:gem/json#lib/json/common.rb:462
def fast_generate(obj, opts = T.unsafe(nil)); end
- # :stopdoc:
- # I want to deprecate these later, so I'll first be silent about them, and later delete them.
- #
- # source://json//json/common.rb#335
- def fast_unparse(obj, opts = T.unsafe(nil)); end
+ # pkg:gem/json#lib/json/common.rb:977
+ def fast_unparse(*_arg0, **_arg1, &_arg2); end
# :call-seq:
# JSON.generate(obj, opts = nil) -> new_string
#
# Returns a \String containing the generated \JSON data.
#
- # See also JSON.fast_generate, JSON.pretty_generate.
+ # See also JSON.pretty_generate.
#
# Argument +obj+ is the Ruby object to be converted to \JSON.
#
@@ -679,14 +763,25 @@ module JSON
# # Raises JSON::NestingError (nesting of 100 is too deep):
# JSON.generate(a)
#
- # source://json//json/common.rb#296
+ # pkg:gem/json#lib/json/common.rb:441
def generate(obj, opts = T.unsafe(nil)); end
# :call-seq:
+ # JSON.load(source, options = {}) -> object
# JSON.load(source, proc = nil, options = {}) -> object
#
# Returns the Ruby objects created by parsing the given +source+.
#
+ # BEWARE: This method is meant to serialise data from trusted user input,
+ # like from your own database server or clients under your control, it could
+ # be dangerous to allow untrusted users to pass JSON sources into it.
+ # If you must use it, use JSON.unsafe_load instead to make it clear.
+ #
+ # Since JSON version 2.8.0, `load` emits a deprecation warning when a
+ # non native type is deserialized, without `create_additions` being explicitly
+ # enabled, and in JSON version 3.0, `load` will have `create_additions` disabled
+ # by default.
+ #
# - Argument +source+ must be, or be convertible to, a \String:
# - If +source+ responds to instance method +to_str+,
# source.to_str becomes the source.
@@ -701,9 +796,6 @@ module JSON
# - Argument +proc+, if given, must be a \Proc that accepts one argument.
# It will be called recursively with each result (depth-first order).
# See details below.
- # BEWARE: This method is meant to serialise data from trusted user input,
- # like from your own database server or clients under your control, it could
- # be dangerous to allow untrusted users to pass JSON sources into it.
# - Argument +opts+, if given, contains a \Hash of options for the parsing.
# See {Parsing Options}[#module-JSON-label-Parsing+Options].
# The default options can be changed via method JSON.load_default_options=.
@@ -714,17 +806,17 @@ module JSON
# parse(source, opts); see #parse.
#
# Source for following examples:
- # source = <<-EOT
- # {
- # "name": "Dave",
- # "age" :40,
- # "hats": [
- # "Cattleman's",
- # "Panama",
- # "Tophat"
- # ]
- # }
- # EOT
+ # source = <<~JSON
+ # {
+ # "name": "Dave",
+ # "age" :40,
+ # "hats": [
+ # "Cattleman's",
+ # "Panama",
+ # "Tophat"
+ # ]
+ # }
+ # JSON
#
# Load a \String:
# ruby = JSON.load(source)
@@ -789,6 +881,7 @@ module JSON
# when Array
# obj.map! {|v| deserialize_obj v }
# end
+ # obj
# })
# pp ruby
# Output:
@@ -810,7 +903,7 @@ module JSON
# #"Admin", "password"=>"0wn3d"}>}
#
- # source://json//json/common.rb#557
+ # pkg:gem/json#lib/json/common.rb:856
def load(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end
# :call-seq:
@@ -821,7 +914,7 @@ module JSON
#
# See method #parse.
#
- # source://json//json/common.rb#245
+ # pkg:gem/json#lib/json/common.rb:390
def load_file(filespec, opts = T.unsafe(nil)); end
# :call-seq:
@@ -832,7 +925,7 @@ module JSON
#
# See method #parse!
#
- # source://json//json/common.rb#256
+ # pkg:gem/json#lib/json/common.rb:401
def load_file!(filespec, opts = T.unsafe(nil)); end
# :call-seq:
@@ -863,17 +956,17 @@ module JSON
# {Parsing \JSON}[#module-JSON-label-Parsing+JSON].
#
# Parses nested JSON objects:
- # source = <<-EOT
- # {
- # "name": "Dave",
- # "age" :40,
- # "hats": [
- # "Cattleman's",
- # "Panama",
- # "Tophat"
- # ]
- # }
- # EOT
+ # source = <<~JSON
+ # {
+ # "name": "Dave",
+ # "age" :40,
+ # "hats": [
+ # "Cattleman's",
+ # "Panama",
+ # "Tophat"
+ # ]
+ # }
+ # JSON
# ruby = JSON.parse(source)
# ruby # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]}
#
@@ -883,7 +976,7 @@ module JSON
# # Raises JSON::ParserError (783: unexpected token at ''):
# JSON.parse('')
#
- # source://json//json/common.rb#215
+ # pkg:gem/json#lib/json/common.rb:353
def parse(source, opts = T.unsafe(nil)); end
# :call-seq:
@@ -898,7 +991,7 @@ module JSON
# which disables checking for nesting depth.
# - Option +allow_nan+, if not provided, defaults to +true+.
#
- # source://json//json/common.rb#230
+ # pkg:gem/json#lib/json/common.rb:375
def parse!(source, opts = T.unsafe(nil)); end
# :call-seq:
@@ -931,29 +1024,155 @@ module JSON
# }
# }
#
- # source://json//json/common.rb#390
+ # pkg:gem/json#lib/json/common.rb:509
def pretty_generate(obj, opts = T.unsafe(nil)); end
+ # pkg:gem/json#lib/json/common.rb:987
+ def pretty_unparse(*_arg0, **_arg1, &_arg2); end
+
+ # pkg:gem/json#lib/json/common.rb:997
+ def restore(*_arg0, **_arg1, &_arg2); end
+
# :stopdoc:
- # I want to deprecate these later, so I'll first be silent about them, and later delete them.
+ # All these were meant to be deprecated circa 2009, but were just set as undocumented
+ # so usage still exist in the wild.
#
- # source://json//json/common.rb#390
- def pretty_unparse(obj, opts = T.unsafe(nil)); end
+ # pkg:gem/json#lib/json/common.rb:967
+ def unparse(*_arg0, **_arg1, &_arg2); end
- # Recursively calls passed _Proc_ if the parsed data structure is an _Array_ or _Hash_
+ # :call-seq:
+ # JSON.unsafe_load(source, options = {}) -> object
+ # JSON.unsafe_load(source, proc = nil, options = {}) -> object
#
- # source://json//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.
+ # Returns the Ruby objects created by parsing the given +source+.
+ #
+ # BEWARE: This method is meant to serialise data from trusted user input,
+ # like from your own database server or clients under your control, it could
+ # be dangerous to allow untrusted users to pass JSON sources into it.
+ #
+ # - Argument +source+ must be, or be convertible to, a \String:
+ # - If +source+ responds to instance method +to_str+,
+ # source.to_str becomes the source.
+ # - If +source+ responds to instance method +to_io+,
+ # source.to_io.read becomes the source.
+ # - If +source+ responds to instance method +read+,
+ # source.read becomes the source.
+ # - If both of the following are true, source becomes the \String 'null':
+ # - Option +allow_blank+ specifies a truthy value.
+ # - The source, as defined above, is +nil+ or the empty \String ''.
+ # - Otherwise, +source+ remains the source.
+ # - Argument +proc+, if given, must be a \Proc that accepts one argument.
+ # It will be called recursively with each result (depth-first order).
+ # See details below.
+ # - Argument +opts+, if given, contains a \Hash of options for the parsing.
+ # See {Parsing Options}[#module-JSON-label-Parsing+Options].
+ # The default options can be changed via method JSON.unsafe_load_default_options=.
+ #
+ # ---
+ #
+ # When no +proc+ is given, modifies +source+ as above and returns the result of
+ # parse(source, opts); see #parse.
+ #
+ # Source for following examples:
+ # source = <<~JSON
+ # {
+ # "name": "Dave",
+ # "age" :40,
+ # "hats": [
+ # "Cattleman's",
+ # "Panama",
+ # "Tophat"
+ # ]
+ # }
+ # JSON
+ #
+ # Load a \String:
+ # ruby = JSON.unsafe_load(source)
+ # ruby # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]}
+ #
+ # Load an \IO object:
+ # require 'stringio'
+ # object = JSON.unsafe_load(StringIO.new(source))
+ # object # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]}
+ #
+ # Load a \File object:
+ # path = 't.json'
+ # File.write(path, source)
+ # File.open(path) do |file|
+ # JSON.unsafe_load(file)
+ # end # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]}
+ #
+ # ---
+ #
+ # When +proc+ is given:
+ # - Modifies +source+ as above.
+ # - Gets the +result+ from calling parse(source, opts).
+ # - Recursively calls proc(result).
+ # - Returns the final result.
+ #
+ # Example:
+ # require 'json'
#
- # source://json//json/common.rb#296
- def unparse(obj, opts = T.unsafe(nil)); end
+ # # Some classes for the example.
+ # class Base
+ # def initialize(attributes)
+ # @attributes = attributes
+ # end
+ # end
+ # class User < Base; end
+ # class Account < Base; end
+ # class Admin < Base; end
+ # # The JSON source.
+ # json = <<-EOF
+ # {
+ # "users": [
+ # {"type": "User", "username": "jane", "email": "jane@example.com"},
+ # {"type": "User", "username": "john", "email": "john@example.com"}
+ # ],
+ # "accounts": [
+ # {"account": {"type": "Account", "paid": true, "account_id": "1234"}},
+ # {"account": {"type": "Account", "paid": false, "account_id": "1235"}}
+ # ],
+ # "admins": {"type": "Admin", "password": "0wn3d"}
+ # }
+ # EOF
+ # # Deserializer method.
+ # def deserialize_obj(obj, safe_types = %w(User Account Admin))
+ # type = obj.is_a?(Hash) && obj["type"]
+ # safe_types.include?(type) ? Object.const_get(type).new(obj) : obj
+ # end
+ # # Call to JSON.unsafe_load
+ # ruby = JSON.unsafe_load(json, proc {|obj|
+ # case obj
+ # when Hash
+ # obj.each {|k, v| obj[k] = deserialize_obj v }
+ # when Array
+ # obj.map! {|v| deserialize_obj v }
+ # end
+ # obj
+ # })
+ # pp ruby
+ # Output:
+ # {"users"=>
+ # [#"User", "username"=>"jane", "email"=>"jane@example.com"}>,
+ # #"User", "username"=>"john", "email"=>"john@example.com"}>],
+ # "accounts"=>
+ # [{"account"=>
+ # #"Account", "paid"=>true, "account_id"=>"1234"}>},
+ # {"account"=>
+ # #"Account", "paid"=>false, "account_id"=>"1235"}>}],
+ # "admins"=>
+ # #"Admin", "password"=>"0wn3d"}>}
+ #
+ # pkg:gem/json#lib/json/common.rb:685
+ def unsafe_load(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end
class << self
# :call-seq:
@@ -968,35 +1187,33 @@ module JSON
# ruby = [0, 1, nil]
# JSON[ruby] # => '[0,1,null]'
#
- # source://json//json/common.rb#18
+ # pkg:gem/json#lib/json/common.rb:132
def [](object, opts = T.unsafe(nil)); end
- # source://json//json/common.rb#81
- def create_fast_state; end
+ # pkg:gem/json#lib/json/common.rb:208
+ def _dump_default_options; end
+
+ # pkg:gem/json#lib/json/common.rb:208
+ def _load_default_options; end
+
+ # pkg:gem/json#lib/json/common.rb:208
+ def _unsafe_load_default_options; end
# Returns the current create identifier.
# See also JSON.create_id=.
#
- # source://json//json/common.rb#126
+ # pkg:gem/json#lib/json/common.rb:236
def create_id; end
# Sets create identifier, which is used to decide if the _json_create_
# hook of a class should be called; initial value is +json_class+:
# JSON.create_id # => 'json_class'
#
- # source://json//json/common.rb#120
+ # pkg:gem/json#lib/json/common.rb:230
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
+ # pkg:gem/json#lib/json/common.rb:104
+ def deprecation_warning(message, uplevel = T.unsafe(nil)); end
# :call-seq:
# JSON.dump(obj, io = nil, limit = nil)
@@ -1026,24 +1243,14 @@ module JSON
# 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
+ # pkg:gem/json#lib/json/common.rb:932
+ def dump(obj, anIO = T.unsafe(nil), limit = T.unsafe(nil), kwargs = T.unsafe(nil)); end
- # Sets or returns the default options for the JSON.dump method.
- # Initially:
- # opts = JSON.dump_default_options
- # opts # => {:max_nesting=>false, :allow_nan=>true, :escape_slash=>false}
- #
- # source://json//json/common.rb#596
+ # pkg:gem/json#lib/json/common.rb:208
def dump_default_options; end
- # Sets or returns the default options for the JSON.dump method.
- # Initially:
- # opts = JSON.dump_default_options
- # opts # => {:max_nesting=>false, :allow_nan=>true, :escape_slash=>false}
- #
- # source://json//json/common.rb#596
- def dump_default_options=(_arg0); end
+ # pkg:gem/json#lib/json/common.rb:208
+ def dump_default_options=(val); end
# :call-seq:
# JSON.fast_generate(obj, opts) -> new_string
@@ -1059,21 +1266,18 @@ module JSON
# # Raises SystemStackError (stack level too deep):
# JSON.fast_generate(a)
#
- # source://json//json/common.rb#335
+ # pkg:gem/json#lib/json/common.rb:462
def fast_generate(obj, opts = T.unsafe(nil)); end
- # :stopdoc:
- # I want to deprecate these later, so I'll first be silent about them, and later delete them.
- #
- # source://json//json/common.rb#335
- def fast_unparse(obj, opts = T.unsafe(nil)); end
+ # pkg:gem/json#lib/json/common.rb:977
+ def fast_unparse(*_arg0, **_arg1, &_arg2); end
# :call-seq:
# JSON.generate(obj, opts = nil) -> new_string
#
# Returns a \String containing the generated \JSON data.
#
- # See also JSON.fast_generate, JSON.pretty_generate.
+ # See also JSON.pretty_generate.
#
# Argument +obj+ is the Ruby object to be converted to \JSON.
#
@@ -1104,31 +1308,35 @@ module JSON
# # Raises JSON::NestingError (nesting of 100 is too deep):
# JSON.generate(a)
#
- # source://json//json/common.rb#296
+ # pkg:gem/json#lib/json/common.rb:441
def generate(obj, opts = T.unsafe(nil)); end
- # Returns the JSON generator module that is used by JSON. This is
- # either JSON::Ext::Generator or JSON::Pure::Generator:
- # JSON.generator # => JSON::Ext::Generator
+ # Returns the JSON generator module that is used by JSON.
#
- # source://json//json/common.rb#103
+ # pkg:gem/json#lib/json/common.rb:179
def generator; end
# Set the module _generator_ to be used by JSON.
#
- # source://json//json/common.rb#58
+ # pkg:gem/json#lib/json/common.rb:156
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, options = {}) -> object
# JSON.load(source, proc = nil, options = {}) -> object
#
# Returns the Ruby objects created by parsing the given +source+.
#
+ # BEWARE: This method is meant to serialise data from trusted user input,
+ # like from your own database server or clients under your control, it could
+ # be dangerous to allow untrusted users to pass JSON sources into it.
+ # If you must use it, use JSON.unsafe_load instead to make it clear.
+ #
+ # Since JSON version 2.8.0, `load` emits a deprecation warning when a
+ # non native type is deserialized, without `create_additions` being explicitly
+ # enabled, and in JSON version 3.0, `load` will have `create_additions` disabled
+ # by default.
+ #
# - Argument +source+ must be, or be convertible to, a \String:
# - If +source+ responds to instance method +to_str+,
# source.to_str becomes the source.
@@ -1143,9 +1351,6 @@ module JSON
# - Argument +proc+, if given, must be a \Proc that accepts one argument.
# It will be called recursively with each result (depth-first order).
# See details below.
- # BEWARE: This method is meant to serialise data from trusted user input,
- # like from your own database server or clients under your control, it could
- # be dangerous to allow untrusted users to pass JSON sources into it.
# - Argument +opts+, if given, contains a \Hash of options for the parsing.
# See {Parsing Options}[#module-JSON-label-Parsing+Options].
# The default options can be changed via method JSON.load_default_options=.
@@ -1156,17 +1361,17 @@ module JSON
# parse(source, opts); see #parse.
#
# Source for following examples:
- # source = <<-EOT
- # {
- # "name": "Dave",
- # "age" :40,
- # "hats": [
- # "Cattleman's",
- # "Panama",
- # "Tophat"
- # ]
- # }
- # EOT
+ # source = <<~JSON
+ # {
+ # "name": "Dave",
+ # "age" :40,
+ # "hats": [
+ # "Cattleman's",
+ # "Panama",
+ # "Tophat"
+ # ]
+ # }
+ # JSON
#
# Load a \String:
# ruby = JSON.load(source)
@@ -1231,6 +1436,7 @@ module JSON
# when Array
# obj.map! {|v| deserialize_obj v }
# end
+ # obj
# })
# pp ruby
# Output:
@@ -1252,24 +1458,14 @@ module JSON
# #"Admin", "password"=>"0wn3d"}>}
#
- # source://json//json/common.rb#557
+ # pkg:gem/json#lib/json/common.rb:856
def load(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end
- # Sets or returns default options for the JSON.load method.
- # Initially:
- # opts = JSON.load_default_options
- # opts # => {:max_nesting=>false, :allow_nan=>true, :allow_blank=>true, :create_additions=>true}
- #
- # source://json//json/common.rb#420
+ # pkg:gem/json#lib/json/common.rb:208
def load_default_options; end
- # Sets or returns default options for the JSON.load method.
- # Initially:
- # opts = JSON.load_default_options
- # opts # => {:max_nesting=>false, :allow_nan=>true, :allow_blank=>true, :create_additions=>true}
- #
- # source://json//json/common.rb#420
- def load_default_options=(_arg0); end
+ # pkg:gem/json#lib/json/common.rb:208
+ def load_default_options=(val); end
# :call-seq:
# JSON.load_file(path, opts={}) -> object
@@ -1279,7 +1475,7 @@ module JSON
#
# See method #parse.
#
- # source://json//json/common.rb#245
+ # pkg:gem/json#lib/json/common.rb:390
def load_file(filespec, opts = T.unsafe(nil)); end
# :call-seq:
@@ -1290,7 +1486,7 @@ module JSON
#
# See method #parse!
#
- # source://json//json/common.rb#256
+ # pkg:gem/json#lib/json/common.rb:401
def load_file!(filespec, opts = T.unsafe(nil)); end
# :call-seq:
@@ -1321,17 +1517,17 @@ module JSON
# {Parsing \JSON}[#module-JSON-label-Parsing+JSON].
#
# Parses nested JSON objects:
- # source = <<-EOT
- # {
- # "name": "Dave",
- # "age" :40,
- # "hats": [
- # "Cattleman's",
- # "Panama",
- # "Tophat"
- # ]
- # }
- # EOT
+ # source = <<~JSON
+ # {
+ # "name": "Dave",
+ # "age" :40,
+ # "hats": [
+ # "Cattleman's",
+ # "Panama",
+ # "Tophat"
+ # ]
+ # }
+ # JSON
# ruby = JSON.parse(source)
# ruby # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]}
#
@@ -1341,7 +1537,7 @@ module JSON
# # Raises JSON::ParserError (783: unexpected token at ''):
# JSON.parse('')
#
- # source://json//json/common.rb#215
+ # pkg:gem/json#lib/json/common.rb:353
def parse(source, opts = T.unsafe(nil)); end
# :call-seq:
@@ -1356,19 +1552,17 @@ module JSON
# which disables checking for nesting depth.
# - Option +allow_nan+, if not provided, defaults to +true+.
#
- # source://json//json/common.rb#230
+ # pkg:gem/json#lib/json/common.rb:375
def parse!(source, opts = T.unsafe(nil)); end
- # Returns the JSON parser class that is used by JSON. This is either
- # JSON::Ext::Parser or JSON::Pure::Parser:
- # JSON.parser # => JSON::Ext::Parser
+ # Returns the JSON parser class that is used by JSON.
#
- # source://json//json/common.rb#29
+ # pkg:gem/json#lib/json/common.rb:146
def parser; end
# Set the JSON parser class _parser_ to be used by JSON.
#
- # source://json//json/common.rb#32
+ # pkg:gem/json#lib/json/common.rb:149
def parser=(parser); end
# :call-seq:
@@ -1401,111 +1595,484 @@ module JSON
# }
# }
#
- # source://json//json/common.rb#390
+ # pkg:gem/json#lib/json/common.rb:509
def pretty_generate(obj, opts = T.unsafe(nil)); end
- # :stopdoc:
- # I want to deprecate these later, so I'll first be silent about them, and later delete them.
- #
- # source://json//json/common.rb#390
- def pretty_unparse(obj, opts = T.unsafe(nil)); end
+ # pkg:gem/json#lib/json/common.rb:987
+ def pretty_unparse(*_arg0, **_arg1, &_arg2); 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
+ # pkg:gem/json#lib/json/common.rb:997
+ def restore(*_arg0, **_arg1, &_arg2); end
- # Sets or Returns the JSON generator state class that is used by JSON. This is
- # either JSON::Ext::Generator::State or JSON::Pure::Generator::State:
- # JSON.state # => JSON::Ext::Generator::State
+ # Sets or Returns the JSON generator state class that is used by JSON.
#
- # source://json//json/common.rb#108
+ # pkg:gem/json#lib/json/common.rb:182
def state; end
- # Sets or Returns the JSON generator state class that is used by JSON. This is
- # either JSON::Ext::Generator::State or JSON::Pure::Generator::State:
- # JSON.state # => JSON::Ext::Generator::State
+ # Sets or Returns the JSON generator state class that is used by JSON.
#
- # source://json//json/common.rb#108
+ # pkg:gem/json#lib/json/common.rb:182
def state=(_arg0); end
# :stopdoc:
- # I want to deprecate these later, so I'll first be silent about them, and
- # later delete them.
+ # All these were meant to be deprecated circa 2009, but were just set as undocumented
+ # so usage still exist in the wild.
+ #
+ # pkg:gem/json#lib/json/common.rb:967
+ def unparse(*_arg0, **_arg1, &_arg2); end
+
+ # :call-seq:
+ # JSON.unsafe_load(source, options = {}) -> object
+ # JSON.unsafe_load(source, proc = nil, options = {}) -> object
+ #
+ # Returns the Ruby objects created by parsing the given +source+.
+ #
+ # BEWARE: This method is meant to serialise data from trusted user input,
+ # like from your own database server or clients under your control, it could
+ # be dangerous to allow untrusted users to pass JSON sources into it.
#
- # source://json//json/common.rb#296
- def unparse(obj, opts = T.unsafe(nil)); end
+ # - Argument +source+ must be, or be convertible to, a \String:
+ # - If +source+ responds to instance method +to_str+,
+ # source.to_str becomes the source.
+ # - If +source+ responds to instance method +to_io+,
+ # source.to_io.read becomes the source.
+ # - If +source+ responds to instance method +read+,
+ # source.read becomes the source.
+ # - If both of the following are true, source becomes the \String 'null':
+ # - Option +allow_blank+ specifies a truthy value.
+ # - The source, as defined above, is +nil+ or the empty \String ''.
+ # - Otherwise, +source+ remains the source.
+ # - Argument +proc+, if given, must be a \Proc that accepts one argument.
+ # It will be called recursively with each result (depth-first order).
+ # See details below.
+ # - Argument +opts+, if given, contains a \Hash of options for the parsing.
+ # See {Parsing Options}[#module-JSON-label-Parsing+Options].
+ # The default options can be changed via method JSON.unsafe_load_default_options=.
+ #
+ # ---
+ #
+ # When no +proc+ is given, modifies +source+ as above and returns the result of
+ # parse(source, opts); see #parse.
+ #
+ # Source for following examples:
+ # source = <<~JSON
+ # {
+ # "name": "Dave",
+ # "age" :40,
+ # "hats": [
+ # "Cattleman's",
+ # "Panama",
+ # "Tophat"
+ # ]
+ # }
+ # JSON
+ #
+ # Load a \String:
+ # ruby = JSON.unsafe_load(source)
+ # ruby # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]}
+ #
+ # Load an \IO object:
+ # require 'stringio'
+ # object = JSON.unsafe_load(StringIO.new(source))
+ # object # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]}
+ #
+ # Load a \File object:
+ # path = 't.json'
+ # File.write(path, source)
+ # File.open(path) do |file|
+ # JSON.unsafe_load(file)
+ # end # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]}
+ #
+ # ---
+ #
+ # When +proc+ is given:
+ # - Modifies +source+ as above.
+ # - Gets the +result+ from calling parse(source, opts).
+ # - Recursively calls proc(result).
+ # - Returns the final result.
+ #
+ # Example:
+ # require 'json'
+ #
+ # # Some classes for the example.
+ # class Base
+ # def initialize(attributes)
+ # @attributes = attributes
+ # end
+ # end
+ # class User < Base; end
+ # class Account < Base; end
+ # class Admin < Base; end
+ # # The JSON source.
+ # json = <<-EOF
+ # {
+ # "users": [
+ # {"type": "User", "username": "jane", "email": "jane@example.com"},
+ # {"type": "User", "username": "john", "email": "john@example.com"}
+ # ],
+ # "accounts": [
+ # {"account": {"type": "Account", "paid": true, "account_id": "1234"}},
+ # {"account": {"type": "Account", "paid": false, "account_id": "1235"}}
+ # ],
+ # "admins": {"type": "Admin", "password": "0wn3d"}
+ # }
+ # EOF
+ # # Deserializer method.
+ # def deserialize_obj(obj, safe_types = %w(User Account Admin))
+ # type = obj.is_a?(Hash) && obj["type"]
+ # safe_types.include?(type) ? Object.const_get(type).new(obj) : obj
+ # end
+ # # Call to JSON.unsafe_load
+ # ruby = JSON.unsafe_load(json, proc {|obj|
+ # case obj
+ # when Hash
+ # obj.each {|k, v| obj[k] = deserialize_obj v }
+ # when Array
+ # obj.map! {|v| deserialize_obj v }
+ # end
+ # obj
+ # })
+ # pp ruby
+ # Output:
+ # {"users"=>
+ # [#"User", "username"=>"jane", "email"=>"jane@example.com"}>,
+ # #"User", "username"=>"john", "email"=>"john@example.com"}>],
+ # "accounts"=>
+ # [{"account"=>
+ # #"Account", "paid"=>true, "account_id"=>"1234"}>},
+ # {"account"=>
+ # #"Account", "paid"=>false, "account_id"=>"1235"}>}],
+ # "admins"=>
+ # #"Admin", "password"=>"0wn3d"}>}
+ #
+ # pkg:gem/json#lib/json/common.rb:685
+ def unsafe_load(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end
+
+ # pkg:gem/json#lib/json/common.rb:208
+ def unsafe_load_default_options; end
+
+ # pkg:gem/json#lib/json/common.rb:208
+ def unsafe_load_default_options=(val); end
+
+ private
+
+ # pkg:gem/json#lib/json/common.rb:1010
+ def const_missing(const_name); end
+
+ # pkg:gem/json#lib/json/common.rb:205
+ def deprecated_singleton_attr_accessor(*attrs); end
+
+ # Called from the extension when a hash has both string and symbol keys
+ #
+ # pkg:gem/json#lib/json/common.rb:187
+ def on_mixed_keys_hash(hash, do_raise); end
+ end
+end
+
+# JSON::Coder holds a parser and generator configuration.
+#
+# module MyApp
+# JSONC_CODER = JSON::Coder.new(
+# allow_trailing_comma: true
+# )
+# end
+#
+# MyApp::JSONC_CODER.load(document)
+#
+# pkg:gem/json#lib/json/common.rb:1036
+class JSON::Coder
+ # :call-seq:
+ # JSON.new(options = nil, &block)
+ #
+ # Argument +options+, if given, contains a \Hash of options for both parsing and generating.
+ # See {Parsing Options}[rdoc-ref:JSON@Parsing+Options],
+ # and {Generating Options}[rdoc-ref:JSON@Generating+Options].
+ #
+ # For generation, the strict: true option is always set. When a Ruby object with no native \JSON counterpart is
+ # encountered, the block provided to the initialize method is invoked, and must return a Ruby object that has a native
+ # \JSON counterpart:
+ #
+ # module MyApp
+ # API_JSON_CODER = JSON::Coder.new do |object|
+ # case object
+ # when Time
+ # object.iso8601(3)
+ # else
+ # object # Unknown type, will raise
+ # end
+ # end
+ # end
+ #
+ # puts MyApp::API_JSON_CODER.dump(Time.now.utc) # => "2025-01-21T08:41:44.286Z"
+ #
+ # pkg:gem/json#lib/json/common.rb:1061
+ def initialize(options = T.unsafe(nil), &as_json); end
+
+ # call-seq:
+ # dump(object) -> String
+ # dump(object, io) -> io
+ #
+ # Serialize the given object into a \JSON document.
+ #
+ # pkg:gem/json#lib/json/common.rb:1079
+ def dump(object, io = T.unsafe(nil)); end
+
+ # pkg:gem/json#lib/json/common.rb:1082
+ def generate(object, io = T.unsafe(nil)); end
+
+ # call-seq:
+ # load(string) -> Object
+ #
+ # Parse the given \JSON document and return an equivalent Ruby object.
+ #
+ # pkg:gem/json#lib/json/common.rb:1088
+ def load(source); end
+
+ # call-seq:
+ # load(path) -> Object
+ #
+ # Parse the given \JSON document and return an equivalent Ruby object.
+ #
+ # pkg:gem/json#lib/json/common.rb:1097
+ def load_file(path); end
+
+ # pkg:gem/json#lib/json/common.rb:1091
+ def parse(source); end
+end
+
+# pkg:gem/json#lib/json/ext/generator/state.rb:6
+class JSON::Ext::Generator::State
+ # call-seq: new(opts = {})
+ #
+ # Instantiates a new State object, configured by _opts_.
+ #
+ # Argument +opts+, if given, contains a \Hash of options for the generation.
+ # See {Generating Options}[rdoc-ref:JSON@Generating+Options].
+ #
+ # pkg:gem/json#lib/json/ext/generator/state.rb:13
+ def initialize(opts = T.unsafe(nil)); end
+
+ # call-seq: [](name)
+ #
+ # Returns the value returned by method +name+.
+ #
+ # pkg:gem/json#lib/json/ext/generator/state.rb:77
+ def [](name); end
+
+ # call-seq: []=(name, value)
+ #
+ # Sets the attribute name to value.
+ #
+ # pkg:gem/json#lib/json/ext/generator/state.rb:91
+ def []=(name, value); end
+
+ # call-seq: configure(opts)
+ #
+ # Configure this State instance with the Hash _opts_, and return
+ # itself.
+ #
+ # pkg:gem/json#lib/json/ext/generator/state.rb:23
+ def configure(opts); end
+
+ # pkg:gem/json#lib/json/ext/generator/state.rb:36
+ def merge(opts); end
+
+ # call-seq: to_h
+ #
+ # Returns the configuration instance variables as a hash, that can be
+ # passed to the configure method.
+ #
+ # pkg:gem/json#lib/json/ext/generator/state.rb:42
+ def to_h; end
+
+ # pkg:gem/json#lib/json/ext/generator/state.rb:72
+ def to_hash; end
+end
+
+# pkg:gem/json#lib/json/ext.rb:9
+class JSON::Ext::Parser
+ # pkg:gem/json#lib/json/ext.rb:17
+ def initialize(source, opts = T.unsafe(nil)); end
+
+ # pkg:gem/json#lib/json/ext.rb:26
+ def parse; end
+
+ # pkg:gem/json#lib/json/ext.rb:22
+ def source; end
+
+ class << self
+ # pkg:gem/json#lib/json/ext.rb:11
+ def parse(_arg0, _arg1); end
+ end
+end
+
+# pkg:gem/json#lib/json/ext.rb:32
+JSON::Ext::Parser::Config = JSON::Ext::ParserConfig
+
+# Fragment of JSON document that is to be included as is:
+# fragment = JSON::Fragment.new("[1, 2, 3]")
+# JSON.generate({ count: 3, items: fragments })
+#
+# This allows to easily assemble multiple JSON fragments that have
+# been persisted somewhere without having to parse them nor resorting
+# to string interpolation.
+#
+# Note: no validation is performed on the provided string. It is the
+# responsibility of the caller to ensure the string contains valid JSON.
+#
+# pkg:gem/json#lib/json/common.rb:289
+class JSON::Fragment < ::Struct
+ # pkg:gem/json#lib/json/common.rb:290
+ def initialize(json); end
+
+ # pkg:gem/json#lib/json/common.rb:289
+ def json; end
+
+ # pkg:gem/json#lib/json/common.rb:289
+ def json=(_); end
+
+ # pkg:gem/json#lib/json/common.rb:298
+ def to_json(state = T.unsafe(nil), *_arg1); end
+
+ class << self
+ # pkg:gem/json#lib/json/common.rb:289
+ def [](*_arg0); end
+
+ # pkg:gem/json#lib/json/common.rb:289
+ def inspect; end
+
+ # pkg:gem/json#lib/json/common.rb:289
+ def keyword_init?; end
+
+ # pkg:gem/json#lib/json/common.rb:289
+ def members; end
+
+ # pkg:gem/json#lib/json/common.rb:289
+ def new(*_arg0); end
end
end
-# source://json//json/common.rb#114
-JSON::CREATE_ID_TLS_KEY = T.let(T.unsafe(nil), String)
+# This exception is raised if a generator or unparser error occurs.
+#
+# pkg:gem/json#lib/json/common.rb:259
+class JSON::GeneratorError < ::JSON::JSONError
+ # pkg:gem/json#lib/json/common.rb:262
+ def initialize(message, invalid_object = T.unsafe(nil)); end
+
+ # pkg:gem/json#lib/json/common.rb:267
+ def detailed_message(*_arg0, **_arg1, &_arg2); end
-# source://json//json/common.rb#111
-JSON::DEFAULT_CREATE_ID = T.let(T.unsafe(nil), String)
+ # pkg:gem/json#lib/json/common.rb:260
+ def invalid_object; end
+end
+# pkg:gem/json#lib/json/common.rb:1102
+module JSON::GeneratorMethods
+ # call-seq: to_json(*)
+ #
+ # Converts this object into a JSON string.
+ # If this object doesn't directly maps to a JSON native type,
+ # first convert it to a string (calling #to_s), then converts
+ # it to a JSON string, and returns the result.
+ # This is a fallback, if no special method #to_json was defined for some object.
+ #
+ # pkg:gem/json#lib/json/common.rb:1110
+ def to_json(state = T.unsafe(nil), *_arg1); end
+end
+
+# pkg:gem/json#lib/json/generic_object.rb:9
class JSON::GenericObject < ::OpenStruct
- # source://json//json/generic_object.rb#63
+ # pkg:gem/json#lib/json/generic_object.rb:59
def as_json(*_arg0); end
- # source://json//json/generic_object.rb#47
+ # pkg:gem/json#lib/json/generic_object.rb:51
def to_hash; end
- # source://json//json/generic_object.rb#67
+ # pkg:gem/json#lib/json/generic_object.rb:63
def to_json(*a); end
- # source://json//json/generic_object.rb#59
+ # pkg:gem/json#lib/json/generic_object.rb:55
def |(other); end
class << self
- # source://json//json/generic_object.rb#41
+ # pkg:gem/json#lib/json/generic_object.rb:11
+ def [](*_arg0); end
+
+ # pkg:gem/json#lib/json/generic_object.rb:45
def dump(obj, *args); end
- # source://json//json/generic_object.rb#21
+ # pkg:gem/json#lib/json/generic_object.rb:25
def from_hash(object); end
- # Sets the attribute json_creatable
- #
- # @param value the value to set the attribute json_creatable to.
- #
- # source://json//json/generic_object.rb#13
+ # pkg:gem/json#lib/json/generic_object.rb:17
def json_creatable=(_arg0); end
- # @return [Boolean]
- #
- # source://json//json/generic_object.rb#9
+ # pkg:gem/json#lib/json/generic_object.rb:13
def json_creatable?; end
- # source://json//json/generic_object.rb#15
+ # pkg:gem/json#lib/json/generic_object.rb:19
def json_create(data); end
- # source://json//json/generic_object.rb#36
+ # pkg:gem/json#lib/json/generic_object.rb:40
def load(source, proc = T.unsafe(nil), opts = T.unsafe(nil)); end
end
end
-# The base exception for JSON errors.
-class JSON::JSONError < ::StandardError
+# pkg:gem/json#lib/json/common.rb:358
+JSON::PARSE_L_OPTIONS = T.let(T.unsafe(nil), Hash)
+
+# pkg:gem/json#lib/json/common.rb:471
+JSON::PRETTY_GENERATE_OPTIONS = T.let(T.unsafe(nil), Hash)
+
+# pkg:gem/json#lib/json/common.rb:152
+JSON::Parser = JSON::Ext::Parser
+
+# This exception is raised if a parser error occurs.
+#
+# pkg:gem/json#lib/json/common.rb:250
+class JSON::ParserError < ::JSON::JSONError
+ # pkg:gem/json#lib/json/common.rb:251
+ def column; end
+
+ # pkg:gem/json#lib/json/common.rb:251
+ def line; end
+end
+
+# pkg:gem/json#lib/json/common.rb:8
+module JSON::ParserOptions
class << self
- # source://json//json/common.rb#138
- def wrap(exception); end
+ # pkg:gem/json#lib/json/common.rb:10
+ def prepare(opts); end
+
+ private
+
+ # pkg:gem/json#lib/json/common.rb:40
+ def array_class_proc(array_class, on_load); end
+
+ # TODO: extract :create_additions support to another gem for version 3.0
+ #
+ # pkg:gem/json#lib/json/common.rb:52
+ def create_additions_proc(opts); end
+
+ # pkg:gem/json#lib/json/common.rb:95
+ def create_additions_warning; end
+
+ # pkg:gem/json#lib/json/common.rb:29
+ def object_class_proc(object_class, on_load); end
end
end
-# source://json//json/common.rb#35
-JSON::Parser = JSON::Ext::Parser
-
-# source://json//json/common.rb#73
+# pkg:gem/json#lib/json/common.rb:173
JSON::State = JSON::Ext::Generator::State
-# For backwards compatibility
-#
-# source://json//json/common.rb#159
-JSON::UnparserError = JSON::GeneratorError
-
+# pkg:gem/json#lib/json/common.rb:1127
module Kernel
private
@@ -1516,18 +2083,25 @@ module Kernel
# 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
+ # pkg:gem/json#lib/json/common.rb:1166
+ def JSON(object, opts = T.unsafe(nil)); end
# Outputs _objs_ to STDOUT as JSON strings in the shortest form, that is in
# one line.
#
- # source://json//json/common.rb#663
+ # pkg:gem/json#lib/json/common.rb:1132
def j(*objs); end
# Outputs _objs_ to STDOUT as JSON strings in a pretty format, with
# indentation and over many lines.
#
- # source://json//json/common.rb#672
+ # pkg:gem/json#lib/json/common.rb:1147
def jj(*objs); end
end
+
+# pkg:gem/json#lib/json/common.rb:1171
+class Object < ::BasicObject
+ include ::Kernel
+ include ::PP::ObjectMixin
+ include ::JSON::GeneratorMethods
+end
diff --git a/sorbet/rbi/gems/kramdown@2.4.0.rbi b/sorbet/rbi/gems/kramdown@2.5.2.rbi
similarity index 64%
rename from sorbet/rbi/gems/kramdown@2.4.0.rbi
rename to sorbet/rbi/gems/kramdown@2.5.2.rbi
index 9b2edd5..649691c 100644
--- a/sorbet/rbi/gems/kramdown@2.4.0.rbi
+++ b/sorbet/rbi/gems/kramdown@2.5.2.rbi
@@ -4,12 +4,277 @@
# 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
+
+# --
+# Copyright (C) 2009-2026 Thomas Leitner
+#
+# This file is part of kramdown which is licensed under the MIT.
+# ++
+#
+#
+# --
+# Copyright (C) 2009-2026 Thomas Leitner
+#
+# This file is part of kramdown which is licensed under the MIT.
+# ++
+#
+#
+# --
+# Copyright (C) 2009-2026 Thomas Leitner
+#
+# This file is part of kramdown which is licensed under the MIT.
+# ++
+#
+#
+# --
+# Copyright (C) 2009-2026 Thomas Leitner
+#
+# This file is part of kramdown which is licensed under the MIT.
+# ++
+#
+# TODO: use [[:alpha:]] in all regexp to allow parsing of international values in 1.9.1
+# NOTE: use @src.pre_match only before other check/match?/... operations, otherwise the content is changed
+#
+# --
+# Copyright (C) 2009-2026 Thomas Leitner
+#
+# This file is part of kramdown which is licensed under the MIT.
+# ++
+#
+#
+# --
+# Copyright (C) 2009-2026 Thomas Leitner
+#
+# This file is part of kramdown which is licensed under the MIT.
+# ++
+#
+#
+# --
+# Copyright (C) 2009-2026 Thomas Leitner
+#
+# This file is part of kramdown which is licensed under the MIT.
+# ++
+#
+#
+# --
+# Copyright (C) 2009-2026 Thomas Leitner
+#
+# This file is part of kramdown which is licensed under the MIT.
+# ++
+#
+#
+# --
+# Copyright (C) 2009-2026 Thomas Leitner
+#
+# This file is part of kramdown which is licensed under the MIT.
+# ++
+#
+#
+# --
+# Copyright (C) 2009-2026 Thomas Leitner
+#
+# This file is part of kramdown which is licensed under the MIT.
+# ++
+#
+#
+# --
+# Copyright (C) 2009-2026 Thomas Leitner
+#
+# This file is part of kramdown which is licensed under the MIT.
+# ++
+#
+#
+# --
+# Copyright (C) 2009-2026 Thomas Leitner
+#
+# This file is part of kramdown which is licensed under the MIT.
+# ++
+#
+#
+# --
+# Copyright (C) 2009-2026 Thomas Leitner
+#
+# This file is part of kramdown which is licensed under the MIT.
+# ++
+#
+#
+# --
+# Copyright (C) 2009-2026 Thomas Leitner
+#
+# This file is part of kramdown which is licensed under the MIT.
+# ++
+#
+#
+# --
+# Copyright (C) 2009-2026 Thomas Leitner
+#
+# This file is part of kramdown which is licensed under the MIT.
+# ++
+#
+# --
+# Parts of this file are based on code from RubyPants:
+#
+# = RubyPants -- SmartyPants ported to Ruby
+#
+# Ported by Christian Neukirchen
+# Copyright (C) 2004 Christian Neukirchen
+#
+# Incooporates ideas, comments and documentation by Chad Miller
+# Copyright (C) 2004 Chad Miller
+#
+# Original SmartyPants by John Gruber
+# Copyright (C) 2003 John Gruber
+#
+#
+# = RubyPants -- SmartyPants ported to Ruby
+#
+#
+# [snip]
+#
+# == Authors
+#
+# John Gruber did all of the hard work of writing this software in
+# Perl for Movable Type and almost all of this useful documentation.
+# Chad Miller ported it to Python to use with Pyblosxom.
+#
+# Christian Neukirchen provided the Ruby port, as a general-purpose
+# library that follows the *Cloth API.
+#
+#
+# == Copyright and License
+#
+# === SmartyPants license:
+#
+# Copyright (c) 2003 John Gruber
+# (http://daringfireball.net)
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+#
+# * Neither the name "SmartyPants" nor the names of its contributors
+# may be used to endorse or promote products derived from this
+# software without specific prior written permission.
+#
+# This software is provided by the copyright holders and contributors
+# "as is" and any express or implied warranties, including, but not
+# limited to, the implied warranties of merchantability and fitness
+# for a particular purpose are disclaimed. In no event shall the
+# copyright owner or contributors be liable for any direct, indirect,
+# incidental, special, exemplary, or consequential damages (including,
+# but not limited to, procurement of substitute goods or services;
+# loss of use, data, or profits; or business interruption) however
+# caused and on any theory of liability, whether in contract, strict
+# liability, or tort (including negligence or otherwise) arising in
+# any way out of the use of this software, even if advised of the
+# possibility of such damage.
+#
+# === RubyPants license
+#
+# RubyPants is a derivative work of SmartyPants and smartypants.py.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+#
+# This software is provided by the copyright holders and contributors
+# "as is" and any express or implied warranties, including, but not
+# limited to, the implied warranties of merchantability and fitness
+# for a particular purpose are disclaimed. In no event shall the
+# copyright owner or contributors be liable for any direct, indirect,
+# incidental, special, exemplary, or consequential damages (including,
+# but not limited to, procurement of substitute goods or services;
+# loss of use, data, or profits; or business interruption) however
+# caused and on any theory of liability, whether in contract, strict
+# liability, or tort (including negligence or otherwise) arising in
+# any way out of the use of this software, even if advised of the
+# possibility of such damage.
+#
+# == Links
+#
+# John Gruber:: http://daringfireball.net
+# SmartyPants:: http://daringfireball.net/projects/smartypants
+#
+# Chad Miller:: http://web.chad.org
+#
+# Christian Neukirchen:: http://kronavita.de/chris
+#
+# ++
+#
+#
+# --
+# Copyright (C) 2009-2026 Thomas Leitner
+#
+# This file is part of kramdown which is licensed under the MIT.
+# ++
+#
+#
+# --
+# Copyright (C) 2009-2026 Thomas Leitner
+#
+# This file is part of kramdown which is licensed under the MIT.
+# ++
+#
+#
+# --
+# Copyright (C) 2009-2026 Thomas Leitner
+#
+# This file is part of kramdown which is licensed under the MIT.
+# ++
+#
+#
+# --
+# Copyright (C) 2009-2026 Thomas Leitner
+#
+# This file is part of kramdown which is licensed under the MIT.
+# ++
+#
+#
+# --
+# Copyright (C) 2009-2026 Thomas Leitner
+#
+# This file is part of kramdown which is licensed under the MIT.
+# ++
+#
+#
+# --
+# Copyright (C) 2009-2026 Thomas Leitner
+#
+# This file is part of kramdown which is licensed under the MIT.
+# ++
+#
+# This file is based on code originally from the Stringex library and needs the data files from
+# Stringex to work correctly.
+#
+# --
+# Copyright (C) 2009-2026 Thomas Leitner
+#
+# This file is part of kramdown which is licensed under the MIT.
+# ++
+#
+# pkg:gem/kramdown#lib/kramdown/version.rb:10
module Kramdown
class << self
# Return the data directory for kramdown.
#
- # source://kramdown//lib/kramdown/document.rb#49
+ # pkg:gem/kramdown#lib/kramdown/document.rb:49
def data_dir; end
end
end
@@ -21,24 +286,24 @@ end
# 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
+# pkg:gem/kramdown#lib/kramdown/converter.rb:20
module Kramdown::Converter
extend ::Kramdown::Utils::Configurable
class << self
- # source://kramdown//lib/kramdown/utils/configurable.rb#37
+ # pkg:gem/kramdown#lib/kramdown/converter.rb:50
def add_math_engine(data, *args, &block); end
- # source://kramdown//lib/kramdown/utils/configurable.rb#37
+ # pkg:gem/kramdown#lib/kramdown/converter.rb:34
def add_syntax_highlighter(data, *args, &block); end
- # source://kramdown//lib/kramdown/utils/configurable.rb#30
+ # pkg:gem/kramdown#lib/kramdown/converter.rb:34
def configurables; end
- # source://kramdown//lib/kramdown/utils/configurable.rb#34
+ # pkg:gem/kramdown#lib/kramdown/converter.rb:50
def math_engine(data); end
- # source://kramdown//lib/kramdown/utils/configurable.rb#34
+ # pkg:gem/kramdown#lib/kramdown/converter.rb:34
def syntax_highlighter(data); end
end
end
@@ -66,69 +331,61 @@ end
#
# Have a look at the Base::convert method for additional information!
#
-# source://kramdown//lib/kramdown/converter/base.rb#40
+# pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/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.
@@ -136,53 +393,51 @@ class Kramdown::Converter::Base
# 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
+ # pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/kramdown#lib/kramdown/converter/base.rb:156
def warning(text); end
# The warnings array.
#
- # source://kramdown//lib/kramdown/converter/base.rb#52
+ # pkg:gem/kramdown#lib/kramdown/converter/base.rb:52
def warnings; end
class << self
@@ -191,7 +446,7 @@ class Kramdown::Converter::Base
# 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
+ # pkg:gem/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
@@ -219,33 +474,36 @@ class Kramdown::Converter::Base
# 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
+ # pkg:gem/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
+ # pkg:gem/kramdown#lib/kramdown/converter/base.rb:139
def get_template(template); end
private
+ # pkg:gem/kramdown#lib/kramdown/converter/base.rb:61
def allocate; end
+
+ # pkg:gem/kramdown#lib/kramdown/converter/base.rb:61
def new(*_arg0); end
end
end
-# source://kramdown//lib/kramdown/converter/base.rb#245
+# pkg:gem/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
+# pkg:gem/kramdown#lib/kramdown/converter/hash_ast.rb:19
class Kramdown::Converter::HashAST < ::Kramdown::Converter::Base
- # source://kramdown//lib/kramdown/converter/hash_ast.rb#21
+ # pkg:gem/kramdown#lib/kramdown/converter/hash_ast.rb:21
def convert(el); end
end
-# source://kramdown//lib/kramdown/converter/hash_ast.rb#35
+# pkg:gem/kramdown#lib/kramdown/converter/hash_ast.rb:35
Kramdown::Converter::HashAst = Kramdown::Converter::HashAST
# Converts a Kramdown::Document to HTML.
@@ -261,186 +519,184 @@ Kramdown::Converter::HashAst = Kramdown::Converter::HashAST
# 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
+# pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/kramdown#lib/kramdown/converter/html.rb:417
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
+ # pkg:gem/kramdown#lib/kramdown/converter/html.rb:57
def convert(el, indent = T.unsafe(nil)); end
- # source://kramdown//lib/kramdown/converter/html.rb#272
+ # pkg:gem/kramdown#lib/kramdown/converter/html.rb:283
def convert_a(el, indent); end
- # source://kramdown//lib/kramdown/converter/html.rb#365
+ # pkg:gem/kramdown#lib/kramdown/converter/html.rb:377
def convert_abbreviation(el, _indent); end
- # source://kramdown//lib/kramdown/converter/html.rb#77
+ # pkg:gem/kramdown#lib/kramdown/converter/html.rb:77
def convert_blank(_el, _indent); end
- # source://kramdown//lib/kramdown/converter/html.rb#141
+ # pkg:gem/kramdown#lib/kramdown/converter/html.rb:145
def convert_blockquote(el, indent); end
- # source://kramdown//lib/kramdown/converter/html.rb#268
+ # pkg:gem/kramdown#lib/kramdown/converter/html.rb:279
def convert_br(_el, _indent); end
- # source://kramdown//lib/kramdown/converter/html.rb#111
+ # pkg:gem/kramdown#lib/kramdown/converter/html.rb:115
def convert_codeblock(el, indent); end
- # source://kramdown//lib/kramdown/converter/html.rb#280
+ # pkg:gem/kramdown#lib/kramdown/converter/html.rb:291
def convert_codespan(el, _indent); end
- # source://kramdown//lib/kramdown/converter/html.rb#260
+ # pkg:gem/kramdown#lib/kramdown/converter/html.rb:271
def convert_comment(el, indent); end
- # source://kramdown//lib/kramdown/converter/html.rb#178
+ # pkg:gem/kramdown#lib/kramdown/converter/html.rb:199
def convert_dd(el, indent); end
- # source://kramdown//lib/kramdown/converter/html.rb#174
+ # pkg:gem/kramdown#lib/kramdown/converter/html.rb:185
def convert_dl(el, indent); end
- # source://kramdown//lib/kramdown/converter/html.rb#190
+ # pkg:gem/kramdown#lib/kramdown/converter/html.rb:201
def convert_dt(el, indent); end
- # source://kramdown//lib/kramdown/converter/html.rb#319
+ # pkg:gem/kramdown#lib/kramdown/converter/html.rb:331
def convert_em(el, indent); end
- # source://kramdown//lib/kramdown/converter/html.rb#324
+ # pkg:gem/kramdown#lib/kramdown/converter/html.rb:336
def convert_entity(el, _indent); end
- # source://kramdown//lib/kramdown/converter/html.rb#294
+ # pkg:gem/kramdown#lib/kramdown/converter/html.rb:305
def convert_footnote(el, _indent); end
- # source://kramdown//lib/kramdown/converter/html.rb#145
+ # pkg:gem/kramdown#lib/kramdown/converter/html.rb:149
def convert_header(el, indent); end
- # source://kramdown//lib/kramdown/converter/html.rb#155
+ # pkg:gem/kramdown#lib/kramdown/converter/html.rb:166
def convert_hr(el, indent); end
- # source://kramdown//lib/kramdown/converter/html.rb#201
+ # pkg:gem/kramdown#lib/kramdown/converter/html.rb:212
def convert_html_element(el, indent); end
- # source://kramdown//lib/kramdown/converter/html.rb#276
+ # pkg:gem/kramdown#lib/kramdown/converter/html.rb:287
def convert_img(el, _indent); end
- # source://kramdown//lib/kramdown/converter/html.rb#178
+ # pkg:gem/kramdown#lib/kramdown/converter/html.rb:189
def convert_li(el, indent); end
- # source://kramdown//lib/kramdown/converter/html.rb#351
+ # pkg:gem/kramdown#lib/kramdown/converter/html.rb:363
def convert_math(el, indent); end
- # source://kramdown//lib/kramdown/converter/html.rb#162
+ # pkg:gem/kramdown#lib/kramdown/converter/html.rb:183
def convert_ol(el, indent); end
- # source://kramdown//lib/kramdown/converter/html.rb#86
+ # pkg:gem/kramdown#lib/kramdown/converter/html.rb:86
def convert_p(el, indent); end
- # source://kramdown//lib/kramdown/converter/html.rb#311
+ # pkg:gem/kramdown#lib/kramdown/converter/html.rb:323
def convert_raw(el, _indent); end
- # source://kramdown//lib/kramdown/converter/html.rb#372
+ # pkg:gem/kramdown#lib/kramdown/converter/html.rb:384
def convert_root(el, indent); end
- # source://kramdown//lib/kramdown/converter/html.rb#347
+ # pkg:gem/kramdown#lib/kramdown/converter/html.rb:359
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
+ # pkg:gem/kramdown#lib/kramdown/converter/html.rb:99
def convert_standalone_image(el, indent); end
- # source://kramdown//lib/kramdown/converter/html.rb#319
+ # pkg:gem/kramdown#lib/kramdown/converter/html.rb:334
def convert_strong(el, indent); end
- # source://kramdown//lib/kramdown/converter/html.rb#238
+ # pkg:gem/kramdown#lib/kramdown/converter/html.rb:249
def convert_table(el, indent); end
- # source://kramdown//lib/kramdown/converter/html.rb#238
+ # pkg:gem/kramdown#lib/kramdown/converter/html.rb:253
def convert_tbody(el, indent); end
- # source://kramdown//lib/kramdown/converter/html.rb#248
+ # pkg:gem/kramdown#lib/kramdown/converter/html.rb:259
def convert_td(el, indent); end
- # source://kramdown//lib/kramdown/converter/html.rb#81
+ # pkg:gem/kramdown#lib/kramdown/converter/html.rb:81
def convert_text(el, _indent); end
- # source://kramdown//lib/kramdown/converter/html.rb#238
+ # pkg:gem/kramdown#lib/kramdown/converter/html.rb:254
def convert_tfoot(el, indent); end
- # source://kramdown//lib/kramdown/converter/html.rb#238
+ # pkg:gem/kramdown#lib/kramdown/converter/html.rb:252
def convert_thead(el, indent); end
- # source://kramdown//lib/kramdown/converter/html.rb#238
+ # pkg:gem/kramdown#lib/kramdown/converter/html.rb:255
def convert_tr(el, indent); end
- # source://kramdown//lib/kramdown/converter/html.rb#339
+ # pkg:gem/kramdown#lib/kramdown/converter/html.rb:351
def convert_typographic_sym(el, _indent); end
- # source://kramdown//lib/kramdown/converter/html.rb#162
+ # pkg:gem/kramdown#lib/kramdown/converter/html.rb:173
def convert_ul(el, indent); end
- # source://kramdown//lib/kramdown/converter/html.rb#228
+ # pkg:gem/kramdown#lib/kramdown/converter/html.rb:239
def convert_xml_comment(el, indent); end
- # source://kramdown//lib/kramdown/converter/html.rb#228
+ # pkg:gem/kramdown#lib/kramdown/converter/html.rb:247
def convert_xml_pi(el, indent); end
# Fixes the elements for use in a TOC entry.
#
- # source://kramdown//lib/kramdown/converter/html.rb#453
+ # pkg:gem/kramdown#lib/kramdown/converter/html.rb:461
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
+ # pkg:gem/kramdown#lib/kramdown/converter/html.rb:496
def footnote_content; end
# Format the given element as block HTML.
#
- # source://kramdown//lib/kramdown/converter/html.rb#397
+ # pkg:gem/kramdown#lib/kramdown/converter/html.rb:405
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
+ # pkg:gem/kramdown#lib/kramdown/converter/html.rb:411
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
+ # pkg:gem/kramdown#lib/kramdown/converter/html.rb:400
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
+ # pkg:gem/kramdown#lib/kramdown/converter/html.rb:423
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
+ # pkg:gem/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
+ # pkg:gem/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
@@ -449,193 +705,191 @@ class Kramdown::Converter::Html < ::Kramdown::Converter::Base
# 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
+ # pkg:gem/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
+ # pkg:gem/kramdown#lib/kramdown/converter/html.rb:484
def obfuscate(text); end
# Remove all footnotes from the given elements.
#
- # source://kramdown//lib/kramdown/converter/html.rb#468
+ # pkg:gem/kramdown#lib/kramdown/converter/html.rb:476
def remove_footnotes(elements); end
# Remove all link elements by unwrapping them.
#
- # source://kramdown//lib/kramdown/converter/html.rb#460
+ # pkg:gem/kramdown#lib/kramdown/converter/html.rb:468
def unwrap_links(elements); end
end
-# source://kramdown//lib/kramdown/converter/html.rb#246
+# pkg:gem/kramdown#lib/kramdown/converter/html.rb:257
Kramdown::Converter::Html::ENTITY_NBSP = T.let(T.unsafe(nil), Kramdown::Utils::Entities::Entity)
-# source://kramdown//lib/kramdown/converter/html.rb#485
+# pkg:gem/kramdown#lib/kramdown/converter/html.rb:493
Kramdown::Converter::Html::FOOTNOTE_BACKLINK_FMT = T.let(T.unsafe(nil), String)
-# source://kramdown//lib/kramdown/converter/html.rb#328
+# pkg:gem/kramdown#lib/kramdown/converter/html.rb:340
Kramdown::Converter::Html::TYPOGRAPHIC_SYMS = T.let(T.unsafe(nil), Hash)
-# source://kramdown//lib/kramdown/converter/html.rb#159
+# pkg:gem/kramdown#lib/kramdown/converter/html.rb:170
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
+# pkg:gem/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
+ # pkg:gem/kramdown#lib/kramdown/converter/kramdown.rb:24
def initialize(root, options); end
- # source://kramdown//lib/kramdown/converter/kramdown.rb#34
+ # pkg:gem/kramdown#lib/kramdown/converter/kramdown.rb:34
def convert(el, opts = T.unsafe(nil)); end
- # source://kramdown//lib/kramdown/converter/kramdown.rb#291
+ # pkg:gem/kramdown#lib/kramdown/converter/kramdown.rb:296
def convert_a(el, opts); end
- # source://kramdown//lib/kramdown/converter/kramdown.rb#377
+ # pkg:gem/kramdown#lib/kramdown/converter/kramdown.rb:382
def convert_abbreviation(el, _opts); end
- # source://kramdown//lib/kramdown/converter/kramdown.rb#70
+ # pkg:gem/kramdown#lib/kramdown/converter/kramdown.rb:71
def convert_blank(_el, _opts); end
- # source://kramdown//lib/kramdown/converter/kramdown.rb#107
+ # pkg:gem/kramdown#lib/kramdown/converter/kramdown.rb:111
def convert_blockquote(el, opts); end
- # source://kramdown//lib/kramdown/converter/kramdown.rb#287
- def convert_br(_el, _opts); end
+ # pkg:gem/kramdown#lib/kramdown/converter/kramdown.rb:292
+ def convert_br(_el, opts); end
- # source://kramdown//lib/kramdown/converter/kramdown.rb#103
+ # pkg:gem/kramdown#lib/kramdown/converter/kramdown.rb:107
def convert_codeblock(el, _opts); end
- # source://kramdown//lib/kramdown/converter/kramdown.rb#324
+ # pkg:gem/kramdown#lib/kramdown/converter/kramdown.rb:329
def convert_codespan(el, _opts); end
- # source://kramdown//lib/kramdown/converter/kramdown.rb#279
+ # pkg:gem/kramdown#lib/kramdown/converter/kramdown.rb:284
def convert_comment(el, _opts); end
- # source://kramdown//lib/kramdown/converter/kramdown.rb#158
+ # pkg:gem/kramdown#lib/kramdown/converter/kramdown.rb:163
def convert_dd(el, opts); end
- # source://kramdown//lib/kramdown/converter/kramdown.rb#124
+ # pkg:gem/kramdown#lib/kramdown/converter/kramdown.rb:133
def convert_dl(el, opts); end
- # source://kramdown//lib/kramdown/converter/kramdown.rb#182
+ # pkg:gem/kramdown#lib/kramdown/converter/kramdown.rb:187
def convert_dt(el, opts); end
- # source://kramdown//lib/kramdown/converter/kramdown.rb#346
+ # pkg:gem/kramdown#lib/kramdown/converter/kramdown.rb:351
def convert_em(el, opts); end
- # source://kramdown//lib/kramdown/converter/kramdown.rb#356
+ # pkg:gem/kramdown#lib/kramdown/converter/kramdown.rb:361
def convert_entity(el, _opts); end
- # source://kramdown//lib/kramdown/converter/kramdown.rb#329
+ # pkg:gem/kramdown#lib/kramdown/converter/kramdown.rb:334
def convert_footnote(el, _opts); end
- # source://kramdown//lib/kramdown/converter/kramdown.rb#112
+ # pkg:gem/kramdown#lib/kramdown/converter/kramdown.rb:116
def convert_header(el, opts); end
- # source://kramdown//lib/kramdown/converter/kramdown.rb#120
+ # pkg:gem/kramdown#lib/kramdown/converter/kramdown.rb:125
def convert_hr(_el, _opts); end
- # source://kramdown//lib/kramdown/converter/kramdown.rb#195
+ # pkg:gem/kramdown#lib/kramdown/converter/kramdown.rb:200
def convert_html_element(el, opts); end
- # source://kramdown//lib/kramdown/converter/kramdown.rb#308
+ # pkg:gem/kramdown#lib/kramdown/converter/kramdown.rb:313
def convert_img(el, _opts); end
- # source://kramdown//lib/kramdown/converter/kramdown.rb#130
+ # pkg:gem/kramdown#lib/kramdown/converter/kramdown.rb:135
def convert_li(el, opts); end
- # source://kramdown//lib/kramdown/converter/kramdown.rb#373
+ # pkg:gem/kramdown#lib/kramdown/converter/kramdown.rb:378
def convert_math(el, _opts); end
- # source://kramdown//lib/kramdown/converter/kramdown.rb#124
+ # pkg:gem/kramdown#lib/kramdown/converter/kramdown.rb:132
def convert_ol(el, opts); end
- # source://kramdown//lib/kramdown/converter/kramdown.rb#88
+ # pkg:gem/kramdown#lib/kramdown/converter/kramdown.rb:92
def convert_p(el, opts); end
- # source://kramdown//lib/kramdown/converter/kramdown.rb#334
+ # pkg:gem/kramdown#lib/kramdown/converter/kramdown.rb:339
def convert_raw(el, _opts); end
- # source://kramdown//lib/kramdown/converter/kramdown.rb#381
+ # pkg:gem/kramdown#lib/kramdown/converter/kramdown.rb:386
def convert_root(el, opts); end
- # source://kramdown//lib/kramdown/converter/kramdown.rb#369
+ # pkg:gem/kramdown#lib/kramdown/converter/kramdown.rb:374
def convert_smart_quote(el, _opts); end
- # source://kramdown//lib/kramdown/converter/kramdown.rb#351
+ # pkg:gem/kramdown#lib/kramdown/converter/kramdown.rb:356
def convert_strong(el, opts); end
- # source://kramdown//lib/kramdown/converter/kramdown.rb#239
+ # pkg:gem/kramdown#lib/kramdown/converter/kramdown.rb:244
def convert_table(el, opts); end
- # source://kramdown//lib/kramdown/converter/kramdown.rb#260
+ # pkg:gem/kramdown#lib/kramdown/converter/kramdown.rb:265
def convert_tbody(el, opts); end
- # source://kramdown//lib/kramdown/converter/kramdown.rb#275
+ # pkg:gem/kramdown#lib/kramdown/converter/kramdown.rb:280
def convert_td(el, opts); end
- # source://kramdown//lib/kramdown/converter/kramdown.rb#76
+ # pkg:gem/kramdown#lib/kramdown/converter/kramdown.rb:77
def convert_text(el, opts); end
- # source://kramdown//lib/kramdown/converter/kramdown.rb#267
+ # pkg:gem/kramdown#lib/kramdown/converter/kramdown.rb:272
def convert_tfoot(el, opts); end
- # source://kramdown//lib/kramdown/converter/kramdown.rb#244
+ # pkg:gem/kramdown#lib/kramdown/converter/kramdown.rb:249
def convert_thead(el, opts); end
- # source://kramdown//lib/kramdown/converter/kramdown.rb#271
+ # pkg:gem/kramdown#lib/kramdown/converter/kramdown.rb:276
def convert_tr(el, opts); end
- # source://kramdown//lib/kramdown/converter/kramdown.rb#365
+ # pkg:gem/kramdown#lib/kramdown/converter/kramdown.rb:370
def convert_typographic_sym(el, _opts); end
- # source://kramdown//lib/kramdown/converter/kramdown.rb#124
+ # pkg:gem/kramdown#lib/kramdown/converter/kramdown.rb:129
def convert_ul(el, opts); end
- # source://kramdown//lib/kramdown/converter/kramdown.rb#229
+ # pkg:gem/kramdown#lib/kramdown/converter/kramdown.rb:234
def convert_xml_comment(el, _opts); end
- # source://kramdown//lib/kramdown/converter/kramdown.rb#229
+ # pkg:gem/kramdown#lib/kramdown/converter/kramdown.rb:242
def convert_xml_pi(el, _opts); end
- # source://kramdown//lib/kramdown/converter/kramdown.rb#408
+ # pkg:gem/kramdown#lib/kramdown/converter/kramdown.rb:413
def create_abbrev_defs; end
- # source://kramdown//lib/kramdown/converter/kramdown.rb#399
+ # pkg:gem/kramdown#lib/kramdown/converter/kramdown.rb:404
def create_footnote_defs; end
- # source://kramdown//lib/kramdown/converter/kramdown.rb#389
+ # pkg:gem/kramdown#lib/kramdown/converter/kramdown.rb:394
def create_link_defs; end
# Return the IAL containing the attributes of the element +el+.
#
- # source://kramdown//lib/kramdown/converter/kramdown.rb#419
+ # pkg:gem/kramdown#lib/kramdown/converter/kramdown.rb:424
def ial_for_element(el); end
- # source://kramdown//lib/kramdown/converter/kramdown.rb#54
+ # pkg:gem/kramdown#lib/kramdown/converter/kramdown.rb:55
def inner(el, opts = T.unsafe(nil)); end
- # source://kramdown//lib/kramdown/converter/kramdown.rb#444
+ # pkg:gem/kramdown#lib/kramdown/converter/kramdown.rb:449
def parse_title(attr); end
end
-# source://kramdown//lib/kramdown/converter/kramdown.rb#74
+# pkg:gem/kramdown#lib/kramdown/converter/kramdown.rb:75
Kramdown::Converter::Kramdown::ESCAPED_CHAR_RE = T.let(T.unsafe(nil), Regexp)
-# source://kramdown//lib/kramdown/converter/kramdown.rb#192
+# pkg:gem/kramdown#lib/kramdown/converter/kramdown.rb:197
Kramdown::Converter::Kramdown::HTML_ELEMENT_TYPES = T.let(T.unsafe(nil), Array)
-# source://kramdown//lib/kramdown/converter/kramdown.rb#190
+# pkg:gem/kramdown#lib/kramdown/converter/kramdown.rb:195
Kramdown::Converter::Kramdown::HTML_TAGS_WITH_BODY = T.let(T.unsafe(nil), Array)
-# source://kramdown//lib/kramdown/converter/kramdown.rb#360
+# pkg:gem/kramdown#lib/kramdown/converter/kramdown.rb:365
Kramdown::Converter::Kramdown::TYPOGRAPHIC_SYMS = T.let(T.unsafe(nil), Hash)
# Converts an element tree to LaTeX.
@@ -653,338 +907,336 @@ Kramdown::Converter::Kramdown::TYPOGRAPHIC_SYMS = T.let(T.unsafe(nil), Hash)
# 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
+# pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/kramdown#lib/kramdown/converter/latex.rb:600
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
+ # pkg:gem/kramdown#lib/kramdown/converter/latex.rb:41
def convert(el, opts = T.unsafe(nil)); end
- # source://kramdown//lib/kramdown/converter/latex.rb#216
+ # pkg:gem/kramdown#lib/kramdown/converter/latex.rb:217
def convert_a(el, opts); end
- # source://kramdown//lib/kramdown/converter/latex.rb#569
+ # pkg:gem/kramdown#lib/kramdown/converter/latex.rb:570
def convert_abbreviation(el, _opts); end
- # source://kramdown//lib/kramdown/converter/latex.rb#61
+ # pkg:gem/kramdown#lib/kramdown/converter/latex.rb:61
def convert_blank(_el, opts); end
- # source://kramdown//lib/kramdown/converter/latex.rb#110
+ # pkg:gem/kramdown#lib/kramdown/converter/latex.rb:110
def convert_blockquote(el, opts); end
- # source://kramdown//lib/kramdown/converter/latex.rb#209
+ # pkg:gem/kramdown#lib/kramdown/converter/latex.rb:210
def convert_br(_el, opts); end
- # source://kramdown//lib/kramdown/converter/latex.rb#87
+ # pkg:gem/kramdown#lib/kramdown/converter/latex.rb:87
def convert_codeblock(el, _opts); end
- # source://kramdown//lib/kramdown/converter/latex.rb#239
+ # pkg:gem/kramdown#lib/kramdown/converter/latex.rb:240
def convert_codespan(el, _opts); end
- # source://kramdown//lib/kramdown/converter/latex.rb#205
+ # pkg:gem/kramdown#lib/kramdown/converter/latex.rb:206
def convert_comment(el, _opts); end
- # source://kramdown//lib/kramdown/converter/latex.rb#151
+ # pkg:gem/kramdown#lib/kramdown/converter/latex.rb:151
def convert_dd(el, opts); end
- # source://kramdown//lib/kramdown/converter/latex.rb#139
+ # pkg:gem/kramdown#lib/kramdown/converter/latex.rb:139
def convert_dl(el, opts); end
- # source://kramdown//lib/kramdown/converter/latex.rb#147
+ # pkg:gem/kramdown#lib/kramdown/converter/latex.rb:147
def convert_dt(el, opts); end
- # source://kramdown//lib/kramdown/converter/latex.rb#263
+ # pkg:gem/kramdown#lib/kramdown/converter/latex.rb:264
def convert_em(el, opts); end
- # source://kramdown//lib/kramdown/converter/latex.rb#533
+ # pkg:gem/kramdown#lib/kramdown/converter/latex.rb:534
def convert_entity(el, _opts); end
- # source://kramdown//lib/kramdown/converter/latex.rb#250
+ # pkg:gem/kramdown#lib/kramdown/converter/latex.rb:251
def convert_footnote(el, opts); end
- # source://kramdown//lib/kramdown/converter/latex.rb#114
+ # pkg:gem/kramdown#lib/kramdown/converter/latex.rb:114
def convert_header(el, opts); end
- # source://kramdown//lib/kramdown/converter/latex.rb#124
+ # pkg:gem/kramdown#lib/kramdown/converter/latex.rb:124
def convert_hr(el, _opts); end
- # source://kramdown//lib/kramdown/converter/latex.rb#155
+ # pkg:gem/kramdown#lib/kramdown/converter/latex.rb:155
def convert_html_element(el, opts); end
- # source://kramdown//lib/kramdown/converter/latex.rb#225
+ # pkg:gem/kramdown#lib/kramdown/converter/latex.rb:226
def convert_img(el, _opts); end
- # source://kramdown//lib/kramdown/converter/latex.rb#143
+ # pkg:gem/kramdown#lib/kramdown/converter/latex.rb:143
def convert_li(el, opts); end
- # source://kramdown//lib/kramdown/converter/latex.rb#556
+ # pkg:gem/kramdown#lib/kramdown/converter/latex.rb:557
def convert_math(el, _opts); end
- # source://kramdown//lib/kramdown/converter/latex.rb#129
+ # pkg:gem/kramdown#lib/kramdown/converter/latex.rb:137
def convert_ol(el, opts); end
- # source://kramdown//lib/kramdown/converter/latex.rb#69
+ # pkg:gem/kramdown#lib/kramdown/converter/latex.rb:69
def convert_p(el, opts); end
- # source://kramdown//lib/kramdown/converter/latex.rb#255
+ # pkg:gem/kramdown#lib/kramdown/converter/latex.rb:256
def convert_raw(el, _opts); end
- # source://kramdown//lib/kramdown/converter/latex.rb#57
+ # pkg:gem/kramdown#lib/kramdown/converter/latex.rb:57
def convert_root(el, opts); end
- # source://kramdown//lib/kramdown/converter/latex.rb#550
+ # pkg:gem/kramdown#lib/kramdown/converter/latex.rb:551
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
+ # pkg:gem/kramdown#lib/kramdown/converter/latex.rb:80
def convert_standalone_image(el, _opts, img); end
- # source://kramdown//lib/kramdown/converter/latex.rb#267
+ # pkg:gem/kramdown#lib/kramdown/converter/latex.rb:268
def convert_strong(el, opts); end
- # source://kramdown//lib/kramdown/converter/latex.rb#177
+ # pkg:gem/kramdown#lib/kramdown/converter/latex.rb:178
def convert_table(el, opts); end
- # source://kramdown//lib/kramdown/converter/latex.rb#189
+ # pkg:gem/kramdown#lib/kramdown/converter/latex.rb:190
def convert_tbody(el, opts); end
- # source://kramdown//lib/kramdown/converter/latex.rb#201
+ # pkg:gem/kramdown#lib/kramdown/converter/latex.rb:202
def convert_td(el, opts); end
- # source://kramdown//lib/kramdown/converter/latex.rb#65
+ # pkg:gem/kramdown#lib/kramdown/converter/latex.rb:65
def convert_text(el, _opts); end
- # source://kramdown//lib/kramdown/converter/latex.rb#193
+ # pkg:gem/kramdown#lib/kramdown/converter/latex.rb:194
def convert_tfoot(el, opts); end
- # source://kramdown//lib/kramdown/converter/latex.rb#185
+ # pkg:gem/kramdown#lib/kramdown/converter/latex.rb:186
def convert_thead(el, opts); end
- # source://kramdown//lib/kramdown/converter/latex.rb#197
+ # pkg:gem/kramdown#lib/kramdown/converter/latex.rb:198
def convert_tr(el, opts); end
- # source://kramdown//lib/kramdown/converter/latex.rb#542
+ # pkg:gem/kramdown#lib/kramdown/converter/latex.rb:543
def convert_typographic_sym(el, _opts); end
- # source://kramdown//lib/kramdown/converter/latex.rb#129
+ # pkg:gem/kramdown#lib/kramdown/converter/latex.rb:129
def convert_ul(el, opts); end
- # source://kramdown//lib/kramdown/converter/latex.rb#166
+ # pkg:gem/kramdown#lib/kramdown/converter/latex.rb:167
def convert_xml_comment(el, _opts); end
- # source://kramdown//lib/kramdown/converter/latex.rb#170
+ # pkg:gem/kramdown#lib/kramdown/converter/latex.rb:171
def convert_xml_pi(_el, _opts); end
- # source://kramdown//lib/kramdown/converter/latex.rb#522
+ # pkg:gem/kramdown#lib/kramdown/converter/latex.rb:523
def entity_to_latex(entity); end
# Escape the special LaTeX characters in the string +str+.
#
- # source://kramdown//lib/kramdown/converter/latex.rb#618
+ # pkg:gem/kramdown#lib/kramdown/converter/latex.rb:619
def escape(str); end
# Return the converted content of the children of +el+ as a string.
#
- # source://kramdown//lib/kramdown/converter/latex.rb#46
+ # pkg:gem/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
+ # pkg:gem/kramdown#lib/kramdown/converter/latex.rb:583
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
+ # pkg:gem/kramdown#lib/kramdown/converter/latex.rb:591
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
+ # pkg:gem/kramdown#lib/kramdown/converter/latex.rb:576
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
+# pkg:gem/kramdown#lib/kramdown/converter/latex.rb:274
Kramdown::Converter::Latex::ENTITY_CONV_TABLE = T.let(T.unsafe(nil), Hash)
-# source://kramdown//lib/kramdown/converter/latex.rb#605
+# pkg:gem/kramdown#lib/kramdown/converter/latex.rb:606
Kramdown::Converter::Latex::ESCAPE_MAP = T.let(T.unsafe(nil), Hash)
-# source://kramdown//lib/kramdown/converter/latex.rb#615
+# pkg:gem/kramdown#lib/kramdown/converter/latex.rb:616
Kramdown::Converter::Latex::ESCAPE_RE = T.let(T.unsafe(nil), Regexp)
-# source://kramdown//lib/kramdown/converter/latex.rb#175
+# pkg:gem/kramdown#lib/kramdown/converter/latex.rb:176
Kramdown::Converter::Latex::TABLE_ALIGNMENT_CHAR = T.let(T.unsafe(nil), Hash)
-# source://kramdown//lib/kramdown/converter/latex.rb#537
+# pkg:gem/kramdown#lib/kramdown/converter/latex.rb:538
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
+# pkg:gem/kramdown#lib/kramdown/converter/man.rb:18
class Kramdown::Converter::Man < ::Kramdown::Converter::Base
- # source://kramdown//lib/kramdown/converter/man.rb#20
+ # pkg:gem/kramdown#lib/kramdown/converter/man.rb:20
def convert(el, opts = T.unsafe(nil)); end
private
- # source://kramdown//lib/kramdown/converter/man.rb#191
+ # pkg:gem/kramdown#lib/kramdown/converter/man.rb:191
def convert_a(el, opts); end
- # source://kramdown//lib/kramdown/converter/man.rb#229
+ # pkg:gem/kramdown#lib/kramdown/converter/man.rb:229
def convert_abbreviation(el, opts); end
- # source://kramdown//lib/kramdown/converter/man.rb#47
+ # pkg:gem/kramdown#lib/kramdown/converter/man.rb:47
def convert_blank(*_arg0); end
- # source://kramdown//lib/kramdown/converter/man.rb#95
+ # pkg:gem/kramdown#lib/kramdown/converter/man.rb:95
def convert_blockquote(el, opts); end
- # source://kramdown//lib/kramdown/converter/man.rb#225
+ # pkg:gem/kramdown#lib/kramdown/converter/man.rb:225
def convert_br(_el, opts); end
- # source://kramdown//lib/kramdown/converter/man.rb#89
+ # pkg:gem/kramdown#lib/kramdown/converter/man.rb:89
def convert_codeblock(el, opts); end
- # source://kramdown//lib/kramdown/converter/man.rb#221
+ # pkg:gem/kramdown#lib/kramdown/converter/man.rb:221
def convert_codespan(el, opts); end
- # source://kramdown//lib/kramdown/converter/man.rb#186
+ # pkg:gem/kramdown#lib/kramdown/converter/man.rb:189
def convert_comment(el, opts); end
- # source://kramdown//lib/kramdown/converter/man.rb#127
+ # pkg:gem/kramdown#lib/kramdown/converter/man.rb:127
def convert_dd(el, opts); end
- # source://kramdown//lib/kramdown/converter/man.rb#101
+ # pkg:gem/kramdown#lib/kramdown/converter/man.rb:107
def convert_dl(el, opts); end
- # source://kramdown//lib/kramdown/converter/man.rb#121
+ # pkg:gem/kramdown#lib/kramdown/converter/man.rb:121
def convert_dt(el, opts); end
- # source://kramdown//lib/kramdown/converter/man.rb#209
+ # pkg:gem/kramdown#lib/kramdown/converter/man.rb:209
def convert_em(el, opts); end
- # source://kramdown//lib/kramdown/converter/man.rb#255
+ # pkg:gem/kramdown#lib/kramdown/converter/man.rb:255
def convert_entity(el, opts); end
- # source://kramdown//lib/kramdown/converter/man.rb#241
+ # pkg:gem/kramdown#lib/kramdown/converter/man.rb:241
def convert_footnote(*_arg0); end
- # source://kramdown//lib/kramdown/converter/man.rb#61
+ # pkg:gem/kramdown#lib/kramdown/converter/man.rb:61
def convert_header(el, opts); end
- # source://kramdown//lib/kramdown/converter/man.rb#47
+ # pkg:gem/kramdown#lib/kramdown/converter/man.rb:49
def convert_hr(*_arg0); end
- # source://kramdown//lib/kramdown/converter/man.rb#182
+ # pkg:gem/kramdown#lib/kramdown/converter/man.rb:182
def convert_html_element(*_arg0); end
- # source://kramdown//lib/kramdown/converter/man.rb#205
+ # pkg:gem/kramdown#lib/kramdown/converter/man.rb:205
def convert_img(_el, _opts); end
- # source://kramdown//lib/kramdown/converter/man.rb#110
+ # pkg:gem/kramdown#lib/kramdown/converter/man.rb:110
def convert_li(el, opts); end
- # source://kramdown//lib/kramdown/converter/man.rb#233
+ # pkg:gem/kramdown#lib/kramdown/converter/man.rb:233
def convert_math(el, opts); end
- # source://kramdown//lib/kramdown/converter/man.rb#101
+ # pkg:gem/kramdown#lib/kramdown/converter/man.rb:108
def convert_ol(el, opts); end
- # source://kramdown//lib/kramdown/converter/man.rb#52
+ # pkg:gem/kramdown#lib/kramdown/converter/man.rb:52
def convert_p(el, opts); end
- # source://kramdown//lib/kramdown/converter/man.rb#245
+ # pkg:gem/kramdown#lib/kramdown/converter/man.rb:245
def convert_raw(*_arg0); end
- # source://kramdown//lib/kramdown/converter/man.rb#40
+ # pkg:gem/kramdown#lib/kramdown/converter/man.rb:40
def convert_root(el, opts); end
- # source://kramdown//lib/kramdown/converter/man.rb#259
+ # pkg:gem/kramdown#lib/kramdown/converter/man.rb:259
def convert_smart_quote(el, opts); end
- # source://kramdown//lib/kramdown/converter/man.rb#215
+ # pkg:gem/kramdown#lib/kramdown/converter/man.rb:215
def convert_strong(el, opts); end
- # source://kramdown//lib/kramdown/converter/man.rb#139
+ # pkg:gem/kramdown#lib/kramdown/converter/man.rb:139
def convert_table(el, opts); end
- # source://kramdown//lib/kramdown/converter/man.rb#154
+ # pkg:gem/kramdown#lib/kramdown/converter/man.rb:154
def convert_tbody(el, opts); end
- # source://kramdown//lib/kramdown/converter/man.rb#170
+ # pkg:gem/kramdown#lib/kramdown/converter/man.rb:170
def convert_td(el, opts); end
- # source://kramdown//lib/kramdown/converter/man.rb#249
+ # pkg:gem/kramdown#lib/kramdown/converter/man.rb:249
def convert_text(el, opts); end
- # source://kramdown//lib/kramdown/converter/man.rb#161
+ # pkg:gem/kramdown#lib/kramdown/converter/man.rb:161
def convert_tfoot(el, opts); end
- # source://kramdown//lib/kramdown/converter/man.rb#148
+ # pkg:gem/kramdown#lib/kramdown/converter/man.rb:148
def convert_thead(el, opts); end
- # source://kramdown//lib/kramdown/converter/man.rb#165
+ # pkg:gem/kramdown#lib/kramdown/converter/man.rb:165
def convert_tr(el, opts); end
- # source://kramdown//lib/kramdown/converter/man.rb#268
+ # pkg:gem/kramdown#lib/kramdown/converter/man.rb:268
def convert_typographic_sym(el, opts); end
- # source://kramdown//lib/kramdown/converter/man.rb#101
+ # pkg:gem/kramdown#lib/kramdown/converter/man.rb:101
def convert_ul(el, opts); end
- # source://kramdown//lib/kramdown/converter/man.rb#186
+ # pkg:gem/kramdown#lib/kramdown/converter/man.rb:186
def convert_xml_comment(el, opts); end
- # source://kramdown//lib/kramdown/converter/man.rb#47
+ # pkg:gem/kramdown#lib/kramdown/converter/man.rb:50
def convert_xml_pi(*_arg0); end
- # source://kramdown//lib/kramdown/converter/man.rb#285
+ # pkg:gem/kramdown#lib/kramdown/converter/man.rb:285
def escape(text, preserve_whitespace = T.unsafe(nil)); end
- # source://kramdown//lib/kramdown/converter/man.rb#26
+ # pkg:gem/kramdown#lib/kramdown/converter/man.rb:26
def inner(el, opts, use = T.unsafe(nil)); end
- # source://kramdown//lib/kramdown/converter/man.rb#272
+ # pkg:gem/kramdown#lib/kramdown/converter/man.rb:272
def macro(name, *args); end
- # source://kramdown//lib/kramdown/converter/man.rb#276
+ # pkg:gem/kramdown#lib/kramdown/converter/man.rb:276
def newline(text); end
- # source://kramdown//lib/kramdown/converter/man.rb#281
+ # pkg:gem/kramdown#lib/kramdown/converter/man.rb:281
def quote(text); end
- # source://kramdown//lib/kramdown/converter/man.rb#293
+ # pkg:gem/kramdown#lib/kramdown/converter/man.rb:293
def unicode_char(codepoint); end
end
-# source://kramdown//lib/kramdown/converter/man.rb#137
+# pkg:gem/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
+# pkg:gem/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.
@@ -997,14 +1249,12 @@ Kramdown::Converter::Man::TYPOGRAPHIC_SYMS_MAP = T.let(T.unsafe(nil), Hash)
#
# This converter modifies the given tree in-place and returns it.
#
-# source://kramdown//lib/kramdown/converter/remove_html_tags.rb#25
+# pkg:gem/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
+ # pkg:gem/kramdown#lib/kramdown/converter/remove_html_tags.rb:27
def initialize(root, options); end
- # source://kramdown//lib/kramdown/converter/remove_html_tags.rb#32
+ # pkg:gem/kramdown#lib/kramdown/converter/remove_html_tags.rb:32
def convert(el); end
end
@@ -1018,19 +1268,17 @@ end
# 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
+# pkg:gem/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
+ # pkg:gem/kramdown#lib/kramdown/converter/toc.rb:27
def initialize(root, options); end
- # source://kramdown//lib/kramdown/converter/toc.rb#34
+ # pkg:gem/kramdown#lib/kramdown/converter/toc.rb:34
def convert(el); end
private
- # source://kramdown//lib/kramdown/converter/toc.rb#47
+ # pkg:gem/kramdown#lib/kramdown/converter/toc.rb:47
def add_to_toc(el, id); end
end
@@ -1049,7 +1297,7 @@ end
# 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
+# pkg:gem/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.
@@ -1062,12 +1310,10 @@ class Kramdown::Document
# 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
+ # pkg:gem/kramdown#lib/kramdown/document.rb:96
def initialize(source, options = T.unsafe(nil)); end
- # source://kramdown//lib/kramdown/document.rb#124
+ # pkg:gem/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
@@ -1075,37 +1321,37 @@ class Kramdown::Document
#
# For example, +to_html+ would instantiate the Kramdown::Converter::Html class.
#
- # source://kramdown//lib/kramdown/document.rb#113
+ # pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/kramdown#lib/kramdown/document.rb:129
def try_require(type, name); end
end
@@ -1578,19 +1824,17 @@ end
# 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
+# pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/kramdown#lib/kramdown/element.rb:502
def attr; end
# syntactic sugar to simplify calls such as +Kramdown::Element.category(el) == :block+ with
@@ -1598,27 +1842,25 @@ class Kramdown::Element
#
# Returns boolean true or false.
#
- # @return [Boolean]
- #
- # source://kramdown//lib/kramdown/element.rb#537
+ # pkg:gem/kramdown#lib/kramdown/element.rb:537
def block?; end
# The child elements of this element.
#
- # source://kramdown//lib/kramdown/element.rb#492
+ # pkg:gem/kramdown#lib/kramdown/element.rb:492
def children; end
# The child elements of this element.
#
- # source://kramdown//lib/kramdown/element.rb#492
+ # pkg:gem/kramdown#lib/kramdown/element.rb:492
def children=(_arg0); end
- # source://kramdown//lib/kramdown/element.rb#511
+ # pkg:gem/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
+ # pkg:gem/kramdown#lib/kramdown/element.rb:507
def options; end
# syntactic sugar to simplify calls such as +Kramdown::Element.category(el) == :span+ with
@@ -1626,31 +1868,29 @@ class Kramdown::Element
#
# Returns boolean true or false.
#
- # @return [Boolean]
- #
- # source://kramdown//lib/kramdown/element.rb#545
+ # pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/kramdown#lib/kramdown/element.rb:489
def value=(_arg0); end
class << self
@@ -1659,30 +1899,30 @@ class Kramdown::Element
# 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
+ # pkg:gem/kramdown#lib/kramdown/element.rb:529
def category(el); end
end
end
-# source://kramdown//lib/kramdown/element.rb#519
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+ # pkg:gem/kramdown#lib/kramdown/options.rb:72
def defaults; end
# Define a new option called +name+ (a Symbol) with the given +type+ (String, Integer, Float,
@@ -1693,27 +1933,23 @@ module Kramdown::Options
# 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
+ # pkg:gem/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
+ # pkg:gem/kramdown#lib/kramdown/options.rb:67
def defined?(name); end
# Return all option definitions.
#
- # source://kramdown//lib/kramdown/options.rb#62
+ # pkg:gem/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
+ # pkg:gem/kramdown#lib/kramdown/options.rb:83
def merge(hash); end
# Parse the given value +data+ as if it was a value for the option +name+ and return the parsed
@@ -1722,9 +1958,7 @@ module Kramdown::Options
# 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
+ # pkg:gem/kramdown#lib/kramdown/options.rb:97
def parse(name, data); end
# Ensures that the option value +val+ for the option called +name+ is a valid array. The
@@ -1735,7 +1969,7 @@ module Kramdown::Options
#
# Optionally, the array is checked for the correct size.
#
- # source://kramdown//lib/kramdown/options.rb#141
+ # pkg:gem/kramdown#lib/kramdown/options.rb:142
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
@@ -1744,9 +1978,7 @@ module Kramdown::Options
# - a hash in YAML format
# - or a Ruby Hash object.
#
- # @raise [Kramdown::Error]
- #
- # source://kramdown//lib/kramdown/options.rb#158
+ # pkg:gem/kramdown#lib/kramdown/options.rb:159
def simple_hash_validator(val, name); end
# Converts the given String +data+ into a Symbol or +nil+ with the
@@ -1755,107 +1987,91 @@ module Kramdown::Options
# - 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
+ # pkg:gem/kramdown#lib/kramdown/options.rb:123
def str_to_sym(data); end
end
end
# Allowed option types.
#
-# source://kramdown//lib/kramdown/options.rb#39
+# pkg:gem/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
+# pkg:gem/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
+ # pkg:gem/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
+# pkg:gem/kramdown#lib/kramdown/options.rb:36
class Kramdown::Options::Definition < ::Struct
- # Returns the value of attribute default
- #
- # @return [Object] the current value of default
+ # pkg:gem/kramdown#lib/kramdown/options.rb:36
def default; end
- # Sets the attribute default
- #
- # @param value [Object] the value to set the attribute default to.
- # @return [Object] the newly set value
+ # pkg:gem/kramdown#lib/kramdown/options.rb:36
def default=(_); end
- # Returns the value of attribute desc
- #
- # @return [Object] the current value of desc
+ # pkg:gem/kramdown#lib/kramdown/options.rb:36
def desc; end
- # Sets the attribute desc
- #
- # @param value [Object] the value to set the attribute desc to.
- # @return [Object] the newly set value
+ # pkg:gem/kramdown#lib/kramdown/options.rb:36
def desc=(_); end
- # Returns the value of attribute name
- #
- # @return [Object] the current value of name
+ # pkg:gem/kramdown#lib/kramdown/options.rb:36
def name; end
- # Sets the attribute name
- #
- # @param value [Object] the value to set the attribute name to.
- # @return [Object] the newly set value
+ # pkg:gem/kramdown#lib/kramdown/options.rb:36
def name=(_); end
- # Returns the value of attribute type
- #
- # @return [Object] the current value of type
+ # pkg:gem/kramdown#lib/kramdown/options.rb:36
def type; end
- # Sets the attribute type
- #
- # @param value [Object] the value to set the attribute type to.
- # @return [Object] the newly set value
+ # pkg:gem/kramdown#lib/kramdown/options.rb:36
def type=(_); end
- # Returns the value of attribute validator
- #
- # @return [Object] the current value of validator
+ # pkg:gem/kramdown#lib/kramdown/options.rb:36
def validator; end
- # Sets the attribute validator
- #
- # @param value [Object] the value to set the attribute validator to.
- # @return [Object] the newly set value
+ # pkg:gem/kramdown#lib/kramdown/options.rb:36
def validator=(_); end
class << self
+ # pkg:gem/kramdown#lib/kramdown/options.rb:36
def [](*_arg0); end
+
+ # pkg:gem/kramdown#lib/kramdown/options.rb:36
def inspect; end
+
+ # pkg:gem/kramdown#lib/kramdown/options.rb:36
def keyword_init?; end
+
+ # pkg:gem/kramdown#lib/kramdown/options.rb:36
def members; end
+
+ # pkg:gem/kramdown#lib/kramdown/options.rb:36
def new(*_arg0); end
end
end
-# source://kramdown//lib/kramdown/options.rb#396
+# pkg:gem/kramdown#lib/kramdown/options.rb:406
Kramdown::Options::SMART_QUOTES_ENTITIES = T.let(T.unsafe(nil), Array)
-# source://kramdown//lib/kramdown/options.rb#397
+# pkg:gem/kramdown#lib/kramdown/options.rb:407
Kramdown::Options::SMART_QUOTES_STR = T.let(T.unsafe(nil), String)
-# source://kramdown//lib/kramdown/options.rb#336
+# pkg:gem/kramdown#lib/kramdown/options.rb:346
Kramdown::Options::TOC_LEVELS_ARRAY = T.let(T.unsafe(nil), Array)
-# source://kramdown//lib/kramdown/options.rb#335
+# pkg:gem/kramdown#lib/kramdown/options.rb:345
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
@@ -1864,7 +2080,7 @@ Kramdown::Options::TOC_LEVELS_RANGE = T.let(T.unsafe(nil), Range)
# 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
+# pkg:gem/kramdown#lib/kramdown/parser.rb:17
module Kramdown::Parser; end
# == \Base class for parsers
@@ -1885,39 +2101,37 @@ module Kramdown::Parser; end
#
# Have a look at the Base::parse, Base::new and Base#parse methods for additional information!
#
-# source://kramdown//lib/kramdown/parser/base.rb#34
+# pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/kramdown#lib/kramdown/parser/base.rb:97
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
+ # pkg:gem/kramdown#lib/kramdown/parser/base.rb:109
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
+ # pkg:gem/kramdown#lib/kramdown/parser/base.rb:121
def extract_string(range, strscan); end
# The hash with the parsing options.
#
- # source://kramdown//lib/kramdown/parser/base.rb#37
+ # pkg:gem/kramdown#lib/kramdown/parser/base.rb:37
def options; end
# Parse the source string into an element tree.
@@ -1927,29 +2141,27 @@ class Kramdown::Parser::Base
#
# This is the only method that has to be implemented by sub-classes!
#
- # @raise [NotImplementedError]
- #
- # source://kramdown//lib/kramdown/parser/base.rb#79
+ # pkg:gem/kramdown#lib/kramdown/parser/base.rb:85
def parse; end
# The root element of element tree that is created from the source string.
#
- # source://kramdown//lib/kramdown/parser/base.rb#46
+ # pkg:gem/kramdown#lib/kramdown/parser/base.rb:46
def root; end
# The original source string.
#
- # source://kramdown//lib/kramdown/parser/base.rb#43
+ # pkg:gem/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
+ # pkg:gem/kramdown#lib/kramdown/parser/base.rb:90
def warning(text); end
# The array with the parser warnings.
#
- # source://kramdown//lib/kramdown/parser/base.rb#40
+ # pkg:gem/kramdown#lib/kramdown/parser/base.rb:40
def warnings; end
class << self
@@ -1959,12 +2171,15 @@ class Kramdown::Parser::Base
# 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
+ # pkg:gem/kramdown#lib/kramdown/parser/base.rb:73
def parse(source, options = T.unsafe(nil)); end
private
+ # pkg:gem/kramdown#lib/kramdown/parser/base.rb:66
def allocate; end
+
+ # pkg:gem/kramdown#lib/kramdown/parser/base.rb:66
def new(*_arg0); end
end
end
@@ -1973,214 +2188,212 @@ end
#
# The parsing code is in the Parser module that can also be used by other parsers.
#
-# source://kramdown//lib/kramdown/parser/html.rb#22
+# pkg:gem/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
+ # pkg:gem/kramdown#lib/kramdown/parser/html.rb:593
def parse; end
end
# Contains all constants that are used when parsing.
#
-# source://kramdown//lib/kramdown/parser/html.rb#25
+# pkg:gem/kramdown#lib/kramdown/parser/html.rb:25
module Kramdown::Parser::Html::Constants; end
-# source://kramdown//lib/kramdown/parser/html.rb#32
+# pkg:gem/kramdown#lib/kramdown/parser/html.rb:33
Kramdown::Parser::Html::Constants::HTML_ATTRIBUTE_RE = T.let(T.unsafe(nil), Regexp)
-# source://kramdown//lib/kramdown/parser/html.rb#59
+# pkg:gem/kramdown#lib/kramdown/parser/html.rb:60
Kramdown::Parser::Html::Constants::HTML_BLOCK_ELEMENTS = T.let(T.unsafe(nil), Array)
-# source://kramdown//lib/kramdown/parser/html.rb#30
+# pkg:gem/kramdown#lib/kramdown/parser/html.rb:32
+Kramdown::Parser::Html::Constants::HTML_CDATA_RE = T.let(T.unsafe(nil), Regexp)
+
+# pkg:gem/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
+# pkg:gem/kramdown#lib/kramdown/parser/html.rb:49
Kramdown::Parser::Html::Constants::HTML_CONTENT_MODEL = T.let(T.unsafe(nil), Hash)
-# source://kramdown//lib/kramdown/parser/html.rb#37
+# pkg:gem/kramdown#lib/kramdown/parser/html.rb:38
Kramdown::Parser::Html::Constants::HTML_CONTENT_MODEL_BLOCK = T.let(T.unsafe(nil), Array)
-# source://kramdown//lib/kramdown/parser/html.rb#44
+# pkg:gem/kramdown#lib/kramdown/parser/html.rb:45
Kramdown::Parser::Html::Constants::HTML_CONTENT_MODEL_RAW = T.let(T.unsafe(nil), Array)
-# source://kramdown//lib/kramdown/parser/html.rb#41
+# pkg:gem/kramdown#lib/kramdown/parser/html.rb:42
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
+# pkg:gem/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
+# pkg:gem/kramdown#lib/kramdown/parser/html.rb:67
Kramdown::Parser::Html::Constants::HTML_ELEMENT = T.let(T.unsafe(nil), Hash)
-# source://kramdown//lib/kramdown/parser/html.rb#63
+# pkg:gem/kramdown#lib/kramdown/parser/html.rb:64
Kramdown::Parser::Html::Constants::HTML_ELEMENTS_WITHOUT_BODY = T.let(T.unsafe(nil), Array)
-# source://kramdown//lib/kramdown/parser/html.rb#35
+# pkg:gem/kramdown#lib/kramdown/parser/html.rb:36
Kramdown::Parser::Html::Constants::HTML_ENTITY_RE = T.let(T.unsafe(nil), Regexp)
-# source://kramdown//lib/kramdown/parser/html.rb#31
+# pkg:gem/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
+# pkg:gem/kramdown#lib/kramdown/parser/html.rb:57
Kramdown::Parser::Html::Constants::HTML_SPAN_ELEMENTS = T.let(T.unsafe(nil), Array)
-# source://kramdown//lib/kramdown/parser/html.rb#34
+# pkg:gem/kramdown#lib/kramdown/parser/html.rb:35
Kramdown::Parser::Html::Constants::HTML_TAG_CLOSE_RE = T.let(T.unsafe(nil), Regexp)
-# source://kramdown//lib/kramdown/parser/html.rb#33
+# pkg:gem/kramdown#lib/kramdown/parser/html.rb:34
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
+# pkg:gem/kramdown#lib/kramdown/parser/html.rb:200
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
+ # pkg:gem/kramdown#lib/kramdown/parser/html.rb:219
def initialize(root); end
- # source://kramdown//lib/kramdown/parser/html.rb#384
+ # pkg:gem/kramdown#lib/kramdown/parser/html.rb:388
def convert_a(el); end
- # source://kramdown//lib/kramdown/parser/html.rb#394
+ # pkg:gem/kramdown#lib/kramdown/parser/html.rb:409
def convert_b(el); end
- # source://kramdown//lib/kramdown/parser/html.rb#417
+ # pkg:gem/kramdown#lib/kramdown/parser/html.rb:421
def convert_code(el); end
- # source://kramdown//lib/kramdown/parser/html.rb#394
+ # pkg:gem/kramdown#lib/kramdown/parser/html.rb:398
def convert_em(el); end
- # source://kramdown//lib/kramdown/parser/html.rb#408
+ # pkg:gem/kramdown#lib/kramdown/parser/html.rb:412
def convert_h1(el); end
- # source://kramdown//lib/kramdown/parser/html.rb#408
+ # pkg:gem/kramdown#lib/kramdown/parser/html.rb:418
def convert_h2(el); end
- # source://kramdown//lib/kramdown/parser/html.rb#408
+ # pkg:gem/kramdown#lib/kramdown/parser/html.rb:418
def convert_h3(el); end
- # source://kramdown//lib/kramdown/parser/html.rb#408
+ # pkg:gem/kramdown#lib/kramdown/parser/html.rb:418
def convert_h4(el); end
- # source://kramdown//lib/kramdown/parser/html.rb#408
+ # pkg:gem/kramdown#lib/kramdown/parser/html.rb:418
def convert_h5(el); end
- # source://kramdown//lib/kramdown/parser/html.rb#408
+ # pkg:gem/kramdown#lib/kramdown/parser/html.rb:418
def convert_h6(el); end
- # source://kramdown//lib/kramdown/parser/html.rb#394
+ # pkg:gem/kramdown#lib/kramdown/parser/html.rb:409
def convert_i(el); end
- # source://kramdown//lib/kramdown/parser/html.rb#417
+ # pkg:gem/kramdown#lib/kramdown/parser/html.rb:463
def convert_pre(el); end
- # source://kramdown//lib/kramdown/parser/html.rb#563
+ # pkg:gem/kramdown#lib/kramdown/parser/html.rb:570
def convert_script(el); end
- # source://kramdown//lib/kramdown/parser/html.rb#394
+ # pkg:gem/kramdown#lib/kramdown/parser/html.rb:409
def convert_strong(el); end
- # source://kramdown//lib/kramdown/parser/html.rb#460
+ # pkg:gem/kramdown#lib/kramdown/parser/html.rb:465
def convert_table(el); end
- # source://kramdown//lib/kramdown/parser/html.rb#380
+ # pkg:gem/kramdown#lib/kramdown/parser/html.rb:384
def convert_textarea(el); end
- # source://kramdown//lib/kramdown/parser/html.rb#375
+ # pkg:gem/kramdown#lib/kramdown/parser/html.rb:379
def extract_text(el, raw); end
- # source://kramdown//lib/kramdown/parser/html.rb#575
+ # pkg:gem/kramdown#lib/kramdown/parser/html.rb:582
def handle_math_tag(el); end
- # @return [Boolean]
- #
- # source://kramdown//lib/kramdown/parser/html.rb#571
+ # pkg:gem/kramdown#lib/kramdown/parser/html.rb:578
def is_math_tag?(el); end
- # @return [Boolean]
- #
- # source://kramdown//lib/kramdown/parser/html.rb#503
+ # pkg:gem/kramdown#lib/kramdown/parser/html.rb:508
def is_simple_table?(el); end
# Convert the element +el+ and its children.
#
- # source://kramdown//lib/kramdown/parser/html.rb#225
+ # pkg:gem/kramdown#lib/kramdown/parser/html.rb:228
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
+ # pkg:gem/kramdown#lib/kramdown/parser/html.rb:282
def process_children(el, do_conversion = T.unsafe(nil), preserve_text = T.unsafe(nil)); end
- # source://kramdown//lib/kramdown/parser/html.rb#320
+ # pkg:gem/kramdown#lib/kramdown/parser/html.rb:324
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
+ # pkg:gem/kramdown#lib/kramdown/parser/html.rb:295
def process_text(raw, preserve = T.unsafe(nil)); end
- # source://kramdown//lib/kramdown/parser/html.rb#326
+ # pkg:gem/kramdown#lib/kramdown/parser/html.rb:330
def remove_text_children(el); end
- # source://kramdown//lib/kramdown/parser/html.rb#359
+ # pkg:gem/kramdown#lib/kramdown/parser/html.rb:363
def remove_whitespace_children(el); end
- # source://kramdown//lib/kramdown/parser/html.rb#369
+ # pkg:gem/kramdown#lib/kramdown/parser/html.rb:373
def set_basics(el, type, opts = T.unsafe(nil)); end
- # source://kramdown//lib/kramdown/parser/html.rb#349
+ # pkg:gem/kramdown#lib/kramdown/parser/html.rb:353
def strip_whitespace(el); end
- # source://kramdown//lib/kramdown/parser/html.rb#330
+ # pkg:gem/kramdown#lib/kramdown/parser/html.rb:334
def wrap_text_children(el); end
class << self
- # source://kramdown//lib/kramdown/parser/html.rb#220
+ # pkg:gem/kramdown#lib/kramdown/parser/html.rb:223
def convert(root, el = T.unsafe(nil)); end
end
end
-# source://kramdown//lib/kramdown/parser/html.rb#393
+# pkg:gem/kramdown#lib/kramdown/parser/html.rb:397
Kramdown::Parser::Html::ElementConverter::EMPHASIS_TYPE_MAP = T.let(T.unsafe(nil), Hash)
-# source://kramdown//lib/kramdown/parser/html.rb#204
+# pkg:gem/kramdown#lib/kramdown/parser/html.rb:207
Kramdown::Parser::Html::ElementConverter::REMOVE_TEXT_CHILDREN = T.let(T.unsafe(nil), Array)
-# source://kramdown//lib/kramdown/parser/html.rb#208
+# pkg:gem/kramdown#lib/kramdown/parser/html.rb:211
Kramdown::Parser::Html::ElementConverter::REMOVE_WHITESPACE_CHILDREN = T.let(T.unsafe(nil), Array)
-# source://kramdown//lib/kramdown/parser/html.rb#213
+# pkg:gem/kramdown#lib/kramdown/parser/html.rb:216
Kramdown::Parser::Html::ElementConverter::SIMPLE_ELEMENTS = T.let(T.unsafe(nil), Array)
-# source://kramdown//lib/kramdown/parser/html.rb#210
+# pkg:gem/kramdown#lib/kramdown/parser/html.rb:213
Kramdown::Parser::Html::ElementConverter::STRIP_WHITESPACE = T.let(T.unsafe(nil), Array)
-# source://kramdown//lib/kramdown/parser/html.rb#206
+# pkg:gem/kramdown#lib/kramdown/parser/html.rb:209
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
+# @stack for storing the needed state and @src (instance of StringScanner) for the actual
# parsing.
#
-# source://kramdown//lib/kramdown/parser/html.rb#77
+# pkg:gem/kramdown#lib/kramdown/parser/html.rb:78
module Kramdown::Parser::Html::Parser
include ::Kramdown::Parser::Html::Constants
@@ -2191,12 +2404,12 @@ module Kramdown::Parser::Html::Parser
# 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
+ # pkg:gem/kramdown#lib/kramdown/parser/html.rb:88
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
+ # pkg:gem/kramdown#lib/kramdown/parser/html.rb:128
def handle_raw_html_tag(name); end
# Parses the given string for HTML attributes and returns the resulting hash.
@@ -2206,7 +2419,7 @@ module Kramdown::Parser::Html::Parser
# 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
+ # pkg:gem/kramdown#lib/kramdown/parser/html.rb:115
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+.
@@ -2219,11 +2432,11 @@ module Kramdown::Parser::Html::Parser
# 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
+ # pkg:gem/kramdown#lib/kramdown/parser/html.rb:151
def parse_raw_html(el, &block); end
end
-# source://kramdown//lib/kramdown/parser/html.rb#139
+# pkg:gem/kramdown#lib/kramdown/parser/html.rb:140
Kramdown::Parser::Html::Parser::HTML_RAW_START = T.let(T.unsafe(nil), Regexp)
# Used for parsing a document in kramdown format.
@@ -2265,272 +2478,267 @@ Kramdown::Parser::Html::Parser::HTML_RAW_START = T.let(T.unsafe(nil), Regexp)
#
# Kramdown::Document.new(input_text, :input => 'ERBKramdown').to_html
#
-# source://kramdown//lib/kramdown/parser/kramdown.rb#60
+# pkg:gem/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
+ include ::Kramdown::Utils::Html
# 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
+ # pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/kramdown#lib/kramdown/parser/kramdown/abbreviation.rb:34
def correct_abbreviations_attributes; end
- # source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#96
+ # pkg:gem/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
+ # pkg:gem/kramdown#lib/kramdown/parser/kramdown/html.rb:26
def handle_kramdown_html_tag(el, closed, handle_body); end
# Normalize the link identifier.
#
- # source://kramdown//lib/kramdown/parser/kramdown/link.rb#17
+ # pkg:gem/kramdown#lib/kramdown/parser/kramdown/link.rb:17
def normalize_link_id(id); end
- # source://kramdown//lib/kramdown/parser/kramdown/paragraph.rb#56
+ # pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/kramdown#lib/kramdown/parser/kramdown/html.rb:73
def parse_block_html; end
# Parse the math block at the current location.
#
- # source://kramdown//lib/kramdown/parser/kramdown/math.rb#19
+ # pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/kramdown#lib/kramdown/parser/kramdown.rb:306
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
+ # pkg:gem/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
+ # pkg:gem/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+.
@@ -2543,55 +2751,54 @@ class Kramdown::Parser::Kramdown < ::Kramdown::Parser::Base
#
# The parameter +text_type+ specifies the type which should be used for created text nodes.
#
- # source://kramdown//lib/kramdown/parser/kramdown.rb#214
+ # pkg:gem/kramdown#lib/kramdown/parser/kramdown.rb:215
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
+ # pkg:gem/kramdown#lib/kramdown/parser/kramdown.rb:254
def reset_env(opts = T.unsafe(nil)); end
# Restore the current parsing environment.
#
- # source://kramdown//lib/kramdown/parser/kramdown.rb#268
+ # pkg:gem/kramdown#lib/kramdown/parser/kramdown.rb:269
def restore_env(env); end
# Return the current parsing environment.
#
- # source://kramdown//lib/kramdown/parser/kramdown.rb#263
+ # pkg:gem/kramdown#lib/kramdown/parser/kramdown.rb:264
def save_env; end
# Create the needed span parser regexps.
#
- # source://kramdown//lib/kramdown/parser/kramdown.rb#134
+ # pkg:gem/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
+ # pkg:gem/kramdown#lib/kramdown/parser/kramdown.rb:275
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
+ # pkg:gem/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
+ # pkg:gem/kramdown#lib/kramdown/parser/kramdown.rb:289
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
+ # pkg:gem/kramdown#lib/kramdown/parser/kramdown.rb:166
def update_tree(element); end
private
@@ -2599,10 +2806,10 @@ class Kramdown::Parser::Kramdown < ::Kramdown::Parser::Base
# 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
+ # pkg:gem/kramdown#lib/kramdown/parser/kramdown/list.rb:258
def fetch_pattern(type, indentation); end
- # source://kramdown//lib/kramdown/parser/kramdown.rb#200
+ # pkg:gem/kramdown#lib/kramdown/parser/kramdown.rb:201
def span_pattern_cache(stop_re, span_start); end
class << self
@@ -2616,355 +2823,342 @@ class Kramdown::Parser::Kramdown < ::Kramdown::Parser::Base
# 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
+ # pkg:gem/kramdown#lib/kramdown/parser/kramdown.rb:329
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
+ # pkg:gem/kramdown#lib/kramdown/parser/kramdown.rb:340
def has_parser?(name); end
# Return the Data structure for the parser +name+.
#
- # source://kramdown//lib/kramdown/parser/kramdown.rb#334
+ # pkg:gem/kramdown#lib/kramdown/parser/kramdown.rb:335
def parser(name = T.unsafe(nil)); end
end
end
-# source://kramdown//lib/kramdown/parser/kramdown/abbreviation.rb#14
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/kramdown#lib/kramdown/parser/kramdown.rb:318
class Kramdown::Parser::Kramdown::Data < ::Struct
- # Returns the value of attribute method
- #
- # @return [Object] the current value of method
+ # pkg:gem/kramdown#lib/kramdown/parser/kramdown.rb:318
def method; end
- # Sets the attribute method
- #
- # @param value [Object] the value to set the attribute method to.
- # @return [Object] the newly set value
+ # pkg:gem/kramdown#lib/kramdown/parser/kramdown.rb:318
def method=(_); end
- # Returns the value of attribute name
- #
- # @return [Object] the current value of name
+ # pkg:gem/kramdown#lib/kramdown/parser/kramdown.rb:318
def name; end
- # Sets the attribute name
- #
- # @param value [Object] the value to set the attribute name to.
- # @return [Object] the newly set value
+ # pkg:gem/kramdown#lib/kramdown/parser/kramdown.rb:318
def name=(_); end
- # Returns the value of attribute span_start
- #
- # @return [Object] the current value of span_start
+ # pkg:gem/kramdown#lib/kramdown/parser/kramdown.rb:318
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
+ # pkg:gem/kramdown#lib/kramdown/parser/kramdown.rb:318
def span_start=(_); end
- # Returns the value of attribute start_re
- #
- # @return [Object] the current value of start_re
+ # pkg:gem/kramdown#lib/kramdown/parser/kramdown.rb:318
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
+ # pkg:gem/kramdown#lib/kramdown/parser/kramdown.rb:318
def start_re=(_); end
class << self
+ # pkg:gem/kramdown#lib/kramdown/parser/kramdown.rb:318
def [](*_arg0); end
+
+ # pkg:gem/kramdown#lib/kramdown/parser/kramdown.rb:318
def inspect; end
+
+ # pkg:gem/kramdown#lib/kramdown/parser/kramdown.rb:318
def keyword_init?; end
+
+ # pkg:gem/kramdown#lib/kramdown/parser/kramdown.rb:318
def members; end
+
+ # pkg:gem/kramdown#lib/kramdown/parser/kramdown.rb:318
def new(*_arg0); end
end
end
-# source://kramdown//lib/kramdown/parser/kramdown/emphasis.rb#14
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/kramdown#lib/kramdown/parser/kramdown/html.rb:70
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
+# pkg:gem/kramdown#lib/kramdown/parser/kramdown/html.rb:22
Kramdown::Parser::Kramdown::HTML_MARKDOWN_ATTR_MAP = T.let(T.unsafe(nil), Hash)
-# source://kramdown//lib/kramdown/parser/kramdown/html.rb#99
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/kramdown#lib/kramdown/parser/kramdown.rb:345
Kramdown::Parser::Kramdown::INDENT = T.let(T.unsafe(nil), Regexp)
-# source://kramdown//lib/kramdown/parser/kramdown/math.rb#41
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/kramdown#lib/kramdown/parser/kramdown.rb:347
Kramdown::Parser::Kramdown::OPT_SPACE = T.let(T.unsafe(nil), Regexp)
-# source://kramdown//lib/kramdown/parser/kramdown/paragraph.rb#28
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/kramdown#lib/kramdown/parser/kramdown/html.rb:24
Kramdown::Parser::Kramdown::TRAILING_WHITESPACE = T.let(T.unsafe(nil), Regexp)
-# source://kramdown//lib/kramdown/parser/kramdown/typographic_symbol.rb#14
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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.
@@ -2977,43 +3171,41 @@ Kramdown::Parser::Kramdown::TYPOGRAPHIC_SYMS_SUBST = T.let(T.unsafe(nil), Hash)
# 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
+# pkg:gem/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
+ # pkg:gem/kramdown#lib/kramdown/parser/markdown.rb:32
def initialize(source, options); end
end
# :stopdoc:
#
-# source://kramdown//lib/kramdown/parser/markdown.rb#40
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/kramdown#lib/kramdown/parser/markdown.rb:44
Kramdown::Parser::Markdown::PARAGRAPH_END = T.let(T.unsafe(nil), Regexp)
# == \Utils Module
@@ -3021,27 +3213,27 @@ Kramdown::Parser::Markdown::PARAGRAPH_END = T.let(T.unsafe(nil), Regexp)
# This module contains utility class/modules/methods that can be used by both parsers and
# converters.
#
-# source://kramdown//lib/kramdown/utils.rb#16
+# pkg:gem/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
+ # pkg:gem/kramdown#lib/kramdown/utils.rb:26
def camelize(name); end
- # source://kramdown//lib/kramdown/utils.rb#39
+ # pkg:gem/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
+ # pkg:gem/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
+# pkg:gem/kramdown#lib/kramdown/utils/configurable.rb:14
module Kramdown::Utils::Configurable
# Create a new configurable extension called +name+.
#
@@ -3056,32 +3248,32 @@ module Kramdown::Utils::Configurable
# 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
+ # pkg:gem/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
+# pkg:gem/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
+ # pkg:gem/kramdown#lib/kramdown/utils/entities.rb:990
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
+ # pkg:gem/kramdown#lib/kramdown/utils/entities.rb:994
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
+# pkg:gem/kramdown#lib/kramdown/utils/entities.rb:973
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.
@@ -3089,45 +3281,42 @@ Kramdown::Utils::Entities::ENTITY_MAP = T.let(T.unsafe(nil), Hash)
# 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
+# pkg:gem/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
+# pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/kramdown#lib/kramdown/utils/entities.rb:18
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
+ # pkg:gem/kramdown#lib/kramdown/utils/entities.rb:18
def code_point=(_); end
- # Returns the value of attribute name
- #
- # @return [Object] the current value of name
+ # pkg:gem/kramdown#lib/kramdown/utils/entities.rb:18
def name; end
- # Sets the attribute name
- #
- # @param value [Object] the value to set the attribute name to.
- # @return [Object] the newly set value
+ # pkg:gem/kramdown#lib/kramdown/utils/entities.rb:18
def name=(_); end
class << self
+ # pkg:gem/kramdown#lib/kramdown/utils/entities.rb:18
def [](*_arg0); end
+
+ # pkg:gem/kramdown#lib/kramdown/utils/entities.rb:18
def inspect; end
+
+ # pkg:gem/kramdown#lib/kramdown/utils/entities.rb:18
def keyword_init?; end
+
+ # pkg:gem/kramdown#lib/kramdown/utils/entities.rb:18
def members; end
+
+ # pkg:gem/kramdown#lib/kramdown/utils/entities.rb:18
def new(*_arg0); end
end
end
@@ -3138,14 +3327,14 @@ end
# 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
+# pkg:gem/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
+ # pkg:gem/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
@@ -3153,36 +3342,36 @@ module Kramdown::Utils::Html
# 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
+ # pkg:gem/kramdown#lib/kramdown/utils/html.rb:69
def escape_html(str, type = T.unsafe(nil)); end
- # source://kramdown//lib/kramdown/utils/html.rb#74
+ # pkg:gem/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
+ # pkg:gem/kramdown#lib/kramdown/utils/html.rb:44
def html_attributes(attr); end
end
-# source://kramdown//lib/kramdown/utils/html.rb#59
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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
+# pkg:gem/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.
@@ -3191,38 +3380,34 @@ Kramdown::Utils::Html::REDUNDANT_LINE_BREAK_REGEX = T.let(T.unsafe(nil), Regexp)
# 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
+# pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/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
+ # pkg:gem/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
+# pkg:gem/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
+ # pkg:gem/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.
@@ -3232,7 +3417,7 @@ class Kramdown::Utils::StringScanner < ::StringScanner
# 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
+ # pkg:gem/kramdown#lib/kramdown/utils/string_scanner.rb:67
def current_line_number; end
# Sets the byte position of the scan pointer.
@@ -3240,12 +3425,12 @@ class Kramdown::Utils::StringScanner < ::StringScanner
# 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
+ # pkg:gem/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
+ # pkg:gem/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
@@ -3255,17 +3440,17 @@ class Kramdown::Utils::StringScanner < ::StringScanner
#
# Note: Just saving #pos won't be enough.
#
- # source://kramdown//lib/kramdown/utils/string_scanner.rb#51
+ # pkg:gem/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
+ # pkg:gem/kramdown#lib/kramdown/utils/string_scanner.rb:21
def start_line_number; end
end
# The kramdown version.
#
-# source://kramdown//lib/kramdown/version.rb#13
+# pkg:gem/kramdown#lib/kramdown/version.rb:13
Kramdown::VERSION = T.let(T.unsafe(nil), String)
diff --git a/sorbet/rbi/gems/language_server-protocol@3.17.0.5.rbi b/sorbet/rbi/gems/language_server-protocol@3.17.0.5.rbi
new file mode 100644
index 0000000..5f91e74
--- /dev/null
+++ b/sorbet/rbi/gems/language_server-protocol@3.17.0.5.rbi
@@ -0,0 +1,9 @@
+# typed: true
+
+# DO NOT EDIT MANUALLY
+# This is an autogenerated file for types exported from the `language_server-protocol` gem.
+# Please instead update this file by running `bin/tapioca gem language_server-protocol`.
+
+
+# THIS IS AN EMPTY RBI FILE.
+# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem
diff --git a/sorbet/rbi/gems/lint_roller@1.1.0.rbi b/sorbet/rbi/gems/lint_roller@1.1.0.rbi
new file mode 100644
index 0000000..b6e9bd4
--- /dev/null
+++ b/sorbet/rbi/gems/lint_roller@1.1.0.rbi
@@ -0,0 +1,189 @@
+# typed: true
+
+# DO NOT EDIT MANUALLY
+# This is an autogenerated file for types exported from the `lint_roller` gem.
+# Please instead update this file by running `bin/tapioca gem lint_roller`.
+
+
+# pkg:gem/lint_roller#lib/lint_roller/context.rb:1
+module LintRoller; end
+
+# pkg:gem/lint_roller#lib/lint_roller/about.rb:2
+class LintRoller::About < ::Struct
+ # pkg:gem/lint_roller#lib/lint_roller/about.rb:2
+ def description; end
+
+ # pkg:gem/lint_roller#lib/lint_roller/about.rb:2
+ def description=(_); end
+
+ # pkg:gem/lint_roller#lib/lint_roller/about.rb:2
+ def homepage; end
+
+ # pkg:gem/lint_roller#lib/lint_roller/about.rb:2
+ def homepage=(_); end
+
+ # pkg:gem/lint_roller#lib/lint_roller/about.rb:2
+ def name; end
+
+ # pkg:gem/lint_roller#lib/lint_roller/about.rb:2
+ def name=(_); end
+
+ # pkg:gem/lint_roller#lib/lint_roller/about.rb:2
+ def version; end
+
+ # pkg:gem/lint_roller#lib/lint_roller/about.rb:2
+ def version=(_); end
+
+ class << self
+ # pkg:gem/lint_roller#lib/lint_roller/about.rb:2
+ def [](*_arg0); end
+
+ # pkg:gem/lint_roller#lib/lint_roller/about.rb:2
+ def inspect; end
+
+ # pkg:gem/lint_roller#lib/lint_roller/about.rb:2
+ def keyword_init?; end
+
+ # pkg:gem/lint_roller#lib/lint_roller/about.rb:2
+ def members; end
+
+ # pkg:gem/lint_roller#lib/lint_roller/about.rb:2
+ def new(*_arg0); end
+ end
+end
+
+# pkg:gem/lint_roller#lib/lint_roller/context.rb:2
+class LintRoller::Context < ::Struct
+ # pkg:gem/lint_roller#lib/lint_roller/context.rb:2
+ def engine; end
+
+ # pkg:gem/lint_roller#lib/lint_roller/context.rb:2
+ def engine=(_); end
+
+ # pkg:gem/lint_roller#lib/lint_roller/context.rb:2
+ def engine_version; end
+
+ # pkg:gem/lint_roller#lib/lint_roller/context.rb:2
+ def engine_version=(_); end
+
+ # pkg:gem/lint_roller#lib/lint_roller/context.rb:2
+ def rule_format; end
+
+ # pkg:gem/lint_roller#lib/lint_roller/context.rb:2
+ def rule_format=(_); end
+
+ # pkg:gem/lint_roller#lib/lint_roller/context.rb:2
+ def runner; end
+
+ # pkg:gem/lint_roller#lib/lint_roller/context.rb:2
+ def runner=(_); end
+
+ # pkg:gem/lint_roller#lib/lint_roller/context.rb:2
+ def runner_version; end
+
+ # pkg:gem/lint_roller#lib/lint_roller/context.rb:2
+ def runner_version=(_); end
+
+ # pkg:gem/lint_roller#lib/lint_roller/context.rb:2
+ def target_ruby_version; end
+
+ # pkg:gem/lint_roller#lib/lint_roller/context.rb:2
+ def target_ruby_version=(_); end
+
+ class << self
+ # pkg:gem/lint_roller#lib/lint_roller/context.rb:2
+ def [](*_arg0); end
+
+ # pkg:gem/lint_roller#lib/lint_roller/context.rb:2
+ def inspect; end
+
+ # pkg:gem/lint_roller#lib/lint_roller/context.rb:2
+ def keyword_init?; end
+
+ # pkg:gem/lint_roller#lib/lint_roller/context.rb:2
+ def members; end
+
+ # pkg:gem/lint_roller#lib/lint_roller/context.rb:2
+ def new(*_arg0); end
+ end
+end
+
+# pkg:gem/lint_roller#lib/lint_roller/error.rb:2
+class LintRoller::Error < ::StandardError; end
+
+# pkg:gem/lint_roller#lib/lint_roller/plugin.rb:2
+class LintRoller::Plugin
+ # `config' is a Hash of options passed to the plugin by the user
+ #
+ # pkg:gem/lint_roller#lib/lint_roller/plugin.rb:4
+ def initialize(config = T.unsafe(nil)); end
+
+ # pkg:gem/lint_roller#lib/lint_roller/plugin.rb:8
+ def about; end
+
+ # `context' is an instance of LintRoller::Context provided by the runner
+ #
+ # pkg:gem/lint_roller#lib/lint_roller/plugin.rb:18
+ def rules(context); end
+
+ # `context' is an instance of LintRoller::Context provided by the runner
+ #
+ # pkg:gem/lint_roller#lib/lint_roller/plugin.rb:13
+ def supported?(context); end
+end
+
+# pkg:gem/lint_roller#lib/lint_roller/rules.rb:2
+class LintRoller::Rules < ::Struct
+ # pkg:gem/lint_roller#lib/lint_roller/rules.rb:2
+ def config_format; end
+
+ # pkg:gem/lint_roller#lib/lint_roller/rules.rb:2
+ def config_format=(_); end
+
+ # pkg:gem/lint_roller#lib/lint_roller/rules.rb:2
+ def error; end
+
+ # pkg:gem/lint_roller#lib/lint_roller/rules.rb:2
+ def error=(_); end
+
+ # pkg:gem/lint_roller#lib/lint_roller/rules.rb:2
+ def type; end
+
+ # pkg:gem/lint_roller#lib/lint_roller/rules.rb:2
+ def type=(_); end
+
+ # pkg:gem/lint_roller#lib/lint_roller/rules.rb:2
+ def value; end
+
+ # pkg:gem/lint_roller#lib/lint_roller/rules.rb:2
+ def value=(_); end
+
+ class << self
+ # pkg:gem/lint_roller#lib/lint_roller/rules.rb:2
+ def [](*_arg0); end
+
+ # pkg:gem/lint_roller#lib/lint_roller/rules.rb:2
+ def inspect; end
+
+ # pkg:gem/lint_roller#lib/lint_roller/rules.rb:2
+ def keyword_init?; end
+
+ # pkg:gem/lint_roller#lib/lint_roller/rules.rb:2
+ def members; end
+
+ # pkg:gem/lint_roller#lib/lint_roller/rules.rb:2
+ def new(*_arg0); end
+ end
+end
+
+# pkg:gem/lint_roller#lib/lint_roller/support/merges_upstream_metadata.rb:2
+module LintRoller::Support; end
+
+# pkg:gem/lint_roller#lib/lint_roller/support/merges_upstream_metadata.rb:3
+class LintRoller::Support::MergesUpstreamMetadata
+ # pkg:gem/lint_roller#lib/lint_roller/support/merges_upstream_metadata.rb:4
+ def merge(plugin_yaml, upstream_yaml); end
+end
+
+# pkg:gem/lint_roller#lib/lint_roller/version.rb:2
+LintRoller::VERSION = T.let(T.unsafe(nil), String)
diff --git a/sorbet/rbi/gems/listen@3.10.0.rbi b/sorbet/rbi/gems/listen@3.10.0.rbi
new file mode 100644
index 0000000..6a5af05
--- /dev/null
+++ b/sorbet/rbi/gems/listen@3.10.0.rbi
@@ -0,0 +1,9 @@
+# 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`.
+
+
+# THIS IS AN EMPTY RBI FILE.
+# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem
diff --git a/sorbet/rbi/gems/listen@3.8.0.rbi b/sorbet/rbi/gems/listen@3.8.0.rbi
deleted file mode 100644
index f3a5ae0..0000000
--- a/sorbet/rbi/gems/listen@3.8.0.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.3/forwardable.rb#231
- def start(*args, **_arg1, &block); end
-
- # source://forwardable/1.3.3/forwardable.rb#231
- 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.3/forwardable.rb#231
- def close(*args, **_arg1, &block); end
-
- # source://forwardable/1.3.3/forwardable.rb#231
- def empty?(*args, **_arg1, &block); end
-
- # source://forwardable/1.3.3/forwardable.rb#231
- 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/logger@1.7.0.rbi b/sorbet/rbi/gems/logger@1.7.0.rbi
new file mode 100644
index 0000000..b6268d3
--- /dev/null
+++ b/sorbet/rbi/gems/logger@1.7.0.rbi
@@ -0,0 +1,896 @@
+# typed: false
+
+# DO NOT EDIT MANUALLY
+# This is an autogenerated file for types exported from the `logger` gem.
+# Please instead update this file by running `bin/tapioca gem logger`.
+
+
+# \Class \Logger provides a simple but sophisticated logging utility that
+# you can use to create one or more
+# {event logs}[https://en.wikipedia.org/wiki/Logging_(software)#Event_logs]
+# for your program.
+# Each such log contains a chronological sequence of entries
+# that provides a record of the program's activities.
+#
+# == About the Examples
+#
+# All examples on this page assume that \Logger has been required:
+#
+# require 'logger'
+#
+# == Synopsis
+#
+# Create a log with Logger.new:
+#
+# # Single log file.
+# logger = Logger.new('t.log')
+# # Size-based rotated logging: 3 10-megabyte files.
+# logger = Logger.new('t.log', 3, 10485760)
+# # Period-based rotated logging: daily (also allowed: 'weekly', 'monthly').
+# logger = Logger.new('t.log', 'daily')
+# # Log to an IO stream.
+# logger = Logger.new($stdout)
+#
+# Add entries (level, message) with Logger#add:
+#
+# logger.add(Logger::DEBUG, 'Maximal debugging info')
+# logger.add(Logger::INFO, 'Non-error information')
+# logger.add(Logger::WARN, 'Non-error warning')
+# logger.add(Logger::ERROR, 'Non-fatal error')
+# logger.add(Logger::FATAL, 'Fatal error')
+# logger.add(Logger::UNKNOWN, 'Most severe')
+#
+# Close the log with Logger#close:
+#
+# logger.close
+#
+# == Entries
+#
+# You can add entries with method Logger#add:
+#
+# logger.add(Logger::DEBUG, 'Maximal debugging info')
+# logger.add(Logger::INFO, 'Non-error information')
+# logger.add(Logger::WARN, 'Non-error warning')
+# logger.add(Logger::ERROR, 'Non-fatal error')
+# logger.add(Logger::FATAL, 'Fatal error')
+# logger.add(Logger::UNKNOWN, 'Most severe')
+#
+# These shorthand methods also add entries:
+#
+# logger.debug('Maximal debugging info')
+# logger.info('Non-error information')
+# logger.warn('Non-error warning')
+# logger.error('Non-fatal error')
+# logger.fatal('Fatal error')
+# logger.unknown('Most severe')
+#
+# When you call any of these methods,
+# the entry may or may not be written to the log,
+# depending on the entry's severity and on the log level;
+# see {Log Level}[rdoc-ref:Logger@Log+Level]
+#
+# An entry always has:
+#
+# - A severity (the required argument to #add).
+# - An automatically created timestamp.
+#
+# And may also have:
+#
+# - A message.
+# - A program name.
+#
+# Example:
+#
+# logger = Logger.new($stdout)
+# logger.add(Logger::INFO, 'My message.', 'mung')
+# # => I, [2022-05-07T17:21:46.536234 #20536] INFO -- mung: My message.
+#
+# The default format for an entry is:
+#
+# "%s, [%s #%d] %5s -- %s: %s\n"
+#
+# where the values to be formatted are:
+#
+# - \Severity (one letter).
+# - Timestamp.
+# - Process id.
+# - \Severity (word).
+# - Program name.
+# - Message.
+#
+# You can use a different entry format by:
+#
+# - Setting a custom format proc (affects following entries);
+# see {formatter=}[Logger.html#attribute-i-formatter].
+# - Calling any of the methods above with a block
+# (affects only the one entry).
+# Doing so can have two benefits:
+#
+# - Context: the block can evaluate the entire program context
+# and create a context-dependent message.
+# - Performance: the block is not evaluated unless the log level
+# permits the entry actually to be written:
+#
+# logger.error { my_slow_message_generator }
+#
+# Contrast this with the string form, where the string is
+# always evaluated, regardless of the log level:
+#
+# logger.error("#{my_slow_message_generator}")
+#
+# === \Severity
+#
+# The severity of a log entry has two effects:
+#
+# - Determines whether the entry is selected for inclusion in the log;
+# see {Log Level}[rdoc-ref:Logger@Log+Level].
+# - Indicates to any log reader (whether a person or a program)
+# the relative importance of the entry.
+#
+# === Timestamp
+#
+# The timestamp for a log entry is generated automatically
+# when the entry is created.
+#
+# The logged timestamp is formatted by method
+# {Time#strftime}[https://docs.ruby-lang.org/en/master/Time.html#method-i-strftime]
+# using this format string:
+#
+# '%Y-%m-%dT%H:%M:%S.%6N'
+#
+# Example:
+#
+# logger = Logger.new($stdout)
+# logger.add(Logger::INFO)
+# # => I, [2022-05-07T17:04:32.318331 #20536] INFO -- : nil
+#
+# You can set a different format using method #datetime_format=.
+#
+# === Message
+#
+# The message is an optional argument to an entry method:
+#
+# logger = Logger.new($stdout)
+# logger.add(Logger::INFO, 'My message')
+# # => I, [2022-05-07T18:15:37.647581 #20536] INFO -- : My message
+#
+# For the default entry formatter, Logger::Formatter,
+# the message object may be:
+#
+# - A string: used as-is.
+# - An Exception: message.message is used.
+# - Anything else: message.inspect is used.
+#
+# *Note*: Logger::Formatter does not escape or sanitize
+# the message passed to it.
+# Developers should be aware that malicious data (user input)
+# may be in the message, and should explicitly escape untrusted data.
+#
+# You can use a custom formatter to escape message data;
+# see the example at {formatter=}[Logger.html#attribute-i-formatter].
+#
+# === Program Name
+#
+# The program name is an optional argument to an entry method:
+#
+# logger = Logger.new($stdout)
+# logger.add(Logger::INFO, 'My message', 'mung')
+# # => I, [2022-05-07T18:17:38.084716 #20536] INFO -- mung: My message
+#
+# The default program name for a new logger may be set in the call to
+# Logger.new via optional keyword argument +progname+:
+#
+# logger = Logger.new('t.log', progname: 'mung')
+#
+# The default program name for an existing logger may be set
+# by a call to method #progname=:
+#
+# logger.progname = 'mung'
+#
+# The current program name may be retrieved with method
+# {progname}[Logger.html#attribute-i-progname]:
+#
+# logger.progname # => "mung"
+#
+# == Log Level
+#
+# The log level setting determines whether an entry is actually
+# written to the log, based on the entry's severity.
+#
+# These are the defined severities (least severe to most severe):
+#
+# logger = Logger.new($stdout)
+# logger.add(Logger::DEBUG, 'Maximal debugging info')
+# # => D, [2022-05-07T17:57:41.776220 #20536] DEBUG -- : Maximal debugging info
+# logger.add(Logger::INFO, 'Non-error information')
+# # => I, [2022-05-07T17:59:14.349167 #20536] INFO -- : Non-error information
+# logger.add(Logger::WARN, 'Non-error warning')
+# # => W, [2022-05-07T18:00:45.337538 #20536] WARN -- : Non-error warning
+# logger.add(Logger::ERROR, 'Non-fatal error')
+# # => E, [2022-05-07T18:02:41.592912 #20536] ERROR -- : Non-fatal error
+# logger.add(Logger::FATAL, 'Fatal error')
+# # => F, [2022-05-07T18:05:24.703931 #20536] FATAL -- : Fatal error
+# logger.add(Logger::UNKNOWN, 'Most severe')
+# # => A, [2022-05-07T18:07:54.657491 #20536] ANY -- : Most severe
+#
+# The default initial level setting is Logger::DEBUG, the lowest level,
+# which means that all entries are to be written, regardless of severity:
+#
+# logger = Logger.new($stdout)
+# logger.level # => 0
+# logger.add(0, "My message")
+# # => D, [2022-05-11T15:10:59.773668 #20536] DEBUG -- : My message
+#
+# You can specify a different setting in a new logger
+# using keyword argument +level+ with an appropriate value:
+#
+# logger = Logger.new($stdout, level: Logger::ERROR)
+# logger = Logger.new($stdout, level: 'error')
+# logger = Logger.new($stdout, level: :error)
+# logger.level # => 3
+#
+# With this level, entries with severity Logger::ERROR and higher
+# are written, while those with lower severities are not written:
+#
+# logger = Logger.new($stdout, level: Logger::ERROR)
+# logger.add(3)
+# # => E, [2022-05-11T15:17:20.933362 #20536] ERROR -- : nil
+# logger.add(2) # Silent.
+#
+# You can set the log level for an existing logger
+# with method #level=:
+#
+# logger.level = Logger::ERROR
+#
+# These shorthand methods also set the level:
+#
+# logger.debug! # => 0
+# logger.info! # => 1
+# logger.warn! # => 2
+# logger.error! # => 3
+# logger.fatal! # => 4
+#
+# You can retrieve the log level with method #level.
+#
+# logger.level = Logger::ERROR
+# logger.level # => 3
+#
+# These methods return whether a given
+# level is to be written:
+#
+# logger.level = Logger::ERROR
+# logger.debug? # => false
+# logger.info? # => false
+# logger.warn? # => false
+# logger.error? # => true
+# logger.fatal? # => true
+#
+# == Log File Rotation
+#
+# By default, a log file is a single file that grows indefinitely
+# (until explicitly closed); there is no file rotation.
+#
+# To keep log files to a manageable size,
+# you can use _log_ _file_ _rotation_, which uses multiple log files:
+#
+# - Each log file has entries for a non-overlapping
+# time interval.
+# - Only the most recent log file is open and active;
+# the others are closed and inactive.
+#
+# === Size-Based Rotation
+#
+# For size-based log file rotation, call Logger.new with:
+#
+# - Argument +logdev+ as a file path.
+# - Argument +shift_age+ with a positive integer:
+# the number of log files to be in the rotation.
+# - Argument +shift_size+ as a positive integer:
+# the maximum size (in bytes) of each log file;
+# defaults to 1048576 (1 megabyte).
+#
+# Examples:
+#
+# logger = Logger.new('t.log', 3) # Three 1-megabyte files.
+# logger = Logger.new('t.log', 5, 10485760) # Five 10-megabyte files.
+#
+# For these examples, suppose:
+#
+# logger = Logger.new('t.log', 3)
+#
+# Logging begins in the new log file, +t.log+;
+# the log file is "full" and ready for rotation
+# when a new entry would cause its size to exceed +shift_size+.
+#
+# The first time +t.log+ is full:
+#
+# - +t.log+ is closed and renamed to +t.log.0+.
+# - A new file +t.log+ is opened.
+#
+# The second time +t.log+ is full:
+#
+# - +t.log.0 is renamed as +t.log.1+.
+# - +t.log+ is closed and renamed to +t.log.0+.
+# - A new file +t.log+ is opened.
+#
+# Each subsequent time that +t.log+ is full,
+# the log files are rotated:
+#
+# - +t.log.1+ is removed.
+# - +t.log.0 is renamed as +t.log.1+.
+# - +t.log+ is closed and renamed to +t.log.0+.
+# - A new file +t.log+ is opened.
+#
+# === Periodic Rotation
+#
+# For periodic rotation, call Logger.new with:
+#
+# - Argument +logdev+ as a file path.
+# - Argument +shift_age+ as a string period indicator.
+#
+# Examples:
+#
+# logger = Logger.new('t.log', 'daily') # Rotate log files daily.
+# logger = Logger.new('t.log', 'weekly') # Rotate log files weekly.
+# logger = Logger.new('t.log', 'monthly') # Rotate log files monthly.
+#
+# Example:
+#
+# logger = Logger.new('t.log', 'daily')
+#
+# When the given period expires:
+#
+# - The base log file, +t.log+ is closed and renamed
+# with a date-based suffix such as +t.log.20220509+.
+# - A new log file +t.log+ is opened.
+# - Nothing is removed.
+#
+# The default format for the suffix is '%Y%m%d',
+# which produces a suffix similar to the one above.
+# You can set a different format using create-time option
+# +shift_period_suffix+;
+# see details and suggestions at
+# {Time#strftime}[https://docs.ruby-lang.org/en/master/Time.html#method-i-strftime].
+#
+# pkg:gem/logger#lib/logger/version.rb:3
+class Logger
+ include ::Logger::Severity
+
+ # :call-seq:
+ # Logger.new(logdev, shift_age = 0, shift_size = 1048576, **options)
+ #
+ # With the single argument +logdev+,
+ # returns a new logger with all default options:
+ #
+ # Logger.new('t.log') # => #
+ #
+ # Argument +logdev+ must be one of:
+ #
+ # - A string filepath: entries are to be written
+ # to the file at that path; if the file at that path exists,
+ # new entries are appended.
+ # - An IO stream (typically $stdout, $stderr. or
+ # an open file): entries are to be written to the given stream.
+ # - +nil+ or +File::NULL+: no entries are to be written.
+ #
+ # Argument +shift_age+ must be one of:
+ #
+ # - The number of log files to be in the rotation.
+ # See {Size-Based Rotation}[rdoc-ref:Logger@Size-Based+Rotation].
+ # - A string period indicator.
+ # See {Periodic Rotation}[rdoc-ref:Logger@Periodic+Rotation].
+ #
+ # Argument +shift_size+ is the maximum size (in bytes) of each log file.
+ # See {Size-Based Rotation}[rdoc-ref:Logger@Size-Based+Rotation].
+ #
+ # Examples:
+ #
+ # Logger.new('t.log')
+ # Logger.new($stdout)
+ #
+ # The keyword options are:
+ #
+ # - +level+: sets the log level; default value is Logger::DEBUG.
+ # See {Log Level}[rdoc-ref:Logger@Log+Level]:
+ #
+ # Logger.new('t.log', level: Logger::ERROR)
+ #
+ # - +progname+: sets the default program name; default is +nil+.
+ # See {Program Name}[rdoc-ref:Logger@Program+Name]:
+ #
+ # Logger.new('t.log', progname: 'mung')
+ #
+ # - +formatter+: sets the entry formatter; default is +nil+.
+ # See {formatter=}[Logger.html#attribute-i-formatter].
+ #
+ # - +datetime_format+: sets the format for entry timestamp;
+ # default is +nil+.
+ # See #datetime_format=.
+ #
+ # - +binmode+: sets whether the logger writes in binary mode;
+ # default is +false+.
+ #
+ # - +shift_period_suffix+: sets the format for the filename suffix
+ # for periodic log file rotation; default is '%Y%m%d'.
+ # See {Periodic Rotation}[rdoc-ref:Logger@Periodic+Rotation].
+ #
+ # - +reraise_write_errors+: An array of exception classes, which will
+ # be reraised if there is an error when writing to the log device.
+ # The default is to swallow all exceptions raised.
+ # - +skip_header+: If +true+, prevents the logger from writing a header
+ # when creating a new log file. The default is +false+, meaning
+ # the header will be written as usual.
+ #
+ # pkg:gem/logger#lib/logger.rb:598
+ def initialize(logdev, shift_age = T.unsafe(nil), shift_size = T.unsafe(nil), level: T.unsafe(nil), progname: T.unsafe(nil), formatter: T.unsafe(nil), datetime_format: T.unsafe(nil), binmode: T.unsafe(nil), shift_period_suffix: T.unsafe(nil), reraise_write_errors: T.unsafe(nil), skip_header: T.unsafe(nil)); end
+
+ # Writes the given +msg+ to the log with no formatting;
+ # returns the number of characters written,
+ # or +nil+ if no log device exists:
+ #
+ # logger = Logger.new($stdout)
+ # logger << 'My message.' # => 10
+ #
+ # Output:
+ #
+ # My message.
+ #
+ # pkg:gem/logger#lib/logger.rb:708
+ def <<(msg); end
+
+ # Creates a log entry, which may or may not be written to the log,
+ # depending on the entry's severity and on the log level.
+ # See {Log Level}[rdoc-ref:Logger@Log+Level]
+ # and {Entries}[rdoc-ref:Logger@Entries] for details.
+ #
+ # Examples:
+ #
+ # logger = Logger.new($stdout, progname: 'mung')
+ # logger.add(Logger::INFO)
+ # logger.add(Logger::ERROR, 'No good')
+ # logger.add(Logger::ERROR, 'No good', 'gnum')
+ #
+ # Output:
+ #
+ # I, [2022-05-12T16:25:31.469726 #36328] INFO -- mung: mung
+ # E, [2022-05-12T16:25:55.349414 #36328] ERROR -- mung: No good
+ # E, [2022-05-12T16:26:35.841134 #36328] ERROR -- gnum: No good
+ #
+ # These convenience methods have implicit severity:
+ #
+ # - #debug.
+ # - #info.
+ # - #warn.
+ # - #error.
+ # - #fatal.
+ # - #unknown.
+ #
+ # pkg:gem/logger#lib/logger.rb:675
+ def add(severity, message = T.unsafe(nil), progname = T.unsafe(nil)); end
+
+ # Closes the logger; returns +nil+:
+ #
+ # logger = Logger.new('t.log')
+ # logger.close # => nil
+ # logger.info('foo') # Prints "log writing failed. closed stream"
+ #
+ # Related: Logger#reopen.
+ #
+ # pkg:gem/logger#lib/logger.rb:755
+ def close; end
+
+ # Returns the date-time format; see #datetime_format=.
+ #
+ # pkg:gem/logger#lib/logger.rb:438
+ def datetime_format; end
+
+ # Sets the date-time format.
+ #
+ # Argument +datetime_format+ should be either of these:
+ #
+ # - A string suitable for use as a format for method
+ # {Time#strftime}[https://docs.ruby-lang.org/en/master/Time.html#method-i-strftime].
+ # - +nil+: the logger uses '%Y-%m-%dT%H:%M:%S.%6N'.
+ #
+ # pkg:gem/logger#lib/logger.rb:432
+ def datetime_format=(datetime_format); end
+
+ # Equivalent to calling #add with severity Logger::DEBUG.
+ #
+ # pkg:gem/logger#lib/logger.rb:714
+ def debug(progname = T.unsafe(nil), &block); end
+
+ # Sets the log level to Logger::DEBUG.
+ # See {Log Level}[rdoc-ref:Logger@Log+Level].
+ #
+ # pkg:gem/logger#lib/logger.rb:487
+ def debug!; end
+
+ # Returns +true+ if the log level allows entries with severity
+ # Logger::DEBUG to be written, +false+ otherwise.
+ # See {Log Level}[rdoc-ref:Logger@Log+Level].
+ #
+ # pkg:gem/logger#lib/logger.rb:482
+ def debug?; end
+
+ # Equivalent to calling #add with severity Logger::ERROR.
+ #
+ # pkg:gem/logger#lib/logger.rb:732
+ def error(progname = T.unsafe(nil), &block); end
+
+ # Sets the log level to Logger::ERROR.
+ # See {Log Level}[rdoc-ref:Logger@Log+Level].
+ #
+ # pkg:gem/logger#lib/logger.rb:520
+ def error!; end
+
+ # Returns +true+ if the log level allows entries with severity
+ # Logger::ERROR to be written, +false+ otherwise.
+ # See {Log Level}[rdoc-ref:Logger@Log+Level].
+ #
+ # pkg:gem/logger#lib/logger.rb:515
+ def error?; end
+
+ # Equivalent to calling #add with severity Logger::FATAL.
+ #
+ # pkg:gem/logger#lib/logger.rb:738
+ def fatal(progname = T.unsafe(nil), &block); end
+
+ # Sets the log level to Logger::FATAL.
+ # See {Log Level}[rdoc-ref:Logger@Log+Level].
+ #
+ # pkg:gem/logger#lib/logger.rb:531
+ def fatal!; end
+
+ # Returns +true+ if the log level allows entries with severity
+ # Logger::FATAL to be written, +false+ otherwise.
+ # See {Log Level}[rdoc-ref:Logger@Log+Level].
+ #
+ # pkg:gem/logger#lib/logger.rb:526
+ def fatal?; end
+
+ # Sets or retrieves the logger entry formatter proc.
+ #
+ # When +formatter+ is +nil+, the logger uses Logger::Formatter.
+ #
+ # When +formatter+ is a proc, a new entry is formatted by the proc,
+ # which is called with four arguments:
+ #
+ # - +severity+: The severity of the entry.
+ # - +time+: A Time object representing the entry's timestamp.
+ # - +progname+: The program name for the entry.
+ # - +msg+: The message for the entry (string or string-convertible object).
+ #
+ # The proc should return a string containing the formatted entry.
+ #
+ # This custom formatter uses
+ # {String#dump}[https://docs.ruby-lang.org/en/master/String.html#method-i-dump]
+ # to escape the message string:
+ #
+ # logger = Logger.new($stdout, progname: 'mung')
+ # original_formatter = logger.formatter || Logger::Formatter.new
+ # logger.formatter = proc { |severity, time, progname, msg|
+ # original_formatter.call(severity, time, progname, msg.dump)
+ # }
+ # logger.add(Logger::INFO, "hello \n ''")
+ # logger.add(Logger::INFO, "\f\x00\xff\\\"")
+ #
+ # Output:
+ #
+ # I, [2022-05-13T13:16:29.637488 #8492] INFO -- mung: "hello \n ''"
+ # I, [2022-05-13T13:16:29.637610 #8492] INFO -- mung: "\f\x00\xFF\\\""
+ #
+ # pkg:gem/logger#lib/logger.rb:473
+ def formatter; end
+
+ # Sets or retrieves the logger entry formatter proc.
+ #
+ # When +formatter+ is +nil+, the logger uses Logger::Formatter.
+ #
+ # When +formatter+ is a proc, a new entry is formatted by the proc,
+ # which is called with four arguments:
+ #
+ # - +severity+: The severity of the entry.
+ # - +time+: A Time object representing the entry's timestamp.
+ # - +progname+: The program name for the entry.
+ # - +msg+: The message for the entry (string or string-convertible object).
+ #
+ # The proc should return a string containing the formatted entry.
+ #
+ # This custom formatter uses
+ # {String#dump}[https://docs.ruby-lang.org/en/master/String.html#method-i-dump]
+ # to escape the message string:
+ #
+ # logger = Logger.new($stdout, progname: 'mung')
+ # original_formatter = logger.formatter || Logger::Formatter.new
+ # logger.formatter = proc { |severity, time, progname, msg|
+ # original_formatter.call(severity, time, progname, msg.dump)
+ # }
+ # logger.add(Logger::INFO, "hello \n ''")
+ # logger.add(Logger::INFO, "\f\x00\xff\\\"")
+ #
+ # Output:
+ #
+ # I, [2022-05-13T13:16:29.637488 #8492] INFO -- mung: "hello \n ''"
+ # I, [2022-05-13T13:16:29.637610 #8492] INFO -- mung: "\f\x00\xFF\\\""
+ #
+ # pkg:gem/logger#lib/logger.rb:473
+ def formatter=(_arg0); end
+
+ # Equivalent to calling #add with severity Logger::INFO.
+ #
+ # pkg:gem/logger#lib/logger.rb:720
+ def info(progname = T.unsafe(nil), &block); end
+
+ # Sets the log level to Logger::INFO.
+ # See {Log Level}[rdoc-ref:Logger@Log+Level].
+ #
+ # pkg:gem/logger#lib/logger.rb:498
+ def info!; end
+
+ # Returns +true+ if the log level allows entries with severity
+ # Logger::INFO to be written, +false+ otherwise.
+ # See {Log Level}[rdoc-ref:Logger@Log+Level].
+ #
+ # pkg:gem/logger#lib/logger.rb:493
+ def info?; end
+
+ # Logging severity threshold (e.g. Logger::INFO).
+ #
+ # pkg:gem/logger#lib/logger.rb:383
+ def level; end
+
+ # Sets the log level; returns +severity+.
+ # See {Log Level}[rdoc-ref:Logger@Log+Level].
+ #
+ # Argument +severity+ may be an integer, a string, or a symbol:
+ #
+ # logger.level = Logger::ERROR # => 3
+ # logger.level = 3 # => 3
+ # logger.level = 'error' # => "error"
+ # logger.level = :error # => :error
+ #
+ # Logger#sev_threshold= is an alias for Logger#level=.
+ #
+ # pkg:gem/logger#lib/logger.rb:399
+ def level=(severity); end
+
+ # pkg:gem/logger#lib/logger.rb:695
+ def log(severity, message = T.unsafe(nil), progname = T.unsafe(nil)); end
+
+ # Program name to include in log messages.
+ #
+ # pkg:gem/logger#lib/logger.rb:422
+ def progname; end
+
+ # Program name to include in log messages.
+ #
+ # pkg:gem/logger#lib/logger.rb:422
+ def progname=(_arg0); end
+
+ # Sets the logger's output stream:
+ #
+ # - If +logdev+ is +nil+, reopens the current output stream.
+ # - If +logdev+ is a filepath, opens the indicated file for append.
+ # - If +logdev+ is an IO stream
+ # (usually $stdout, $stderr, or an open File object),
+ # opens the stream for append.
+ #
+ # Example:
+ #
+ # logger = Logger.new('t.log')
+ # logger.add(Logger::ERROR, 'one')
+ # logger.close
+ # logger.add(Logger::ERROR, 'two') # Prints 'log writing failed. closed stream'
+ # logger.reopen
+ # logger.add(Logger::ERROR, 'three')
+ # logger.close
+ # File.readlines('t.log')
+ # # =>
+ # # ["# Logfile created on 2022-05-12 14:21:19 -0500 by logger.rb/v1.5.0\n",
+ # # "E, [2022-05-12T14:21:27.596726 #22428] ERROR -- : one\n",
+ # # "E, [2022-05-12T14:23:05.847241 #22428] ERROR -- : three\n"]
+ #
+ # pkg:gem/logger#lib/logger.rb:642
+ def reopen(logdev = T.unsafe(nil), shift_age = T.unsafe(nil), shift_size = T.unsafe(nil), shift_period_suffix: T.unsafe(nil), binmode: T.unsafe(nil)); end
+
+ # pkg:gem/logger#lib/logger.rb:475
+ def sev_threshold; end
+
+ # pkg:gem/logger#lib/logger.rb:476
+ def sev_threshold=(severity); end
+
+ # Equivalent to calling #add with severity Logger::UNKNOWN.
+ #
+ # pkg:gem/logger#lib/logger.rb:744
+ def unknown(progname = T.unsafe(nil), &block); end
+
+ # Equivalent to calling #add with severity Logger::WARN.
+ #
+ # pkg:gem/logger#lib/logger.rb:726
+ def warn(progname = T.unsafe(nil), &block); end
+
+ # Sets the log level to Logger::WARN.
+ # See {Log Level}[rdoc-ref:Logger@Log+Level].
+ #
+ # pkg:gem/logger#lib/logger.rb:509
+ def warn!; end
+
+ # Returns +true+ if the log level allows entries with severity
+ # Logger::WARN to be written, +false+ otherwise.
+ # See {Log Level}[rdoc-ref:Logger@Log+Level].
+ #
+ # pkg:gem/logger#lib/logger.rb:504
+ def warn?; end
+
+ # Adjust the log level during the block execution for the current Fiber only
+ #
+ # logger.with_level(:debug) do
+ # logger.debug { "Hello" }
+ # end
+ #
+ # pkg:gem/logger#lib/logger.rb:408
+ def with_level(severity); end
+
+ private
+
+ # pkg:gem/logger#lib/logger.rb:786
+ def format_message(severity, datetime, progname, msg); end
+
+ # pkg:gem/logger#lib/logger.rb:764
+ def format_severity(severity); end
+
+ # pkg:gem/logger#lib/logger.rb:782
+ def level_key; end
+
+ # Guarantee the existence of this ivar even when subclasses don't call the superclass constructor.
+ #
+ # pkg:gem/logger#lib/logger.rb:769
+ def level_override; end
+end
+
+# Default formatter for log messages.
+#
+# pkg:gem/logger#lib/logger/formatter.rb:5
+class Logger::Formatter
+ # pkg:gem/logger#lib/logger/formatter.rb:11
+ def initialize; end
+
+ # pkg:gem/logger#lib/logger/formatter.rb:15
+ def call(severity, time, progname, msg); end
+
+ # pkg:gem/logger#lib/logger/formatter.rb:9
+ def datetime_format; end
+
+ # pkg:gem/logger#lib/logger/formatter.rb:9
+ def datetime_format=(_arg0); end
+
+ private
+
+ # pkg:gem/logger#lib/logger/formatter.rb:21
+ def format_datetime(time); end
+
+ # pkg:gem/logger#lib/logger/formatter.rb:25
+ def msg2str(msg); end
+end
+
+# pkg:gem/logger#lib/logger/formatter.rb:7
+Logger::Formatter::DatetimeFormat = T.let(T.unsafe(nil), String)
+
+# pkg:gem/logger#lib/logger/formatter.rb:6
+Logger::Formatter::Format = T.let(T.unsafe(nil), String)
+
+# Device used for logging messages.
+#
+# pkg:gem/logger#lib/logger/log_device.rb:7
+class Logger::LogDevice
+ include ::Logger::Period
+ include ::MonitorMixin
+
+ # pkg:gem/logger#lib/logger/log_device.rb:14
+ def initialize(log = T.unsafe(nil), shift_age: T.unsafe(nil), shift_size: T.unsafe(nil), shift_period_suffix: T.unsafe(nil), binmode: T.unsafe(nil), reraise_write_errors: T.unsafe(nil), skip_header: T.unsafe(nil)); end
+
+ # pkg:gem/logger#lib/logger/log_device.rb:38
+ def close; end
+
+ # pkg:gem/logger#lib/logger/log_device.rb:10
+ def dev; end
+
+ # pkg:gem/logger#lib/logger/log_device.rb:11
+ def filename; end
+
+ # pkg:gem/logger#lib/logger/log_device.rb:48
+ def reopen(log = T.unsafe(nil), shift_age: T.unsafe(nil), shift_size: T.unsafe(nil), shift_period_suffix: T.unsafe(nil), binmode: T.unsafe(nil)); end
+
+ # pkg:gem/logger#lib/logger/log_device.rb:27
+ def write(message); end
+
+ private
+
+ # pkg:gem/logger#lib/logger/log_device.rb:156
+ def add_log_header(file); end
+
+ # pkg:gem/logger#lib/logger/log_device.rb:162
+ def check_shift_log; end
+
+ # pkg:gem/logger#lib/logger/log_device.rb:132
+ def create_logfile(filename); end
+
+ # pkg:gem/logger#lib/logger/log_device.rb:104
+ def fixup_mode(dev); end
+
+ # pkg:gem/logger#lib/logger/log_device.rb:148
+ def handle_write_errors(mesg); end
+
+ # pkg:gem/logger#lib/logger/log_device.rb:177
+ def lock_shift_log; end
+
+ # pkg:gem/logger#lib/logger/log_device.rb:119
+ def open_logfile(filename); end
+
+ # pkg:gem/logger#lib/logger/log_device.rb:78
+ def set_dev(log); end
+
+ # pkg:gem/logger#lib/logger/log_device.rb:92
+ def set_file(shift_age, shift_size, shift_period_suffix); end
+
+ # pkg:gem/logger#lib/logger/log_device.rb:207
+ def shift_log_age; end
+
+ # pkg:gem/logger#lib/logger/log_device.rb:232
+ def shift_log_file(shifted); end
+
+ # pkg:gem/logger#lib/logger/log_device.rb:216
+ def shift_log_period(period_end); end
+end
+
+# :stopdoc:
+#
+# pkg:gem/logger#lib/logger/log_device.rb:69
+Logger::LogDevice::MODE = T.let(T.unsafe(nil), Integer)
+
+# pkg:gem/logger#lib/logger/log_device.rb:76
+Logger::LogDevice::MODE_TO_CREATE = T.let(T.unsafe(nil), Integer)
+
+# pkg:gem/logger#lib/logger/log_device.rb:72
+Logger::LogDevice::MODE_TO_OPEN = T.let(T.unsafe(nil), Integer)
+
+# pkg:gem/logger#lib/logger/period.rb:4
+module Logger::Period
+ private
+
+ # pkg:gem/logger#lib/logger/period.rb:9
+ def next_rotate_time(now, shift_age); end
+
+ # pkg:gem/logger#lib/logger/period.rb:31
+ def previous_period_end(now, shift_age); end
+
+ class << self
+ # pkg:gem/logger#lib/logger/period.rb:9
+ def next_rotate_time(now, shift_age); end
+
+ # pkg:gem/logger#lib/logger/period.rb:31
+ def previous_period_end(now, shift_age); end
+ end
+end
+
+# pkg:gem/logger#lib/logger/period.rb:7
+Logger::Period::SiD = T.let(T.unsafe(nil), Integer)
+
+# \Severity label for logging (max 5 chars).
+#
+# pkg:gem/logger#lib/logger.rb:762
+Logger::SEV_LABEL = T.let(T.unsafe(nil), Array)
+
+# Logging severity.
+#
+# pkg:gem/logger#lib/logger/severity.rb:5
+module Logger::Severity
+ class << self
+ # pkg:gem/logger#lib/logger/severity.rb:29
+ def coerce(severity); end
+ end
+end
+
+# pkg:gem/logger#lib/logger/severity.rb:19
+Logger::Severity::LEVELS = T.let(T.unsafe(nil), Hash)
diff --git a/sorbet/rbi/gems/lumberjack@1.2.8.rbi b/sorbet/rbi/gems/lumberjack@1.4.2.rbi
similarity index 99%
rename from sorbet/rbi/gems/lumberjack@1.2.8.rbi
rename to sorbet/rbi/gems/lumberjack@1.4.2.rbi
index 40f3b31..1dd6771 100644
--- a/sorbet/rbi/gems/lumberjack@1.2.8.rbi
+++ b/sorbet/rbi/gems/lumberjack@1.4.2.rbi
@@ -4,5 +4,6 @@
# This is an autogenerated file for types exported from the `lumberjack` gem.
# Please instead update this file by running `bin/tapioca gem lumberjack`.
+
# THIS IS AN EMPTY RBI FILE.
# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem
diff --git a/sorbet/rbi/gems/method_source@1.0.0.rbi b/sorbet/rbi/gems/method_source@1.1.0.rbi
similarity index 52%
rename from sorbet/rbi/gems/method_source@1.0.0.rbi
rename to sorbet/rbi/gems/method_source@1.1.0.rbi
index 039ac9d..feaff62 100644
--- a/sorbet/rbi/gems/method_source@1.0.0.rbi
+++ b/sorbet/rbi/gems/method_source@1.1.0.rbi
@@ -4,183 +4,200 @@
# This is an autogenerated file for types exported from the `method_source` gem.
# Please instead update this file by running `bin/tapioca gem method_source`.
-# source://method_source//lib/method_source.rb#127
+
+# pkg:gem/method_source#lib/method_source.rb:163
class Method
include ::MethodSource::SourceLocation::MethodExtensions
include ::MethodSource::MethodExtensions
end
-# source://method_source//lib/method_source/version.rb#1
+# pkg:gem/method_source#lib/method_source/version.rb:1
module MethodSource
extend ::MethodSource::CodeHelpers
class << self
+ # Clear cache.
+ #
+ # pkg:gem/method_source#lib/method_source.rb:59
+ def clear_cache; end
+
# Helper method responsible for opening source file and buffering up
# the comments for a specified method. Defined here to avoid polluting
# `Method` class.
- #
- # @param source_location [Array] The array returned by Method#source_location
- # @param method_name [String]
- # @raise [SourceNotFoundError]
+ # @param [Array] source_location The array returned by Method#source_location
+ # @param [String] method_name
# @return [String] The comments up to the point of the method.
#
- # source://method_source//lib/method_source.rb#38
+ # pkg:gem/method_source#lib/method_source.rb:38
def comment_helper(source_location, name = T.unsafe(nil)); end
# @deprecated — use MethodSource::CodeHelpers#expression_at
#
- # source://method_source//lib/method_source.rb#66
+ # pkg:gem/method_source#lib/method_source.rb:71
def extract_code(source_location); end
# Load a memoized copy of the lines in a file.
#
- # @param file_name [String]
- # @param method_name [String]
+ # @param [String] file_name
+ # @param [String] method_name
+ # @return [Array] the contents of the file
# @raise [SourceNotFoundError]
- # @return [Array] the contents of the file
#
- # source://method_source//lib/method_source.rb#51
+ # pkg:gem/method_source#lib/method_source.rb:51
def lines_for(file_name, name = T.unsafe(nil)); end
# Helper method responsible for extracting method body.
# Defined here to avoid polluting `Method` class.
- #
- # @param source_location [Array] The array returned by Method#source_location
- # @param method_name [String]
+ # @param [Array] source_location The array returned by Method#source_location
+ # @param [String] method_name
# @return [String] The method body
#
- # source://method_source//lib/method_source.rb#23
+ # pkg:gem/method_source#lib/method_source.rb:23
def source_helper(source_location, name = T.unsafe(nil)); end
# @deprecated — use MethodSource::CodeHelpers#complete_expression?
- # @return [Boolean]
#
- # source://method_source//lib/method_source.rb#59
+ # pkg:gem/method_source#lib/method_source.rb:64
def valid_expression?(str); end
end
end
-# source://method_source//lib/method_source/code_helpers.rb#3
+# pkg:gem/method_source#lib/method_source/code_helpers.rb:3
module MethodSource::CodeHelpers
# Retrieve the comment describing the expression on the given line of the given file.
#
# This is useful to get module or method documentation.
#
- # @param file [Array, File, String] The file to parse, either as a File or as
- # a String or an Array of lines.
- # @param line_number [Integer] The line number at which to look.
- # NOTE: The first line in a file is line 1!
- # @return [String] The comment
+ # @param [Array, File, String] file The file to parse, either as a File or as
+ # a String or an Array of lines.
+ # @param [Integer] line_number The line number at which to look.
+ # NOTE: The first line in a file is line 1!
+ # @return [String] The comment
#
- # source://method_source//lib/method_source/code_helpers.rb#52
+ # pkg:gem/method_source#lib/method_source/code_helpers.rb:52
def comment_describing(file, line_number); end
# Determine if a string of code is a complete Ruby expression.
- #
+ # @param [String] code The code to validate.
+ # @return [Boolean] Whether or not the code is a complete Ruby expression.
+ # @raise [SyntaxError] Any SyntaxError that does not represent incompleteness.
# @example
# complete_expression?("class Hello") #=> false
# complete_expression?("class Hello; end") #=> true
# complete_expression?("class 123") #=> SyntaxError: unexpected tINTEGER
- # @param code [String] The code to validate.
- # @raise [SyntaxError] Any SyntaxError that does not represent incompleteness.
- # @return [Boolean] Whether or not the code is a complete Ruby expression.
#
- # source://method_source//lib/method_source/code_helpers.rb#66
+ # pkg:gem/method_source#lib/method_source/code_helpers.rb:66
def complete_expression?(str); end
# Retrieve the first expression starting on the given line of the given file.
#
# This is useful to get module or method source code.
#
+ # @param [Array, File, String] file The file to parse, either as a File or as
+ # @param [Integer] line_number The line number at which to look.
+ # NOTE: The first line in a file is
# line 1!
+ # @param [Hash] options The optional configuration parameters.
+ # @option options [Boolean] :strict If set to true, then only completely
+ # valid expressions are returned. Otherwise heuristics are used to extract
+ # expressions that may have been valid inside an eval.
+ # @option options [Integer] :consume A number of lines to automatically
+ # consume (add to the expression buffer) without checking for validity.
+ # @return [String] The first complete expression
+ # @raise [SyntaxError] If the first complete expression can't be identified
#
- # @option options
- # @option options
- # @param file [Array, File, String] The file to parse, either as a File or as
- # @param line_number [Integer] The line number at which to look.
- # NOTE: The first line in a file is
- # @param options [Hash] The optional configuration parameters.
- # @raise [SyntaxError] If the first complete expression can't be identified
- # @return [String] The first complete expression
- #
- # source://method_source//lib/method_source/code_helpers.rb#20
+ # pkg:gem/method_source#lib/method_source/code_helpers.rb:20
def expression_at(file, line_number, options = T.unsafe(nil)); end
private
# Get the first expression from the input.
#
- # @param lines [Array]
- # @param consume [Integer] A number of lines to automatically
+ # @param [Array] lines
+ # @param [Integer] consume A number of lines to automatically
# consume (add to the expression buffer) without checking for validity.
- # @raise [SyntaxError]
- # @return [String] a valid ruby expression
# @yield a clean-up function to run before checking for complete_expression
+ # @return [String] a valid ruby expression
+ # @raise [SyntaxError]
#
- # source://method_source//lib/method_source/code_helpers.rb#92
+ # pkg:gem/method_source#lib/method_source/code_helpers.rb:92
def extract_first_expression(lines, consume = T.unsafe(nil), &block); end
# Get the last comment from the input.
#
- # @param lines [Array]
+ # @param [Array] lines
# @return [String]
#
- # source://method_source//lib/method_source/code_helpers.rb#106
+ # pkg:gem/method_source#lib/method_source/code_helpers.rb:106
def extract_last_comment(lines); end
end
# An exception matcher that matches only subsets of SyntaxErrors that can be
# fixed by adding more input to the buffer.
#
-# source://method_source//lib/method_source/code_helpers.rb#124
+# pkg:gem/method_source#lib/method_source/code_helpers.rb:124
module MethodSource::CodeHelpers::IncompleteExpression
class << self
- # source://method_source//lib/method_source/code_helpers.rb#137
+ # pkg:gem/method_source#lib/method_source/code_helpers.rb:137
def ===(ex); end
- # @return [Boolean]
- #
- # source://method_source//lib/method_source/code_helpers.rb#149
+ # pkg:gem/method_source#lib/method_source/code_helpers.rb:149
def rbx?; end
end
end
-# source://method_source//lib/method_source/code_helpers.rb#125
+# pkg:gem/method_source#lib/method_source/code_helpers.rb:125
MethodSource::CodeHelpers::IncompleteExpression::GENERIC_REGEXPS = T.let(T.unsafe(nil), Array)
-# source://method_source//lib/method_source/code_helpers.rb#133
+# pkg:gem/method_source#lib/method_source/code_helpers.rb:133
MethodSource::CodeHelpers::IncompleteExpression::RBX_ONLY_REGEXPS = T.let(T.unsafe(nil), Array)
# This module is to be included by `Method` and `UnboundMethod` and
# provides the `#source` functionality
#
-# source://method_source//lib/method_source.rb#72
+# pkg:gem/method_source#lib/method_source.rb:77
module MethodSource::MethodExtensions
- # Return the comments associated with the method as a string.
+ # Return the comments associated with the method class/module.
+ # @return [String] The method's comments as a string
+ # @raise SourceNotFoundException
#
# @example
- # Set.instance_method(:clear).comment.display
- # =>
- # # Removes all elements and returns self.
- # @raise SourceNotFoundException
+ # MethodSource::MethodExtensions.method(:included).module_comment
+ # =>
+ # # This module is to be included by `Method` and `UnboundMethod` and
+ # # provides the `#source` functionality
+ #
+ # pkg:gem/method_source#lib/method_source.rb:139
+ def class_comment; end
+
+ # Return the comments associated with the method as a string.
# @return [String] The method's comments as a string
+ # @raise SourceNotFoundException
#
- # source://method_source//lib/method_source.rb#121
+ # @example
+ # Set.instance_method(:clear).comment.display
+ # =>
+ # # Removes all elements and returns self.
+ #
+ # pkg:gem/method_source#lib/method_source.rb:126
def comment; end
+ # pkg:gem/method_source#lib/method_source.rb:159
+ def module_comment; end
+
# Return the sourcecode for the method as a string
+ # @return [String] The method sourcecode as a string
+ # @raise SourceNotFoundException
#
# @example
- # Set.instance_method(:clear).source.display
- # =>
- # def clear
- # @hash.clear
- # self
- # end
- # @raise SourceNotFoundException
- # @return [String] The method sourcecode as a string
+ # Set.instance_method(:clear).source.display
+ # =>
+ # def clear
+ # @hash.clear
+ # self
+ # end
#
- # source://method_source//lib/method_source.rb#109
+ # pkg:gem/method_source#lib/method_source.rb:114
def source; end
class << self
@@ -188,84 +205,88 @@ module MethodSource::MethodExtensions
# We need to use the included hook as Rubinius defines a `source`
# on Method so including a module will have no effect (as it's
# higher up the MRO).
+ # @param [Class] klass The class that includes the module.
#
- # @param klass [Class] The class that includes the module.
- #
- # source://method_source//lib/method_source.rb#79
+ # pkg:gem/method_source#lib/method_source.rb:84
def included(klass); end
end
end
-# source://method_source//lib/method_source/source_location.rb#2
+# pkg:gem/method_source#lib/method_source/source_location.rb:2
module MethodSource::ReeSourceLocation
# Ruby enterprise edition provides all the information that's
# needed, in a slightly different way.
#
- # source://method_source//lib/method_source/source_location.rb#5
+ # pkg:gem/method_source#lib/method_source/source_location.rb:5
def source_location; end
end
-# source://method_source//lib/method_source/source_location.rb#10
+# pkg:gem/method_source#lib/method_source/source_location.rb:10
module MethodSource::SourceLocation; end
-# source://method_source//lib/method_source/source_location.rb#11
+# pkg:gem/method_source#lib/method_source/source_location.rb:11
module MethodSource::SourceLocation::MethodExtensions
+ # JRuby version source_location hack
+ # @return [Array] A two element array containing the source location of the method
# Return the source location of a method for Ruby 1.8.
- #
# @return [Array] A two element array. First element is the
# file, second element is the line in the file where the
# method definition is found.
#
- # source://method_source//lib/method_source/source_location.rb#40
+ # pkg:gem/method_source#lib/method_source/source_location.rb:40
def source_location; end
private
- # source://method_source//lib/method_source/source_location.rb#26
+ # pkg:gem/method_source#lib/method_source/source_location.rb:26
def trace_func(event, file, line, id, binding, classname); end
end
-# source://method_source//lib/method_source/source_location.rb#54
+# pkg:gem/method_source#lib/method_source/source_location.rb:54
module MethodSource::SourceLocation::ProcExtensions
+ # Return the source location for a Proc (Rubinius only)
+ # @return [Array] A two element array. First element is the
+ # file, second element is the line in the file where the
+ # proc definition is found.
# Return the source location for a Proc (in implementations
# without Proc#source_location)
- #
# @return [Array] A two element array. First element is the
# file, second element is the line in the file where the
# proc definition is found.
#
- # source://method_source//lib/method_source/source_location.rb#74
+ # pkg:gem/method_source#lib/method_source/source_location.rb:74
def source_location; end
end
-# source://method_source//lib/method_source/source_location.rb#81
+# pkg:gem/method_source#lib/method_source/source_location.rb:81
module MethodSource::SourceLocation::UnboundMethodExtensions
+ # JRuby version source_location hack
+ # @return [Array] A two element array containing the source location of the method
# Return the source location of an instance method for Ruby 1.8.
- #
# @return [Array] A two element array. First element is the
# file, second element is the line in the file where the
# method definition is found.
#
- # source://method_source//lib/method_source/source_location.rb#101
+ # pkg:gem/method_source#lib/method_source/source_location.rb:101
def source_location; end
end
# An Exception to mark errors that were raised trying to find the source from
# a given source_location.
#
-# source://method_source//lib/method_source.rb#16
+# pkg:gem/method_source#lib/method_source.rb:16
class MethodSource::SourceNotFoundError < ::StandardError; end
-# source://method_source//lib/method_source/version.rb#2
+# pkg:gem/method_source#lib/method_source/version.rb:2
MethodSource::VERSION = T.let(T.unsafe(nil), String)
-# source://method_source//lib/method_source.rb#137
+# pkg:gem/method_source#lib/method_source.rb:173
class Proc
include ::MethodSource::SourceLocation::ProcExtensions
include ::MethodSource::MethodExtensions
end
-# source://method_source//lib/method_source.rb#132
+# pkg:gem/method_source#lib/method_source.rb:168
class UnboundMethod
include ::MethodSource::SourceLocation::UnboundMethodExtensions
include ::MethodSource::MethodExtensions
diff --git a/sorbet/rbi/gems/minitest@5.17.0.rbi b/sorbet/rbi/gems/minitest@5.17.0.rbi
deleted file mode 100644
index d1451e9..0000000
--- a/sorbet/rbi/gems/minitest@5.17.0.rbi
+++ /dev/null
@@ -1,1457 +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#1059
- 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#1050
- 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#578
-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#612
- 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#591
- 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#600
- def record(result); end
-
- # Outputs the summary of the run.
- #
- # source://minitest//lib/minitest.rb#606
- def report; end
-
- # Starts reporting on the run.
- #
- # source://minitest//lib/minitest.rb#584
- 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#895
-class Minitest::Assertion < ::Exception
- # source://minitest//lib/minitest.rb#896
- def error; end
-
- # Where was this run before an assertion was raised?
- #
- # source://minitest//lib/minitest.rb#903
- def location; end
-
- # source://minitest//lib/minitest.rb#912
- def result_code; end
-
- # source://minitest//lib/minitest.rb#916
- 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 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#369
- 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#396
- def assert_raises(*exp); end
-
- # Fails unless +obj+ responds to +meth+.
- #
- # source://minitest//lib/minitest/assertions.rb#427
- def assert_respond_to(obj, meth, msg = T.unsafe(nil)); end
-
- # Fails unless +exp+ and +act+ are #equal?
- #
- # source://minitest//lib/minitest/assertions.rb#437
- 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#450
- 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#466
- def assert_silent; end
-
- # Fails unless the block throws +sym+
- #
- # source://minitest//lib/minitest/assertions.rb#475
- 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#516
- 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#549
- 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#581
- 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#597
- def fail_after(y, m, d, msg); end
-
- # Fails with +msg+.
- #
- # source://minitest//lib/minitest/assertions.rb#604
- 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#612
- 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#623
- def pass(_msg = T.unsafe(nil)); end
-
- # Fails if +test+ is truthy.
- #
- # source://minitest//lib/minitest/assertions.rb#630
- def refute(test, msg = T.unsafe(nil)); end
-
- # Fails if +obj+ is empty.
- #
- # source://minitest//lib/minitest/assertions.rb#638
- 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#649
- 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#661
- 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#673
- 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#680
- def refute_includes(collection, obj, msg = T.unsafe(nil)); end
-
- # Fails if +obj+ is an instance of +cls+.
- #
- # source://minitest//lib/minitest/assertions.rb#691
- 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#701
- def refute_kind_of(cls, obj, msg = T.unsafe(nil)); end
-
- # Fails if +matcher+ =~ +obj+.
- #
- # source://minitest//lib/minitest/assertions.rb#709
- def refute_match(matcher, obj, msg = T.unsafe(nil)); end
-
- # Fails if +obj+ is nil.
- #
- # source://minitest//lib/minitest/assertions.rb#719
- 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#730
- def refute_operator(o1, op, o2 = T.unsafe(nil), msg = T.unsafe(nil)); end
-
- # Fails if +path+ exists.
- #
- # source://minitest//lib/minitest/assertions.rb#739
- def refute_path_exists(path, msg = T.unsafe(nil)); 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#753
- def refute_predicate(o1, op, msg = T.unsafe(nil)); end
-
- # Fails if +obj+ responds to the message +meth+.
- #
- # source://minitest//lib/minitest/assertions.rb#761
- 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#770
- 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#783
- 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#795
- def skip_until(y, m, d, msg); end
-
- # Was this testcase skipped? Meant for #teardown.
- #
- # @return [Boolean]
- #
- # source://minitest//lib/minitest/assertions.rb#804
- 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#1027
-class Minitest::BacktraceFilter
- # Filter +bt+ to something useful. Returns the whole thing if
- # $DEBUG (ruby) or $MT_DEBUG (env).
- #
- # source://minitest//lib/minitest.rb#1035
- def filter(bt); end
-end
-
-# source://minitest//lib/minitest.rb#1029
-Minitest::BacktraceFilter::MT_RE = T.let(T.unsafe(nil), Regexp)
-
-# Dispatch to multiple reporters as one.
-#
-# source://minitest//lib/minitest.rb#844
-class Minitest::CompositeReporter < ::Minitest::AbstractReporter
- # @return [CompositeReporter] a new instance of CompositeReporter
- #
- # source://minitest//lib/minitest.rb#850
- def initialize(*reporters); end
-
- # Add another reporter to the mix.
- #
- # source://minitest//lib/minitest.rb#862
- def <<(reporter); end
-
- # source://minitest//lib/minitest.rb#855
- def io; end
-
- # @return [Boolean]
- #
- # source://minitest//lib/minitest.rb#866
- def passed?; end
-
- # source://minitest//lib/minitest.rb#874
- def prerecord(klass, name); end
-
- # source://minitest//lib/minitest.rb#881
- def record(result); end
-
- # source://minitest//lib/minitest.rb#887
- def report; end
-
- # The list of reporters to dispatch to.
- #
- # source://minitest//lib/minitest.rb#848
- def reporters; end
-
- # The list of reporters to dispatch to.
- #
- # source://minitest//lib/minitest.rb#848
- def reporters=(_arg0); end
-
- # source://minitest//lib/minitest.rb#870
- 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#971
-module Minitest::Guard
- # Is this running on jruby?
- #
- # @return [Boolean]
- #
- # source://minitest//lib/minitest.rb#976
- def jruby?(platform = T.unsafe(nil)); end
-
- # Is this running on maglev?
- #
- # @return [Boolean]
- #
- # source://minitest//lib/minitest.rb#983
- def maglev?(platform = T.unsafe(nil)); end
-
- # Is this running on mri?
- #
- # @return [Boolean]
- #
- # source://minitest//lib/minitest.rb#993
- def mri?(platform = T.unsafe(nil)); end
-
- # Is this running on macOS?
- #
- # @return [Boolean]
- #
- # source://minitest//lib/minitest.rb#1000
- def osx?(platform = T.unsafe(nil)); end
-
- # Is this running on rubinius?
- #
- # @return [Boolean]
- #
- # source://minitest//lib/minitest.rb#1007
- def rubinius?(platform = T.unsafe(nil)); end
-
- # Is this running on windows?
- #
- # @return [Boolean]
- #
- # source://minitest//lib/minitest.rb#1017
- 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#643
-class Minitest::ProgressReporter < ::Minitest::Reporter
- # source://minitest//lib/minitest.rb#644
- def prerecord(klass, name); end
-
- # source://minitest//lib/minitest.rb#651
- 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#475
-module Minitest::Reportable
- # @raise [NotImplementedError]
- #
- # source://minitest//lib/minitest.rb#495
- def class_name; end
-
- # Did this run error?
- #
- # @return [Boolean]
- #
- # source://minitest//lib/minitest.rb#516
- def error?; end
-
- # The location identifier of this test. Depends on a method
- # existing called class_name.
- #
- # source://minitest//lib/minitest.rb#490
- 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#482
- def passed?; end
-
- # Returns ".", "F", or "E" based on the result of the run.
- #
- # source://minitest//lib/minitest.rb#502
- def result_code; end
-
- # Was this run skipped?
- #
- # @return [Boolean]
- #
- # source://minitest//lib/minitest.rb#509
- def skipped?; end
-end
-
-# source://minitest//lib/minitest.rb#619
-class Minitest::Reporter < ::Minitest::AbstractReporter
- # @return [Reporter] a new instance of Reporter
- #
- # source://minitest//lib/minitest.rb#628
- def initialize(io = T.unsafe(nil), options = T.unsafe(nil)); end
-
- # The IO used to report.
- #
- # source://minitest//lib/minitest.rb#621
- def io; end
-
- # The IO used to report.
- #
- # source://minitest//lib/minitest.rb#621
- def io=(_arg0); end
-
- # Command-line options for this run.
- #
- # source://minitest//lib/minitest.rb#626
- def options; end
-
- # Command-line options for this run.
- #
- # source://minitest//lib/minitest.rb#626
- 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#528
-class Minitest::Result < ::Minitest::Runnable
- include ::Minitest::Reportable
-
- # source://minitest//lib/minitest.rb#561
- def class_name; end
-
- # The class name of the test result.
- #
- # source://minitest//lib/minitest.rb#537
- def klass; end
-
- # The class name of the test result.
- #
- # source://minitest//lib/minitest.rb#537
- def klass=(_arg0); end
-
- # The location of the test method.
- #
- # source://minitest//lib/minitest.rb#542
- def source_location; end
-
- # The location of the test method.
- #
- # source://minitest//lib/minitest.rb#542
- def source_location=(_arg0); end
-
- # source://minitest//lib/minitest.rb#565
- def to_s; end
-
- class << self
- # Create a new test result from a Runnable instance.
- #
- # source://minitest//lib/minitest.rb#547
- 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#431
- 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#427
- 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#413
- def marshal_dump; end
-
- # source://minitest//lib/minitest.rb#423
- 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#450
- 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#459
- def result_code; end
-
- # Runs a single method. Needs to return self.
- #
- # @raise [NotImplementedError]
- #
- # source://minitest//lib/minitest.rb#440
- def run; end
-
- # Was this run skipped? See #passed? for more information.
- #
- # @raise [NotImplementedError]
- # @return [Boolean]
- #
- # source://minitest//lib/minitest.rb#466
- 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#1069
- 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#383
- 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#363
- 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#400
- def runnable_methods; end
-
- # Returns all subclasses of Runnable.
- #
- # source://minitest//lib/minitest.rb#407
- def runnables; end
-
- # source://minitest//lib/minitest.rb#368
- def with_info_handler(reporter, &block); end
- end
-end
-
-# source://minitest//lib/minitest.rb#381
-Minitest::Runnable::SIGNALS = T.let(T.unsafe(nil), Hash)
-
-# Assertion raised when skipping a run.
-#
-# source://minitest//lib/minitest.rb#924
-class Minitest::Skip < ::Minitest::Assertion
- # source://minitest//lib/minitest.rb#925
- 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 " "onetwothree"
+# crio = CompositeReadIO.new(StringIO.new('one'),
+# StringIO.new('two'),
+# StringIO.new('three'))
+# puts crio.read # => "onetwothree"
#
-# source://multipart-post//lib/multipart/post/composite_read_io.rb#28
+# pkg:gem/multipart-post#lib/multipart/post/composite_read_io.rb:28
class Multipart::Post::CompositeReadIO
# Create a new composite-read IO from the arguments, all of which should
# respond to #read in a manner consistent with IO.
#
- # @return [CompositeReadIO] a new instance of CompositeReadIO
- #
- # source://multipart-post//lib/multipart/post/composite_read_io.rb#31
+ # pkg:gem/multipart-post#lib/multipart/post/composite_read_io.rb:31
def initialize(*ios); end
+ # Close all the underyling IOs.
+ #
+ # pkg:gem/multipart-post#lib/multipart/post/composite_read_io.rb:37
+ def close; end
+
+ # pkg:gem/multipart-post#lib/multipart/post/composite_read_io.rb:46
+ def closed?; end
+
# Read from IOs in order until `length` bytes have been received.
#
- # source://multipart-post//lib/multipart/post/composite_read_io.rb#37
+ # pkg:gem/multipart-post#lib/multipart/post/composite_read_io.rb:51
def read(length = T.unsafe(nil), outbuf = T.unsafe(nil)); end
- # source://multipart-post//lib/multipart/post/composite_read_io.rb#54
+ # pkg:gem/multipart-post#lib/multipart/post/composite_read_io.rb:72
def rewind; end
private
- # source://multipart-post//lib/multipart/post/composite_read_io.rb#65
+ # pkg:gem/multipart-post#lib/multipart/post/composite_read_io.rb:83
def advance_io; end
- # source://multipart-post//lib/multipart/post/composite_read_io.rb#61
+ # pkg:gem/multipart-post#lib/multipart/post/composite_read_io.rb:79
def current_io; end
end
-# source://multipart-post//lib/multipart/post/multipartable.rb#23
+# pkg:gem/multipart-post#lib/multipart/post/multipartable.rb:23
module Multipart::Post::Multipartable
- # source://multipart-post//lib/multipart/post/multipartable.rb#38
+ # pkg:gem/multipart-post#lib/multipart/post/multipartable.rb:38
def initialize(path, params, headers = T.unsafe(nil), boundary = T.unsafe(nil)); end
- # Returns the value of attribute boundary.
- #
- # source://multipart-post//lib/multipart/post/multipartable.rb#61
+ # pkg:gem/multipart-post#lib/multipart/post/multipartable.rb:61
def boundary; end
private
- # source://multipart-post//lib/multipart/post/multipartable.rb#66
+ # pkg:gem/multipart-post#lib/multipart/post/multipartable.rb:65
def symbolize_keys(hash); end
class << self
- # source://multipart-post//lib/multipart/post/multipartable.rb#24
+ # pkg:gem/multipart-post#lib/multipart/post/multipartable.rb:24
def secure_boundary; end
end
end
-# source://multipart-post//lib/multipart/post/parts.rb#26
+# pkg:gem/multipart-post#lib/multipart/post/parts.rb:26
module Multipart::Post::Parts; end
# Represents the epilogue or closing boundary.
#
-# source://multipart-post//lib/multipart/post/parts.rb#138
+# pkg:gem/multipart-post#lib/multipart/post/parts.rb:138
class Multipart::Post::Parts::EpiloguePart
include ::Multipart::Post::Parts::Part
- # @return [EpiloguePart] a new instance of EpiloguePart
- #
- # source://multipart-post//lib/multipart/post/parts.rb#141
+ # pkg:gem/multipart-post#lib/multipart/post/parts.rb:141
def initialize(boundary); end
end
# Represents a part to be filled from file IO.
#
-# source://multipart-post//lib/multipart/post/parts.rb#83
+# pkg:gem/multipart-post#lib/multipart/post/parts.rb:83
class Multipart::Post::Parts::FilePart
include ::Multipart::Post::Parts::Part
@@ -95,9 +118,8 @@ class Multipart::Post::Parts::FilePart
# @param name [#to_s]
# @param io [IO]
# @param headers [Hash]
- # @return [FilePart] a new instance of FilePart
#
- # source://multipart-post//lib/multipart/post/parts.rb#92
+ # pkg:gem/multipart-post#lib/multipart/post/parts.rb:92
def initialize(boundary, name, io, headers = T.unsafe(nil)); end
# @param boundary [String]
@@ -107,18 +129,16 @@ class Multipart::Post::Parts::FilePart
# @param content_len [Integer]
# @param opts [Hash]
#
- # source://multipart-post//lib/multipart/post/parts.rb#107
+ # pkg:gem/multipart-post#lib/multipart/post/parts.rb:107
def build_head(boundary, name, filename, type, content_len, opts = T.unsafe(nil)); end
- # Returns the value of attribute length.
- #
- # source://multipart-post//lib/multipart/post/parts.rb#86
+ # pkg:gem/multipart-post#lib/multipart/post/parts.rb:86
def length; end
end
# Represents a parametric part to be filled with given value.
#
-# source://multipart-post//lib/multipart/post/parts.rb#51
+# pkg:gem/multipart-post#lib/multipart/post/parts.rb:51
class Multipart::Post::Parts::ParamPart
include ::Multipart::Post::Parts::Part
@@ -126,9 +146,8 @@ class Multipart::Post::Parts::ParamPart
# @param name [#to_s]
# @param value [String]
# @param headers [Hash] Content-Type and Content-ID are used, if present.
- # @return [ParamPart] a new instance of ParamPart
#
- # source://multipart-post//lib/multipart/post/parts.rb#58
+ # pkg:gem/multipart-post#lib/multipart/post/parts.rb:58
def initialize(boundary, name, value, headers = T.unsafe(nil)); end
# @param boundary [String]
@@ -136,35 +155,33 @@ class Multipart::Post::Parts::ParamPart
# @param value [String]
# @param headers [Hash] Content-Type is used, if present.
#
- # source://multipart-post//lib/multipart/post/parts.rb#71
+ # pkg:gem/multipart-post#lib/multipart/post/parts.rb:71
def build_part(boundary, name, value, headers = T.unsafe(nil)); end
- # source://multipart-post//lib/multipart/post/parts.rb#63
+ # pkg:gem/multipart-post#lib/multipart/post/parts.rb:63
def length; end
end
-# source://multipart-post//lib/multipart/post/parts.rb#27
+# pkg:gem/multipart-post#lib/multipart/post/parts.rb:27
module Multipart::Post::Parts::Part
- # source://multipart-post//lib/multipart/post/parts.rb#41
+ # pkg:gem/multipart-post#lib/multipart/post/parts.rb:41
def length; end
- # source://multipart-post//lib/multipart/post/parts.rb#45
+ # pkg:gem/multipart-post#lib/multipart/post/parts.rb:45
def to_io; end
class << self
- # @return [Boolean]
- #
- # source://multipart-post//lib/multipart/post/parts.rb#37
+ # pkg:gem/multipart-post#lib/multipart/post/parts.rb:37
def file?(value); end
- # source://multipart-post//lib/multipart/post/parts.rb#28
+ # pkg:gem/multipart-post#lib/multipart/post/parts.rb:28
def new(boundary, name, value, headers = T.unsafe(nil)); end
end
end
# Convenience methods for dealing with files and IO that are to be uploaded.
#
-# source://multipart-post//lib/multipart/post/upload_io.rb#9
+# pkg:gem/multipart-post#lib/multipart/post/upload_io.rb:9
class Multipart::Post::UploadIO
# Create an upload IO suitable for including in the params hash of a
# Net::HTTP::Post::Multipart.
@@ -178,56 +195,41 @@ class Multipart::Post::UploadIO
# an arbitrarily named RackMultipart file in /tmp).
#
# @example
- # UploadIO.new("file.txt", "text/plain")
- # UploadIO.new(file_io, "text/plain", "file.txt")
- # @return [UploadIO] a new instance of UploadIO
+ # UploadIO.new("file.txt", "text/plain")
+ # UploadIO.new(file_io, "text/plain", "file.txt")
#
- # source://multipart-post//lib/multipart/post/upload_io.rb#26
+ # pkg:gem/multipart-post#lib/multipart/post/upload_io.rb:26
def initialize(filename_or_io, content_type, filename = T.unsafe(nil), opts = T.unsafe(nil)); end
- # Returns the value of attribute content_type.
- #
- # source://multipart-post//lib/multipart/post/upload_io.rb#10
+ # pkg:gem/multipart-post#lib/multipart/post/upload_io.rb:10
def content_type; end
- # Returns the value of attribute io.
- #
- # source://multipart-post//lib/multipart/post/upload_io.rb#10
+ # pkg:gem/multipart-post#lib/multipart/post/upload_io.rb:10
def io; end
- # Returns the value of attribute local_path.
- #
- # source://multipart-post//lib/multipart/post/upload_io.rb#10
+ # pkg:gem/multipart-post#lib/multipart/post/upload_io.rb:10
def local_path; end
- # source://multipart-post//lib/multipart/post/upload_io.rb#52
+ # pkg:gem/multipart-post#lib/multipart/post/upload_io.rb:52
def method_missing(*args); end
- # Returns the value of attribute opts.
- #
- # source://multipart-post//lib/multipart/post/upload_io.rb#10
+ # pkg:gem/multipart-post#lib/multipart/post/upload_io.rb:10
def opts; end
- # Returns the value of attribute original_filename.
- #
- # source://multipart-post//lib/multipart/post/upload_io.rb#10
+ # pkg:gem/multipart-post#lib/multipart/post/upload_io.rb:10
def original_filename; end
- # @return [Boolean]
- #
- # source://multipart-post//lib/multipart/post/upload_io.rb#56
+ # pkg:gem/multipart-post#lib/multipart/post/upload_io.rb:56
def respond_to?(meth, include_all = T.unsafe(nil)); end
class << self
- # @raise [ArgumentError]
- #
- # source://multipart-post//lib/multipart/post/upload_io.rb#46
+ # pkg:gem/multipart-post#lib/multipart/post/upload_io.rb:46
def convert!(io, content_type, original_filename, local_path); end
end
end
-# source://multipart-post//lib/multipart/post/version.rb#9
+# pkg:gem/multipart-post#lib/multipart/post/version.rb:9
Multipart::Post::VERSION = T.let(T.unsafe(nil), String)
-# source://multipart-post//lib/multipart/post/upload_io.rb#63
+# pkg:gem/multipart-post#lib/multipart/post/upload_io.rb:63
UploadIO = Multipart::Post::UploadIO
diff --git a/sorbet/rbi/gems/nokogiri@1.14.0.rbi b/sorbet/rbi/gems/nokogiri@1.19.3.rbi
similarity index 53%
rename from sorbet/rbi/gems/nokogiri@1.14.0.rbi
rename to sorbet/rbi/gems/nokogiri@1.19.3.rbi
index 3a14c08..5309d68 100644
--- a/sorbet/rbi/gems/nokogiri@1.14.0.rbi
+++ b/sorbet/rbi/gems/nokogiri@1.19.3.rbi
@@ -4,11 +4,6 @@
# This is an autogenerated file for types exported from the `nokogiri` gem.
# Please instead update this file by running `bin/tapioca gem nokogiri`.
-# source://yard/0.9.28/lib/yard.rb#61
-::RUBY18 = T.let(T.unsafe(nil), FalseClass)
-
-# source://yard/0.9.28/lib/yard.rb#62
-::RUBY19 = T.let(T.unsafe(nil), TrueClass)
# Nokogiri parses and searches XML/HTML very quickly, and also has
# correctly implemented CSS3 selector support as well as XPath 1.0
@@ -38,29 +33,38 @@
#
# - Nokogiri::XML::Searchable#css for more information about CSS searching
# - Nokogiri::XML::Searchable#xpath for more information about XPath searching
-#
-# source://nokogiri//lib/nokogiri.rb#38
+# coding: utf-8
+# coding: utf-8
+# --
+# DO NOT MODIFY!!!!
+# This file is automatically generated by rex 1.0.8
+# from lexical definition file "lib/nokogiri/css/tokenizer.rex".
+# ++
+# coding: utf-8
+# coding: utf-8
+# coding: utf-8
+# coding: utf-8
+# coding: utf-8
+# coding: utf-8
+# coding: utf-8
+# coding: utf-8
+# coding: utf-8
+#
+# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
module Nokogiri
class << self
- # source://nokogiri//lib/nokogiri/html4.rb#10
- def HTML(input, url = T.unsafe(nil), encoding = T.unsafe(nil), options = T.unsafe(nil), &block); end
+ # pkg:gem/nokogiri#lib/nokogiri/html.rb:16
+ def HTML(*_arg0, **_arg1, &_arg2); end
- # :call-seq:
- # HTML4(input, url = nil, encoding = nil, options = XML::ParseOptions::DEFAULT_HTML, &block) → Nokogiri::HTML4::Document
- #
- # Parse HTML. Convenience method for Nokogiri::HTML4::Document.parse
+ # Convenience method for Nokogiri::HTML4::Document.parse
#
- # source://nokogiri//lib/nokogiri/html4.rb#10
- def HTML4(input, url = T.unsafe(nil), encoding = T.unsafe(nil), options = T.unsafe(nil), &block); end
+ # pkg:gem/nokogiri#lib/nokogiri/html4.rb:7
+ def HTML4(*_arg0, **_arg1, &_arg2); end
- # Since v1.12.0
+ # Convenience method for Nokogiri::HTML5::Document.parse
#
- # ⚠ HTML5 functionality is not available when running JRuby.
- #
- # Parse an HTML5 document. Convenience method for {Nokogiri::HTML5::Document.parse}
- #
- # source://nokogiri//lib/nokogiri/html5.rb#30
- def HTML5(input, url = T.unsafe(nil), encoding = T.unsafe(nil), **options, &block); end
+ # pkg:gem/nokogiri#lib/nokogiri/html5.rb:28
+ def HTML5(*_arg0, **_arg1, &_arg2); end
# Parse a document and add the Slop decorator. The Slop decorator
# implements method_missing such that methods may be used instead of CSS
@@ -76,509 +80,504 @@ module Nokogiri
# eohtml
# assert_equal('second', doc.html.body.p[1].text)
#
- # source://nokogiri//lib/nokogiri.rb#83
+ # pkg:gem/nokogiri#lib/nokogiri.rb:91
def Slop(*args, &block); end
- # Parse XML. Convenience method for Nokogiri::XML::Document.parse
+ # 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
+ # pkg:gem/nokogiri#lib/nokogiri/xml.rb:6
+ def XML(*_arg0, **_arg1, &_arg2); end
- # Create a Nokogiri::XSLT::Stylesheet with +stylesheet+.
- #
- # Example:
- #
- # xslt = Nokogiri::XSLT(File.read(ARGV[0]))
+ # Convenience method for Nokogiri::XSLT.parse
#
- # source://nokogiri//lib/nokogiri/xslt.rb#13
- def XSLT(stylesheet, modules = T.unsafe(nil)); end
+ # pkg:gem/nokogiri#lib/nokogiri/xslt.rb:7
+ def XSLT(*_arg0, **_arg1, &_arg2); end
- # source://nokogiri//lib/nokogiri.rb#88
+ # pkg:gem/nokogiri#lib/nokogiri.rb:96
def install_default_aliases; end
- # @return [Boolean]
- #
- # source://nokogiri//lib/nokogiri/version/info.rb#205
+ # pkg:gem/nokogiri#lib/nokogiri/version/info.rb:206
def jruby?; end
- # source://nokogiri//lib/nokogiri/version/info.rb#210
+ # pkg:gem/nokogiri#lib/nokogiri/version/info.rb:211
def libxml2_patches; end
# Create a new Nokogiri::XML::DocumentFragment
#
- # source://nokogiri//lib/nokogiri.rb#60
+ # pkg:gem/nokogiri#lib/nokogiri.rb:68
def make(input = T.unsafe(nil), opts = T.unsafe(nil), &blk); end
# Parse an HTML or XML document. +string+ contains the document.
#
- # source://nokogiri//lib/nokogiri.rb#42
+ # pkg:gem/nokogiri#lib/nokogiri.rb:42
def parse(string, url = T.unsafe(nil), encoding = T.unsafe(nil), options = T.unsafe(nil)); end
- # @return [Boolean]
- #
- # source://nokogiri//lib/nokogiri/version/info.rb#200
+ # pkg:gem/nokogiri#lib/nokogiri/version/info.rb:201
def uses_gumbo?; end
- # @return [Boolean]
- #
- # source://nokogiri//lib/nokogiri/version/info.rb#192
+ # pkg:gem/nokogiri#lib/nokogiri/version/info.rb:193
def uses_libxml?(requirement = T.unsafe(nil)); end
end
end
# Translate a CSS selector into an XPath 1.0 query
#
-# source://nokogiri//lib/nokogiri/css.rb#6
+# pkg:gem/nokogiri#lib/nokogiri/css.rb:6
module Nokogiri::CSS
class << self
# TODO: Deprecate this method ahead of 2.0 and delete it in 2.0.
# It is not used by Nokogiri and shouldn't be part of the public API.
#
- # source://nokogiri//lib/nokogiri/css.rb#10
+ # pkg:gem/nokogiri#lib/nokogiri/css.rb:10
def parse(selector); end
# :call-seq:
- # xpath_for(selector) → String
- # xpath_for(selector [, prefix:] [, visitor:] [, ns:]) → String
+ # xpath_for(selector_list) → Array
+ # xpath_for(selector_list [, prefix:] [, ns:] [, visitor:] [, cache:]) → Array
+ #
+ # Translate a CSS selector list to the equivalent XPath expressions.
#
- # Translate a CSS selector to the equivalent XPath query.
+ # 💡 Note that translated queries are cached by default for performance concerns.
+ #
+ # ⚠ Users should prefer Nokogiri::XML::Searchable#css, which is mixed into all document and
+ # node classes, for querying documents with CSS selectors. This method is the underlying
+ # mechanism used by XML::Searchable and is provided solely for advanced users to translate
+ # \CSS selectors to XPath directly.
+ #
+ # Also see Nokogiri::XML::Searchable#css for documentation on supported CSS selector features,
+ # some extended syntax that Nokogiri supports, and advanced CSS features like pseudo-class
+ # functions.
#
# [Parameters]
- # - +selector+ (String) The CSS selector to be translated into XPath
+ # - +selector_list+ (String)
#
+ # The CSS selector to be translated into XPath. This is always a String, but that string
+ # value may be a {selector list}[https://www.w3.org/TR/selectors-4/#grouping] (see
+ # examples).
+ #
+ # [Keyword arguments]
# - +prefix:+ (String)
#
- # The XPath prefix for the query, see Nokogiri::XML::XPath for some options. Default is
- # +XML::XPath::GLOBAL_SEARCH_PREFIX+.
+ # The XPath expression prefix which determines the search context. See Nokogiri::XML::XPath
+ # for standard options. Default is +XPath::GLOBAL_SEARCH_PREFIX+.
+ #
+ # - +ns:+ (Hash, nil)
+ #
+ # 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 +nil+ indicating an
+ # empty set of namespaces.
#
# - +visitor:+ (Nokogiri::CSS::XPathVisitor)
#
- # The visitor class to use to transform the AST into XPath. Default is
- # +Nokogiri::CSS::XPathVisitor.new+.
+ # Use this XPathVisitor object to transform the CSS AST into XPath expressions. See
+ # Nokogiri::CSS::XPathVisitor for more information on some of the complex behavior that can
+ # be customized for your document type. Default is +Nokogiri::CSS::XPathVisitor.new+.
+ #
+ # ⚠ Note that this option is mutually exclusive with +prefix+ and +ns+. If +visitor+ is
+ # provided, +prefix+ and +ns+ must not be present.
+ #
+ # - +cache:+ (Boolean)
+ #
+ # Whether to use the SelectorCache for the translated query to ensure that repeated queries
+ # don't incur the overhead of re-parsing the selector. Default is +true+.
+ #
+ # [Returns] (Array) The equivalent set of XPath expressions for +selector_list+
+ #
+ # *Example* with a simple selector:
+ #
+ # Nokogiri::CSS.xpath_for("div") # => ["//div"]
+ #
+ # *Example* with a compound selector:
#
- # - +ns:+ (Hash)
+ # Nokogiri::CSS.xpath_for("div.xl") # => ["//div[contains(concat(' ',normalize-space(@class),' '),' xl ')]"]
#
- # 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.
+ # *Example* with a complex selector:
#
- # [Returns] (String) The equivalent XPath query for +selector+
+ # Nokogiri::CSS.xpath_for("h1 + div") # => ["//h1/following-sibling::*[1]/self::div"]
#
- # 💡 Note that translated queries are cached for performance concerns.
+ # *Example* with a selector list:
#
- # @raise [TypeError]
+ # Nokogiri::CSS.xpath_for("h1, h2, h3") # => ["//h1", "//h2", "//h3"]
#
- # source://nokogiri//lib/nokogiri/css.rb#42
- def xpath_for(selector, options = T.unsafe(nil)); end
+ # pkg:gem/nokogiri#lib/nokogiri/css.rb:83
+ def xpath_for(selector, options = T.unsafe(nil), prefix: T.unsafe(nil), visitor: T.unsafe(nil), ns: T.unsafe(nil), cache: T.unsafe(nil)); end
end
end
-# source://nokogiri//lib/nokogiri/css/node.rb#5
+# pkg:gem/nokogiri#lib/nokogiri/css/node.rb:5
class Nokogiri::CSS::Node
# Create a new Node with +type+ and +value+
#
- # @return [Node] a new instance of Node
- #
- # source://nokogiri//lib/nokogiri/css/node.rb#14
+ # pkg:gem/nokogiri#lib/nokogiri/css/node.rb:14
def initialize(type, value); end
# Accept +visitor+
#
- # source://nokogiri//lib/nokogiri/css/node.rb#20
+ # pkg:gem/nokogiri#lib/nokogiri/css/node.rb:20
def accept(visitor); end
# Find a node by type using +types+
#
- # source://nokogiri//lib/nokogiri/css/node.rb#32
+ # pkg:gem/nokogiri#lib/nokogiri/css/node.rb:36
def find_by_type(types); end
# Convert to array
#
- # source://nokogiri//lib/nokogiri/css/node.rb#49
+ # pkg:gem/nokogiri#lib/nokogiri/css/node.rb:53
def to_a; end
# Convert to_type
#
- # source://nokogiri//lib/nokogiri/css/node.rb#42
+ # pkg:gem/nokogiri#lib/nokogiri/css/node.rb:46
def to_type; end
# Convert this CSS node to xpath with +prefix+ using +visitor+
#
- # source://nokogiri//lib/nokogiri/css/node.rb#26
- def to_xpath(prefix, visitor); end
+ # pkg:gem/nokogiri#lib/nokogiri/css/node.rb:26
+ def to_xpath(visitor); end
# Get the type of this node
#
- # source://nokogiri//lib/nokogiri/css/node.rb#9
+ # pkg:gem/nokogiri#lib/nokogiri/css/node.rb:9
def type; end
# Get the type of this node
#
- # source://nokogiri//lib/nokogiri/css/node.rb#9
+ # pkg:gem/nokogiri#lib/nokogiri/css/node.rb:9
def type=(_arg0); end
# Get the value of this node
#
- # source://nokogiri//lib/nokogiri/css/node.rb#11
+ # pkg:gem/nokogiri#lib/nokogiri/css/node.rb:11
def value; end
# Get the value of this node
#
- # source://nokogiri//lib/nokogiri/css/node.rb#11
+ # pkg:gem/nokogiri#lib/nokogiri/css/node.rb:11
def value=(_arg0); end
end
-# source://nokogiri//lib/nokogiri/css/node.rb#6
+# pkg:gem/nokogiri#lib/nokogiri/css/node.rb:6
Nokogiri::CSS::Node::ALLOW_COMBINATOR_ON_SELF = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/css/parser_extras.rb#7
+# pkg:gem/nokogiri#lib/nokogiri/css/parser_extras.rb:7
class Nokogiri::CSS::Parser < ::Racc::Parser
- # 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
+ # pkg:gem/nokogiri#lib/nokogiri/css/parser_extras.rb:8
+ def initialize; end
# reduce 0 omitted
#
- # source://nokogiri//lib/nokogiri/css/parser.rb#361
+ # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:363
def _reduce_1(val, _values, result); end
- # source://nokogiri//lib/nokogiri/css/parser.rb#407
+ # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:409
def _reduce_10(val, _values, result); end
- # source://nokogiri//lib/nokogiri/css/parser.rb#412
+ # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:414
def _reduce_11(val, _values, result); end
# reduce 12 omitted
#
- # source://nokogiri//lib/nokogiri/css/parser.rb#424
+ # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:426
def _reduce_13(val, _values, result); end
- # source://nokogiri//lib/nokogiri/css/parser.rb#429
+ # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:431
def _reduce_14(val, _values, result); end
- # source://nokogiri//lib/nokogiri/css/parser.rb#434
+ # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:436
def _reduce_15(val, _values, result); end
# reduce 16 omitted
#
- # source://nokogiri//lib/nokogiri/css/parser.rb#441
+ # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:443
def _reduce_17(val, _values, result); end
- # source://nokogiri//lib/nokogiri/css/parser.rb#446
+ # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:448
def _reduce_18(val, _values, result); end
- # source://nokogiri//lib/nokogiri/css/parser.rb#451
+ # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:453
def _reduce_19(val, _values, result); end
- # source://nokogiri//lib/nokogiri/css/parser.rb#367
+ # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:369
def _reduce_2(val, _values, result); end
# reduce 20 omitted
#
- # source://nokogiri//lib/nokogiri/css/parser.rb#458
+ # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:460
def _reduce_21(val, _values, result); end
# reduce 22 omitted
#
- # source://nokogiri//lib/nokogiri/css/parser.rb#465
+ # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:467
def _reduce_23(val, _values, result); end
- # source://nokogiri//lib/nokogiri/css/parser.rb#470
+ # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:472
def _reduce_24(val, _values, result); end
- # source://nokogiri//lib/nokogiri/css/parser.rb#475
+ # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:477
def _reduce_25(val, _values, result); end
- # source://nokogiri//lib/nokogiri/css/parser.rb#482
+ # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:484
def _reduce_26(val, _values, result); end
# reduce 27 omitted
#
- # source://nokogiri//lib/nokogiri/css/parser.rb#489
+ # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:491
def _reduce_28(val, _values, result); end
- # source://nokogiri//lib/nokogiri/css/parser.rb#495
+ # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:497
def _reduce_29(val, _values, result); end
- # source://nokogiri//lib/nokogiri/css/parser.rb#372
+ # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:374
def _reduce_3(val, _values, result); end
- # source://nokogiri//lib/nokogiri/css/parser.rb#501
+ # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:503
def _reduce_30(val, _values, result); end
- # source://nokogiri//lib/nokogiri/css/parser.rb#507
+ # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:509
def _reduce_31(val, _values, result); end
- # source://nokogiri//lib/nokogiri/css/parser.rb#512
+ # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:514
def _reduce_32(val, _values, result); end
# reduce 33 omitted
#
- # source://nokogiri//lib/nokogiri/css/parser.rb#519
+ # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:521
def _reduce_34(val, _values, result); end
- # source://nokogiri//lib/nokogiri/css/parser.rb#525
+ # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:527
def _reduce_35(val, _values, result); end
- # source://nokogiri//lib/nokogiri/css/parser.rb#531
+ # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:533
def _reduce_36(val, _values, result); end
- # source://nokogiri//lib/nokogiri/css/parser.rb#537
+ # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:539
def _reduce_37(val, _values, result); end
- # source://nokogiri//lib/nokogiri/css/parser.rb#543
+ # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:545
def _reduce_38(val, _values, result); end
- # source://nokogiri//lib/nokogiri/css/parser.rb#549
+ # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:551
def _reduce_39(val, _values, result); end
- # source://nokogiri//lib/nokogiri/css/parser.rb#377
+ # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:379
def _reduce_4(val, _values, result); end
- # source://nokogiri//lib/nokogiri/css/parser.rb#554
+ # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:556
def _reduce_40(val, _values, result); end
- # source://nokogiri//lib/nokogiri/css/parser.rb#559
+ # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:561
def _reduce_41(val, _values, result); end
- # source://nokogiri//lib/nokogiri/css/parser.rb#564
+ # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:566
def _reduce_42(val, _values, result); end
# reduce 44 omitted
#
- # source://nokogiri//lib/nokogiri/css/parser.rb#573
+ # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:575
def _reduce_45(val, _values, result); end
# reduce 46 omitted
#
- # source://nokogiri//lib/nokogiri/css/parser.rb#590
+ # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:592
def _reduce_47(val, _values, result); end
- # source://nokogiri//lib/nokogiri/css/parser.rb#600
+ # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:602
def _reduce_48(val, _values, result); end
- # source://nokogiri//lib/nokogiri/css/parser.rb#616
+ # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:618
def _reduce_49(val, _values, result); end
- # source://nokogiri//lib/nokogiri/css/parser.rb#382
+ # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:384
def _reduce_5(val, _values, result); end
- # source://nokogiri//lib/nokogiri/css/parser.rb#636
+ # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:638
def _reduce_50(val, _values, result); end
- # source://nokogiri//lib/nokogiri/css/parser.rb#642
+ # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:644
def _reduce_51(val, _values, result); end
# reduce 53 omitted
#
- # source://nokogiri//lib/nokogiri/css/parser.rb#651
+ # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:653
def _reduce_54(val, _values, result); end
- # source://nokogiri//lib/nokogiri/css/parser.rb#657
+ # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:659
def _reduce_55(val, _values, result); end
- # source://nokogiri//lib/nokogiri/css/parser.rb#663
+ # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:665
def _reduce_56(val, _values, result); end
- # source://nokogiri//lib/nokogiri/css/parser.rb#669
+ # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:671
def _reduce_57(val, _values, result); end
- # source://nokogiri//lib/nokogiri/css/parser.rb#675
+ # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:677
def _reduce_58(val, _values, result); end
- # source://nokogiri//lib/nokogiri/css/parser.rb#387
+ # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:389
def _reduce_6(val, _values, result); end
# reduce 63 omitted
#
- # source://nokogiri//lib/nokogiri/css/parser.rb#691
+ # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:693
def _reduce_64(val, _values, result); end
- # source://nokogiri//lib/nokogiri/css/parser.rb#696
+ # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:698
def _reduce_65(val, _values, result); end
- # source://nokogiri//lib/nokogiri/css/parser.rb#701
+ # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:703
def _reduce_66(val, _values, result); end
- # source://nokogiri//lib/nokogiri/css/parser.rb#706
+ # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:708
def _reduce_67(val, _values, result); end
# reduce 68 omitted
#
- # source://nokogiri//lib/nokogiri/css/parser.rb#713
+ # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:715
def _reduce_69(val, _values, result); end
- # source://nokogiri//lib/nokogiri/css/parser.rb#392
+ # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:394
def _reduce_7(val, _values, result); end
- # source://nokogiri//lib/nokogiri/css/parser.rb#718
+ # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:720
def _reduce_70(val, _values, result); end
- # source://nokogiri//lib/nokogiri/css/parser.rb#723
+ # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:725
def _reduce_71(val, _values, result); end
- # source://nokogiri//lib/nokogiri/css/parser.rb#728
+ # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:730
def _reduce_72(val, _values, result); end
- # source://nokogiri//lib/nokogiri/css/parser.rb#733
+ # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:735
def _reduce_73(val, _values, result); end
- # source://nokogiri//lib/nokogiri/css/parser.rb#738
+ # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:740
def _reduce_74(val, _values, result); end
- # source://nokogiri//lib/nokogiri/css/parser.rb#743
+ # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:745
def _reduce_75(val, _values, result); end
- # source://nokogiri//lib/nokogiri/css/parser.rb#748
+ # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:750
def _reduce_76(val, _values, result); end
- # source://nokogiri//lib/nokogiri/css/parser.rb#397
+ # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:399
def _reduce_8(val, _values, result); end
- # source://nokogiri//lib/nokogiri/css/parser.rb#402
+ # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:404
def _reduce_9(val, _values, result); end
# reduce 81 omitted
#
- # source://nokogiri//lib/nokogiri/css/parser.rb#764
+ # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:766
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
+ # pkg:gem/nokogiri#lib/nokogiri/css/parser_extras.rb:18
def next_token; end
# On CSS parser error, raise an exception
#
- # @raise [SyntaxError]
- #
- # source://nokogiri//lib/nokogiri/css/parser_extras.rb#84
+ # pkg:gem/nokogiri#lib/nokogiri/css/parser_extras.rb:30
def on_error(error_token_id, error_value, value_stack); end
- # source://nokogiri//lib/nokogiri/css/parser_extras.rb#66
+ # pkg:gem/nokogiri#lib/nokogiri/css/parser_extras.rb:13
def parse(string); end
- # source://nokogiri//lib/nokogiri/css/parser.rb#26
+ # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:26
def unescape_css_identifier(identifier); end
- # source://nokogiri//lib/nokogiri/css/parser.rb#30
+ # pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:30
def unescape_css_string(str); end
- # Get the xpath for +string+ using +options+
+ # Get the xpath for +selector+ using +visitor+
#
- # source://nokogiri//lib/nokogiri/css/parser_extras.rb#76
- def xpath_for(string, prefix, visitor); end
+ # pkg:gem/nokogiri#lib/nokogiri/css/parser_extras.rb:23
+ def xpath_for(selector, visitor); end
+end
- class << self
- # Get the css selector in +string+ from the cache
- #
- # source://nokogiri//lib/nokogiri/css/parser_extras.rb#25
- def [](string); end
+# pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:279
+Nokogiri::CSS::Parser::Racc_arg = T.let(T.unsafe(nil), Array)
- # Set the css selector in +string+ in the cache to +value+
- #
- # source://nokogiri//lib/nokogiri/css/parser_extras.rb#32
- def []=(string, value); end
+# pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:357
+Nokogiri::CSS::Parser::Racc_debug_parser = T.let(T.unsafe(nil), FalseClass)
- # Return a thread-local boolean indicating whether the CSS-to-XPath cache is active. (Default is `true`.)
+# pkg:gem/nokogiri#lib/nokogiri/css/parser.rb:296
+Nokogiri::CSS::Parser::Racc_token_to_s_table = T.let(T.unsafe(nil), Array)
+
+# pkg:gem/nokogiri#lib/nokogiri/css/selector_cache.rb:5
+module Nokogiri::CSS::SelectorCache
+ class << self
+ # Retrieve the cached XPath expressions for the key
#
- # @return [Boolean]
+ # pkg:gem/nokogiri#lib/nokogiri/css/selector_cache.rb:11
+ def [](key); end
+
+ # Insert the XPath expressions `value` at the cache key
#
- # source://nokogiri//lib/nokogiri/css/parser_extras.rb#15
- def cache_on?; end
+ # pkg:gem/nokogiri#lib/nokogiri/css/selector_cache.rb:16
+ def []=(key, value); end
# Clear the cache
#
- # source://nokogiri//lib/nokogiri/css/parser_extras.rb#39
+ # pkg:gem/nokogiri#lib/nokogiri/css/selector_cache.rb:21
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.
+ # Construct a unique key cache key
#
- # 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
+ # pkg:gem/nokogiri#lib/nokogiri/css/selector_cache.rb:32
+ def key(selector:, visitor:); 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
+# pkg:gem/nokogiri#lib/nokogiri/css/syntax_error.rb:6
class Nokogiri::CSS::SyntaxError < ::Nokogiri::SyntaxError; end
-# source://nokogiri//lib/nokogiri/css/tokenizer.rb#11
+# pkg:gem/nokogiri#lib/nokogiri/css/tokenizer.rb:11
class Nokogiri::CSS::Tokenizer
- # source://nokogiri//lib/nokogiri/css/tokenizer.rb#57
+ # pkg:gem/nokogiri#lib/nokogiri/css/tokenizer.rb:57
def _next_token; end
- # source://nokogiri//lib/nokogiri/css/tokenizer.rb#26
+ # pkg:gem/nokogiri#lib/nokogiri/css/tokenizer.rb:26
def action; end
- # Returns the value of attribute filename.
- #
- # source://nokogiri//lib/nokogiri/css/tokenizer.rb#17
+ # pkg:gem/nokogiri#lib/nokogiri/css/tokenizer.rb:17
def filename; end
- # Returns the value of attribute lineno.
- #
- # source://nokogiri//lib/nokogiri/css/tokenizer.rb#16
+ # pkg:gem/nokogiri#lib/nokogiri/css/tokenizer.rb:16
def lineno; end
- # source://nokogiri//lib/nokogiri/css/tokenizer.rb#36
+ # pkg:gem/nokogiri#lib/nokogiri/css/tokenizer.rb:36
def load_file(filename); end
- # source://nokogiri//lib/nokogiri/css/tokenizer.rb#49
+ # pkg:gem/nokogiri#lib/nokogiri/css/tokenizer.rb:49
def next_token; end
- # source://nokogiri//lib/nokogiri/css/tokenizer.rb#30
+ # pkg:gem/nokogiri#lib/nokogiri/css/tokenizer.rb:34
def scan(str); end
- # source://nokogiri//lib/nokogiri/css/tokenizer.rb#43
+ # pkg:gem/nokogiri#lib/nokogiri/css/tokenizer.rb:43
def scan_file(filename); end
- # source://nokogiri//lib/nokogiri/css/tokenizer.rb#20
+ # pkg:gem/nokogiri#lib/nokogiri/css/tokenizer.rb:20
def scan_setup(str); end
- # source://nokogiri//lib/nokogiri/css/tokenizer.rb#30
+ # pkg:gem/nokogiri#lib/nokogiri/css/tokenizer.rb:30
def scan_str(str); end
- # Returns the value of attribute state.
- #
- # source://nokogiri//lib/nokogiri/css/tokenizer.rb#18
+ # pkg:gem/nokogiri#lib/nokogiri/css/tokenizer.rb:18
def state; end
- # Sets the attribute state
- #
- # @param value the value to set the attribute state to.
- #
- # source://nokogiri//lib/nokogiri/css/tokenizer.rb#18
+ # pkg:gem/nokogiri#lib/nokogiri/css/tokenizer.rb:18
def state=(_arg0); end
end
-# source://nokogiri//lib/nokogiri/css/tokenizer.rb#14
+# pkg:gem/nokogiri#lib/nokogiri/css/tokenizer.rb:14
class Nokogiri::CSS::Tokenizer::ScanError < ::StandardError; end
# When translating CSS selectors to XPath queries with Nokogiri::CSS.xpath_for, the XPathVisitor
# class allows for changing some of the behaviors related to builtin xpath functions and quirks
# of HTML5.
#
-# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#9
+# pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:9
class Nokogiri::CSS::XPathVisitor
# :call-seq:
# new() → XPathVisitor
@@ -590,157 +589,160 @@ class Nokogiri::CSS::XPathVisitor
#
# [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
+ # pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:69
+ def initialize(builtins: T.unsafe(nil), doctype: T.unsafe(nil), prefix: T.unsafe(nil), namespaces: T.unsafe(nil)); end
- # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#267
+ # pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:298
def accept(node); end
+ # The visitor configuration set via the +builtins:+ keyword argument to XPathVisitor.new.
+ #
+ # pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:48
+ def builtins; 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
+ # pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:93
def config; end
- # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#263
+ # The visitor configuration set via the +doctype:+ keyword argument to XPathVisitor.new.
+ #
+ # pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:51
+ def doctype; end
+
+ # The visitor configuration set via the +namespaces:+ keyword argument to XPathVisitor.new.
+ #
+ # pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:57
+ def namespaces; end
+
+ # The visitor configuration set via the +prefix:+ keyword argument to XPathVisitor.new.
+ #
+ # pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:54
+ def prefix; end
+
+ # pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:294
def visit_attrib_name(node); end
- # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#154
+ # pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:175
def visit_attribute_condition(node); end
- # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#234
+ # pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:255
def visit_child_selector(node); end
- # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#215
+ # pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:237
def visit_class_condition(node); end
- # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#219
+ # pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:241
def visit_combinator(node); end
- # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#240
+ # pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:262
def visit_conditional_selector(node); end
- # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#234
+ # pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:255
def visit_descendant_selector(node); end
- # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#234
+ # pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:255
def visit_direct_adjacent_selector(node); end
- # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#245
+ # pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:267
def visit_element_name(node); end
- # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#234
+ # pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:255
def visit_following_selector(node); end
# :stopdoc:
#
- # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#79
+ # pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:98
def visit_function(node); end
- # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#149
+ # pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:170
def visit_id(node); end
- # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#140
+ # pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:161
def visit_not(node); end
- # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#190
+ # pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:211
def visit_pseudo_class(node); end
private
- # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#328
+ # pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:365
def css_class(hay, needle); end
- # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#273
+ # pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:310
def html5_element_name_needs_namespace_handling(node); end
- # @return [Boolean]
- #
- # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#318
+ # pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:355
def is_of_type_pseudo_class?(node); end
- # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#280
+ # pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:317
def nth(node, options = T.unsafe(nil)); end
- # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#304
+ # pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:341
def read_a_and_positive_b(values); end
+
+ # pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:304
+ def validate_xpath_function_name(name); end
end
# Enum to direct XPathVisitor when to use Nokogiri builtin XPath functions.
#
-# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#13
+# pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:13
module Nokogiri::CSS::XPathVisitor::BuiltinsConfig; end
# Always use Nokogiri builtin functions whenever possible. This is probably only useful for testing.
#
-# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#19
+# pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:19
Nokogiri::CSS::XPathVisitor::BuiltinsConfig::ALWAYS = T.let(T.unsafe(nil), Symbol)
# Never use Nokogiri builtin functions, always generate vanilla XPath 1.0 queries. This is
# the default when calling Nokogiri::CSS.xpath_for directly.
#
-# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#16
+# pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:16
Nokogiri::CSS::XPathVisitor::BuiltinsConfig::NEVER = T.let(T.unsafe(nil), Symbol)
# Only use Nokogiri builtin functions when they will be faster than vanilla XPath. This is
# the behavior chosen when searching for CSS selectors on a Nokogiri document, fragment, or
# node.
#
-# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#24
+# pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:24
Nokogiri::CSS::XPathVisitor::BuiltinsConfig::OPTIMAL = T.let(T.unsafe(nil), Symbol)
-# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#27
+# pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:27
Nokogiri::CSS::XPathVisitor::BuiltinsConfig::VALUES = T.let(T.unsafe(nil), Array)
# Enum to direct XPathVisitor when to tweak the XPath query to suit the nature of the document
# being searched. Note that searches for CSS selectors from a Nokogiri document, fragment, or
# node will choose the correct option automatically.
#
-# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#33
+# pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:33
module Nokogiri::CSS::XPathVisitor::DoctypeConfig; end
# The document being searched is an HTML4 document.
#
-# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#38
+# pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:38
Nokogiri::CSS::XPathVisitor::DoctypeConfig::HTML4 = T.let(T.unsafe(nil), Symbol)
# The document being searched is an HTML5 document.
#
-# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#41
+# pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:41
Nokogiri::CSS::XPathVisitor::DoctypeConfig::HTML5 = T.let(T.unsafe(nil), Symbol)
-# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#44
+# pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:44
Nokogiri::CSS::XPathVisitor::DoctypeConfig::VALUES = T.let(T.unsafe(nil), Array)
# The document being searched is an XML document. This is the default.
#
-# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#35
+# pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:35
Nokogiri::CSS::XPathVisitor::DoctypeConfig::XML = T.let(T.unsafe(nil), Symbol)
-# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#10
+# pkg:gem/nokogiri#lib/nokogiri/css/xpath_visitor.rb:10
Nokogiri::CSS::XPathVisitor::WILDCARD_NAMESPACES = T.let(T.unsafe(nil), TrueClass)
-# 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.
#
@@ -752,7 +754,7 @@ end
#
# This module is included into those key classes who need to do this.
#
-# source://nokogiri//lib/nokogiri/class_resolver.rb#19
+# pkg:gem/nokogiri#lib/nokogiri/class_resolver.rb:17
module Nokogiri::ClassResolver
# :call-seq:
# related_class(class_name) → Class
@@ -777,91 +779,100 @@ module Nokogiri::ClassResolver
# ThisIsATopLevelClass.new.related_class("Document")
# # => Nokogiri::HTML4::Document
#
- # source://nokogiri//lib/nokogiri/class_resolver.rb#46
+ # pkg:gem/nokogiri#lib/nokogiri/class_resolver.rb:44
def related_class(class_name); end
end
# #related_class restricts matching namespaces to those matching this set.
#
-# source://nokogiri//lib/nokogiri/class_resolver.rb#21
+# pkg:gem/nokogiri#lib/nokogiri/class_resolver.rb:19
Nokogiri::ClassResolver::VALID_NAMESPACES = T.let(T.unsafe(nil), Set)
-# source://nokogiri//lib/nokogiri/decorators/slop.rb#4
+# pkg:gem/nokogiri#lib/nokogiri/decorators/slop.rb:4
module Nokogiri::Decorators; end
# The Slop decorator implements method missing such that a methods may be
# used instead of XPath or CSS. See Nokogiri.Slop
#
-# source://nokogiri//lib/nokogiri/decorators/slop.rb#8
+# pkg:gem/nokogiri#lib/nokogiri/decorators/slop.rb:8
module Nokogiri::Decorators::Slop
# look for node with +name+. See Nokogiri.Slop
#
- # source://nokogiri//lib/nokogiri/decorators/slop.rb#14
+ # pkg:gem/nokogiri#lib/nokogiri/decorators/slop.rb:14
def method_missing(name, *args, &block); end
private
- # @return [Boolean]
- #
- # source://nokogiri//lib/nokogiri/decorators/slop.rb#37
+ # pkg:gem/nokogiri#lib/nokogiri/decorators/slop.rb:35
def respond_to_missing?(name, include_private = T.unsafe(nil)); end
end
# The default XPath search context for Slop
#
-# source://nokogiri//lib/nokogiri/decorators/slop.rb#10
+# pkg:gem/nokogiri#lib/nokogiri/decorators/slop.rb:10
Nokogiri::Decorators::Slop::XPATH_PREFIX = T.let(T.unsafe(nil), String)
-# source://nokogiri//lib/nokogiri/encoding_handler.rb#5
+# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
class Nokogiri::EncodingHandler
- # Returns the value of attribute name.
+ # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
def name; end
class << self
+ # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
def [](_arg0); end
+
+ # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
def alias(_arg0, _arg1); end
+
+ # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
def clear_aliases!; end
+
+ # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
def delete(_arg0); end
- # source://nokogiri//lib/nokogiri/encoding_handler.rb#15
+ # pkg:gem/nokogiri#lib/nokogiri/encoding_handler.rb:15
def install_default_aliases; end
end
end
# Popular encoding aliases not known by all iconv implementations that Nokogiri should support.
#
-# source://nokogiri//lib/nokogiri/encoding_handler.rb#7
+# pkg:gem/nokogiri#lib/nokogiri/encoding_handler.rb:7
Nokogiri::EncodingHandler::USEFUL_ALIASES = T.let(T.unsafe(nil), Hash)
-# source://nokogiri//lib/nokogiri/gumbo.rb#4
+# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
module Nokogiri::Gumbo
class << self
- def fragment(_arg0, _arg1, _arg2, _arg3, _arg4, _arg5); end
- def parse(_arg0, _arg1, _arg2, _arg3, _arg4, _arg5); end
+ # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
+ def fragment(*_arg0); end
+
+ # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
+ def parse(*_arg0); end
end
end
# The default maximum number of attributes per element.
#
-# source://nokogiri//lib/nokogiri/gumbo.rb#6
+# pkg:gem/nokogiri#lib/nokogiri/gumbo.rb:6
Nokogiri::Gumbo::DEFAULT_MAX_ATTRIBUTES = T.let(T.unsafe(nil), Integer)
# The default maximum number of errors for parsing a document or a fragment.
#
-# source://nokogiri//lib/nokogiri/gumbo.rb#9
+# pkg:gem/nokogiri#lib/nokogiri/gumbo.rb:9
Nokogiri::Gumbo::DEFAULT_MAX_ERRORS = T.let(T.unsafe(nil), Integer)
# The default maximum depth of the DOM tree produced by parsing a document
# or fragment.
#
-# source://nokogiri//lib/nokogiri/gumbo.rb#13
+# pkg:gem/nokogiri#lib/nokogiri/gumbo.rb:13
Nokogiri::Gumbo::DEFAULT_MAX_TREE_DEPTH = T.let(T.unsafe(nil), Integer)
+# Alias for Nokogiri::HTML4
# 💡 This module/namespace is an alias for Nokogiri::HTML4 as of v1.12.0. Before v1.12.0,
# Nokogiri::HTML4 did not exist, and this was the module/namespace for all HTML-related
# classes.
#
-# source://nokogiri//lib/nokogiri/html.rb#8
+# pkg:gem/nokogiri#lib/nokogiri/html.rb:8
Nokogiri::HTML = Nokogiri::HTML4
# Since v1.12.0
@@ -869,18 +880,18 @@ Nokogiri::HTML = Nokogiri::HTML4
# 💡 Before v1.12.0, Nokogiri::HTML4 did not exist, and Nokogiri::HTML was the module/namespace
# for parsing HTML.
#
-# source://nokogiri//lib/nokogiri/html4.rb#19
+# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
module Nokogiri::HTML4
class << self
- # Parse a fragment from +string+ in to a NodeSet.
+ # Convenience method for Nokogiri::HTML4::DocumentFragment.parse
#
- # source://nokogiri//lib/nokogiri/html4.rb#29
- def fragment(string, encoding = T.unsafe(nil), options = T.unsafe(nil), &block); end
+ # pkg:gem/nokogiri#lib/nokogiri/html4.rb:24
+ def fragment(*_arg0, **_arg1, &_arg2); end
- # Parse HTML. Convenience method for Nokogiri::HTML4::Document.parse
+ # 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
+ # pkg:gem/nokogiri#lib/nokogiri/html4.rb:19
+ def parse(*_arg0, **_arg1, &_arg2); end
end
end
@@ -907,26 +918,29 @@ end
#
# The HTML builder inherits from the XML builder, so make sure to read the
# Nokogiri::XML::Builder documentation.
+# 💡 This class is an alias for Nokogiri::HTML4::Builder as of v1.12.0.
#
-# source://nokogiri//lib/nokogiri/html.rb#31
+# pkg:gem/nokogiri#lib/nokogiri/html.rb:31
class Nokogiri::HTML4::Builder < ::Nokogiri::XML::Builder
# Convert the builder to HTML
#
- # source://nokogiri//lib/nokogiri/html4/builder.rb#32
+ # pkg:gem/nokogiri#lib/nokogiri/html4/builder.rb:32
def to_html; end
end
-# source://nokogiri//lib/nokogiri/html4/document.rb#8
+# 💡 This class is an alias for Nokogiri::HTML4::Document as of v1.12.0.
+#
+# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
class Nokogiri::HTML4::Document < ::Nokogiri::XML::Document
# Create a Nokogiri::XML::DocumentFragment from +tags+
#
- # source://nokogiri//lib/nokogiri/html4/document.rb#149
+ # pkg:gem/nokogiri#lib/nokogiri/html4/document.rb:149
def fragment(tags = T.unsafe(nil)); end
# Get the meta tag encoding for this document. If there is no meta tag,
# then nil is returned.
#
- # source://nokogiri//lib/nokogiri/html4/document.rb#12
+ # pkg:gem/nokogiri#lib/nokogiri/html4/document.rb:12
def meta_encoding; end
# Set the meta tag encoding for this document.
@@ -945,7 +959,7 @@ class Nokogiri::HTML4::Document < ::Nokogiri::XML::Document
# Beware in CRuby, that libxml2 automatically inserts a meta tag
# into a head element.
#
- # source://nokogiri//lib/nokogiri/html4/document.rb#36
+ # pkg:gem/nokogiri#lib/nokogiri/html4/document.rb:36
def meta_encoding=(encoding); end
# Serialize Node using +options+. Save options can also be set using a block.
@@ -962,13 +976,13 @@ class Nokogiri::HTML4::Document < ::Nokogiri::XML::Document
# config.format.as_xml
# end
#
- # source://nokogiri//lib/nokogiri/html4/document.rb#142
+ # pkg:gem/nokogiri#lib/nokogiri/html4/document.rb:142
def serialize(options = T.unsafe(nil)); end
# Get the title string of this document. Return nil if there is
# no title tag.
#
- # source://nokogiri//lib/nokogiri/html4/document.rb#70
+ # pkg:gem/nokogiri#lib/nokogiri/html4/document.rb:70
def title; end
# Set the title string of this document.
@@ -982,9 +996,10 @@ class Nokogiri::HTML4::Document < ::Nokogiri::XML::Document
# encoding/charset tag if any, and before any text node or
# content element (typically ) if any.
#
- # source://nokogiri//lib/nokogiri/html4/document.rb#85
+ # pkg:gem/nokogiri#lib/nokogiri/html4/document.rb:85
def title=(text); end
+ # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
def type; end
# :call-seq:
@@ -994,196 +1009,301 @@ class Nokogiri::HTML4::Document < ::Nokogiri::XML::Document
#
# See XPathVisitor for more information.
#
- # source://nokogiri//lib/nokogiri/html4/document.rb#159
+ # pkg:gem/nokogiri#lib/nokogiri/html4/document.rb:159
def xpath_doctype; end
private
- # source://nokogiri//lib/nokogiri/html4/document.rb#60
+ # pkg:gem/nokogiri#lib/nokogiri/html4/document.rb:60
def meta_content_type; end
- # source://nokogiri//lib/nokogiri/html4/document.rb#103
+ # pkg:gem/nokogiri#lib/nokogiri/html4/document.rb:103
def set_metadata_element(element); end
class << self
+ # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
def new(*_arg0); end
- # 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.
+ # :call-seq:
+ # parse(input) { |options| ... } => Nokogiri::HTML4::Document
+ #
+ # Parse \HTML4 input from a String or IO object, and return a new HTML4::Document.
+ #
+ # [Required Parameters]
+ # - +input+ (String | IO) The content to be parsed.
+ #
+ # [Optional Keyword Arguments]
+ # - +url:+ (String) The base URI for this document.
+ #
+ # document. When not provided, the encoding will be determined based on the document
+ # content.
+ #
+ # - +options:+ (Nokogiri::XML::ParseOptions) Configuration object that determines some
+ # behaviors during parsing. See ParseOptions for more information. The default value is
+ # +ParseOptions::DEFAULT_HTML+.
+ #
+ # [Yields]
+ # If a block is given, a Nokogiri::XML::ParseOptions object is yielded to the block which
+ # can be configured before parsing. See Nokogiri::XML::ParseOptions for more information.
#
- # @yield [options]
+ # [Returns] Nokogiri::HTML4::Document
#
- # 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
+ # pkg:gem/nokogiri#lib/nokogiri/html4/document.rb:189
+ def parse(input, url_ = T.unsafe(nil), encoding_ = T.unsafe(nil), options_ = T.unsafe(nil), url: T.unsafe(nil), encoding: T.unsafe(nil), options: T.unsafe(nil)); end
+ # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
def read_io(_arg0, _arg1, _arg2, _arg3); end
+
+ # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
def read_memory(_arg0, _arg1, _arg2, _arg3); end
end
end
-# source://nokogiri//lib/nokogiri/html4/document_fragment.rb#5
+# 💡 This class is an alias for Nokogiri::HTML4::DocumentFragment as of v1.12.0.
+#
+# pkg:gem/nokogiri#lib/nokogiri/html4/document_fragment.rb:5
class Nokogiri::HTML4::DocumentFragment < ::Nokogiri::XML::DocumentFragment
- # @return [DocumentFragment] a new instance of DocumentFragment
- # @yield [options]
+ # :call-seq:
+ # new(document) { |options| ... } → HTML4::DocumentFragment
+ # new(document, input) { |options| ... } → HTML4::DocumentFragment
+ # new(document, input, context:, options:) { |options| ... } → HTML4::DocumentFragment
+ #
+ # Parse \HTML4 fragment input from a String, and return a new HTML4::DocumentFragment.
+ #
+ # 💡 It's recommended to use either HTML4::DocumentFragment.parse or XML::Node#parse rather
+ # than call this method directly.
+ #
+ # [Required Parameters]
+ # - +document+ (HTML4::Document) The parent document to associate the returned fragment with.
+ #
+ # [Optional Parameters]
+ # - +input+ (String) The content to be parsed.
+ #
+ # [Optional Keyword Arguments]
+ # - +context:+ (Nokogiri::XML::Node) The context node for the subtree created. See
+ # below for more information.
#
- # 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
+ # - +options:+ (Nokogiri::XML::ParseOptions) Configuration object that determines some
+ # behaviors during parsing. See ParseOptions for more information. The default value is
+ # +ParseOptions::DEFAULT_HTML+.
+ #
+ # [Yields]
+ # If a block is given, a Nokogiri::XML::ParseOptions object is yielded to the block which
+ # can be configured before parsing. See ParseOptions for more information.
+ #
+ # [Returns] HTML4::DocumentFragment
+ #
+ # === Context \Node
+ #
+ # If a context node is specified using +context:+, then the fragment will be created by
+ # calling XML::Node#parse on that node, so the parser will behave as if that Node is the
+ # parent of the fragment subtree.
+ #
+ # pkg:gem/nokogiri#lib/nokogiri/html4/document_fragment.rb:134
+ def initialize(document, input = T.unsafe(nil), context_ = T.unsafe(nil), options_ = T.unsafe(nil), context: T.unsafe(nil), options: T.unsafe(nil)); end
class << self
- # Create a Nokogiri::XML::DocumentFragment from +tags+, using +encoding+
+ # :call-seq:
+ # parse(input) { |options| ... } → HTML4::DocumentFragment
+ #
+ # Parse \HTML4 fragment input from a String, and return a new HTML4::DocumentFragment. This
+ # method creates a new, empty HTML4::Document to contain the fragment.
+ #
+ # [Required Parameters]
+ # - +input+ (String | IO) The content to be parsed.
+ #
+ # [Optional Keyword Arguments]
+ # document. When not provided, the encoding will be determined based on the document
+ # content.
+ #
+ # - +options:+ (Nokogiri::XML::ParseOptions) Configuration object that determines some
+ # behaviors during parsing. See ParseOptions for more information. The default value is
+ # +ParseOptions::DEFAULT_HTML+.
+ #
+ # [Yields]
+ # If a block is given, a Nokogiri::XML::ParseOptions object is yielded to the block which
+ # can be configured before parsing. See ParseOptions for more information.
+ #
+ # [Returns] HTML4::DocumentFragment
+ #
+ # *Example:* Parsing a string
+ #
+ # fragment = HTML4::DocumentFragment.parse("Hello World
")
+ #
+ # *Example:* Parsing an IO
+ #
+ # fragment = File.open("fragment.html") do |file|
+ # HTML4::DocumentFragment.parse(file)
+ # end
+ #
+ # *Example:* Specifying encoding
+ #
+ #
+ # *Example:* Setting parse options dynamically
#
- # source://nokogiri//lib/nokogiri/html4/document_fragment.rb#8
- def parse(tags, encoding = T.unsafe(nil), options = T.unsafe(nil), &block); end
+ # HTML4::DocumentFragment.parse("Hello World") do |options|
+ # options.huge.pedantic
+ # end
+ #
+ # pkg:gem/nokogiri#lib/nokogiri/html4/document_fragment.rb:52
+ def parse(input, encoding_ = T.unsafe(nil), options_ = T.unsafe(nil), encoding: T.unsafe(nil), options: T.unsafe(nil), &block); end
end
end
-# source://nokogiri//lib/nokogiri/html4/element_description.rb#5
+# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
class Nokogiri::HTML4::ElementDescription
# Is this element a block element?
#
- # @return [Boolean]
- #
- # source://nokogiri//lib/nokogiri/html4/element_description.rb#8
+ # pkg:gem/nokogiri#lib/nokogiri/html4/element_description.rb:8
def block?; end
+ # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
def default_sub_element; end
- # @return [Boolean]
+ # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
def deprecated?; end
+ # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
def deprecated_attributes; end
+
+ # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
def description; end
+
+ # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
def empty?; end
- # @return [Boolean]
+ # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
def implied_end_tag?; end
- # @return [Boolean]
+ # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
def implied_start_tag?; end
+ # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
def inline?; end
# Inspection information
#
- # source://nokogiri//lib/nokogiri/html4/element_description.rb#20
+ # pkg:gem/nokogiri#lib/nokogiri/html4/element_description.rb:20
def inspect; end
+ # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
def name; end
+
+ # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
def optional_attributes; end
+
+ # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
def required_attributes; end
- # @return [Boolean]
+ # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
def save_end_tag?; end
+ # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
def sub_elements; end
# Convert this description to a string
#
- # source://nokogiri//lib/nokogiri/html4/element_description.rb#14
+ # pkg:gem/nokogiri#lib/nokogiri/html4/element_description.rb:14
def to_s; end
private
- # source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#21
+ # pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:32
def default_desc; end
class << self
+ # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
def [](_arg0); end
end
end
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#233
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:436
Nokogiri::HTML4::ElementDescription::ACTION_ATTR = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#228
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:423
Nokogiri::HTML4::ElementDescription::ALIGN_ATTR = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#167
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:239
Nokogiri::HTML4::ElementDescription::ALT_ATTR = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#174
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:246
Nokogiri::HTML4::ElementDescription::APPLET_ATTRS = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#177
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:258
Nokogiri::HTML4::ElementDescription::AREA_ATTRS = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#153
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:212
Nokogiri::HTML4::ElementDescription::ATTRS = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#162
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:221
Nokogiri::HTML4::ElementDescription::A_ATTRS = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#179
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:268
Nokogiri::HTML4::ElementDescription::BASEFONT_ATTRS = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#272
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:546
Nokogiri::HTML4::ElementDescription::BGCOLOR_ATTR = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#135
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:171
Nokogiri::HTML4::ElementDescription::BLOCK = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#234
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:437
Nokogiri::HTML4::ElementDescription::BLOCKLI_ELT = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#182
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:271
Nokogiri::HTML4::ElementDescription::BODY_ATTRS = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#181
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:270
Nokogiri::HTML4::ElementDescription::BODY_CONTENTS = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#183
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:272
Nokogiri::HTML4::ElementDescription::BODY_DEPR = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#185
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:280
Nokogiri::HTML4::ElementDescription::BUTTON_ATTRS = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#154
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:213
Nokogiri::HTML4::ElementDescription::CELLHALIGN = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#155
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:214
Nokogiri::HTML4::ElementDescription::CELLVALIGN = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#170
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:242
Nokogiri::HTML4::ElementDescription::CLEAR_ATTRS = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#188
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:292
Nokogiri::HTML4::ElementDescription::COL_ATTRS = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#189
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:293
Nokogiri::HTML4::ElementDescription::COL_ELT = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#193
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:297
Nokogiri::HTML4::ElementDescription::COMPACT_ATTR = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#191
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:295
Nokogiri::HTML4::ElementDescription::COMPACT_ATTRS = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#236
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:439
Nokogiri::HTML4::ElementDescription::CONTENT_ATTR = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#148
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:199
Nokogiri::HTML4::ElementDescription::COREATTRS = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#159
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:218
Nokogiri::HTML4::ElementDescription::CORE_ATTRS = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#158
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:217
Nokogiri::HTML4::ElementDescription::CORE_I18N_ATTRS = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#275
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:549
Nokogiri::HTML4::ElementDescription::DIR_ATTR = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#192
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:296
Nokogiri::HTML4::ElementDescription::DL_CONTENTS = T.let(T.unsafe(nil), Array)
# This is filled in down below.
#
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#19
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:30
Nokogiri::HTML4::ElementDescription::DefaultDescriptions = T.let(T.unsafe(nil), Hash)
# Methods are defined protected by method_defined? because at
@@ -1191,468 +1311,459 @@ Nokogiri::HTML4::ElementDescription::DefaultDescriptions = T.let(T.unsafe(nil),
# and we don't want to clobber any methods that have been
# defined there.
#
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#11
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:11
Nokogiri::HTML4::ElementDescription::Desc = Struct
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#190
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:294
Nokogiri::HTML4::ElementDescription::EDIT_ATTRS = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#217
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:377
Nokogiri::HTML4::ElementDescription::EMBED_ATTRS = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#141
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:192
Nokogiri::HTML4::ElementDescription::EMPTY = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#150
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:201
Nokogiri::HTML4::ElementDescription::EVENTS = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#195
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:299
Nokogiri::HTML4::ElementDescription::FIELDSET_CONTENTS = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#139
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:190
Nokogiri::HTML4::ElementDescription::FLOW = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#173
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:245
Nokogiri::HTML4::ElementDescription::FLOW_PARAM = T.let(T.unsafe(nil), Array)
# Attributes defined and categorized
#
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#125
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:136
Nokogiri::HTML4::ElementDescription::FONTSTYLE = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#196
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:300
Nokogiri::HTML4::ElementDescription::FONT_ATTRS = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#134
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:170
Nokogiri::HTML4::ElementDescription::FORMCTRL = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#200
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:318
Nokogiri::HTML4::ElementDescription::FORM_ATTRS = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#197
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:301
Nokogiri::HTML4::ElementDescription::FORM_CONTENTS = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#204
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:339
Nokogiri::HTML4::ElementDescription::FRAMESET_ATTRS = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#205
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:340
Nokogiri::HTML4::ElementDescription::FRAMESET_CONTENTS = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#202
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:328
Nokogiri::HTML4::ElementDescription::FRAME_ATTRS = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#132
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:168
Nokogiri::HTML4::ElementDescription::HEADING = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#206
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:341
Nokogiri::HTML4::ElementDescription::HEAD_ATTRS = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#207
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:342
Nokogiri::HTML4::ElementDescription::HEAD_CONTENTS = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#169
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:241
Nokogiri::HTML4::ElementDescription::HREF_ATTRS = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#209
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:352
Nokogiri::HTML4::ElementDescription::HR_DEPR = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#157
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:216
Nokogiri::HTML4::ElementDescription::HTML_ATTRS = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#146
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:197
Nokogiri::HTML4::ElementDescription::HTML_CDATA = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#211
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:354
Nokogiri::HTML4::ElementDescription::HTML_CONTENT = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#143
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:194
Nokogiri::HTML4::ElementDescription::HTML_FLOW = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#144
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:195
Nokogiri::HTML4::ElementDescription::HTML_INLINE = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#145
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:196
Nokogiri::HTML4::ElementDescription::HTML_PCDATA = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#149
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:200
Nokogiri::HTML4::ElementDescription::I18N = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#160
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:219
Nokogiri::HTML4::ElementDescription::I18N_ATTRS = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#212
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:355
Nokogiri::HTML4::ElementDescription::IFRAME_ATTRS = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#215
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:368
Nokogiri::HTML4::ElementDescription::IMG_ATTRS = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#138
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:189
Nokogiri::HTML4::ElementDescription::INLINE = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#171
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:243
Nokogiri::HTML4::ElementDescription::INLINE_P = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#221
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:398
Nokogiri::HTML4::ElementDescription::INPUT_ATTRS = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#194
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:298
Nokogiri::HTML4::ElementDescription::LABEL_ATTR = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#226
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:421
Nokogiri::HTML4::ElementDescription::LABEL_ATTRS = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#253
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:484
Nokogiri::HTML4::ElementDescription::LANGUAGE_ATTR = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#227
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:422
Nokogiri::HTML4::ElementDescription::LEGEND_ATTRS = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#229
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:424
Nokogiri::HTML4::ElementDescription::LINK_ATTRS = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#133
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:169
Nokogiri::HTML4::ElementDescription::LIST = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#273
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:547
Nokogiri::HTML4::ElementDescription::LI_ELT = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#231
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:434
Nokogiri::HTML4::ElementDescription::MAP_CONTENTS = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#235
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:438
Nokogiri::HTML4::ElementDescription::META_ATTRS = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#140
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:191
Nokogiri::HTML4::ElementDescription::MODIFIER = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#232
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:435
Nokogiri::HTML4::ElementDescription::NAME_ATTR = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#238
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:441
Nokogiri::HTML4::ElementDescription::NOFRAMES_CONTENT = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#240
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:443
Nokogiri::HTML4::ElementDescription::OBJECT_ATTRS = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#239
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:442
Nokogiri::HTML4::ElementDescription::OBJECT_CONTENTS = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#243
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:459
Nokogiri::HTML4::ElementDescription::OBJECT_DEPR = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#244
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:460
Nokogiri::HTML4::ElementDescription::OL_ATTRS = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#246
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:462
Nokogiri::HTML4::ElementDescription::OPTGROUP_ATTRS = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#247
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:463
Nokogiri::HTML4::ElementDescription::OPTION_ATTRS = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#245
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:461
Nokogiri::HTML4::ElementDescription::OPTION_ELT = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#248
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:464
Nokogiri::HTML4::ElementDescription::PARAM_ATTRS = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#131
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:167
Nokogiri::HTML4::ElementDescription::PCDATA = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#126
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:137
Nokogiri::HTML4::ElementDescription::PHRASE = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#250
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:466
Nokogiri::HTML4::ElementDescription::PRE_CONTENT = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#225
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:420
Nokogiri::HTML4::ElementDescription::PROMPT_ATTRS = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#180
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:269
Nokogiri::HTML4::ElementDescription::QUOTE_ATTRS = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#166
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:238
Nokogiri::HTML4::ElementDescription::ROWS_COLS_ATTR = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#252
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:483
Nokogiri::HTML4::ElementDescription::SCRIPT_ATTRS = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#255
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:486
Nokogiri::HTML4::ElementDescription::SELECT_ATTRS = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#254
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:485
Nokogiri::HTML4::ElementDescription::SELECT_CONTENT = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#128
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:149
Nokogiri::HTML4::ElementDescription::SPECIAL = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#168
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:240
Nokogiri::HTML4::ElementDescription::SRC_ALT_ATTRS = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#257
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:497
Nokogiri::HTML4::ElementDescription::STYLE_ATTRS = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#258
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:498
Nokogiri::HTML4::ElementDescription::TABLE_ATTRS = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#261
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:510
Nokogiri::HTML4::ElementDescription::TABLE_CONTENTS = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#260
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:509
Nokogiri::HTML4::ElementDescription::TABLE_DEPR = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#264
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:520
Nokogiri::HTML4::ElementDescription::TALIGN_ATTRS = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#165
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:237
Nokogiri::HTML4::ElementDescription::TARGET_ATTR = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#268
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:533
Nokogiri::HTML4::ElementDescription::TEXTAREA_ATTRS = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#266
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:522
Nokogiri::HTML4::ElementDescription::TH_TD_ATTR = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#265
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:521
Nokogiri::HTML4::ElementDescription::TH_TD_DEPR = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#271
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:545
Nokogiri::HTML4::ElementDescription::TR_CONTENTS = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#263
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:519
Nokogiri::HTML4::ElementDescription::TR_ELT = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#237
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:440
Nokogiri::HTML4::ElementDescription::TYPE_ATTR = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#274
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:548
Nokogiri::HTML4::ElementDescription::UL_DEPR = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#210
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:353
Nokogiri::HTML4::ElementDescription::VERSION_ATTR = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#249
+# pkg:gem/nokogiri#lib/nokogiri/html4/element_description_defaults.rb:465
Nokogiri::HTML4::ElementDescription::WIDTH_ATTR = T.let(T.unsafe(nil), Array)
-# source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#14
+# pkg:gem/nokogiri#lib/nokogiri/html4/encoding_reader.rb:14
class Nokogiri::HTML4::EncodingReader
- # @return [EncodingReader] a new instance of EncodingReader
- #
- # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#82
+ # pkg:gem/nokogiri#lib/nokogiri/html4/encoding_reader.rb:82
def initialize(io); end
# This method is used by the C extension so that
# Nokogiri::HTML4::Document#read_io() does not leak memory when
# EncodingFound is raised.
#
- # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#91
+ # pkg:gem/nokogiri#lib/nokogiri/html4/encoding_reader.rb:91
def encoding_found; end
- # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#93
+ # pkg:gem/nokogiri#lib/nokogiri/html4/encoding_reader.rb:93
def read(len); end
class << self
- # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#59
+ # pkg:gem/nokogiri#lib/nokogiri/html4/encoding_reader.rb:59
def detect_encoding(chunk); end
end
end
-# source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#15
+# pkg:gem/nokogiri#lib/nokogiri/html4/encoding_reader.rb:15
class Nokogiri::HTML4::EncodingReader::EncodingFound < ::StandardError
- # @return [EncodingFound] a new instance of EncodingFound
- #
- # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#18
+ # pkg:gem/nokogiri#lib/nokogiri/html4/encoding_reader.rb:18
def initialize(encoding); end
- # Returns the value of attribute found_encoding.
- #
- # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#16
+ # pkg:gem/nokogiri#lib/nokogiri/html4/encoding_reader.rb:16
def found_encoding; end
end
-# source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#46
+# pkg:gem/nokogiri#lib/nokogiri/html4/encoding_reader.rb:46
class Nokogiri::HTML4::EncodingReader::JumpSAXHandler < ::Nokogiri::HTML4::EncodingReader::SAXHandler
- # @return [JumpSAXHandler] a new instance of JumpSAXHandler
- #
- # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#47
+ # pkg:gem/nokogiri#lib/nokogiri/html4/encoding_reader.rb:47
def initialize(jumptag); end
- # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#52
+ # pkg:gem/nokogiri#lib/nokogiri/html4/encoding_reader.rb:52
def start_element(name, attrs = T.unsafe(nil)); end
end
-# source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#24
+# pkg:gem/nokogiri#lib/nokogiri/html4/encoding_reader.rb:24
class Nokogiri::HTML4::EncodingReader::SAXHandler < ::Nokogiri::XML::SAX::Document
- # @return [SAXHandler] a new instance of SAXHandler
- #
- # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#27
+ # pkg:gem/nokogiri#lib/nokogiri/html4/encoding_reader.rb:27
def initialize; end
- # Returns the value of attribute encoding.
- #
- # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#25
+ # pkg:gem/nokogiri#lib/nokogiri/html4/encoding_reader.rb:25
def encoding; end
- # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#32
+ # pkg:gem/nokogiri#lib/nokogiri/html4/encoding_reader.rb:32
def start_element(name, attrs = T.unsafe(nil)); end
end
-# source://nokogiri//lib/nokogiri/html4/entity_lookup.rb#5
+# pkg:gem/nokogiri#lib/nokogiri/html4/entity_lookup.rb:5
class Nokogiri::HTML4::EntityDescription < ::Struct; end
-# source://nokogiri//lib/nokogiri/html4/entity_lookup.rb#7
+# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
class Nokogiri::HTML4::EntityLookup
# Look up entity with +name+
#
- # source://nokogiri//lib/nokogiri/html4/entity_lookup.rb#10
+ # pkg:gem/nokogiri#lib/nokogiri/html4/entity_lookup.rb:10
def [](name); end
+ # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
def get(_arg0); end
end
# Instance of Nokogiri::HTML4::EntityLookup
#
-# source://nokogiri//lib/nokogiri/html4.rb#35
+# pkg:gem/nokogiri#lib/nokogiri/html4.rb:30
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.
+# Nokogiri provides a SAX parser to process HTML4 which will provide HTML recovery
+# ("autocorrection") 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
+# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
module Nokogiri::HTML4::SAX; end
-# This class lets you perform SAX style parsing on HTML with HTML error correction.
+# This parser is a SAX style parser that reads its input as it deems necessary. The parser
+# takes a Nokogiri::XML::SAX::Document, an optional encoding, then given an HTML input, sends
+# messages to the Nokogiri::XML::SAX::Document.
+#
+# ⚠ This is an HTML4 parser and so may not support some HTML5 features and behaviors.
#
# Here is a basic usage example:
#
-# class MyDoc < Nokogiri::XML::SAX::Document
+# class MyHandler < 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'))
+# parser = Nokogiri::HTML4::SAX::Parser.new(MyHandler.new)
#
-# For more information on SAX parsers, see Nokogiri::XML::SAX
+# # Hand an IO object to the parser, which will read the HTML from the IO.
+# File.open(path_to_html) do |f|
+# parser.parse(f)
+# end
#
-# source://nokogiri//lib/nokogiri/html4/sax/parser.rb#27
+# For more information on \SAX parsers, see Nokogiri::XML::SAX or the parent class
+# Nokogiri::XML::SAX::Parser.
+#
+# Also see Nokogiri::XML::SAX::Document for the available events.
+#
+# 💡 This class is an alias for Nokogiri::HTML4::SAX::Parser as of v1.12.0.
+#
+# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
class Nokogiri::HTML4::SAX::Parser < ::Nokogiri::XML::SAX::Parser
- # 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
+ private
- # 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
+ # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
+ def initialize_native; 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
+# Context object to invoke the HTML4 SAX parser on the SAX::Document handler.
+#
+# 💡 This class is usually not instantiated by the user. Use Nokogiri::HTML4::SAX::Parser
+# instead.
+# 💡 This class is an alias for Nokogiri::HTML4::SAX::ParserContext as of v1.12.0.
#
-# source://nokogiri//lib/nokogiri/html4/sax/parser_context.rb#9
+# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
class Nokogiri::HTML4::SAX::ParserContext < ::Nokogiri::XML::SAX::ParserContext
+ # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
def parse_with(_arg0); end
class << self
- def file(_arg0, _arg1); end
- def memory(_arg0, _arg1); end
+ # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
+ def native_file(_arg0, _arg1); end
- # source://nokogiri//lib/nokogiri/html4/sax/parser_context.rb#10
- def new(thing, encoding = T.unsafe(nil)); end
+ # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
+ def native_memory(_arg0, _arg1); end
end
end
-# source://nokogiri//lib/nokogiri/html4/sax/push_parser.rb#6
+# 💡 This class is an alias for Nokogiri::HTML4::SAX::PushParser as of v1.12.0.
+#
+# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
class Nokogiri::HTML4::SAX::PushParser < ::Nokogiri::XML::SAX::PushParser
- # @return [PushParser] a new instance of PushParser
- #
- # source://nokogiri//lib/nokogiri/html4/sax/push_parser.rb#11
+ # pkg:gem/nokogiri#lib/nokogiri/html4/sax/push_parser.rb:11
def initialize(doc = T.unsafe(nil), file_name = T.unsafe(nil), encoding = T.unsafe(nil)); end
- # Write a +chunk+ of HTML to the PushParser. Any callback methods
- # that can be called will be called immediately.
- #
- # source://nokogiri//lib/nokogiri/html4/sax/push_parser.rb#23
+ # pkg:gem/nokogiri#lib/nokogiri/html4/sax/push_parser.rb:26
def <<(chunk, last_chunk = T.unsafe(nil)); end
# The Nokogiri::HTML4::SAX::Document on which the PushParser will be
# operating
#
- # source://nokogiri//lib/nokogiri/html4/sax/push_parser.rb#9
+ # pkg:gem/nokogiri#lib/nokogiri/html4/sax/push_parser.rb:9
def document; end
# The Nokogiri::HTML4::SAX::Document on which the PushParser will be
# operating
#
- # source://nokogiri//lib/nokogiri/html4/sax/push_parser.rb#9
+ # pkg:gem/nokogiri#lib/nokogiri/html4/sax/push_parser.rb:9
def document=(_arg0); end
# Finish the parsing. This method is only necessary for
# Nokogiri::HTML4::SAX::Document#end_document to be called.
#
- # source://nokogiri//lib/nokogiri/html4/sax/push_parser.rb#31
+ # pkg:gem/nokogiri#lib/nokogiri/html4/sax/push_parser.rb:31
def finish; end
# Write a +chunk+ of HTML to the PushParser. Any callback methods
# that can be called will be called immediately.
#
- # source://nokogiri//lib/nokogiri/html4/sax/push_parser.rb#23
+ # pkg:gem/nokogiri#lib/nokogiri/html4/sax/push_parser.rb:23
def write(chunk, last_chunk = T.unsafe(nil)); end
private
+ # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
def initialize_native(_arg0, _arg1, _arg2); end
+
+ # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
def native_write(_arg0, _arg1); end
end
# == Usage
#
-# ⚠ HTML5 functionality is not available when running JRuby.
-#
# Parse an HTML5 document:
#
-# doc = Nokogiri.HTML5(string)
+# doc = Nokogiri.HTML5(input)
#
# Parse an HTML5 fragment:
#
-# fragment = Nokogiri::HTML5.fragment(string)
+# fragment = Nokogiri::HTML5.fragment(input)
+#
+# ⚠ HTML5 functionality is not available when running JRuby.
#
# == Parsing options
#
-# The document and fragment parsing methods support options that are different from Nokogiri's.
+# The document and fragment parsing methods support options that are different from
+# Nokogiri::HTML4::Document or Nokogiri::XML::Document.
#
-# -
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.
+# The four currently supported parse options are
#
-# === Error reporting
+# - +max_errors:+ (Integer, default 0) Maximum number of parse errors to report in HTML5::Document#errors.
+# - +max_tree_depth:+ (Integer, default +Nokogiri::Gumbo::DEFAULT_MAX_TREE_DEPTH+) Maximum tree depth to parse.
+# - +max_attributes:+ (Integer, default +Nokogiri::Gumbo::DEFAULT_MAX_ATTRIBUTES+) Maximum number of attributes to parse per element.
+# - +parse_noscript_content_as_text:+ (Boolean, default false) When enabled, parse +noscript+ tag content as text, mimicking the behavior of web browsers.
+#
+# These options are explained in the following sections.
+#
+# === Error reporting: +max_errors:+
#
# 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}.
+# HTML5.parse or HTML5.fragment.
#
# For example, this script:
#
@@ -1678,20 +1789,21 @@ end
#
# 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 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
+# The {HTML standard}[https://html.spec.whatwg.org/multipage/parsing.html#parse-errors] 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.
+# 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
+# doc = Nokogiri::HTML5.parse('
Hi there!',
# # => 1:1: generic-parser
# # 1:1: non-void-html-element-start-tag-with-trailing-solidus
# # 1:17: end-tag-with-trailing-solidus
@@ -1704,40 +1816,75 @@ end
# 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
+# === Maximum tree depth: +max_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.
+# +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.
+# This limit (which defaults to +Nokogiri::Gumbo::DEFAULT_MAX_TREE_DEPTH+) 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
+# === Attribute limit per element: +max_attributes:+
#
# 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.
+# 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.
+# This limit (which defaults to +Nokogiri::Gumbo::DEFAULT_MAX_ATTRIBUTES+) can be removed by
+# giving the option
max_attributes: -1.
#
-# html = '
'
+# html = '
'
# # "
"
# doc = Nokogiri.HTML5(html)
# # raises ArgumentError: Attributes per element limit exceeded
+#
# doc = Nokogiri.HTML5(html, max_attributes: -1)
+# # parses successfully
+#
+# === Parse +noscript+ elements' content as text: +parse_noscript_content_as_text:+
+#
+# By default, the content of +noscript+ elements is parsed as HTML elements. Browsers that
+# support scripting parse the content of +noscript+ elements as raw text.
+#
+# The +:parse_noscript_content_as_text+ option causes Nokogiri to parse the content of +noscript+
+# elements as a single text node.
+#
+# html = ""
+# doc = Nokogiri::HTML5.parse(html, parse_noscript_content_as_text: true)
+# pp doc.at_xpath("/html/head/noscript")
+# # => #(Element:0x878c {
+# # name = "noscript",
+# # children = [ #(Text "")]
+# # })
+#
+# In contrast, parse_noscript_content_as_text: false (the default) causes the +noscript+
+# element in the previous example to have two children, a +meta+ element and a +link+ element.
+#
+# doc = Nokogiri::HTML5.parse(html)
+# puts doc.at_xpath("/html/head/noscript")
+# # => #(Element:0x96b4 {
+# # name = "noscript",
+# # children = [
+# # #(Element:0x97e0 { name = "meta", attribute_nodes = [ #(Attr:0x990c { name = "charset", value = "UTF-8" })] }),
+# # #(Element:0x9b00 {
+# # name = "link",
+# # attribute_nodes = [
+# # #(Attr:0x9c2c { name = "rel", value = "stylesheet" }),
+# # #(Attr:0x9dd0 { name = "href", value = "!" })]
+# # })]
+# # })
#
# == 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
+# 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
+# +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!")
@@ -1745,12 +1892,12 @@ end
# # => 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
+# 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.
+# In particular, a newline at the start of +pre+, +listing+, and +textarea+
+# elements is ignored by the parser.
#
# doc = Nokogiri::HTML5(<<-EOF)
#
@@ -1779,104 +1926,124 @@ end
#
# == Encodings
#
-# Nokogiri always parses HTML5 using {https://en.wikipedia.org/wiki/UTF-8 UTF-8}; however, the
+# Nokogiri always parses HTML5 using {UTF-8}[https://en.wikipedia.org/wiki/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}.
+# as {HTML numeric
+# entities}[https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references].
#
# 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
+# (There's a {bug}[https://bugs.ruby-lang.org/issues/15033] 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.fragment function takes a String or IO and parses it as a HTML5 document
+# in a +body+ context. As a result, the +html+, +head+, and +body+ elements are removed from
+# this document, and any children of these elements that remain are returned as a
+# Nokogiri::HTML5::DocumentFragment; but you can pass in a different context (e.g., "html" to
+# get +head+ and +body+ tags in the result).
#
-# * 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.
+# * The Nokogiri::HTML5.parse function takes a String or IO 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.
+# * 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
+# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
module Nokogiri::HTML5
class << self
- # Parse a fragment from +string+. Convenience method for
- # {Nokogiri::HTML5::DocumentFragment.parse}.
+ # Convenience method for Nokogiri::HTML5::DocumentFragment.parse
#
- # source://nokogiri//lib/nokogiri/html5.rb#238
- def fragment(string, encoding = T.unsafe(nil), **options); end
+ # pkg:gem/nokogiri#lib/nokogiri/html5.rb:280
+ def fragment(*_arg0, **_arg1, &_arg2); 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]
+ # Convenience method for Nokogiri::HTML5::Document.parse
#
- # source://nokogiri//lib/nokogiri/html5.rb#249
- def get(uri, options = T.unsafe(nil)); end
+ # pkg:gem/nokogiri#lib/nokogiri/html5.rb:275
+ def parse(*_arg0, **_arg1, &_arg2); 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#257
+ # pkg:gem/nokogiri#lib/nokogiri/html5.rb:285
def read_and_encode(string, encoding); end
private
- # source://nokogiri//lib/nokogiri/html5.rb#283
- 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
+ # 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
+ # 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#344
+ # pkg:gem/nokogiri#lib/nokogiri/html5.rb:323
def reencode(body, content_type = T.unsafe(nil)); end
end
end
+# Nokogiri HTML5 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.
+#
+# The construction behavior is identical to HTML4::Builder, but HTML5 documents implement the
+# [HTML5 standard's serialization
+# algorithm](https://www.w3.org/TR/2008/WD-html5-20080610/serializing.html).
+#
+# == Synopsis:
+#
+# Create an HTML5 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::HTML5::Builder.new do |doc|
+# doc.html {
+# doc.body(:onload => 'some_func();') {
+# doc.span.bold {
+# doc.text "Hello world"
+# }
+# }
+# }
+# end
+# puts builder.to_html
+#
+# The HTML5 builder inherits from the XML builder, so make sure to read the
+# Nokogiri::XML::Builder documentation.
+#
+# pkg:gem/nokogiri#lib/nokogiri/html5/builder.rb:32
+class Nokogiri::HTML5::Builder < ::Nokogiri::XML::Builder
+ # Convert the builder to HTML
+ #
+ # pkg:gem/nokogiri#lib/nokogiri/html5/builder.rb:35
+ def to_html; end
+end
+
# Since v1.12.0
#
# 💡 HTML5 functionality is not available when running JRuby.
#
-# source://nokogiri//lib/nokogiri/html5/document.rb#39
+# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
class Nokogiri::HTML5::Document < ::Nokogiri::HTML4::Document
- # @return [Document] a new instance of Document
- #
- # source://nokogiri//lib/nokogiri/html5/document.rb#129
+ # pkg:gem/nokogiri#lib/nokogiri/html5/document.rb:159
def initialize(*args); end
# :call-seq:
@@ -1889,27 +2056,28 @@ class Nokogiri::HTML5::Document < ::Nokogiri::HTML4::Document
# - +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`.
+ # 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
+ # pkg:gem/nokogiri#lib/nokogiri/html5/document.rb:178
def fragment(markup = T.unsafe(nil)); end
# Get the parser's quirks mode value. See HTML5::QuirksMode.
#
- # This method returns `nil` if the parser was not invoked (e.g., `Nokogiri::HTML5::Document.new`).
+ # 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
+ # pkg:gem/nokogiri#lib/nokogiri/html5/document.rb:49
def quirks_mode; end
- # source://nokogiri//lib/nokogiri/html5/document.rb#151
+ # pkg:gem/nokogiri#lib/nokogiri/html5/document.rb:182
def to_xml(options = T.unsafe(nil), &block); end
# Get the url name for this document, as passed into Document.parse, Document.read_io, or
# Document.read_memory
#
- # source://nokogiri//lib/nokogiri/html5/document.rb#42
+ # pkg:gem/nokogiri#lib/nokogiri/html5/document.rb:42
def url; end
# :call-seq:
@@ -1919,65 +2087,77 @@ class Nokogiri::HTML5::Document < ::Nokogiri::HTML4::Document
#
# See CSS::XPathVisitor for more information.
#
- # source://nokogiri//lib/nokogiri/html5/document.rb#163
+ # pkg:gem/nokogiri#lib/nokogiri/html5/document.rb:194
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(input) { |options| ... } → HTML5::Document
+ # parse(input, **options) → HTML5::Document
#
- # Parse HTML5 input.
+ # Parse \HTML input with a parser compliant with the HTML5 spec. This method uses the
+ # parameter.
#
- # [Parameters]
- # - +input+ may be a String, or any object that responds to _read_ and _close_ such as an
- # IO, or StringIO.
+ # [Required Parameters]
+ # - +input+ (String | IO) the \HTML content to be parsed.
+ #
+ # [Optional Parameters]
+ # - +url:+ (String) the base URI of the document.
+ #
+ # [Optional Keyword Arguments]
+ # document. When not provided, the encoding will be determined based on the document
+ # content.
+ #
+ # - +max_errors:+ (Integer) The maximum number of parse errors to record. (default
+ # +Nokogiri::Gumbo::DEFAULT_MAX_ERRORS+ which is currently 0)
+ #
+ # - +max_tree_depth:+ (Integer) The maximum depth of the parse tree. (default
+ # +Nokogiri::Gumbo::DEFAULT_MAX_TREE_DEPTH+)
#
- # - +url+ (optional) is a String indicating the canonical URI where this document is located.
+ # - +max_attributes:+ (Integer) The maximum number of attributes allowed on an
+ # element. (default +Nokogiri::Gumbo::DEFAULT_MAX_ATTRIBUTES+)
#
- # - +encoding+ (optional) is the encoding that should be used when processing
- # the document.
+ # - +parse_noscript_content_as_text:+ (Boolean) Whether to parse the content of +noscript+
+ # elements as text. (default +false+)
#
- # - +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.
+ # See rdoc-ref:HTML5@Parsing+options for a complete description of these parsing options.
#
- # ⚠ Note that these options are different than those made available by
- # Nokogiri::XML::Document and Nokogiri::HTML4::Document.
+ # [Yields]
+ # If present, the block will be passed a Hash object to modify with parse options before the
+ # input is parsed. See rdoc-ref:HTML5@Parsing+options for a list of available options.
#
- # - +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]
+ # *Example:* Parse a string with a specific encoding and custom max errors limit.
#
- # source://nokogiri//lib/nokogiri/html5/document.rb#80
- def parse(string_or_io, url = T.unsafe(nil), encoding = T.unsafe(nil), **options, &block); end
+ #
+ # *Example:* Parse a string setting the +:parse_noscript_content_as_text+ option using the
+ # configuration block parameter.
+ #
+ # Nokogiri::HTML5::Document.parse(input) { |c| c[:parse_noscript_content_as_text] = true }
+ #
+ # pkg:gem/nokogiri#lib/nokogiri/html5/document.rb:103
+ def parse(string_or_io, url_ = T.unsafe(nil), encoding_ = T.unsafe(nil), url: T.unsafe(nil), encoding: T.unsafe(nil), **options, &block); end
# Create a new document from an IO object.
#
# 💡 Most users should prefer Document.parse to this method.
#
- # @raise [ArgumentError]
- #
- # source://nokogiri//lib/nokogiri/html5/document.rb#101
- def read_io(io, url = T.unsafe(nil), encoding = T.unsafe(nil), **options); end
+ # pkg:gem/nokogiri#lib/nokogiri/html5/document.rb:129
+ def read_io(io, url_ = T.unsafe(nil), encoding_ = T.unsafe(nil), url: T.unsafe(nil), encoding: T.unsafe(nil), **options); end
# Create a new document from a String.
#
# 💡 Most users should prefer Document.parse to this method.
#
- # @raise [ArgumentError]
- #
- # source://nokogiri//lib/nokogiri/html5/document.rb#110
- def read_memory(string, url = T.unsafe(nil), encoding = T.unsafe(nil), **options); end
+ # pkg:gem/nokogiri#lib/nokogiri/html5/document.rb:138
+ def read_memory(string, url_ = T.unsafe(nil), encoding_ = T.unsafe(nil), url: T.unsafe(nil), encoding: T.unsafe(nil), **options); end
private
- # source://nokogiri//lib/nokogiri/html5/document.rb#118
- def do_parse(string_or_io, url, encoding, options); end
+ # pkg:gem/nokogiri#lib/nokogiri/html5/document.rb:146
+ def do_parse(string_or_io, url, encoding, **options); end
end
end
@@ -1985,59 +2165,124 @@ end
#
# 💡 HTML5 functionality is not available when running JRuby.
#
-# source://nokogiri//lib/nokogiri/html5/document_fragment.rb#27
+# pkg:gem/nokogiri#lib/nokogiri/html5/document_fragment.rb:27
class Nokogiri::HTML5::DocumentFragment < ::Nokogiri::HTML4::DocumentFragment
- # Create a document fragment.
+ # :call-seq:
+ # new(document, input, **options) → HTML5::DocumentFragment
#
- # @return [DocumentFragment] a new instance of DocumentFragment
+ # Parse \HTML5 fragment input from a String, and return a new HTML5::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.
+ # 💡 It's recommended to use either HTML5::DocumentFragment.parse or HTML5::Node#fragment
+ # rather than call this method directly.
#
- # source://nokogiri//lib/nokogiri/html5/document_fragment.rb#28
- def document; end
-
- # Sets the attribute document
+ # [Required Parameters]
+ # - +document+ (HTML5::Document) The parent document to associate the returned fragment with.
+ #
+ # [Optional Parameters]
+ # - +input+ (String) The content to be parsed.
+ #
+ # [Optional Keyword Arguments]
+ # used when processing the document. When not provided, the encoding will be determined
+ # based on the document content. Also see Nokogiri::HTML5 for a longer explanation of how
+ # encoding is handled by the parser.
+ #
+ # - +context:+ (String | Nokogiri::XML::Node) The node, or the name of an HTML5 element, in
+ # which to parse the document fragment. (default +"body"+)
+ #
+ # - +max_errors:+ (Integer) The maximum number of parse errors to record. (default
+ # +Nokogiri::Gumbo::DEFAULT_MAX_ERRORS+ which is currently 0)
+ #
+ # - +max_tree_depth:+ (Integer) The maximum depth of the parse tree. (default
+ # +Nokogiri::Gumbo::DEFAULT_MAX_TREE_DEPTH+)
+ #
+ # - +max_attributes:+ (Integer) The maximum number of attributes allowed on an
+ # element. (default +Nokogiri::Gumbo::DEFAULT_MAX_ATTRIBUTES+)
+ #
+ # - +parse_noscript_content_as_text:+ (Boolean) Whether to parse the content of +noscript+
+ # elements as text. (default +false+)
#
- # @param value the value to set the attribute document to.
+ # See rdoc-ref:HTML5@Parsing+options for a complete description of these parsing options.
#
- # source://nokogiri//lib/nokogiri/html5/document_fragment.rb#28
+ # [Returns] HTML5::DocumentFragment
+ #
+ # === Context \Node
+ #
+ # If a context node is specified using +context:+, then the parser will behave as if that
+ # Node, or a hypothetical tag named as specified, is the parent of the fragment subtree.
+ #
+ # pkg:gem/nokogiri#lib/nokogiri/html5/document_fragment.rb:144
+ def initialize(doc, input = T.unsafe(nil), context_ = T.unsafe(nil), positional_options_hash = T.unsafe(nil), context: T.unsafe(nil), **options); end
+
+ # pkg:gem/nokogiri#lib/nokogiri/html5/document_fragment.rb:88
+ def document; end
+
+ # pkg:gem/nokogiri#lib/nokogiri/html5/document_fragment.rb:88
def document=(_arg0); end
- # Returns the value of attribute errors.
- #
- # source://nokogiri//lib/nokogiri/html5/document_fragment.rb#29
+ # pkg:gem/nokogiri#lib/nokogiri/html5/document_fragment.rb:89
def errors; end
- # Sets the attribute errors
- #
- # @param value the value to set the attribute errors to.
- #
- # source://nokogiri//lib/nokogiri/html5/document_fragment.rb#29
+ # pkg:gem/nokogiri#lib/nokogiri/html5/document_fragment.rb:89
def errors=(_arg0); end
- # source://nokogiri//lib/nokogiri/html5/document_fragment.rb#65
+ # pkg:gem/nokogiri#lib/nokogiri/html5/document_fragment.rb:175
def extract_params(params); end
# Get the parser's quirks mode value. See HTML5::QuirksMode.
#
- # This method returns `nil` if the parser was not invoked (e.g., `Nokogiri::HTML5::DocumentFragment.new(doc)`).
+ # 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
+ # pkg:gem/nokogiri#lib/nokogiri/html5/document_fragment.rb:97
def quirks_mode; end
- # source://nokogiri//lib/nokogiri/html5/document_fragment.rb#51
+ # pkg:gem/nokogiri#lib/nokogiri/html5/document_fragment.rb:169
def serialize(options = T.unsafe(nil), &block); end
class << self
- # Parse a document fragment from +tags+, returning a Nodeset.
+ # :call-seq:
+ # parse(input, **options) → HTML5::DocumentFragment
+ #
+ # Parse \HTML5 fragment input from a String, and return a new HTML5::DocumentFragment. This
+ # method creates a new, empty HTML5::Document to contain the fragment.
+ #
+ # [Parameters]
+ # - +input+ (String | IO) The HTML5 document fragment to parse.
+ #
+ # [Optional Keyword Arguments]
+ # used when processing the document. When not provided, the encoding will be determined
+ # based on the document content. Also see Nokogiri::HTML5 for a longer explanation of how
+ # encoding is handled by the parser.
+ #
+ # - +context:+ (String | Nokogiri::XML::Node) The node, or the name of an HTML5 element, "in
+ # context" of which to parse the document fragment. See below for more
+ # information. (default +"body"+)
+ #
+ # - +max_errors:+ (Integer) The maximum number of parse errors to record. (default
+ # +Nokogiri::Gumbo::DEFAULT_MAX_ERRORS+ which is currently 0)
#
- # source://nokogiri//lib/nokogiri/html5/document_fragment.rb#58
- def parse(tags, encoding = T.unsafe(nil), options = T.unsafe(nil)); end
+ # - +max_tree_depth:+ (Integer) The maximum depth of the parse tree. (default
+ # +Nokogiri::Gumbo::DEFAULT_MAX_TREE_DEPTH+)
+ #
+ # - +max_attributes:+ (Integer) The maximum number of attributes allowed on an
+ # element. (default +Nokogiri::Gumbo::DEFAULT_MAX_ATTRIBUTES+)
+ #
+ # - +parse_noscript_content_as_text:+ (Boolean) Whether to parse the content of +noscript+
+ # elements as text. (default +false+)
+ #
+ # See rdoc-ref:HTML5@Parsing+options for a complete description of these parsing options.
+ #
+ # [Returns] Nokogiri::HTML5::DocumentFragment
+ #
+ # === Context \Node
+ #
+ # If a context node is specified using +context:+, then the parser will behave as if that
+ # Node, or a hypothetical tag named as specified, is the parent of the fragment subtree.
+ #
+ # pkg:gem/nokogiri#lib/nokogiri/html5/document_fragment.rb:69
+ def parse(input, encoding_ = T.unsafe(nil), positional_options_hash = T.unsafe(nil), encoding: T.unsafe(nil), **options); end
end
end
@@ -2045,17 +2290,15 @@ end
#
# 💡 HTML5 functionality is not available when running JRuby.
#
-# source://nokogiri//lib/nokogiri/html5/node.rb#27
+# pkg:gem/nokogiri#lib/nokogiri/html5/node.rb:30
module Nokogiri::HTML5::Node
- # source://nokogiri//lib/nokogiri/html5/node.rb#65
+ # pkg:gem/nokogiri#lib/nokogiri/html5/node.rb:70
def fragment(tags); end
- # source://nokogiri//lib/nokogiri/html5/node.rb#28
+ # pkg:gem/nokogiri#lib/nokogiri/html5/node.rb:31
def inner_html(options = T.unsafe(nil)); end
- # @yield [config]
- #
- # source://nokogiri//lib/nokogiri/html5/node.rb#36
+ # pkg:gem/nokogiri#lib/nokogiri/html5/node.rb:39
def write_to(io, *options); end
private
@@ -2066,7 +2309,7 @@ module Nokogiri::HTML5::Node
# annoying with attribute names like xml:lang since libxml2 will
# actually create the xml namespace if it doesn't exist already.
#
- # source://nokogiri//lib/nokogiri/html5/node.rb#78
+ # pkg:gem/nokogiri#lib/nokogiri/html5/node.rb:83
def add_child_node_and_reparent_attrs(node); end
end
@@ -2077,22 +2320,20 @@ end
#
# Since v1.14.0
#
-# source://nokogiri//lib/nokogiri/html5/document.rb#30
+# pkg:gem/nokogiri#lib/nokogiri/html5/document.rb:30
module Nokogiri::HTML5::QuirksMode; end
-# The document was parsed in "limited-quirks" mode
+# The document was parsed in "quirks" mode
#
-# source://nokogiri//lib/nokogiri/html5/document.rb#33
+# pkg:gem/nokogiri#lib/nokogiri/html5/document.rb:33
Nokogiri::HTML5::QuirksMode::LIMITED_QUIRKS = T.let(T.unsafe(nil), Integer)
-# The document was parsed in "no-quirks" mode
-#
-# source://nokogiri//lib/nokogiri/html5/document.rb#31
+# pkg:gem/nokogiri#lib/nokogiri/html5/document.rb:31
Nokogiri::HTML5::QuirksMode::NO_QUIRKS = T.let(T.unsafe(nil), Integer)
-# The document was parsed in "quirks" mode
+# The document was parsed in "no-quirks" mode
#
-# source://nokogiri//lib/nokogiri/html5/document.rb#32
+# pkg:gem/nokogiri#lib/nokogiri/html5/document.rb:32
Nokogiri::HTML5::QuirksMode::QUIRKS = T.let(T.unsafe(nil), Integer)
Nokogiri::LIBXML2_PATCHES = T.let(T.unsafe(nil), Array)
@@ -2100,6 +2341,7 @@ 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::LIBXML_ZLIB_ENABLED = T.let(T.unsafe(nil), TrueClass)
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)
@@ -2108,145 +2350,138 @@ Nokogiri::OTHER_LIBRARY_VERSIONS = T.let(T.unsafe(nil), String)
Nokogiri::PACKAGED_LIBRARIES = T.let(T.unsafe(nil), TrueClass)
Nokogiri::PRECOMPILED_LIBRARIES = T.let(T.unsafe(nil), TrueClass)
-# source://nokogiri//lib/nokogiri/syntax_error.rb#4
+# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
class Nokogiri::SyntaxError < ::StandardError; end
+# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
module Nokogiri::Test
class << self
+ # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
def __foreign_error_handler; end
end
end
# The version of Nokogiri you are using
#
-# source://nokogiri//lib/nokogiri/version/constant.rb#5
+# pkg:gem/nokogiri#lib/nokogiri/version/constant.rb:5
Nokogiri::VERSION = T.let(T.unsafe(nil), String)
# Detailed version info about Nokogiri and the installed extension dependencies.
#
-# source://nokogiri//lib/nokogiri/version/info.rb#222
+# pkg:gem/nokogiri#lib/nokogiri/version/info.rb:223
Nokogiri::VERSION_INFO = T.let(T.unsafe(nil), Hash)
-# source://nokogiri//lib/nokogiri/version/info.rb#7
+# pkg:gem/nokogiri#lib/nokogiri/version/info.rb:7
class Nokogiri::VersionInfo
include ::Singleton
extend ::Singleton::SingletonClassMethods
- # source://nokogiri//lib/nokogiri/version/info.rb#33
+ # pkg:gem/nokogiri#lib/nokogiri/version/info.rb:33
def compiled_libxml_version; end
- # source://nokogiri//lib/nokogiri/version/info.rb#44
+ # pkg:gem/nokogiri#lib/nokogiri/version/info.rb:44
def compiled_libxslt_version; end
- # source://nokogiri//lib/nokogiri/version/info.rb#22
+ # pkg:gem/nokogiri#lib/nokogiri/version/info.rb:22
def engine; end
- # @return [Boolean]
- #
- # source://nokogiri//lib/nokogiri/version/info.rb#10
+ # pkg:gem/nokogiri#lib/nokogiri/version/info.rb:10
def jruby?; end
- # @return [Boolean]
- #
- # source://nokogiri//lib/nokogiri/version/info.rb#48
+ # pkg:gem/nokogiri#lib/nokogiri/version/info.rb:48
def libxml2?; end
- # @return [Boolean]
- #
- # source://nokogiri//lib/nokogiri/version/info.rb#52
+ # pkg:gem/nokogiri#lib/nokogiri/version/info.rb:52
def libxml2_has_iconv?; end
- # @return [Boolean]
- #
- # source://nokogiri//lib/nokogiri/version/info.rb#68
+ # pkg:gem/nokogiri#lib/nokogiri/version/info.rb:68
def libxml2_precompiled?; end
- # @return [Boolean]
- #
- # source://nokogiri//lib/nokogiri/version/info.rb#60
+ # pkg:gem/nokogiri#lib/nokogiri/version/info.rb:60
def libxml2_using_packaged?; end
- # @return [Boolean]
- #
- # source://nokogiri//lib/nokogiri/version/info.rb#64
+ # pkg:gem/nokogiri#lib/nokogiri/version/info.rb:64
def libxml2_using_system?; end
- # @return [Boolean]
- #
- # source://nokogiri//lib/nokogiri/version/info.rb#56
+ # pkg:gem/nokogiri#lib/nokogiri/version/info.rb:56
def libxslt_has_datetime?; end
- # source://nokogiri//lib/nokogiri/version/info.rb#26
+ # pkg:gem/nokogiri#lib/nokogiri/version/info.rb:26
def loaded_libxml_version; end
- # source://nokogiri//lib/nokogiri/version/info.rb#37
+ # pkg:gem/nokogiri#lib/nokogiri/version/info.rb:37
def loaded_libxslt_version; end
- # source://nokogiri//lib/nokogiri/version/info.rb#18
+ # pkg:gem/nokogiri#lib/nokogiri/version/info.rb:18
def ruby_minor; end
- # source://nokogiri//lib/nokogiri/version/info.rb#88
+ # pkg:gem/nokogiri#lib/nokogiri/version/info.rb:88
def to_hash; end
- # source://nokogiri//lib/nokogiri/version/info.rb#180
+ # pkg:gem/nokogiri#lib/nokogiri/version/info.rb:181
def to_markdown; end
- # source://nokogiri//lib/nokogiri/version/info.rb#72
+ # pkg:gem/nokogiri#lib/nokogiri/version/info.rb:72
def warnings; end
- # @return [Boolean]
- #
- # source://nokogiri//lib/nokogiri/version/info.rb#14
+ # pkg:gem/nokogiri#lib/nokogiri/version/info.rb:14
def windows?; end
class << self
private
+ # pkg:gem/nokogiri#lib/nokogiri/version/info.rb:8
def allocate; end
+
+ # pkg:gem/nokogiri#lib/nokogiri/version/info.rb:8
def new(*_arg0); end
end
end
-# source://nokogiri//lib/nokogiri/xml.rb#12
+# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
module Nokogiri::XML
class << self
- # Parse an XML document using the Nokogiri::XML::Reader API. See
- # Nokogiri::XML::Reader for mor information
+ # Convenience method for Nokogiri::XML::Reader.new
#
- # @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
+ # pkg:gem/nokogiri#lib/nokogiri/xml.rb:21
+ def Reader(*_arg0, **_arg1, &_arg2); end
- # Create a new Nokogiri::XML::RelaxNG document from +string_or_io+.
- # See Nokogiri::XML::RelaxNG for an example.
+ # :call-seq:
+ # RelaxNG(input) → Nokogiri::XML::RelaxNG
+ # RelaxNG(input, options:) → Nokogiri::XML::RelaxNG
#
- # source://nokogiri//lib/nokogiri/xml/relax_ng.rb#9
- def RelaxNG(string_or_io, options = T.unsafe(nil)); end
+ # Convenience method for Nokogiri::XML::RelaxNG.new
+ #
+ # pkg:gem/nokogiri#lib/nokogiri/xml/relax_ng.rb:11
+ def RelaxNG(*_arg0, **_arg1, &_arg2); end
- # Create a new Nokogiri::XML::Schema object using a +string_or_io+
- # object.
+ # :call-seq:
+ # Schema(input) → Nokogiri::XML::Schema
+ # Schema(input, parse_options) → Nokogiri::XML::Schema
#
- # source://nokogiri//lib/nokogiri/xml/schema.rb#9
- def Schema(string_or_io, options = T.unsafe(nil)); end
+ # Convenience method for Nokogiri::XML::Schema.new
+ #
+ # pkg:gem/nokogiri#lib/nokogiri/xml/schema.rb:11
+ def Schema(*_arg0, **_arg1, &_arg2); end
- # Parse a fragment from +string+ in to a NodeSet.
+ # Convenience method for Nokogiri::XML::DocumentFragment.parse
#
- # source://nokogiri//lib/nokogiri/xml.rb#42
- def fragment(string, options = T.unsafe(nil), &block); end
+ # pkg:gem/nokogiri#lib/nokogiri/xml.rb:31
+ def fragment(*_arg0, **_arg1, &_arg2); end
- # Parse XML. Convenience method for Nokogiri::XML::Document.parse
+ # 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
+ # pkg:gem/nokogiri#lib/nokogiri/xml.rb:26
+ def parse(*_arg0, **_arg1, &_arg2); end
end
end
-# source://nokogiri//lib/nokogiri/xml/attr.rb#6
+# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
class Nokogiri::XML::Attr < ::Nokogiri::XML::Node
+ # pkg:gem/nokogiri#lib/nokogiri/xml/attr.rb:9
def content=(_arg0); end
- # :call-seq: deconstruct_keys(array_of_names) → Hash
+ # :call-seq: deconstruct_keys(array_of_names) → Hash
#
# Returns a hash describing the Attr, to use in pattern matching.
#
@@ -2255,8 +2490,6 @@ class Nokogiri::XML::Attr < ::Nokogiri::XML::Node
# - +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)
@@ -2289,33 +2522,48 @@ class Nokogiri::XML::Attr < ::Nokogiri::XML::Node
# # href = "http://nokogiri.org/ns/noko"
# # })}
#
- # source://nokogiri//lib/nokogiri/xml/attr.rb#55
+ # Since v1.14.0
+ #
+ # pkg:gem/nokogiri#lib/nokogiri/xml/attr.rb:55
def deconstruct_keys(keys); end
+ # pkg:gem/nokogiri#lib/nokogiri/xml/attr.rb:8
def to_s; end
+
+ # pkg:gem/nokogiri#lib/nokogiri/xml/attr.rb:7
def value; end
+
+ # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
def value=(_arg0); end
private
- # source://nokogiri//lib/nokogiri/xml/attr.rb#61
+ # pkg:gem/nokogiri#lib/nokogiri/xml/attr.rb:61
def inspect_attributes; end
class << self
+ # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
def new(*_arg0); end
end
end
# Represents an attribute declaration in a DTD
#
-# source://nokogiri//lib/nokogiri/xml/attribute_decl.rb#7
+# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
class Nokogiri::XML::AttributeDecl < ::Nokogiri::XML::Node
+ # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
def attribute_type; end
+
+ # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
def default; end
+
+ # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
def enumeration; end
- # source://nokogiri//lib/nokogiri/xml/attribute_decl.rb#15
- def inspect; end
+ private
+
+ # pkg:gem/nokogiri#lib/nokogiri/xml/attribute_decl.rb:17
+ def inspect_attributes; end
end
# Nokogiri builder can be used for building XML and HTML documents.
@@ -2576,7 +2824,7 @@ end
#
#
#
-# source://nokogiri//lib/nokogiri/xml/builder.rb#264
+# pkg:gem/nokogiri#lib/nokogiri/xml/builder.rb:264
class Nokogiri::XML::Builder
include ::Nokogiri::ClassResolver
@@ -2589,86 +2837,84 @@ class Nokogiri::XML::Builder
# ...
# end
#
- # @return [Builder] a new instance of Builder
- #
- # source://nokogiri//lib/nokogiri/xml/builder.rb#307
+ # pkg:gem/nokogiri#lib/nokogiri/xml/builder.rb:307
def initialize(options = T.unsafe(nil), root = T.unsafe(nil), &block); end
# Append the given raw XML +string+ to the document
#
- # source://nokogiri//lib/nokogiri/xml/builder.rb#390
+ # pkg:gem/nokogiri#lib/nokogiri/xml/builder.rb:390
def <<(string); end
# Build a tag that is associated with namespace +ns+. Raises an
# ArgumentError if +ns+ has not been defined higher in the tree.
#
- # source://nokogiri//lib/nokogiri/xml/builder.rb#358
+ # pkg:gem/nokogiri#lib/nokogiri/xml/builder.rb:358
def [](ns); end
- # source://nokogiri//lib/nokogiri/xml/builder.rb#278
+ # pkg:gem/nokogiri#lib/nokogiri/xml/builder.rb:278
def arity; end
- # source://nokogiri//lib/nokogiri/xml/builder.rb#278
+ # pkg:gem/nokogiri#lib/nokogiri/xml/builder.rb:278
def arity=(_arg0); end
# Create a CDATA Node with content of +string+
#
- # source://nokogiri//lib/nokogiri/xml/builder.rb#345
+ # pkg:gem/nokogiri#lib/nokogiri/xml/builder.rb:345
def cdata(string); end
# Create a Comment Node with content of +string+
#
- # source://nokogiri//lib/nokogiri/xml/builder.rb#351
+ # pkg:gem/nokogiri#lib/nokogiri/xml/builder.rb:351
def comment(string); end
# A context object for use when the block has no arguments
#
- # source://nokogiri//lib/nokogiri/xml/builder.rb#276
+ # pkg:gem/nokogiri#lib/nokogiri/xml/builder.rb:276
def context; end
# A context object for use when the block has no arguments
#
- # source://nokogiri//lib/nokogiri/xml/builder.rb#276
+ # pkg:gem/nokogiri#lib/nokogiri/xml/builder.rb:276
def context=(_arg0); end
# The current Document object being built
#
- # source://nokogiri//lib/nokogiri/xml/builder.rb#270
+ # pkg:gem/nokogiri#lib/nokogiri/xml/builder.rb:270
def doc; end
# The current Document object being built
#
- # source://nokogiri//lib/nokogiri/xml/builder.rb#270
+ # pkg:gem/nokogiri#lib/nokogiri/xml/builder.rb:270
def doc=(_arg0); end
- # source://nokogiri//lib/nokogiri/xml/builder.rb#394
+ # pkg:gem/nokogiri#lib/nokogiri/xml/builder.rb:394
def method_missing(method, *args, &block); end
# The parent of the current node being built
#
- # source://nokogiri//lib/nokogiri/xml/builder.rb#273
+ # pkg:gem/nokogiri#lib/nokogiri/xml/builder.rb:273
def parent; end
# The parent of the current node being built
#
- # source://nokogiri//lib/nokogiri/xml/builder.rb#273
+ # pkg:gem/nokogiri#lib/nokogiri/xml/builder.rb:273
def parent=(_arg0); end
# Create a Text Node with content of +string+
#
- # source://nokogiri//lib/nokogiri/xml/builder.rb#339
+ # pkg:gem/nokogiri#lib/nokogiri/xml/builder.rb:339
def text(string); end
# Convert this Builder object to XML
#
- # source://nokogiri//lib/nokogiri/xml/builder.rb#377
+ # pkg:gem/nokogiri#lib/nokogiri/xml/builder.rb:377
def to_xml(*args); end
private
# Insert +node+ as a child of the current Node
#
- # source://nokogiri//lib/nokogiri/xml/builder.rb#423
+ # pkg:gem/nokogiri#lib/nokogiri/xml/builder.rb:423
def insert(node, &block); end
class << self
@@ -2685,105 +2931,124 @@ class Nokogiri::XML::Builder
# xml.awesome # add the "awesome" tag below "some_tag"
# end
#
- # source://nokogiri//lib/nokogiri/xml/builder.rb#294
+ # pkg:gem/nokogiri#lib/nokogiri/xml/builder.rb:294
def with(root, &block); end
end
end
-# source://nokogiri//lib/nokogiri/xml/builder.rb#267
+# pkg:gem/nokogiri#lib/nokogiri/xml/builder.rb:267
Nokogiri::XML::Builder::DEFAULT_DOCUMENT_OPTIONS = T.let(T.unsafe(nil), Hash)
-# source://nokogiri//lib/nokogiri/xml/builder.rb#442
+# pkg:gem/nokogiri#lib/nokogiri/xml/builder.rb:442
class Nokogiri::XML::Builder::NodeBuilder
- # @return [NodeBuilder] a new instance of NodeBuilder
- #
- # source://nokogiri//lib/nokogiri/xml/builder.rb#443
+ # pkg:gem/nokogiri#lib/nokogiri/xml/builder.rb:443
def initialize(node, doc_builder); end
- # source://nokogiri//lib/nokogiri/xml/builder.rb#452
+ # pkg:gem/nokogiri#lib/nokogiri/xml/builder.rb:452
def [](k); end
- # source://nokogiri//lib/nokogiri/xml/builder.rb#448
+ # pkg:gem/nokogiri#lib/nokogiri/xml/builder.rb:448
def []=(k, v); end
- # source://nokogiri//lib/nokogiri/xml/builder.rb#456
+ # pkg:gem/nokogiri#lib/nokogiri/xml/builder.rb:456
def method_missing(method, *args, &block); end
end
-# source://nokogiri//lib/nokogiri/xml/cdata.rb#5
+# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
class Nokogiri::XML::CDATA < ::Nokogiri::XML::Text
# Get the name of this CDATA node
#
- # source://nokogiri//lib/nokogiri/xml/cdata.rb#8
+ # pkg:gem/nokogiri#lib/nokogiri/xml/cdata.rb:8
def name; end
class << self
+ # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
def new(*_arg0); end
end
end
-# source://nokogiri//lib/nokogiri/xml/character_data.rb#5
+# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
class Nokogiri::XML::CharacterData < ::Nokogiri::XML::Node
include ::Nokogiri::XML::PP::CharacterData
end
+# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
class Nokogiri::XML::Comment < ::Nokogiri::XML::CharacterData
class << self
+ # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
def new(*_arg0); end
end
end
-# source://nokogiri//lib/nokogiri/xml/dtd.rb#5
+# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
class Nokogiri::XML::DTD < ::Nokogiri::XML::Node
+ # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
def attributes; end
- # source://nokogiri//lib/nokogiri/xml/dtd.rb#17
+ # pkg:gem/nokogiri#lib/nokogiri/xml/dtd.rb:17
def each; end
+ # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
def elements; end
+
+ # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
def entities; end
+
+ # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
def external_id; end
- # @return [Boolean]
- #
- # source://nokogiri//lib/nokogiri/xml/dtd.rb#27
+ # pkg:gem/nokogiri#lib/nokogiri/xml/dtd.rb:27
def html5_dtd?; end
- # @return [Boolean]
- #
- # source://nokogiri//lib/nokogiri/xml/dtd.rb#23
+ # pkg:gem/nokogiri#lib/nokogiri/xml/dtd.rb:23
def html_dtd?; end
- # source://nokogiri//lib/nokogiri/xml/dtd.rb#13
+ # pkg:gem/nokogiri#lib/nokogiri/xml/dtd.rb:13
def keys; end
+ # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
def notations; end
+
+ # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
def system_id; end
+
+ # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
def validate(_arg0); end
end
-# 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.
+# Nokogiri::XML::Document is the main entry point for dealing with \XML documents. The Document
+# is created by parsing \XML content from a String or an IO object. See
+# Nokogiri::XML::Document.parse for more information on parsing.
#
-# For searching a Document, see Nokogiri::XML::Searchable#css and
-# Nokogiri::XML::Searchable#xpath
+# Document inherits a great deal of functionality from its superclass Nokogiri::XML::Node, so
+# please read that class's documentation as well.
#
-# source://nokogiri//lib/nokogiri/xml/document.rb#14
+# pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
class Nokogiri::XML::Document < ::Nokogiri::XML::Node
- # @return [Document] a new instance of Document
- #
- # source://nokogiri//lib/nokogiri/xml/document.rb#178
+ # pkg:gem/nokogiri#lib/nokogiri/xml/document.rb:190
def initialize(*args); end
- # source://nokogiri//lib/nokogiri/xml/document.rb#394
+ # pkg:gem/nokogiri#lib/nokogiri/xml/document.rb:449
def <<(node_or_tags); end
- # source://nokogiri//lib/nokogiri/xml/document.rb#394
+ # pkg:gem/nokogiri#lib/nokogiri/xml/document.rb:437
def add_child(node_or_tags); end
+ # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
def canonicalize(*_arg0); end
- def clone(*_arg0); end
+
+ # :call-seq:
+ # clone → Nokogiri::XML::Document
+ # clone(level) → Nokogiri::XML::Document
+ #
+ # Clone this node.
+ #
+ # [Parameters]
+ # - +level+ (optional Integer). 0 is a shallow copy, 1 (the default) is a deep copy.
+ # [Returns] The new Nokogiri::XML::Document
+ #
+ # pkg:gem/nokogiri#lib/nokogiri/xml/document.rb:223
+ def clone(level = T.unsafe(nil)); end
# :call-seq:
# collect_namespaces() → Hash
@@ -2821,17 +3086,17 @@ class Nokogiri::XML::Document < ::Nokogiri::XML::Node
#
# {"xmlns:foo" => "baz"}
#
- # source://nokogiri//lib/nokogiri/xml/document.rb#317
+ # pkg:gem/nokogiri#lib/nokogiri/xml/document.rb:361
def collect_namespaces; end
# Create a CDATA Node containing +string+
#
- # source://nokogiri//lib/nokogiri/xml/document.rb#262
+ # pkg:gem/nokogiri#lib/nokogiri/xml/document.rb:306
def create_cdata(string, &block); end
# Create a Comment Node containing +string+
#
- # source://nokogiri//lib/nokogiri/xml/document.rb#267
+ # pkg:gem/nokogiri#lib/nokogiri/xml/document.rb:311
def create_comment(string, &block); end
# :call-seq:
@@ -2882,17 +3147,18 @@ class Nokogiri::XML::Document < ::Nokogiri::XML::Node
#
# doc.create_element("div") { |node| node["class"] = "blue" if before_noon? }
#
- # source://nokogiri//lib/nokogiri/xml/document.rb#232
+ # pkg:gem/nokogiri#lib/nokogiri/xml/document.rb:276
def create_element(name, *contents_or_attrs, &block); end
+ # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
def create_entity(*_arg0); end
# Create a Text Node with +string+
#
- # source://nokogiri//lib/nokogiri/xml/document.rb#257
+ # pkg:gem/nokogiri#lib/nokogiri/xml/document.rb:301
def create_text_node(string, &block); end
- # :call-seq: deconstruct_keys(array_of_names) → Hash
+ # :call-seq: deconstruct_keys(array_of_names) → Hash
#
# Returns a hash describing the Document, to use in pattern matching.
#
@@ -2903,8 +3169,6 @@ class Nokogiri::XML::Document < ::Nokogiri::XML::Node
# 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)
@@ -2931,51 +3195,68 @@ class Nokogiri::XML::Document < ::Nokogiri::XML::Node
# doc.deconstruct_keys([:root])
# # => {:root=>nil}
#
- # source://nokogiri//lib/nokogiri/xml/document.rb#458
+ # Since v1.14.0
+ #
+ # pkg:gem/nokogiri#lib/nokogiri/xml/document.rb:501
def deconstruct_keys(keys); end
# Apply any decorators to +node+
#
- # source://nokogiri//lib/nokogiri/xml/document.rb#365
+ # pkg:gem/nokogiri#lib/nokogiri/xml/document.rb:409
def decorate(node); end
# Get the list of decorators given +key+
#
- # source://nokogiri//lib/nokogiri/xml/document.rb#324
+ # pkg:gem/nokogiri#lib/nokogiri/xml/document.rb:368
def decorators(key); end
# A reference to +self+
#
- # source://nokogiri//lib/nokogiri/xml/document.rb#277
+ # pkg:gem/nokogiri#lib/nokogiri/xml/document.rb:321
def document; end
- def dup(*_arg0); end
+ # :call-seq:
+ # dup → Nokogiri::XML::Document
+ # dup(level) → Nokogiri::XML::Document
+ #
+ # Duplicate this node.
+ #
+ # [Parameters]
+ # - +level+ (optional Integer). 0 is a shallow copy, 1 (the default) is a deep copy.
+ # [Returns] The new Nokogiri::XML::Document
+ #
+ # pkg:gem/nokogiri#lib/nokogiri/xml/document.rb:207
+ def dup(level = T.unsafe(nil)); end
+
+ # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
def encoding; end
+
+ # pkg:gem/nokogiri#lib/nokogiri/extension.rb:7
def encoding=(_arg0); end
# The errors found while parsing a document.
#
# [Returns] Array
#
- # source://nokogiri//lib/nokogiri/xml/document.rb#128
+ # pkg:gem/nokogiri#lib/nokogiri/xml/document.rb:141
def errors; end
# The errors found while parsing a document.
#
# [Returns] Array