diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml
index 216a9559..9205383a 100644
--- a/.github/workflows/ruby.yml
+++ b/.github/workflows/ruby.yml
@@ -15,7 +15,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
- ruby: ["3.2", "3.3", "3.4", "4.0"]
+ ruby: ["3.3", "3.4", "4.0"]
name: ${{ matrix.os }} ${{ matrix.ruby }}
runs-on: ${{ matrix.os }}
steps:
diff --git a/Gemfile b/Gemfile
index b96492ac..5368cda5 100644
--- a/Gemfile
+++ b/Gemfile
@@ -5,6 +5,8 @@ source "https://rubygems.org"
gemspec
+gem "rbi", path: "../rbi"
+
gem "minitest"
gem "minitest-mock"
diff --git a/Gemfile.lock b/Gemfile.lock
index bec429f1..ec5eb16a 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,3 +1,10 @@
+PATH
+ remote: ../rbi
+ specs:
+ rbi (0.3.13)
+ prism (~> 1.0)
+ rbs (>= 4.0.1)
+
PATH
remote: .
specs:
@@ -57,9 +64,6 @@ GEM
racc (1.8.1)
rainbow (3.1.1)
rake (13.4.2)
- rbi (0.3.10)
- prism (~> 1.0)
- rbs (>= 4.0.1)
rbs (4.0.2)
logger
prism (>= 1.6.0)
@@ -141,6 +145,7 @@ DEPENDENCIES
minitest-mock
minitest-reporters
rake (~> 13.4.2)
+ rbi!
rubocop-minitest
rubocop-shopify
rubocop-sorbet
diff --git a/bin/tapioca b/bin/tapioca
new file mode 100755
index 00000000..82de9af2
--- /dev/null
+++ b/bin/tapioca
@@ -0,0 +1,16 @@
+#!/usr/bin/env ruby
+# frozen_string_literal: true
+
+#
+# This file was generated by Bundler.
+#
+# The application 'tapioca' is installed as part of a gem, and
+# this file is here to facilitate running it.
+#
+
+ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
+
+require "rubygems"
+require "bundler/setup"
+
+load Gem.bin_path("tapioca", "tapioca")
diff --git a/lib/spoom/sorbet/translate.rb b/lib/spoom/sorbet/translate.rb
index bf815176..23c2e393 100644
--- a/lib/spoom/sorbet/translate.rb
+++ b/lib/spoom/sorbet/translate.rb
@@ -5,6 +5,7 @@
require "spoom/source/rewriter"
require "spoom/sorbet/translate/translator"
+require "spoom/sorbet/translate/validator"
require "spoom/sorbet/translate/rbs_comments_to_sorbet_sigs"
require "spoom/sorbet/translate/sorbet_assertions_to_rbs_comments"
require "spoom/sorbet/translate/sorbet_sigs_to_rbs_comments"
diff --git a/lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs.rb b/lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs.rb
index 989a9061..485cff0f 100644
--- a/lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs.rb
+++ b/lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs.rb
@@ -47,6 +47,8 @@ def initialize(ruby_contents, file:, max_line_length: nil, overloads_strategy: :
@max_line_length = max_line_length
@overloads_strategy = overloads_strategy
+
+ @rbs_translator = RBI::RBS::TypeTranslator.new #: RBI::RBS::TypeTranslator
end
# @override
@@ -133,11 +135,11 @@ def visit_attr(node)
name = node.arguments&.arguments&.first #: as Prism::SymbolNode
sig.params << RBI::SigParam.new(
name.slice[1..-1], #: as String
- RBI::RBS::TypeTranslator.translate(attr_type),
+ @rbs_translator.translate(attr_type),
)
end
- sig.return_type = RBI::RBS::TypeTranslator.translate(attr_type)
+ sig.return_type = @rbs_translator.translate(attr_type)
apply_member_annotations(comments.method_annotations, sig)
@@ -259,7 +261,7 @@ def apply_class_annotations(node)
"final!"
when /^@requires_ancestor: /
srb_type = ::RBS::Parser.parse_type(annotation.string.delete_prefix("@requires_ancestor: "))
- rbs_type = RBI::RBS::TypeTranslator.translate(srb_type)
+ rbs_type = @rbs_translator.translate(srb_type)
"requires_ancestor { #{rbs_type} }"
else
next
@@ -304,12 +306,12 @@ def apply_class_annotations(node)
if type_param.upper_bound || type_param.default_type
if type_param.upper_bound
- rbs_type = RBI::RBS::TypeTranslator.translate(type_param.upper_bound)
+ rbs_type = @rbs_translator.translate(type_param.upper_bound)
type_member = "#{type_member} {{ upper: #{rbs_type} }}"
end
if type_param.default_type
- rbs_type = RBI::RBS::TypeTranslator.translate(type_param.default_type)
+ rbs_type = @rbs_translator.translate(type_param.default_type)
type_member = "#{type_member} {{ fixed: #{rbs_type} }}"
end
end
diff --git a/lib/spoom/sorbet/translate/validator.rb b/lib/spoom/sorbet/translate/validator.rb
new file mode 100644
index 00000000..c5cebfa3
--- /dev/null
+++ b/lib/spoom/sorbet/translate/validator.rb
@@ -0,0 +1,214 @@
+# typed: strict
+# frozen_string_literal: true
+
+module Spoom
+ module Sorbet
+ module Translate
+ # Checks that a translation preserved the lines of every "landmark" (e.g. classes, method defs, and so on)
+ # so line numbers in the rewritten output still line up with the original source.
+ module Validator
+ # A description of a landmark, like "class C", "def foo", etc.
+ #: type landmarkID = String
+
+ # The integer line numbers where each landmark appears.
+ #: type landmarks = Hash[landmarkID, Array[Integer]]
+
+ class << self
+ # Compares the landmarks in both sources and returns a result describing
+ # what changed:
+ # missing_from_rewritten_output - dropped: an occurrence in the original
+ # that is gone from the rewrite
+ # excess_in_rewritten_output - added: an occurrence in the rewrite with
+ # no match in the original
+ # on_wrong_line - survived but moved to a different line
+ #: (String original, String rewritten) -> ValidationResult
+ def validate(original, rewritten)
+ original_landmarks = LandmarkFinder.find_landmarks_in(original)
+ rewritten_landmarks = LandmarkFinder.find_landmarks_in(rewritten)
+
+ missing = []
+ excess = []
+ on_wrong_line = []
+
+ (original_landmarks.keys | rewritten_landmarks.keys).each do |landmark_id|
+ original_lines = original_landmarks.fetch(landmark_id, [])
+ rewritten_lines = rewritten_landmarks.fetch(landmark_id, [])
+
+ dropped = original_lines - rewritten_lines
+ added = rewritten_lines - original_lines
+
+ if dropped.any? && added.any?
+ # Present in both but on different lines: the landmark moved.
+ on_wrong_line << { landmark_id:, expected: dropped, actual: added }
+ else
+ dropped.each { |line| missing << { landmark_id:, line: } }
+ added.each { |line| excess << { landmark_id:, line: } }
+ end
+ end
+
+ if original.lines.count != rewritten.lines.count
+ on_wrong_line << { landmark_id: "EOF", expected: [original.lines.count], actual: [rewritten.lines.count] }
+ end
+
+ ValidationResult.new(
+ missing_from_rewritten_output: missing,
+ excess_in_rewritten_output: excess,
+ on_wrong_line: on_wrong_line,
+ )
+ end
+ end
+ end
+
+ # The outcome of comparing an original source with its rewritten form.
+ class ValidationResult
+ # A landmark dropped from, or added to, the rewritten output.
+ #: type landmark_location = { landmark_id: String, line: Integer }
+
+ # A landmark present in both sources, but on different lines.
+ #: type moved_landmark = { landmark_id: String, expected: Array[Integer], actual: Array[Integer] }
+
+ # Landmarks present in the original but missing from the rewrite.
+ #: Array[landmark_location]
+ attr_reader :missing_from_rewritten_output
+
+ # Landmarks present in the rewrite with no match in the original.
+ #: Array[landmark_location]
+ attr_reader :excess_in_rewritten_output
+
+ # Landmarks present in both sources, but that moved to a different line.
+ #: Array[moved_landmark]
+ attr_reader :on_wrong_line
+
+ #: (
+ #| missing_from_rewritten_output: Array[landmark_location],
+ #| excess_in_rewritten_output: Array[landmark_location],
+ #| on_wrong_line: Array[moved_landmark]
+ #| ) -> void
+ def initialize(missing_from_rewritten_output:, excess_in_rewritten_output:, on_wrong_line:)
+ @missing_from_rewritten_output = missing_from_rewritten_output
+ @excess_in_rewritten_output = excess_in_rewritten_output
+ @on_wrong_line = on_wrong_line
+ end
+
+ # True when every landmark survived the rewrite on its original line.
+ #: -> bool
+ def valid?
+ @missing_from_rewritten_output.empty? &&
+ @excess_in_rewritten_output.empty? &&
+ @on_wrong_line.empty?
+ end
+
+ # Human-readable, one-per-line descriptions of every difference. Empty when
+ # the result is valid.
+ #: -> Array[String]
+ def errors
+ errors = @missing_from_rewritten_output.map do |entry|
+ "missing `#{entry[:landmark_id]}` (expected at line #{entry[:line]})"
+ end
+ errors += @excess_in_rewritten_output.map do |entry|
+ "excess `#{entry[:landmark_id]}` (found at line #{entry[:line]})"
+ end
+ errors += @on_wrong_line.map do |entry|
+ "`#{entry[:landmark_id]}` on the wrong line " \
+ "(expected at #{format_lines(entry[:expected])}, found at #{format_lines(entry[:actual])})"
+ end
+ errors
+ end
+
+ #: (untyped) -> void
+ def pretty_print(printer)
+ if valid?
+ printer.text("#<#{self.class.name} valid>")
+ return
+ end
+
+ printer.text("#<#{self.class.name} invalid")
+ errors.each do |error|
+ printer.breakable
+ printer.text(" #{error}")
+ end
+ printer.breakable
+ printer.text(">")
+ end
+
+ private
+
+ #: (Array[Integer]) -> String
+ def format_lines(lines)
+ "#{lines.size == 1 ? "line" : "lines"} #{lines.join(", ")}"
+ end
+ end
+
+ # Walks a Prism AST and records the locations of various bits of code
+ # whose locations we want to remain constant after a rewriter.
+ class LandmarkFinder < Prism::Visitor
+ #: Validator::landmarks
+ attr_reader :landmarks
+
+ class << self
+ #: (String) -> Hash[String, Array[Integer]]
+ def find_landmarks_in(source)
+ visitor = new
+ Prism.parse(source).value.accept(visitor)
+ visitor.landmarks
+ end
+ end
+
+ #: -> void
+ def initialize
+ super
+ @landmarks = Hash.new { |h, landmark_id| h[landmark_id] = [] } #: Validator::landmarks
+ end
+
+ # @override
+ #: (Prism::ClassNode) -> void
+ def visit_class_node(node)
+ record("class #{node.name}", node)
+ super # keep descending so nested classes/modules/defs are recorded too
+ end
+
+ # @override
+ #: (Prism::ModuleNode) -> void
+ def visit_module_node(node)
+ record("module #{node.name}", node)
+ super
+ end
+
+ # @override
+ #: (Prism::SingletonClassNode) -> void
+ def visit_singleton_class_node(node)
+ # `class << self` (or `class << obj`); record its opening location.
+ record("class << #{node.expression.slice}", node)
+ super
+ end
+
+ # @override
+ #: (Prism::DefNode) -> void
+ def visit_def_node(node)
+ # `def self.foo` (and `def Foo.bar`) carry a receiver; include it so
+ # singleton methods read like their source and key separately from
+ # same-named instance methods.
+ receiver = node.receiver
+ receiver_description = receiver ? "#{receiver.slice}." : ""
+ record("def #{receiver_description}#{node.name}", node)
+ super
+ end
+
+ # @override
+ #: (Prism::SourceLineNode) -> void
+ def visit_source_line_node(node)
+ record("__LINE__", node) # its value changes if the line moves
+ super
+ end
+
+ private
+
+ #: (String landmark_id, Prism::Node) -> void
+ def record(landmark_id, node)
+ (@landmarks[landmark_id] ||= []) << node.location.start_line
+ end
+ end
+ private_constant :LandmarkFinder
+ end
+ end
+end
diff --git a/sorbet/rbi/gems/rbi@0.3.7.rbi b/sorbet/rbi/gems/rbi@0.3.13.rbi
similarity index 64%
rename from sorbet/rbi/gems/rbi@0.3.7.rbi
rename to sorbet/rbi/gems/rbi@0.3.13.rbi
index 7eea6487..dd7d020b 100644
--- a/sorbet/rbi/gems/rbi@0.3.7.rbi
+++ b/sorbet/rbi/gems/rbi@0.3.13.rbi
@@ -9,101 +9,107 @@
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `rbi` gem.
-# Please instead update this file by running `spoom srb sigs export`.
+# Please instead update this file by running `bundle exec spoom srb sigs export`.
-# source://rbi//lib/rbi.rb#7
+# pkg:gem/rbi#lib/rbi.rb:7
module RBI; end
-# source://rbi//lib/rbi/model.rb#833
+# pkg:gem/rbi#lib/rbi/model.rb:862
class RBI::Arg < ::RBI::Node
- # @return [Arg] a new instance of Arg
- #
- # source://rbi//lib/rbi/model.rb#838
+ # pkg:gem/rbi#lib/rbi/model.rb:867
sig { params(value: ::String, loc: T.nilable(::RBI::Loc)).void }
def initialize(value, loc: T.unsafe(nil)); end
- # source://rbi//lib/rbi/model.rb#844
+ # pkg:gem/rbi#lib/rbi/model.rb:873
sig { params(other: T.nilable(::Object)).returns(T::Boolean) }
def ==(other); end
- # source://rbi//lib/rbi/model.rb#849
+ # pkg:gem/rbi#lib/rbi/model.rb:878
sig { returns(::String) }
def to_s; end
- # source://rbi//lib/rbi/model.rb#835
+ # pkg:gem/rbi#lib/rbi/model.rb:864
sig { returns(::String) }
def value; end
end
# @abstract
#
-# source://rbi//lib/rbi/model.rb#298
+# pkg:gem/rbi#lib/rbi/model.rb:325
class RBI::Attr < ::RBI::NodeWithComments
include ::RBI::Indexable
abstract!
- # @return [Attr] a new instance of Attr
- #
- # source://rbi//lib/rbi/model.rb#316
+ # pkg:gem/rbi#lib/rbi/model.rb:353
sig do
params(
name: ::Symbol,
names: T::Array[::Symbol],
visibility: ::RBI::Visibility,
- sigs: T::Array[::RBI::Sig],
+ sigs: T.nilable(T::Array[::RBI::Sig]),
loc: T.nilable(::RBI::Loc),
- comments: T::Array[::RBI::Comment]
+ comments: T.nilable(T::Array[::RBI::Comment])
).void
end
def initialize(name, names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil)); end
- # @return [Boolean]
+ # @override
#
- # source://rbi//lib/rbi/rewriters/merge_trees.rb#407
+ # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:420
sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
def compatible_with?(other); end
# @abstract
- # @raise [NotImplementedError]
#
- # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#59
+ # pkg:gem/rbi#lib/rbi/rewriters/attr_to_methods.rb:59
sig { abstract.returns(T::Array[::RBI::Method]) }
def convert_to_methods; end
# @abstract
- # @raise [NotImplementedError]
#
- # source://rbi//lib/rbi/model.rb#325
+ # pkg:gem/rbi#lib/rbi/model.rb:362
sig { abstract.returns(T::Array[::String]) }
def fully_qualified_names; end
- # source://rbi//lib/rbi/index.rb#104
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/index.rb:104
sig { override.returns(T::Array[::String]) }
def index_ids; end
- # source://rbi//lib/rbi/rewriters/merge_trees.rb#416
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:429
sig { override.params(other: ::RBI::Node).void }
def merge_with(other); end
- # source://rbi//lib/rbi/model.rb#300
+ # pkg:gem/rbi#lib/rbi/model.rb:327
sig { returns(T::Array[::Symbol]) }
def names; end
- # source://rbi//lib/rbi/model.rb#306
+ # pkg:gem/rbi#lib/rbi/model.rb:333
sig { returns(T::Array[::RBI::Sig]) }
def sigs; end
- # source://rbi//lib/rbi/model.rb#303
+ # pkg:gem/rbi#lib/rbi/model.rb:343
+ sig { params(sigs: T::Array[::RBI::Sig]).returns(T::Array[::RBI::Sig]) }
+ def sigs=(sigs); end
+
+ # pkg:gem/rbi#lib/rbi/model.rb:338
+ sig { returns(T::Boolean) }
+ def sigs?; end
+
+ # pkg:gem/rbi#lib/rbi/model.rb:330
sig { returns(::RBI::Visibility) }
def visibility; end
- # source://rbi//lib/rbi/model.rb#303
+ # pkg:gem/rbi#lib/rbi/model.rb:330
def visibility=(_arg0); end
private
- # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#80
+ # pkg:gem/rbi#lib/rbi/rewriters/attr_to_methods.rb:80
sig do
params(
name: ::String,
@@ -115,7 +121,7 @@ class RBI::Attr < ::RBI::NodeWithComments
end
def create_getter_method(name, sig, visibility, loc, comments); end
- # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#99
+ # pkg:gem/rbi#lib/rbi/rewriters/attr_to_methods.rb:99
sig do
params(
name: ::String,
@@ -128,217 +134,218 @@ class RBI::Attr < ::RBI::NodeWithComments
end
def create_setter_method(name, sig, attribute_type, visibility, loc, comments); end
- # @raise [UnexpectedMultipleSigsError]
+ # @final
#
- # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#65
+ # pkg:gem/rbi#lib/rbi/rewriters/attr_to_methods.rb:65
sig(:final) { returns([T.nilable(::RBI::Sig), T.nilable(T.any(::RBI::Type, ::String))]) }
def parse_sig; end
end
-# source://rbi//lib/rbi/model.rb#328
+# pkg:gem/rbi#lib/rbi/model.rb:365
class RBI::AttrAccessor < ::RBI::Attr
- # @return [AttrAccessor] a new instance of AttrAccessor
- #
- # source://rbi//lib/rbi/model.rb#337
+ # pkg:gem/rbi#lib/rbi/model.rb:374
sig do
params(
name: ::Symbol,
names: ::Symbol,
visibility: ::RBI::Visibility,
- sigs: T::Array[::RBI::Sig],
+ sigs: T.nilable(T::Array[::RBI::Sig]),
loc: T.nilable(::RBI::Loc),
- comments: T::Array[::RBI::Comment],
+ comments: T.nilable(T::Array[::RBI::Comment]),
block: T.nilable(T.proc.params(node: ::RBI::AttrAccessor).void)
).void
end
def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
- # @return [Boolean]
+ # @override
#
- # source://rbi//lib/rbi/rewriters/merge_trees.rb#445
+ # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:458
sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
def compatible_with?(other); end
- # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#130
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/rewriters/attr_to_methods.rb:130
sig { override.returns(T::Array[::RBI::Method]) }
def convert_to_methods; end
- # source://rbi//lib/rbi/model.rb#344
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/model.rb:381
sig { override.returns(T::Array[::String]) }
def fully_qualified_names; end
- # source://rbi//lib/rbi/model.rb#351
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/model.rb:388
sig { override.returns(::String) }
def to_s; end
end
-# source://rbi//lib/rbi/model.rb#357
+# pkg:gem/rbi#lib/rbi/model.rb:394
class RBI::AttrReader < ::RBI::Attr
- # @return [AttrReader] a new instance of AttrReader
- #
- # source://rbi//lib/rbi/model.rb#366
+ # pkg:gem/rbi#lib/rbi/model.rb:403
sig do
params(
name: ::Symbol,
names: ::Symbol,
visibility: ::RBI::Visibility,
- sigs: T::Array[::RBI::Sig],
+ sigs: T.nilable(T::Array[::RBI::Sig]),
loc: T.nilable(::RBI::Loc),
- comments: T::Array[::RBI::Comment],
+ comments: T.nilable(T::Array[::RBI::Comment]),
block: T.nilable(T.proc.params(node: ::RBI::AttrReader).void)
).void
end
def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
- # @return [Boolean]
+ # @override
#
- # source://rbi//lib/rbi/rewriters/merge_trees.rb#429
+ # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:442
sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
def compatible_with?(other); end
- # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#145
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/rewriters/attr_to_methods.rb:145
sig { override.returns(T::Array[::RBI::Method]) }
def convert_to_methods; end
- # source://rbi//lib/rbi/model.rb#373
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/model.rb:410
sig { override.returns(T::Array[::String]) }
def fully_qualified_names; end
- # source://rbi//lib/rbi/model.rb#380
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/model.rb:417
sig { override.returns(::String) }
def to_s; end
end
-# source://rbi//lib/rbi/model.rb#386
+# pkg:gem/rbi#lib/rbi/model.rb:423
class RBI::AttrWriter < ::RBI::Attr
- # @return [AttrWriter] a new instance of AttrWriter
- #
- # source://rbi//lib/rbi/model.rb#395
+ # pkg:gem/rbi#lib/rbi/model.rb:432
sig do
params(
name: ::Symbol,
names: ::Symbol,
visibility: ::RBI::Visibility,
- sigs: T::Array[::RBI::Sig],
+ sigs: T.nilable(T::Array[::RBI::Sig]),
loc: T.nilable(::RBI::Loc),
- comments: T::Array[::RBI::Comment],
+ comments: T.nilable(T::Array[::RBI::Comment]),
block: T.nilable(T.proc.params(node: ::RBI::AttrWriter).void)
).void
end
def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
- # @return [Boolean]
+ # @override
#
- # source://rbi//lib/rbi/rewriters/merge_trees.rb#437
+ # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:450
sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
def compatible_with?(other); end
- # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#155
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/rewriters/attr_to_methods.rb:155
sig { override.returns(T::Array[::RBI::Method]) }
def convert_to_methods; end
- # source://rbi//lib/rbi/model.rb#402
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/model.rb:439
sig { override.returns(T::Array[::String]) }
def fully_qualified_names; end
- # source://rbi//lib/rbi/model.rb#409
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/model.rb:446
sig { override.returns(::String) }
def to_s; end
end
# An arbitrary blank line that can be added both in trees and comments
#
-# source://rbi//lib/rbi/model.rb#70
+# pkg:gem/rbi#lib/rbi/model.rb:70
class RBI::BlankLine < ::RBI::Comment
- # @return [BlankLine] a new instance of BlankLine
- #
- # source://rbi//lib/rbi/model.rb#72
+ # pkg:gem/rbi#lib/rbi/model.rb:72
sig { params(loc: T.nilable(::RBI::Loc)).void }
def initialize(loc: T.unsafe(nil)); end
end
-# source://rbi//lib/rbi/model.rb#679
+# pkg:gem/rbi#lib/rbi/model.rb:710
class RBI::BlockParam < ::RBI::Param
- # @return [BlockParam] a new instance of BlockParam
- #
- # source://rbi//lib/rbi/model.rb#681
+ # pkg:gem/rbi#lib/rbi/model.rb:712
sig do
params(
name: ::String,
loc: T.nilable(::RBI::Loc),
- comments: T::Array[::RBI::Comment],
+ comments: T.nilable(T::Array[::RBI::Comment]),
block: T.nilable(T.proc.params(node: ::RBI::BlockParam).void)
).void
end
def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
- # source://rbi//lib/rbi/model.rb#693
- sig { params(other: T.nilable(::Object)).returns(T::Boolean) }
- def ==(other); end
-
- # source://rbi//lib/rbi/model.rb#688
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/model.rb:719
sig { override.returns(::String) }
def to_s; end
end
-# source://rbi//lib/rbi/model.rb#195
+# pkg:gem/rbi#lib/rbi/model.rb:217
class RBI::Class < ::RBI::Scope
- # @return [Class] a new instance of Class
- #
- # source://rbi//lib/rbi/model.rb#203
+ # pkg:gem/rbi#lib/rbi/model.rb:230
sig do
params(
name: ::String,
superclass_name: T.nilable(::String),
loc: T.nilable(::RBI::Loc),
- comments: T::Array[::RBI::Comment],
+ comments: T.nilable(T::Array[::RBI::Comment]),
block: T.nilable(T.proc.params(node: ::RBI::Class).void)
).void
end
def initialize(name, superclass_name: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
- # @return [Boolean]
+ # @override
#
- # source://rbi//lib/rbi/rewriters/merge_trees.rb#375
+ # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:388
sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
def compatible_with?(other); end
- # source://rbi//lib/rbi/model.rb#212
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/model.rb:239
sig { override.returns(::String) }
def fully_qualified_name; end
- # source://rbi//lib/rbi/model.rb#197
+ # pkg:gem/rbi#lib/rbi/model.rb:219
sig { returns(::String) }
def name; end
- # source://rbi//lib/rbi/model.rb#197
- def name=(_arg0); end
-
- # source://rbi//lib/rbi/model.rb#200
+ # pkg:gem/rbi#lib/rbi/model.rb:222
sig { returns(T.nilable(::String)) }
def superclass_name; end
- # source://rbi//lib/rbi/model.rb#200
+ # pkg:gem/rbi#lib/rbi/model.rb:222
def superclass_name=(_arg0); end
end
-# source://rbi//lib/rbi/model.rb#51
+# pkg:gem/rbi#lib/rbi/model.rb:51
class RBI::Comment < ::RBI::Node
- # @return [Comment] a new instance of Comment
- #
- # source://rbi//lib/rbi/model.rb#56
+ # pkg:gem/rbi#lib/rbi/model.rb:56
sig { params(text: ::String, loc: T.nilable(::RBI::Loc)).void }
def initialize(text, loc: T.unsafe(nil)); end
- # source://rbi//lib/rbi/model.rb#62
+ # pkg:gem/rbi#lib/rbi/model.rb:62
sig { params(other: ::Object).returns(T::Boolean) }
def ==(other); end
- # source://rbi//lib/rbi/model.rb#53
+ # pkg:gem/rbi#lib/rbi/model.rb:53
sig { returns(::String) }
def text; end
- # source://rbi//lib/rbi/model.rb#53
+ # pkg:gem/rbi#lib/rbi/model.rb:53
def text=(_arg0); end
end
@@ -357,146 +364,149 @@ end
# end
# ~~~
#
-# source://rbi//lib/rbi/rewriters/merge_trees.rb#559
+# pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:591
class RBI::ConflictTree < ::RBI::Tree
- # @return [ConflictTree] a new instance of ConflictTree
- #
- # source://rbi//lib/rbi/rewriters/merge_trees.rb#567
+ # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:599
sig { params(left_name: ::String, right_name: ::String).void }
def initialize(left_name: T.unsafe(nil), right_name: T.unsafe(nil)); end
- # source://rbi//lib/rbi/rewriters/merge_trees.rb#561
+ # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:593
sig { returns(::RBI::Tree) }
def left; end
- # source://rbi//lib/rbi/rewriters/merge_trees.rb#564
+ # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:596
sig { returns(::String) }
def left_name; end
- # source://rbi//lib/rbi/rewriters/merge_trees.rb#561
+ # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:593
def right; end
- # source://rbi//lib/rbi/rewriters/merge_trees.rb#564
+ # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:596
def right_name; end
end
# Consts
#
-# source://rbi//lib/rbi/model.rb#269
+# pkg:gem/rbi#lib/rbi/model.rb:296
class RBI::Const < ::RBI::NodeWithComments
include ::RBI::Indexable
- # @return [Const] a new instance of Const
- #
- # source://rbi//lib/rbi/model.rb#274
+ # pkg:gem/rbi#lib/rbi/model.rb:301
sig do
params(
name: ::String,
value: ::String,
loc: T.nilable(::RBI::Loc),
- comments: T::Array[::RBI::Comment],
+ comments: T.nilable(T::Array[::RBI::Comment]),
block: T.nilable(T.proc.params(node: ::RBI::Const).void)
).void
end
def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
- # @return [Boolean]
+ # @override
#
- # source://rbi//lib/rbi/rewriters/merge_trees.rb#399
+ # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:412
sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
def compatible_with?(other); end
- # source://rbi//lib/rbi/model.rb#282
+ # pkg:gem/rbi#lib/rbi/model.rb:309
sig { returns(::String) }
def fully_qualified_name; end
- # source://rbi//lib/rbi/index.rb#94
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/index.rb:94
sig { override.returns(T::Array[::String]) }
def index_ids; end
- # source://rbi//lib/rbi/model.rb#271
+ # pkg:gem/rbi#lib/rbi/model.rb:298
sig { returns(::String) }
def name; end
- # source://rbi//lib/rbi/model.rb#290
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/model.rb:317
sig { override.returns(::String) }
def to_s; end
- # source://rbi//lib/rbi/model.rb#271
+ # pkg:gem/rbi#lib/rbi/model.rb:298
def value; end
end
-# source://rbi//lib/rbi/rewriters/merge_trees.rb#345
+# pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:358
class RBI::DuplicateNodeError < ::RBI::Error; end
-# source://rbi//lib/rbi.rb#8
+# pkg:gem/rbi#lib/rbi.rb:8
class RBI::Error < ::StandardError; end
-# source://rbi//lib/rbi/model.rb#726
+# pkg:gem/rbi#lib/rbi/model.rb:752
class RBI::Extend < ::RBI::Mixin
include ::RBI::Indexable
- # @return [Extend] a new instance of Extend
- #
- # source://rbi//lib/rbi/model.rb#728
+ # pkg:gem/rbi#lib/rbi/model.rb:754
sig do
params(
name: ::String,
names: ::String,
loc: T.nilable(::RBI::Loc),
- comments: T::Array[::RBI::Comment],
+ comments: T.nilable(T::Array[::RBI::Comment]),
block: T.nilable(T.proc.params(node: ::RBI::Extend).void)
).void
end
def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
- # @return [Boolean]
+ # @override
#
- # source://rbi//lib/rbi/rewriters/merge_trees.rb#492
+ # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:524
sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
def compatible_with?(other); end
- # source://rbi//lib/rbi/index.rb#134
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/index.rb:134
sig { override.returns(T::Array[::String]) }
def index_ids; end
- # source://rbi//lib/rbi/model.rb#735
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/model.rb:761
sig { override.returns(::String) }
def to_s; end
end
-# source://rbi//lib/rbi/model.rb#131
+# pkg:gem/rbi#lib/rbi/model.rb:143
class RBI::File
- # @return [File] a new instance of File
- #
- # source://rbi//lib/rbi/model.rb#142
+ # pkg:gem/rbi#lib/rbi/model.rb:164
sig do
params(
strictness: T.nilable(::String),
- comments: T::Array[::RBI::Comment],
+ comments: T.nilable(T::Array[::RBI::Comment]),
block: T.nilable(T.proc.params(file: ::RBI::File).void)
).void
end
def initialize(strictness: T.unsafe(nil), comments: T.unsafe(nil), &block); end
- # source://rbi//lib/rbi/model.rb#150
+ # pkg:gem/rbi#lib/rbi/model.rb:172
sig { params(node: ::RBI::Node).void }
def <<(node); end
- # source://rbi//lib/rbi/model.rb#139
+ # pkg:gem/rbi#lib/rbi/model.rb:154
sig { returns(T::Array[::RBI::Comment]) }
def comments; end
- # source://rbi//lib/rbi/model.rb#139
- def comments=(_arg0); end
+ # pkg:gem/rbi#lib/rbi/model.rb:151
+ sig { params(comments: T::Array[::RBI::Comment]).returns(T::Array[::RBI::Comment]) }
+ def comments=(comments); end
- # @return [Boolean]
- #
- # source://rbi//lib/rbi/model.rb#155
+ # pkg:gem/rbi#lib/rbi/model.rb:159
+ sig { returns(T::Boolean) }
+ def comments?; end
+
+ # pkg:gem/rbi#lib/rbi/model.rb:177
sig { returns(T::Boolean) }
def empty?; end
- # source://rbi//lib/rbi/printer.rb#819
+ # pkg:gem/rbi#lib/rbi/printer.rb:877
sig do
params(
out: T.any(::IO, ::StringIO),
@@ -507,38 +517,36 @@ class RBI::File
end
def print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end
- # source://rbi//lib/rbi/rbs_printer.rb#1212
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1236
sig { params(out: T.any(::IO, ::StringIO), indent: ::Integer, print_locs: T::Boolean).void }
def rbs_print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil)); end
- # source://rbi//lib/rbi/rbs_printer.rb#1218
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1242
sig { params(indent: ::Integer, print_locs: T::Boolean).returns(::String) }
def rbs_string(indent: T.unsafe(nil), print_locs: T.unsafe(nil)); end
- # source://rbi//lib/rbi/model.rb#133
+ # pkg:gem/rbi#lib/rbi/model.rb:145
sig { returns(::RBI::Tree) }
def root; end
- # source://rbi//lib/rbi/model.rb#133
+ # pkg:gem/rbi#lib/rbi/model.rb:145
def root=(_arg0); end
- # source://rbi//lib/rbi/model.rb#136
+ # pkg:gem/rbi#lib/rbi/model.rb:148
sig { returns(T.nilable(::String)) }
def strictness; end
- # source://rbi//lib/rbi/model.rb#136
+ # pkg:gem/rbi#lib/rbi/model.rb:148
def strictness=(_arg0); end
- # source://rbi//lib/rbi/printer.rb#825
+ # pkg:gem/rbi#lib/rbi/printer.rb:883
sig { params(indent: ::Integer, print_locs: T::Boolean, max_line_length: T.nilable(::Integer)).returns(::String) }
def string(indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end
end
-# source://rbi//lib/rbi/formatter.rb#5
+# pkg:gem/rbi#lib/rbi/formatter.rb:5
class RBI::Formatter
- # @return [Formatter] a new instance of Formatter
- #
- # source://rbi//lib/rbi/formatter.rb#18
+ # pkg:gem/rbi#lib/rbi/formatter.rb:18
sig do
params(
add_sig_templates: T::Boolean,
@@ -552,202 +560,205 @@ class RBI::Formatter
end
def initialize(add_sig_templates: T.unsafe(nil), group_nodes: T.unsafe(nil), max_line_length: T.unsafe(nil), nest_singleton_methods: T.unsafe(nil), nest_non_public_members: T.unsafe(nil), sort_nodes: T.unsafe(nil), replace_attributes_with_methods: T.unsafe(nil)); end
- # source://rbi//lib/rbi/formatter.rb#43
+ # pkg:gem/rbi#lib/rbi/formatter.rb:43
sig { params(file: ::RBI::File).void }
def format_file(file); end
- # source://rbi//lib/rbi/formatter.rb#48
+ # pkg:gem/rbi#lib/rbi/formatter.rb:48
sig { params(tree: ::RBI::Tree).void }
def format_tree(tree); end
- # source://rbi//lib/rbi/formatter.rb#7
+ # pkg:gem/rbi#lib/rbi/formatter.rb:7
sig { returns(T.nilable(::Integer)) }
def max_line_length; end
- # source://rbi//lib/rbi/formatter.rb#7
+ # pkg:gem/rbi#lib/rbi/formatter.rb:7
def max_line_length=(_arg0); end
- # source://rbi//lib/rbi/formatter.rb#37
+ # pkg:gem/rbi#lib/rbi/formatter.rb:37
sig { params(file: ::RBI::File).returns(::String) }
def print_file(file); end
end
-# source://rbi//lib/rbi/rewriters/group_nodes.rb#84
+# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:86
class RBI::Group < ::RBI::Tree
- # @return [Group] a new instance of Group
- #
- # source://rbi//lib/rbi/rewriters/group_nodes.rb#89
+ # pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:91
sig { params(kind: ::RBI::Group::Kind).void }
def initialize(kind); end
- # source://rbi//lib/rbi/rewriters/group_nodes.rb#86
+ # pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:88
sig { returns(::RBI::Group::Kind) }
def kind; end
end
-# source://rbi//lib/rbi/rewriters/group_nodes.rb#94
+# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:96
class RBI::Group::Kind
class << self
private
- # source://rbi//lib/rbi/rewriters/group_nodes.rb#109
+ # pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:111
def new(*_arg0); end
end
end
-# source://rbi//lib/rbi/rewriters/group_nodes.rb#101
+# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:103
RBI::Group::Kind::Attrs = T.let(T.unsafe(nil), RBI::Group::Kind)
-# source://rbi//lib/rbi/rewriters/group_nodes.rb#107
+# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:109
RBI::Group::Kind::Consts = T.let(T.unsafe(nil), RBI::Group::Kind)
-# source://rbi//lib/rbi/rewriters/group_nodes.rb#97
+# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:99
RBI::Group::Kind::Helpers = T.let(T.unsafe(nil), RBI::Group::Kind)
-# source://rbi//lib/rbi/rewriters/group_nodes.rb#104
+# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:106
RBI::Group::Kind::Inits = T.let(T.unsafe(nil), RBI::Group::Kind)
-# source://rbi//lib/rbi/rewriters/group_nodes.rb#105
+# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:107
RBI::Group::Kind::Methods = T.let(T.unsafe(nil), RBI::Group::Kind)
-# source://rbi//lib/rbi/rewriters/group_nodes.rb#99
+# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:101
RBI::Group::Kind::MixesInClassMethods = T.let(T.unsafe(nil), RBI::Group::Kind)
-# source://rbi//lib/rbi/rewriters/group_nodes.rb#95
+# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:97
RBI::Group::Kind::Mixins = T.let(T.unsafe(nil), RBI::Group::Kind)
-# source://rbi//lib/rbi/rewriters/group_nodes.rb#96
+# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:98
RBI::Group::Kind::RequiredAncestors = T.let(T.unsafe(nil), RBI::Group::Kind)
-# source://rbi//lib/rbi/rewriters/group_nodes.rb#100
+# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:102
RBI::Group::Kind::Sends = T.let(T.unsafe(nil), RBI::Group::Kind)
-# source://rbi//lib/rbi/rewriters/group_nodes.rb#106
+# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:108
RBI::Group::Kind::SingletonClasses = T.let(T.unsafe(nil), RBI::Group::Kind)
-# source://rbi//lib/rbi/rewriters/group_nodes.rb#103
+# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:105
RBI::Group::Kind::TEnums = T.let(T.unsafe(nil), RBI::Group::Kind)
-# source://rbi//lib/rbi/rewriters/group_nodes.rb#102
+# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:104
RBI::Group::Kind::TStructFields = T.let(T.unsafe(nil), RBI::Group::Kind)
-# source://rbi//lib/rbi/rewriters/group_nodes.rb#98
+# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:100
RBI::Group::Kind::TypeMembers = T.let(T.unsafe(nil), RBI::Group::Kind)
-# source://rbi//lib/rbi/rewriters/group_nodes.rb#5
+# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:5
class RBI::GroupNodesError < ::RBI::Error; end
# Sorbet's misc.
#
-# source://rbi//lib/rbi/model.rb#1141
+# pkg:gem/rbi#lib/rbi/model.rb:1187
class RBI::Helper < ::RBI::NodeWithComments
include ::RBI::Indexable
- # @return [Helper] a new instance of Helper
- #
- # source://rbi//lib/rbi/model.rb#1146
+ # pkg:gem/rbi#lib/rbi/model.rb:1192
sig do
params(
name: ::String,
loc: T.nilable(::RBI::Loc),
- comments: T::Array[::RBI::Comment],
+ comments: T.nilable(T::Array[::RBI::Comment]),
block: T.nilable(T.proc.params(node: ::RBI::Helper).void)
).void
end
def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
- # @return [Boolean]
+ # @override
#
- # source://rbi//lib/rbi/rewriters/merge_trees.rb#508
+ # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:540
sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
def compatible_with?(other); end
- # source://rbi//lib/rbi/index.rb#164
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/index.rb:164
sig { override.returns(T::Array[::String]) }
def index_ids; end
- # source://rbi//lib/rbi/model.rb#1143
+ # pkg:gem/rbi#lib/rbi/model.rb:1189
sig { returns(::String) }
def name; end
- # source://rbi//lib/rbi/model.rb#1154
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/model.rb:1200
sig { override.returns(::String) }
def to_s; end
end
-# source://rbi//lib/rbi/model.rb#712
+# pkg:gem/rbi#lib/rbi/model.rb:738
class RBI::Include < ::RBI::Mixin
include ::RBI::Indexable
- # @return [Include] a new instance of Include
- #
- # source://rbi//lib/rbi/model.rb#714
+ # pkg:gem/rbi#lib/rbi/model.rb:740
sig do
params(
name: ::String,
names: ::String,
loc: T.nilable(::RBI::Loc),
- comments: T::Array[::RBI::Comment],
+ comments: T.nilable(T::Array[::RBI::Comment]),
block: T.nilable(T.proc.params(node: ::RBI::Include).void)
).void
end
def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
- # @return [Boolean]
+ # @override
#
- # source://rbi//lib/rbi/rewriters/merge_trees.rb#484
+ # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:516
sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
def compatible_with?(other); end
- # source://rbi//lib/rbi/index.rb#124
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/index.rb:124
sig { override.returns(T::Array[::String]) }
def index_ids; end
- # source://rbi//lib/rbi/model.rb#721
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/model.rb:747
sig { override.returns(::String) }
def to_s; end
end
-# source://rbi//lib/rbi/index.rb#5
+# pkg:gem/rbi#lib/rbi/index.rb:5
class RBI::Index < ::RBI::Visitor
- # @return [Index] a new instance of Index
- #
- # source://rbi//lib/rbi/index.rb#16
+ # pkg:gem/rbi#lib/rbi/index.rb:16
sig { void }
def initialize; end
- # source://rbi//lib/rbi/index.rb#27
+ # pkg:gem/rbi#lib/rbi/index.rb:27
sig { params(id: ::String).returns(T::Array[::RBI::Node]) }
def [](id); end
- # source://rbi//lib/rbi/index.rb#32
+ # pkg:gem/rbi#lib/rbi/index.rb:32
sig { params(nodes: ::RBI::Node).void }
def index(*nodes); end
- # source://rbi//lib/rbi/index.rb#22
+ # pkg:gem/rbi#lib/rbi/index.rb:22
sig { returns(T::Array[::String]) }
def keys; end
- # source://rbi//lib/rbi/index.rb#38
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/index.rb:38
sig { override.params(node: T.nilable(::RBI::Node)).void }
def visit(node); end
private
- # source://rbi//lib/rbi/index.rb#55
+ # pkg:gem/rbi#lib/rbi/index.rb:55
sig { params(node: T.all(::RBI::Indexable, ::RBI::Node)).void }
def index_node(node); end
class << self
- # source://rbi//lib/rbi/index.rb#8
+ # pkg:gem/rbi#lib/rbi/index.rb:8
sig { params(node: ::RBI::Node).returns(::RBI::Index) }
def index(*node); end
end
end
# A Node that can be referred to by a unique ID inside an index
+# @interface
#
-# source://rbi//lib/rbi/index.rb#69
+# pkg:gem/rbi#lib/rbi/index.rb:69
module RBI::Indexable
interface!
@@ -755,118 +766,100 @@ module RBI::Indexable
#
# Some nodes can have multiple ids, for example an attribute accessor matches the ID of the
# getter and the setter.
- #
# @abstract
- # @raise [NotImplementedError]
#
- # source://rbi//lib/rbi/index.rb#76
+ # pkg:gem/rbi#lib/rbi/index.rb:76
sig { abstract.returns(T::Array[::String]) }
def index_ids; end
end
-# source://rbi//lib/rbi/model.rb#854
+# pkg:gem/rbi#lib/rbi/model.rb:883
class RBI::KwArg < ::RBI::Arg
- # @return [KwArg] a new instance of KwArg
- #
- # source://rbi//lib/rbi/model.rb#859
+ # pkg:gem/rbi#lib/rbi/model.rb:888
sig { params(keyword: ::String, value: ::String, loc: T.nilable(::RBI::Loc)).void }
def initialize(keyword, value, loc: T.unsafe(nil)); end
- # source://rbi//lib/rbi/model.rb#865
+ # pkg:gem/rbi#lib/rbi/model.rb:894
sig { params(other: T.nilable(::Object)).returns(T::Boolean) }
def ==(other); end
- # source://rbi//lib/rbi/model.rb#856
+ # pkg:gem/rbi#lib/rbi/model.rb:885
sig { returns(::String) }
def keyword; end
- # source://rbi//lib/rbi/model.rb#870
+ # pkg:gem/rbi#lib/rbi/model.rb:899
sig { returns(::String) }
def to_s; end
end
-# source://rbi//lib/rbi/model.rb#637
+# pkg:gem/rbi#lib/rbi/model.rb:678
class RBI::KwOptParam < ::RBI::Param
- # @return [KwOptParam] a new instance of KwOptParam
- #
- # source://rbi//lib/rbi/model.rb#642
+ # pkg:gem/rbi#lib/rbi/model.rb:683
sig do
params(
name: ::String,
value: ::String,
loc: T.nilable(::RBI::Loc),
- comments: T::Array[::RBI::Comment],
+ comments: T.nilable(T::Array[::RBI::Comment]),
block: T.nilable(T.proc.params(node: ::RBI::KwOptParam).void)
).void
end
def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
- # source://rbi//lib/rbi/model.rb#655
- sig { params(other: T.nilable(::Object)).returns(T::Boolean) }
- def ==(other); end
-
- # source://rbi//lib/rbi/model.rb#650
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/model.rb:691
sig { override.returns(::String) }
def to_s; end
- # source://rbi//lib/rbi/model.rb#639
+ # pkg:gem/rbi#lib/rbi/model.rb:680
sig { returns(::String) }
def value; end
end
-# source://rbi//lib/rbi/model.rb#618
+# pkg:gem/rbi#lib/rbi/model.rb:664
class RBI::KwParam < ::RBI::Param
- # @return [KwParam] a new instance of KwParam
- #
- # source://rbi//lib/rbi/model.rb#620
+ # pkg:gem/rbi#lib/rbi/model.rb:666
sig do
params(
name: ::String,
loc: T.nilable(::RBI::Loc),
- comments: T::Array[::RBI::Comment],
+ comments: T.nilable(T::Array[::RBI::Comment]),
block: T.nilable(T.proc.params(node: ::RBI::KwParam).void)
).void
end
def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
- # source://rbi//lib/rbi/model.rb#632
- sig { params(other: T.nilable(::Object)).returns(T::Boolean) }
- def ==(other); end
-
- # source://rbi//lib/rbi/model.rb#627
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/model.rb:673
sig { override.returns(::String) }
def to_s; end
end
-# source://rbi//lib/rbi/model.rb#660
+# pkg:gem/rbi#lib/rbi/model.rb:696
class RBI::KwRestParam < ::RBI::Param
- # @return [KwRestParam] a new instance of KwRestParam
- #
- # source://rbi//lib/rbi/model.rb#662
+ # pkg:gem/rbi#lib/rbi/model.rb:698
sig do
params(
name: ::String,
loc: T.nilable(::RBI::Loc),
- comments: T::Array[::RBI::Comment],
+ comments: T.nilable(T::Array[::RBI::Comment]),
block: T.nilable(T.proc.params(node: ::RBI::KwRestParam).void)
).void
end
def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
- # source://rbi//lib/rbi/model.rb#674
- sig { params(other: T.nilable(::Object)).returns(T::Boolean) }
- def ==(other); end
-
- # source://rbi//lib/rbi/model.rb#669
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/model.rb:705
sig { override.returns(::String) }
def to_s; end
end
-# source://rbi//lib/rbi/loc.rb#5
+# pkg:gem/rbi#lib/rbi/loc.rb:5
class RBI::Loc
- # @return [Loc] a new instance of Loc
- #
- # source://rbi//lib/rbi/loc.rb#32
+ # pkg:gem/rbi#lib/rbi/loc.rb:32
sig do
params(
file: T.nilable(::String),
@@ -878,37 +871,37 @@ class RBI::Loc
end
def initialize(file: T.unsafe(nil), begin_line: T.unsafe(nil), end_line: T.unsafe(nil), begin_column: T.unsafe(nil), end_column: T.unsafe(nil)); end
- # source://rbi//lib/rbi/loc.rb#23
+ # pkg:gem/rbi#lib/rbi/loc.rb:23
def begin_column; end
- # source://rbi//lib/rbi/loc.rb#23
+ # pkg:gem/rbi#lib/rbi/loc.rb:23
sig { returns(T.nilable(::Integer)) }
def begin_line; end
- # source://rbi//lib/rbi/loc.rb#23
+ # pkg:gem/rbi#lib/rbi/loc.rb:23
def end_column; end
- # source://rbi//lib/rbi/loc.rb#23
+ # pkg:gem/rbi#lib/rbi/loc.rb:23
def end_line; end
- # source://rbi//lib/rbi/loc.rb#20
+ # pkg:gem/rbi#lib/rbi/loc.rb:20
sig { returns(T.nilable(::String)) }
def file; end
- # source://rbi//lib/rbi/loc.rb#41
+ # pkg:gem/rbi#lib/rbi/loc.rb:41
sig { params(other: ::RBI::Loc).returns(::RBI::Loc) }
def join(other); end
- # source://rbi//lib/rbi/loc.rb#61
+ # pkg:gem/rbi#lib/rbi/loc.rb:61
sig { returns(T.nilable(::String)) }
def source; end
- # source://rbi//lib/rbi/loc.rb#52
+ # pkg:gem/rbi#lib/rbi/loc.rb:52
sig { returns(::String) }
def to_s; end
class << self
- # source://rbi//lib/rbi/loc.rb#8
+ # pkg:gem/rbi#lib/rbi/loc.rb:8
sig { params(file: ::String, prism_location: ::Prism::Location).returns(::RBI::Loc) }
def from_prism(file, prism_location); end
end
@@ -916,11 +909,9 @@ end
# A tree that _might_ contain conflicts
#
-# source://rbi//lib/rbi/rewriters/merge_trees.rb#329
+# pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:342
class RBI::MergeTree < ::RBI::Tree
- # @return [MergeTree] a new instance of MergeTree
- #
- # source://rbi//lib/rbi/rewriters/merge_trees.rb#338
+ # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:351
sig do
params(
loc: T.nilable(::RBI::Loc),
@@ -931,286 +922,290 @@ class RBI::MergeTree < ::RBI::Tree
end
def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), conflicts: T.unsafe(nil), &block); end
- # source://rbi//lib/rbi/rewriters/merge_trees.rb#331
+ # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:344
sig { returns(T::Array[::RBI::Rewriters::Merge::Conflict]) }
def conflicts; end
end
# Methods and args
#
-# source://rbi//lib/rbi/model.rb#417
+# pkg:gem/rbi#lib/rbi/model.rb:454
class RBI::Method < ::RBI::NodeWithComments
include ::RBI::Indexable
- # @return [Method] a new instance of Method
- #
- # source://rbi//lib/rbi/model.rb#442
+ # pkg:gem/rbi#lib/rbi/model.rb:491
sig do
params(
name: ::String,
- params: T::Array[::RBI::Param],
+ params: T.nilable(T::Array[::RBI::Param]),
is_singleton: T::Boolean,
visibility: ::RBI::Visibility,
- sigs: T::Array[::RBI::Sig],
+ sigs: T.nilable(T::Array[::RBI::Sig]),
loc: T.nilable(::RBI::Loc),
- comments: T::Array[::RBI::Comment],
+ comments: T.nilable(T::Array[::RBI::Comment]),
block: T.nilable(T.proc.params(node: ::RBI::Method).void)
).void
end
def initialize(name, params: T.unsafe(nil), is_singleton: T.unsafe(nil), visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
- # source://rbi//lib/rbi/model.rb#462
+ # pkg:gem/rbi#lib/rbi/model.rb:511
sig { params(param: ::RBI::Param).void }
def <<(param); end
- # source://rbi//lib/rbi/model.rb#497
+ # pkg:gem/rbi#lib/rbi/model.rb:546
sig { params(name: ::String).void }
def add_block_param(name); end
- # source://rbi//lib/rbi/model.rb#487
+ # pkg:gem/rbi#lib/rbi/model.rb:536
sig { params(name: ::String, default_value: ::String).void }
def add_kw_opt_param(name, default_value); end
- # source://rbi//lib/rbi/model.rb#482
+ # pkg:gem/rbi#lib/rbi/model.rb:531
sig { params(name: ::String).void }
def add_kw_param(name); end
- # source://rbi//lib/rbi/model.rb#492
+ # pkg:gem/rbi#lib/rbi/model.rb:541
sig { params(name: ::String).void }
def add_kw_rest_param(name); end
- # source://rbi//lib/rbi/model.rb#472
+ # pkg:gem/rbi#lib/rbi/model.rb:521
sig { params(name: ::String, default_value: ::String).void }
def add_opt_param(name, default_value); end
- # source://rbi//lib/rbi/model.rb#467
+ # pkg:gem/rbi#lib/rbi/model.rb:516
sig { params(name: ::String).void }
def add_param(name); end
- # source://rbi//lib/rbi/model.rb#477
+ # pkg:gem/rbi#lib/rbi/model.rb:526
sig { params(name: ::String).void }
def add_rest_param(name); end
- # source://rbi//lib/rbi/model.rb#510
+ # pkg:gem/rbi#lib/rbi/model.rb:559
sig do
params(
- params: T::Array[::RBI::SigParam],
+ params: T.nilable(T::Array[::RBI::SigParam]),
return_type: T.any(::RBI::Type, ::String),
is_abstract: T::Boolean,
is_override: T::Boolean,
is_overridable: T::Boolean,
is_final: T::Boolean,
- type_params: T::Array[::String],
+ type_params: T.nilable(T::Array[::String]),
checked: T.nilable(::Symbol),
block: T.nilable(T.proc.params(node: ::RBI::Sig).void)
).void
end
def add_sig(params: T.unsafe(nil), return_type: T.unsafe(nil), is_abstract: T.unsafe(nil), is_override: T.unsafe(nil), is_overridable: T.unsafe(nil), is_final: T.unsafe(nil), type_params: T.unsafe(nil), checked: T.unsafe(nil), &block); end
- # @return [Boolean]
+ # @override
#
- # source://rbi//lib/rbi/rewriters/merge_trees.rb#453
+ # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:466
sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
def compatible_with?(other); end
- # source://rbi//lib/rbi/model.rb#536
+ # pkg:gem/rbi#lib/rbi/model.rb:585
sig { returns(::String) }
def fully_qualified_name; end
- # source://rbi//lib/rbi/index.rb#114
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/index.rb:114
sig { override.returns(T::Array[::String]) }
def index_ids; end
- # source://rbi//lib/rbi/model.rb#425
+ # pkg:gem/rbi#lib/rbi/model.rb:464
sig { returns(T::Boolean) }
def is_singleton; end
- # source://rbi//lib/rbi/model.rb#425
+ # pkg:gem/rbi#lib/rbi/model.rb:464
def is_singleton=(_arg0); end
- # source://rbi//lib/rbi/rewriters/merge_trees.rb#463
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:476
sig { override.params(other: ::RBI::Node).void }
def merge_with(other); end
- # source://rbi//lib/rbi/model.rb#419
+ # pkg:gem/rbi#lib/rbi/model.rb:456
sig { returns(::String) }
def name; end
- # source://rbi//lib/rbi/model.rb#419
- def name=(_arg0); end
-
- # source://rbi//lib/rbi/model.rb#422
+ # pkg:gem/rbi#lib/rbi/model.rb:459
sig { returns(T::Array[::RBI::Param]) }
def params; end
- # source://rbi//lib/rbi/model.rb#431
+ # pkg:gem/rbi#lib/rbi/model.rb:470
sig { returns(T::Array[::RBI::Sig]) }
def sigs; end
- # source://rbi//lib/rbi/model.rb#431
- def sigs=(_arg0); end
+ # pkg:gem/rbi#lib/rbi/model.rb:480
+ sig { params(sigs: T::Array[::RBI::Sig]).returns(T::Array[::RBI::Sig]) }
+ def sigs=(sigs); end
- # source://rbi//lib/rbi/model.rb#546
+ # pkg:gem/rbi#lib/rbi/model.rb:475
+ sig { returns(T::Boolean) }
+ def sigs?; end
+
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/model.rb:595
sig { override.returns(::String) }
def to_s; end
- # source://rbi//lib/rbi/model.rb#428
+ # pkg:gem/rbi#lib/rbi/model.rb:467
sig { returns(::RBI::Visibility) }
def visibility; end
- # source://rbi//lib/rbi/model.rb#428
+ # pkg:gem/rbi#lib/rbi/model.rb:467
def visibility=(_arg0); end
+
+ private
+
+ # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:498
+ sig { params(other: ::RBI::Method).returns(T::Boolean) }
+ def at_most_one_side_anonymous?(other); end
end
-# source://rbi//lib/rbi/model.rb#1185
+# pkg:gem/rbi#lib/rbi/model.rb:1231
class RBI::MixesInClassMethods < ::RBI::Mixin
include ::RBI::Indexable
- # @return [MixesInClassMethods] a new instance of MixesInClassMethods
- #
- # source://rbi//lib/rbi/model.rb#1192
+ # pkg:gem/rbi#lib/rbi/model.rb:1238
sig do
params(
name: ::String,
names: ::String,
loc: T.nilable(::RBI::Loc),
- comments: T::Array[::RBI::Comment],
+ comments: T.nilable(T::Array[::RBI::Comment]),
block: T.nilable(T.proc.params(node: ::RBI::MixesInClassMethods).void)
).void
end
def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
- # @return [Boolean]
+ # @override
#
- # source://rbi//lib/rbi/rewriters/merge_trees.rb#500
+ # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:532
sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
def compatible_with?(other); end
- # source://rbi//lib/rbi/index.rb#144
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/index.rb:144
sig { override.returns(T::Array[::String]) }
def index_ids; end
- # source://rbi//lib/rbi/model.rb#1199
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/model.rb:1245
sig { override.returns(::String) }
def to_s; end
end
# @abstract
#
-# source://rbi//lib/rbi/model.rb#701
+# pkg:gem/rbi#lib/rbi/model.rb:727
class RBI::Mixin < ::RBI::NodeWithComments
abstract!
- # @return [Mixin] a new instance of Mixin
- #
- # source://rbi//lib/rbi/model.rb#706
+ # pkg:gem/rbi#lib/rbi/model.rb:732
sig do
params(
name: ::String,
names: T::Array[::String],
loc: T.nilable(::RBI::Loc),
- comments: T::Array[::RBI::Comment]
+ comments: T.nilable(T::Array[::RBI::Comment])
).void
end
def initialize(name, names, loc: T.unsafe(nil), comments: T.unsafe(nil)); end
- # @return [Boolean]
+ # @override
#
- # source://rbi//lib/rbi/rewriters/merge_trees.rb#476
+ # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:508
sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
def compatible_with?(other); end
- # source://rbi//lib/rbi/model.rb#703
+ # pkg:gem/rbi#lib/rbi/model.rb:729
sig { returns(T::Array[::String]) }
def names; end
end
-# source://rbi//lib/rbi/model.rb#175
+# pkg:gem/rbi#lib/rbi/model.rb:197
class RBI::Module < ::RBI::Scope
- # @return [Module] a new instance of Module
- #
- # source://rbi//lib/rbi/model.rb#180
+ # pkg:gem/rbi#lib/rbi/model.rb:202
sig do
params(
name: ::String,
loc: T.nilable(::RBI::Loc),
- comments: T::Array[::RBI::Comment],
+ comments: T.nilable(T::Array[::RBI::Comment]),
block: T.nilable(T.proc.params(node: ::RBI::Module).void)
).void
end
def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
- # @return [Boolean]
+ # @override
#
- # source://rbi//lib/rbi/rewriters/merge_trees.rb#383
+ # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:396
sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
def compatible_with?(other); end
- # source://rbi//lib/rbi/model.rb#188
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/model.rb:210
sig { override.returns(::String) }
def fully_qualified_name; end
- # source://rbi//lib/rbi/model.rb#177
+ # pkg:gem/rbi#lib/rbi/model.rb:199
sig { returns(::String) }
def name; end
-
- # source://rbi//lib/rbi/model.rb#177
- def name=(_arg0); end
end
# @abstract
#
-# source://rbi//lib/rbi/model.rb#8
+# pkg:gem/rbi#lib/rbi/model.rb:8
class RBI::Node
abstract!
- # @return [Node] a new instance of Node
- #
- # source://rbi//lib/rbi/model.rb#16
+ # pkg:gem/rbi#lib/rbi/model.rb:16
sig { params(loc: T.nilable(::RBI::Loc)).void }
def initialize(loc: T.unsafe(nil)); end
# Can `self` and `_other` be merged into a single definition?
#
- # @return [Boolean]
- #
- # source://rbi//lib/rbi/rewriters/merge_trees.rb#289
- sig { params(_other: ::RBI::Node).returns(T::Boolean) }
+ # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:302
def compatible_with?(_other); end
- # source://rbi//lib/rbi/model.rb#22
+ # pkg:gem/rbi#lib/rbi/model.rb:22
sig { void }
def detach; end
- # source://rbi//lib/rbi/model.rb#13
+ # pkg:gem/rbi#lib/rbi/model.rb:13
sig { returns(T.nilable(::RBI::Loc)) }
def loc; end
- # source://rbi//lib/rbi/model.rb#13
+ # pkg:gem/rbi#lib/rbi/model.rb:13
def loc=(_arg0); end
# Merge `self` and `other` into a single definition
#
- # source://rbi//lib/rbi/rewriters/merge_trees.rb#295
+ # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:308
sig { params(other: ::RBI::Node).void }
def merge_with(other); end
- # source://rbi//lib/rbi/rewriters/merge_trees.rb#298
+ # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:311
sig { returns(T.nilable(::RBI::ConflictTree)) }
def parent_conflict_tree; end
- # source://rbi//lib/rbi/model.rb#44
+ # pkg:gem/rbi#lib/rbi/model.rb:44
sig { returns(T.nilable(::RBI::Scope)) }
def parent_scope; end
- # source://rbi//lib/rbi/model.rb#10
+ # pkg:gem/rbi#lib/rbi/model.rb:10
sig { returns(T.nilable(::RBI::Tree)) }
def parent_tree; end
- # source://rbi//lib/rbi/model.rb#10
+ # pkg:gem/rbi#lib/rbi/model.rb:10
def parent_tree=(_arg0); end
- # source://rbi//lib/rbi/printer.rb#834
+ # pkg:gem/rbi#lib/rbi/printer.rb:895
sig do
params(
out: T.any(::IO, ::StringIO),
@@ -1221,7 +1216,7 @@ class RBI::Node
end
def print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end
- # source://rbi//lib/rbi/rbs_printer.rb#1227
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1251
sig do
params(
out: T.any(::IO, ::StringIO),
@@ -1232,256 +1227,274 @@ class RBI::Node
end
def rbs_print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), positional_names: T.unsafe(nil)); end
- # source://rbi//lib/rbi/rbs_printer.rb#1233
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1257
sig { params(indent: ::Integer, print_locs: T::Boolean, positional_names: T::Boolean).returns(::String) }
def rbs_string(indent: T.unsafe(nil), print_locs: T.unsafe(nil), positional_names: T.unsafe(nil)); end
- # @raise [ReplaceNodeError]
- #
- # source://rbi//lib/rbi/model.rb#31
+ # pkg:gem/rbi#lib/rbi/model.rb:31
sig { params(node: ::RBI::Node).void }
def replace(node); end
- # @return [Boolean]
- #
- # source://rbi//lib/rbi/rewriters/filter_versions.rb#91
+ # pkg:gem/rbi#lib/rbi/rewriters/filter_versions.rb:91
sig { params(version: ::Gem::Version).returns(T::Boolean) }
def satisfies_version?(version); end
- # source://rbi//lib/rbi/printer.rb#840
+ # pkg:gem/rbi#lib/rbi/printer.rb:901
sig { params(indent: ::Integer, print_locs: T::Boolean, max_line_length: T.nilable(::Integer)).returns(::String) }
def string(indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end
end
# @abstract
#
-# source://rbi//lib/rbi/model.rb#88
+# pkg:gem/rbi#lib/rbi/model.rb:88
class RBI::NodeWithComments < ::RBI::Node
abstract!
- # @return [NodeWithComments] a new instance of NodeWithComments
- #
- # source://rbi//lib/rbi/model.rb#93
- sig { params(loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void }
+ # pkg:gem/rbi#lib/rbi/model.rb:105
+ sig { params(loc: T.nilable(::RBI::Loc), comments: T.nilable(T::Array[::RBI::Comment])).void }
def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil)); end
- # source://rbi//lib/rbi/model.rb#99
+ # pkg:gem/rbi#lib/rbi/model.rb:111
sig { returns(T::Array[::String]) }
def annotations; end
- # source://rbi//lib/rbi/model.rb#90
+ # pkg:gem/rbi#lib/rbi/model.rb:93
sig { returns(T::Array[::RBI::Comment]) }
def comments; end
- # source://rbi//lib/rbi/model.rb#90
- def comments=(_arg0); end
+ # pkg:gem/rbi#lib/rbi/model.rb:90
+ sig { params(comments: T::Array[::RBI::Comment]).returns(T::Array[::RBI::Comment]) }
+ def comments=(comments); end
+
+ # Returns true if this node has any comments, without allocating
+ # an empty array for nodes that have never had comments set.
+ #
+ # pkg:gem/rbi#lib/rbi/model.rb:100
+ sig { returns(T::Boolean) }
+ def comments?; end
- # source://rbi//lib/rbi/rewriters/merge_trees.rb#312
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:325
sig { override.params(other: ::RBI::Node).void }
def merge_with(other); end
- # source://rbi//lib/rbi/rewriters/filter_versions.rb#101
+ # pkg:gem/rbi#lib/rbi/rewriters/filter_versions.rb:101
sig { returns(T::Array[::Gem::Requirement]) }
def version_requirements; end
end
-# source://rbi//lib/rbi/model.rb#582
+# pkg:gem/rbi#lib/rbi/model.rb:638
class RBI::OptParam < ::RBI::Param
- # @return [OptParam] a new instance of OptParam
- #
- # source://rbi//lib/rbi/model.rb#587
+ # pkg:gem/rbi#lib/rbi/model.rb:643
sig do
params(
name: ::String,
value: ::String,
loc: T.nilable(::RBI::Loc),
- comments: T::Array[::RBI::Comment],
+ comments: T.nilable(T::Array[::RBI::Comment]),
block: T.nilable(T.proc.params(node: ::RBI::OptParam).void)
).void
end
def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
- # source://rbi//lib/rbi/model.rb#594
- sig { params(other: T.nilable(::Object)).returns(T::Boolean) }
- def ==(other); end
-
- # source://rbi//lib/rbi/model.rb#584
+ # pkg:gem/rbi#lib/rbi/model.rb:640
sig { returns(::String) }
def value; end
end
# @abstract
#
-# source://rbi//lib/rbi/model.rb#552
+# pkg:gem/rbi#lib/rbi/model.rb:601
class RBI::Param < ::RBI::NodeWithComments
abstract!
- # @return [Param] a new instance of Param
- #
- # source://rbi//lib/rbi/model.rb#557
- sig { params(name: ::String, loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void }
+ # pkg:gem/rbi#lib/rbi/model.rb:606
+ sig { params(name: ::String, loc: T.nilable(::RBI::Loc), comments: T.nilable(T::Array[::RBI::Comment])).void }
def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil)); end
- # source://rbi//lib/rbi/model.rb#554
+ # pkg:gem/rbi#lib/rbi/model.rb:624
+ sig { params(other: T.nilable(::Object)).returns(T::Boolean) }
+ def ==(other); end
+
+ # pkg:gem/rbi#lib/rbi/model.rb:619
+ sig { returns(T::Boolean) }
+ def anonymous?; end
+
+ # pkg:gem/rbi#lib/rbi/model.rb:603
sig { returns(::String) }
def name; end
- # source://rbi//lib/rbi/model.rb#564
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/model.rb:614
sig { override.returns(::String) }
def to_s; end
end
-# source://rbi//lib/rbi/parser.rb#7
+# pkg:gem/rbi#lib/rbi/parser.rb:7
class RBI::ParseError < ::RBI::Error
- # @return [ParseError] a new instance of ParseError
- #
- # source://rbi//lib/rbi/parser.rb#12
+ # pkg:gem/rbi#lib/rbi/parser.rb:12
sig { params(message: ::String, location: ::RBI::Loc).void }
def initialize(message, location); end
- # source://rbi//lib/rbi/parser.rb#9
+ # pkg:gem/rbi#lib/rbi/parser.rb:9
sig { returns(::RBI::Loc) }
def location; end
end
-# source://rbi//lib/rbi/parser.rb#49
+# pkg:gem/rbi#lib/rbi/parser.rb:49
class RBI::Parser
- # source://rbi//lib/rbi/parser.rb#80
+ # pkg:gem/rbi#lib/rbi/parser.rb:80
sig { params(path: ::String).returns(::RBI::Tree) }
def parse_file(path); end
- # source://rbi//lib/rbi/parser.rb#75
+ # pkg:gem/rbi#lib/rbi/parser.rb:75
sig { params(string: ::String).returns(::RBI::Tree) }
def parse_string(string); end
private
- # source://rbi//lib/rbi/parser.rb#87
+ # pkg:gem/rbi#lib/rbi/parser.rb:87
sig { params(source: ::String, file: ::String).returns(::RBI::Tree) }
def parse(source, file:); end
class << self
- # source://rbi//lib/rbi/parser.rb#57
+ # pkg:gem/rbi#lib/rbi/parser.rb:57
sig { params(path: ::String).returns(::RBI::Tree) }
def parse_file(path); end
- # source://rbi//lib/rbi/parser.rb#62
+ # pkg:gem/rbi#lib/rbi/parser.rb:62
sig { params(paths: T::Array[::String]).returns(T::Array[::RBI::Tree]) }
def parse_files(paths); end
- # source://rbi//lib/rbi/parser.rb#52
+ # pkg:gem/rbi#lib/rbi/parser.rb:52
sig { params(string: ::String).returns(::RBI::Tree) }
def parse_string(string); end
- # source://rbi//lib/rbi/parser.rb#68
+ # pkg:gem/rbi#lib/rbi/parser.rb:68
sig { params(strings: T::Array[::String]).returns(T::Array[::RBI::Tree]) }
def parse_strings(strings); end
end
end
-# source://rbi//lib/rbi/parser.rb#1003
+# pkg:gem/rbi#lib/rbi/parser.rb:1003
class RBI::Parser::HeredocLocationVisitor < ::Prism::Visitor
- # @return [HeredocLocationVisitor] a new instance of HeredocLocationVisitor
- #
- # source://rbi//lib/rbi/parser.rb#1005
+ # pkg:gem/rbi#lib/rbi/parser.rb:1005
sig { params(source: ::Prism::Source, begin_offset: ::Integer, end_offset: ::Integer).void }
def initialize(source, begin_offset, end_offset); end
- # source://rbi//lib/rbi/parser.rb#1036
+ # pkg:gem/rbi#lib/rbi/parser.rb:1036
sig { returns(::Prism::Location) }
def location; end
- # source://rbi//lib/rbi/parser.rb#1026
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/parser.rb:1026
sig { override.params(node: ::Prism::InterpolatedStringNode).void }
def visit_interpolated_string_node(node); end
- # source://rbi//lib/rbi/parser.rb#1015
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/parser.rb:1015
sig { override.params(node: ::Prism::StringNode).void }
def visit_string_node(node); end
private
- # source://rbi//lib/rbi/parser.rb#1047
+ # pkg:gem/rbi#lib/rbi/parser.rb:1047
sig { params(node: T.any(::Prism::InterpolatedStringNode, ::Prism::StringNode)).void }
def handle_string_node(node); end
end
-# source://rbi//lib/rbi/parser.rb#915
+# pkg:gem/rbi#lib/rbi/parser.rb:915
class RBI::Parser::SigBuilder < ::RBI::Parser::Visitor
- # @return [SigBuilder] a new instance of SigBuilder
- #
- # source://rbi//lib/rbi/parser.rb#920
+ # pkg:gem/rbi#lib/rbi/parser.rb:920
sig { params(content: ::String, file: ::String).void }
def initialize(content, file:); end
- # @return [Boolean]
- #
- # source://rbi//lib/rbi/parser.rb#986
+ # pkg:gem/rbi#lib/rbi/parser.rb:986
sig { params(node: ::Prism::CallNode, value: ::String).returns(T::Boolean) }
def allow_incompatible_override?(node, value); end
- # source://rbi//lib/rbi/parser.rb#917
+ # pkg:gem/rbi#lib/rbi/parser.rb:917
sig { returns(::RBI::Sig) }
def current; end
- # source://rbi//lib/rbi/parser.rb#978
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/parser.rb:978
sig { override.params(node: ::Prism::AssocNode).void }
def visit_assoc_node(node); end
- # source://rbi//lib/rbi/parser.rb#928
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/parser.rb:928
sig { override.params(node: ::Prism::CallNode).void }
def visit_call_node(node); end
end
-# source://rbi//lib/rbi/parser.rb#164
+# pkg:gem/rbi#lib/rbi/parser.rb:164
class RBI::Parser::TreeBuilder < ::RBI::Parser::Visitor
- # @return [TreeBuilder] a new instance of TreeBuilder
- #
- # source://rbi//lib/rbi/parser.rb#172
+ # pkg:gem/rbi#lib/rbi/parser.rb:172
sig { params(source: ::String, comments: T::Array[::Prism::Comment], file: ::String).void }
def initialize(source, comments:, file:); end
- # source://rbi//lib/rbi/parser.rb#169
+ # pkg:gem/rbi#lib/rbi/parser.rb:169
sig { returns(T.nilable(::Prism::Node)) }
def last_node; end
- # source://rbi//lib/rbi/parser.rb#166
+ # pkg:gem/rbi#lib/rbi/parser.rb:166
sig { returns(::RBI::Tree) }
def tree; end
- # source://rbi//lib/rbi/parser.rb#361
+ # pkg:gem/rbi#lib/rbi/parser.rb:361
sig { params(node: ::Prism::CallNode).void }
def visit_call_node(node); end
- # source://rbi//lib/rbi/parser.rb#185
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/parser.rb:185
sig { override.params(node: ::Prism::ClassNode).void }
def visit_class_node(node); end
- # source://rbi//lib/rbi/parser.rb#236
+ # pkg:gem/rbi#lib/rbi/parser.rb:236
sig { params(node: T.any(::Prism::ConstantPathWriteNode, ::Prism::ConstantWriteNode)).void }
def visit_constant_assign(node); end
- # source://rbi//lib/rbi/parser.rb#229
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/parser.rb:229
sig { override.params(node: ::Prism::ConstantPathWriteNode).void }
def visit_constant_path_write_node(node); end
- # source://rbi//lib/rbi/parser.rb#221
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/parser.rb:221
sig { override.params(node: ::Prism::ConstantWriteNode).void }
def visit_constant_write_node(node); end
- # source://rbi//lib/rbi/parser.rb#291
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/parser.rb:291
sig { override.params(node: ::Prism::DefNode).void }
def visit_def_node(node); end
- # source://rbi//lib/rbi/parser.rb#313
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/parser.rb:313
sig { override.params(node: ::Prism::ModuleNode).void }
def visit_module_node(node); end
- # source://rbi//lib/rbi/parser.rb#332
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/parser.rb:332
sig { override.params(node: ::Prism::ProgramNode).void }
def visit_program_node(node); end
- # source://rbi//lib/rbi/parser.rb#344
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/parser.rb:344
sig { override.params(node: ::Prism::SingletonClassNode).void }
def visit_singleton_class_node(node); end
@@ -1489,49 +1502,49 @@ class RBI::Parser::TreeBuilder < ::RBI::Parser::Visitor
# Collect all the remaining comments within a node
#
- # source://rbi//lib/rbi/parser.rb#539
+ # pkg:gem/rbi#lib/rbi/parser.rb:539
sig { params(node: ::Prism::Node).void }
def collect_dangling_comments(node); end
# Collect all the remaining comments after visiting the tree
#
- # source://rbi//lib/rbi/parser.rb#557
+ # pkg:gem/rbi#lib/rbi/parser.rb:557
sig { void }
def collect_orphan_comments; end
- # source://rbi//lib/rbi/parser.rb#580
+ # pkg:gem/rbi#lib/rbi/parser.rb:580
sig { returns(::RBI::Tree) }
def current_scope; end
- # source://rbi//lib/rbi/parser.rb#585
+ # pkg:gem/rbi#lib/rbi/parser.rb:585
sig { returns(T::Array[::RBI::Sig]) }
def current_sigs; end
- # source://rbi//lib/rbi/parser.rb#592
+ # pkg:gem/rbi#lib/rbi/parser.rb:592
sig { params(sigs: T::Array[::RBI::Sig]).returns(T::Array[::RBI::Comment]) }
def detach_comments_from_sigs(sigs); end
- # source://rbi//lib/rbi/parser.rb#604
+ # pkg:gem/rbi#lib/rbi/parser.rb:604
sig { params(node: ::Prism::Node).returns(T::Array[::RBI::Comment]) }
def node_comments(node); end
- # source://rbi//lib/rbi/parser.rb#666
+ # pkg:gem/rbi#lib/rbi/parser.rb:666
sig { params(node: ::Prism::Comment).returns(::RBI::Comment) }
def parse_comment(node); end
- # source://rbi//lib/rbi/parser.rb#699
+ # pkg:gem/rbi#lib/rbi/parser.rb:699
sig { params(node: T.nilable(::Prism::Node)).returns(T::Array[::RBI::Param]) }
def parse_params(node); end
- # source://rbi//lib/rbi/parser.rb#673
+ # pkg:gem/rbi#lib/rbi/parser.rb:673
sig { params(node: T.nilable(::Prism::Node)).returns(T::Array[::RBI::Arg]) }
def parse_send_args(node); end
- # source://rbi//lib/rbi/parser.rb#765
+ # pkg:gem/rbi#lib/rbi/parser.rb:765
sig { params(node: ::Prism::CallNode).returns(::RBI::Sig) }
def parse_sig(node); end
- # source://rbi//lib/rbi/parser.rb#774
+ # pkg:gem/rbi#lib/rbi/parser.rb:774
sig do
params(
node: T.any(::Prism::ConstantPathWriteNode, ::Prism::ConstantWriteNode)
@@ -1539,82 +1552,70 @@ class RBI::Parser::TreeBuilder < ::RBI::Parser::Visitor
end
def parse_struct(node); end
- # source://rbi//lib/rbi/parser.rb#822
+ # pkg:gem/rbi#lib/rbi/parser.rb:822
sig { params(send: ::Prism::CallNode).void }
def parse_tstruct_field(send); end
- # source://rbi//lib/rbi/parser.rb#859
+ # pkg:gem/rbi#lib/rbi/parser.rb:859
sig { params(name: ::String, node: ::Prism::Node).returns(::RBI::Visibility) }
def parse_visibility(name, node); end
- # source://rbi//lib/rbi/parser.rb#873
+ # pkg:gem/rbi#lib/rbi/parser.rb:873
sig { void }
def separate_header_comments; end
- # source://rbi//lib/rbi/parser.rb#883
+ # pkg:gem/rbi#lib/rbi/parser.rb:883
sig { void }
def set_root_tree_loc; end
- # @return [Boolean]
- #
- # source://rbi//lib/rbi/parser.rb#902
+ # pkg:gem/rbi#lib/rbi/parser.rb:902
sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) }
def t_enum_value?(node); end
- # @return [Boolean]
- #
- # source://rbi//lib/rbi/parser.rb#897
+ # pkg:gem/rbi#lib/rbi/parser.rb:897
sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) }
def type_variable_definition?(node); end
end
-# source://rbi//lib/rbi/parser.rb#114
+# pkg:gem/rbi#lib/rbi/parser.rb:114
class RBI::Parser::Visitor < ::Prism::Visitor
- # @return [Visitor] a new instance of Visitor
- #
- # source://rbi//lib/rbi/parser.rb#116
+ # pkg:gem/rbi#lib/rbi/parser.rb:116
sig { params(source: ::String, file: ::String).void }
def initialize(source, file:); end
private
- # source://rbi//lib/rbi/parser.rb#143
+ # pkg:gem/rbi#lib/rbi/parser.rb:143
sig { params(node: ::Prism::Node).returns(::Prism::Location) }
def adjust_prism_location_for_heredoc(node); end
- # source://rbi//lib/rbi/parser.rb#126
+ # pkg:gem/rbi#lib/rbi/parser.rb:126
sig { params(node: ::Prism::Node).returns(::RBI::Loc) }
def node_loc(node); end
- # source://rbi//lib/rbi/parser.rb#131
+ # pkg:gem/rbi#lib/rbi/parser.rb:131
sig { params(node: T.nilable(::Prism::Node)).returns(T.nilable(::String)) }
def node_string(node); end
- # source://rbi//lib/rbi/parser.rb#138
+ # pkg:gem/rbi#lib/rbi/parser.rb:138
sig { params(node: ::Prism::Node).returns(::String) }
def node_string!(node); end
- # @return [Boolean]
- #
- # source://rbi//lib/rbi/parser.rb#154
+ # pkg:gem/rbi#lib/rbi/parser.rb:154
sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) }
def self?(node); end
- # @return [Boolean]
- #
- # source://rbi//lib/rbi/parser.rb#159
+ # pkg:gem/rbi#lib/rbi/parser.rb:159
sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) }
def t_sig_without_runtime?(node); end
end
-# source://rbi//lib/rbi/printer.rb#7
+# pkg:gem/rbi#lib/rbi/printer.rb:7
class RBI::Printer < ::RBI::Visitor
- # @return [Printer] a new instance of Printer
- #
- # source://rbi//lib/rbi/printer.rb#21
+ # pkg:gem/rbi#lib/rbi/printer.rb:25
sig do
params(
- out: T.any(::IO, ::StringIO),
+ out: T.any(::IO, ::String, ::StringIO),
indent: ::Integer,
print_locs: T::Boolean,
max_line_length: T.nilable(::Integer)
@@ -1622,454 +1623,562 @@ class RBI::Printer < ::RBI::Visitor
end
def initialize(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end
- # source://rbi//lib/rbi/printer.rb#15
+ # pkg:gem/rbi#lib/rbi/printer.rb:19
sig { returns(::Integer) }
def current_indent; end
- # source://rbi//lib/rbi/printer.rb#39
+ # pkg:gem/rbi#lib/rbi/printer.rb:48
+ sig { returns(::String) }
+ def current_indent_string; end
+
+ # pkg:gem/rbi#lib/rbi/printer.rb:43
sig { void }
def dedent; end
- # source://rbi//lib/rbi/printer.rb#9
+ # pkg:gem/rbi#lib/rbi/printer.rb:13
def in_visibility_group; end
- # source://rbi//lib/rbi/printer.rb#9
+ # pkg:gem/rbi#lib/rbi/printer.rb:13
def in_visibility_group=(_arg0); end
- # source://rbi//lib/rbi/printer.rb#34
+ # pkg:gem/rbi#lib/rbi/printer.rb:38
sig { void }
def indent; end
- # source://rbi//lib/rbi/printer.rb#18
+ # pkg:gem/rbi#lib/rbi/printer.rb:22
sig { returns(T.nilable(::Integer)) }
def max_line_length; end
- # source://rbi//lib/rbi/printer.rb#12
+ # pkg:gem/rbi#lib/rbi/printer.rb:16
sig { returns(T.nilable(::RBI::Node)) }
def previous_node; end
# Print a string without indentation nor `\n` at the end.
#
- # source://rbi//lib/rbi/printer.rb#45
+ # pkg:gem/rbi#lib/rbi/printer.rb:54
sig { params(string: ::String).void }
def print(string); end
- # source://rbi//lib/rbi/printer.rb#9
+ # pkg:gem/rbi#lib/rbi/printer.rb:13
sig { returns(T::Boolean) }
def print_locs; end
- # source://rbi//lib/rbi/printer.rb#9
+ # pkg:gem/rbi#lib/rbi/printer.rb:13
def print_locs=(_arg0); end
# Print a string with indentation and `\n` at the end.
#
- # source://rbi//lib/rbi/printer.rb#65
+ # pkg:gem/rbi#lib/rbi/printer.rb:76
sig { params(string: ::String).void }
def printl(string); end
# Print a string without indentation but with a `\n` at the end.
#
- # source://rbi//lib/rbi/printer.rb#51
+ # pkg:gem/rbi#lib/rbi/printer.rb:60
sig { params(string: T.nilable(::String)).void }
def printn(string = T.unsafe(nil)); end
# Print a string with indentation but without a `\n` at the end.
#
- # source://rbi//lib/rbi/printer.rb#58
+ # pkg:gem/rbi#lib/rbi/printer.rb:69
sig { params(string: T.nilable(::String)).void }
def printt(string = T.unsafe(nil)); end
- # source://rbi//lib/rbi/printer.rb#72
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/printer.rb:84
sig { override.params(nodes: T::Array[::RBI::Node]).void }
def visit_all(nodes); end
- # source://rbi//lib/rbi/printer.rb#84
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/printer.rb:98
sig { override.params(file: ::RBI::File).void }
def visit_file(file); end
private
- # @return [Boolean]
- #
- # source://rbi//lib/rbi/printer.rb#680
+ # pkg:gem/rbi#lib/rbi/printer.rb:720
sig { params(node: ::RBI::Node).returns(T::Boolean) }
def oneline?(node); end
- # source://rbi//lib/rbi/printer.rb#638
+ # pkg:gem/rbi#lib/rbi/printer.rb:678
sig { params(node: ::RBI::Node).void }
def print_blank_line_before(node); end
- # source://rbi//lib/rbi/printer.rb#648
+ # pkg:gem/rbi#lib/rbi/printer.rb:688
sig { params(node: ::RBI::Node).void }
def print_loc(node); end
- # source://rbi//lib/rbi/printer.rb#654
+ # pkg:gem/rbi#lib/rbi/printer.rb:694
sig { params(node: ::RBI::Param, last: T::Boolean).void }
def print_param_comment_leading_space(node, last:); end
- # source://rbi//lib/rbi/printer.rb#736
+ # pkg:gem/rbi#lib/rbi/printer.rb:779
sig { params(node: ::RBI::Sig).void }
def print_sig_as_block(node); end
- # source://rbi//lib/rbi/printer.rb#709
+ # pkg:gem/rbi#lib/rbi/printer.rb:749
sig { params(node: ::RBI::Sig).void }
def print_sig_as_line(node); end
- # source://rbi//lib/rbi/printer.rb#672
+ # pkg:gem/rbi#lib/rbi/printer.rb:712
sig { params(node: ::RBI::SigParam, last: T::Boolean).void }
def print_sig_param_comment_leading_space(node, last:); end
- # source://rbi//lib/rbi/printer.rb#796
+ # pkg:gem/rbi#lib/rbi/printer.rb:849
sig { params(node: ::RBI::Sig).returns(T::Array[::String]) }
def sig_modifiers(node); end
- # source://rbi//lib/rbi/printer.rb#453
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/printer.rb:489
sig { override.params(node: ::RBI::Arg).void }
def visit_arg(node); end
- # source://rbi//lib/rbi/printer.rb#258
+ # pkg:gem/rbi#lib/rbi/printer.rb:280
sig { params(node: ::RBI::Attr).void }
def visit_attr(node); end
- # source://rbi//lib/rbi/printer.rb#241
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/printer.rb:263
sig { override.params(node: ::RBI::AttrAccessor).void }
def visit_attr_accessor(node); end
- # source://rbi//lib/rbi/printer.rb#247
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/printer.rb:269
sig { override.params(node: ::RBI::AttrReader).void }
def visit_attr_reader(node); end
- # source://rbi//lib/rbi/printer.rb#253
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/printer.rb:275
sig { override.params(node: ::RBI::AttrWriter).void }
def visit_attr_writer(node); end
- # source://rbi//lib/rbi/printer.rb#138
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/printer.rb:160
sig { override.params(node: ::RBI::BlankLine).void }
def visit_blank_line(node); end
- # source://rbi//lib/rbi/printer.rb#373
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/printer.rb:408
sig { override.params(node: ::RBI::BlockParam).void }
def visit_block_param(node); end
- # source://rbi//lib/rbi/printer.rb#158
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/printer.rb:180
sig { override.params(node: ::RBI::Class).void }
def visit_class(node); end
- # source://rbi//lib/rbi/printer.rb#121
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/printer.rb:139
sig { override.params(node: ::RBI::Comment).void }
def visit_comment(node); end
- # source://rbi//lib/rbi/printer.rb#614
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/printer.rb:654
sig { override.params(node: ::RBI::ConflictTree).void }
def visit_conflict_tree(node); end
- # source://rbi//lib/rbi/printer.rb#231
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/printer.rb:253
sig { override.params(node: ::RBI::Const).void }
def visit_const(node); end
- # source://rbi//lib/rbi/printer.rb#385
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/printer.rb:421
sig { override.params(node: ::RBI::Extend).void }
def visit_extend(node); end
- # source://rbi//lib/rbi/printer.rb#583
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/printer.rb:623
sig { override.params(node: ::RBI::Group).void }
def visit_group(node); end
- # source://rbi//lib/rbi/printer.rb#567
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/printer.rb:607
sig { override.params(node: ::RBI::Helper).void }
def visit_helper(node); end
- # source://rbi//lib/rbi/printer.rb#379
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/printer.rb:415
sig { override.params(node: ::RBI::Include).void }
def visit_include(node); end
- # source://rbi//lib/rbi/printer.rb#459
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/printer.rb:495
sig { override.params(node: ::RBI::KwArg).void }
def visit_kw_arg(node); end
- # source://rbi//lib/rbi/printer.rb#361
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/printer.rb:393
sig { override.params(node: ::RBI::KwOptParam).void }
def visit_kw_opt_param(node); end
- # source://rbi//lib/rbi/printer.rb#355
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/printer.rb:386
sig { override.params(node: ::RBI::KwParam).void }
def visit_kw_param(node); end
- # source://rbi//lib/rbi/printer.rb#367
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/printer.rb:401
sig { override.params(node: ::RBI::KwRestParam).void }
def visit_kw_rest_param(node); end
- # source://rbi//lib/rbi/printer.rb#287
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/printer.rb:315
sig { override.params(node: ::RBI::Method).void }
def visit_method(node); end
- # source://rbi//lib/rbi/printer.rb#577
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/printer.rb:617
sig { override.params(node: ::RBI::MixesInClassMethods).void }
def visit_mixes_in_class_methods(node); end
- # source://rbi//lib/rbi/printer.rb#390
+ # pkg:gem/rbi#lib/rbi/printer.rb:426
sig { params(node: ::RBI::Mixin).void }
def visit_mixin(node); end
- # source://rbi//lib/rbi/printer.rb#152
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/printer.rb:174
sig { override.params(node: ::RBI::Module).void }
def visit_module(node); end
- # source://rbi//lib/rbi/printer.rb#343
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/printer.rb:371
sig { override.params(node: ::RBI::OptParam).void }
def visit_opt_param(node); end
- # source://rbi//lib/rbi/printer.rb#420
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/printer.rb:456
sig { override.params(node: ::RBI::Private).void }
def visit_private(node); end
- # source://rbi//lib/rbi/printer.rb#414
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/printer.rb:450
sig { override.params(node: ::RBI::Protected).void }
def visit_protected(node); end
- # source://rbi//lib/rbi/printer.rb#408
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/printer.rb:444
sig { override.params(node: ::RBI::Public).void }
def visit_public(node); end
- # source://rbi//lib/rbi/printer.rb#104
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/printer.rb:118
sig { override.params(node: ::RBI::RBSComment).void }
def visit_rbs_comment(node); end
- # source://rbi//lib/rbi/printer.rb#337
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/printer.rb:365
sig { override.params(node: ::RBI::ReqParam).void }
def visit_req_param(node); end
- # source://rbi//lib/rbi/printer.rb#604
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/printer.rb:644
sig { override.params(node: ::RBI::RequiresAncestor).void }
def visit_requires_ancestor(node); end
- # source://rbi//lib/rbi/printer.rb#349
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/printer.rb:379
sig { override.params(node: ::RBI::RestParam).void }
def visit_rest_param(node); end
- # source://rbi//lib/rbi/printer.rb#175
+ # pkg:gem/rbi#lib/rbi/printer.rb:197
sig { params(node: ::RBI::Scope).void }
def visit_scope(node); end
- # source://rbi//lib/rbi/printer.rb#220
+ # pkg:gem/rbi#lib/rbi/printer.rb:242
sig { params(node: ::RBI::Scope).void }
def visit_scope_body(node); end
- # source://rbi//lib/rbi/printer.rb#624
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/printer.rb:664
sig { override.params(node: ::RBI::ScopeConflict).void }
def visit_scope_conflict(node); end
- # source://rbi//lib/rbi/printer.rb#185
+ # pkg:gem/rbi#lib/rbi/printer.rb:207
sig { params(node: ::RBI::Scope).void }
def visit_scope_header(node); end
- # source://rbi//lib/rbi/printer.rb#435
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/printer.rb:471
sig { override.params(node: ::RBI::Send).void }
def visit_send(node); end
- # source://rbi//lib/rbi/printer.rb#465
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/printer.rb:503
sig { override.params(node: ::RBI::Sig).void }
def visit_sig(node); end
- # source://rbi//lib/rbi/printer.rb#486
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/printer.rb:524
sig { override.params(node: ::RBI::SigParam).void }
def visit_sig_param(node); end
- # source://rbi//lib/rbi/printer.rb#170
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/printer.rb:192
sig { override.params(node: ::RBI::SingletonClass).void }
def visit_singleton_class(node); end
- # source://rbi//lib/rbi/printer.rb#164
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/printer.rb:186
sig { override.params(node: ::RBI::Struct).void }
def visit_struct(node); end
- # source://rbi//lib/rbi/printer.rb#509
+ # pkg:gem/rbi#lib/rbi/printer.rb:549
sig { params(node: ::RBI::TStructField).void }
def visit_t_struct_field(node); end
- # source://rbi//lib/rbi/printer.rb#528
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/printer.rb:568
sig { override.params(node: ::RBI::TEnum).void }
def visit_tenum(node); end
- # source://rbi//lib/rbi/printer.rb#534
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/printer.rb:574
sig { override.params(node: ::RBI::TEnumBlock).void }
def visit_tenum_block(node); end
- # source://rbi//lib/rbi/printer.rb#547
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/printer.rb:587
sig { override.params(node: ::RBI::TEnumValue).void }
def visit_tenum_value(node); end
- # source://rbi//lib/rbi/printer.rb#144
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/printer.rb:166
sig { override.params(node: ::RBI::Tree).void }
def visit_tree(node); end
- # source://rbi//lib/rbi/printer.rb#492
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/printer.rb:532
sig { override.params(node: ::RBI::TStruct).void }
def visit_tstruct(node); end
- # source://rbi//lib/rbi/printer.rb#498
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/printer.rb:538
sig { override.params(node: ::RBI::TStructConst).void }
def visit_tstruct_const(node); end
- # source://rbi//lib/rbi/printer.rb#504
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/printer.rb:544
sig { override.params(node: ::RBI::TStructProp).void }
def visit_tstruct_prop(node); end
- # source://rbi//lib/rbi/printer.rb#557
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/printer.rb:597
sig { override.params(node: ::RBI::TypeMember).void }
def visit_type_member(node); end
- # source://rbi//lib/rbi/printer.rb#425
+ # pkg:gem/rbi#lib/rbi/printer.rb:461
sig { params(node: ::RBI::Visibility).void }
def visit_visibility(node); end
- # source://rbi//lib/rbi/printer.rb#590
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/printer.rb:630
sig { override.params(node: ::RBI::VisibilityGroup).void }
def visit_visibility_group(node); end
end
-# source://rbi//lib/rbi/printer.rb#5
+# pkg:gem/rbi#lib/rbi/printer.rb:846
+RBI::Printer::EMPTY_MODIFIERS = T.let(T.unsafe(nil), Array)
+
+# pkg:gem/rbi#lib/rbi/printer.rb:10
+RBI::Printer::INDENT_CACHE = T.let(T.unsafe(nil), Array)
+
+# Pre-computed indentation strings to avoid allocating " " * indent on every line.
+#
+# pkg:gem/rbi#lib/rbi/printer.rb:9
+RBI::Printer::MAX_CACHED_INDENT = T.let(T.unsafe(nil), Integer)
+
+# pkg:gem/rbi#lib/rbi/printer.rb:5
class RBI::PrinterError < ::RBI::Error; end
-# source://rbi//lib/rbi/model.rb#792
+# pkg:gem/rbi#lib/rbi/model.rb:821
class RBI::Private < ::RBI::Visibility
- # @return [Private] a new instance of Private
- #
- # source://rbi//lib/rbi/model.rb#794
+ # pkg:gem/rbi#lib/rbi/model.rb:823
sig do
params(
loc: T.nilable(::RBI::Loc),
- comments: T::Array[::RBI::Comment],
+ comments: T.nilable(T::Array[::RBI::Comment]),
block: T.nilable(T.proc.params(node: ::RBI::Private).void)
).void
end
def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
end
-# source://rbi//lib/rbi/model.rb#784
+# pkg:gem/rbi#lib/rbi/model.rb:813
class RBI::Protected < ::RBI::Visibility
- # @return [Protected] a new instance of Protected
- #
- # source://rbi//lib/rbi/model.rb#786
+ # pkg:gem/rbi#lib/rbi/model.rb:815
sig do
params(
loc: T.nilable(::RBI::Loc),
- comments: T::Array[::RBI::Comment],
+ comments: T.nilable(T::Array[::RBI::Comment]),
block: T.nilable(T.proc.params(node: ::RBI::Protected).void)
).void
end
def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
end
-# source://rbi//lib/rbi/model.rb#776
+# pkg:gem/rbi#lib/rbi/model.rb:802
class RBI::Public < ::RBI::Visibility
- # @return [Public] a new instance of Public
- #
- # source://rbi//lib/rbi/model.rb#778
+ # pkg:gem/rbi#lib/rbi/model.rb:804
sig do
params(
loc: T.nilable(::RBI::Loc),
- comments: T::Array[::RBI::Comment],
+ comments: T.nilable(T::Array[::RBI::Comment]),
block: T.nilable(T.proc.params(node: ::RBI::Public).void)
).void
end
def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
end
-# source://rbi//lib/rbi/rbs/method_type_translator.rb#5
+# Shared default instance to avoid allocating a new Public on every Method/Attr creation.
+#
+# pkg:gem/rbi#lib/rbi/model.rb:810
+RBI::Public::DEFAULT = T.let(T.unsafe(nil), RBI::Public)
+
+# pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:5
module RBI::RBS; end
-# source://rbi//lib/rbi/rbs/method_type_translator.rb#6
+# pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:6
class RBI::RBS::MethodTypeTranslator
- # @return [MethodTypeTranslator] a new instance of MethodTypeTranslator
- #
- # source://rbi//lib/rbi/rbs/method_type_translator.rb#22
+ # pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:22
sig { params(method: ::RBI::Method).void }
def initialize(method); end
- # source://rbi//lib/rbi/rbs/method_type_translator.rb#19
+ # pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:19
sig { returns(::RBI::Sig) }
def result; end
- # source://rbi//lib/rbi/rbs/method_type_translator.rb#28
+ # pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:29
sig { params(type: ::RBS::MethodType).void }
def visit(type); end
private
- # source://rbi//lib/rbi/rbs/method_type_translator.rb#100
+ # pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:101
sig { params(param: ::RBS::Types::Function::Param, index: ::Integer).returns(::RBI::SigParam) }
def translate_function_param(param, index); end
- # source://rbi//lib/rbi/rbs/method_type_translator.rb#115
+ # pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:116
sig { params(type: T.untyped).returns(::RBI::Type) }
def translate_type(type); end
- # @raise [Error]
- #
- # source://rbi//lib/rbi/rbs/method_type_translator.rb#42
+ # pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:43
sig { params(type: ::RBS::Types::Block).void }
def visit_block_type(type); end
- # source://rbi//lib/rbi/rbs/method_type_translator.rb#57
+ # pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:58
sig { params(type: ::RBS::Types::Function).void }
def visit_function_type(type); end
class << self
- # source://rbi//lib/rbi/rbs/method_type_translator.rb#11
+ # pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:11
sig { params(method: ::RBI::Method, type: ::RBS::MethodType).returns(::RBI::Sig) }
def translate(method, type); end
end
end
-# source://rbi//lib/rbi/rbs/method_type_translator.rb#7
+# pkg:gem/rbi#lib/rbi/rbs/method_type_translator.rb:7
class RBI::RBS::MethodTypeTranslator::Error < ::RBI::Error; end
-# source://rbi//lib/rbi/rbs/type_translator.rb#6
+# pkg:gem/rbi#lib/rbi/rbs/type_translator.rb:6
class RBI::RBS::TypeTranslator
+ # pkg:gem/rbi#lib/rbi/rbs/type_translator.rb:39
+ sig do
+ params(
+ type: T.any(::RBS::Types::Alias, ::RBS::Types::Bases::Any, ::RBS::Types::Bases::Bool, ::RBS::Types::Bases::Bottom, ::RBS::Types::Bases::Class, ::RBS::Types::Bases::Instance, ::RBS::Types::Bases::Nil, ::RBS::Types::Bases::Self, ::RBS::Types::Bases::Top, ::RBS::Types::Bases::Void, ::RBS::Types::ClassInstance, ::RBS::Types::ClassSingleton, ::RBS::Types::Function, ::RBS::Types::Interface, ::RBS::Types::Intersection, ::RBS::Types::Literal, ::RBS::Types::Optional, ::RBS::Types::Proc, ::RBS::Types::Record, ::RBS::Types::Tuple, ::RBS::Types::Union, ::RBS::Types::UntypedFunction, ::RBS::Types::Variable)
+ ).returns(::RBI::Type)
+ end
+ def translate(type); end
+
+ private
+
+ # pkg:gem/rbi#lib/rbi/rbs/type_translator.rb:123
+ sig { params(type: ::RBS::Types::ClassInstance).returns(::RBI::Type) }
+ def translate_class_instance(type); end
+
+ # pkg:gem/rbi#lib/rbi/rbs/type_translator.rb:131
+ sig { params(type: ::RBS::Types::Function).returns(::RBI::Type) }
+ def translate_function(type); end
+
+ # pkg:gem/rbi#lib/rbi/rbs/type_translator.rb:178
+ sig { params(type_name: ::String).returns(::String) }
+ def translate_t_generic_type(type_name); end
+
+ # pkg:gem/rbi#lib/rbi/rbs/type_translator.rb:111
+ sig { params(type: ::RBS::Types::Alias).returns(::RBI::Type) }
+ def translate_type_alias(type); end
+
class << self
- # source://rbi//lib/rbi/rbs/type_translator.rb#33
+ # pkg:gem/rbi#lib/rbi/rbs/type_translator.rb:33
sig do
params(
type: T.any(::RBS::Types::Alias, ::RBS::Types::Bases::Any, ::RBS::Types::Bases::Bool, ::RBS::Types::Bases::Bottom, ::RBS::Types::Bases::Class, ::RBS::Types::Bases::Instance, ::RBS::Types::Bases::Nil, ::RBS::Types::Bases::Self, ::RBS::Types::Bases::Top, ::RBS::Types::Bases::Void, ::RBS::Types::ClassInstance, ::RBS::Types::ClassSingleton, ::RBS::Types::Function, ::RBS::Types::Interface, ::RBS::Types::Intersection, ::RBS::Types::Literal, ::RBS::Types::Optional, ::RBS::Types::Proc, ::RBS::Types::Record, ::RBS::Types::Tuple, ::RBS::Types::Union, ::RBS::Types::UntypedFunction, ::RBS::Types::Variable)
).returns(::RBI::Type)
end
def translate(type); end
-
- private
-
- # source://rbi//lib/rbi/rbs/type_translator.rb#107
- sig { params(type: ::RBS::Types::ClassInstance).returns(::RBI::Type) }
- def translate_class_instance(type); end
-
- # source://rbi//lib/rbi/rbs/type_translator.rb#115
- sig { params(type: ::RBS::Types::Function).returns(::RBI::Type) }
- def translate_function(type); end
-
- # source://rbi//lib/rbi/rbs/type_translator.rb#162
- sig { params(type_name: ::String).returns(::String) }
- def translate_t_generic_type(type_name); end
-
- # source://rbi//lib/rbi/rbs/type_translator.rb#95
- sig { params(type: ::RBS::Types::Alias).returns(::RBI::Type) }
- def translate_type_alias(type); end
end
end
+RBI::RBS::TypeTranslator::RbsType = T.type_alias { T.any(::RBS::Types::Alias, ::RBS::Types::Bases::Any, ::RBS::Types::Bases::Bool, ::RBS::Types::Bases::Bottom, ::RBS::Types::Bases::Class, ::RBS::Types::Bases::Instance, ::RBS::Types::Bases::Nil, ::RBS::Types::Bases::Self, ::RBS::Types::Bases::Top, ::RBS::Types::Bases::Void, ::RBS::Types::ClassInstance, ::RBS::Types::ClassSingleton, ::RBS::Types::Function, ::RBS::Types::Interface, ::RBS::Types::Intersection, ::RBS::Types::Literal, ::RBS::Types::Optional, ::RBS::Types::Proc, ::RBS::Types::Record, ::RBS::Types::Tuple, ::RBS::Types::Union, ::RBS::Types::UntypedFunction, ::RBS::Types::Variable) }
+
# A comment representing a RBS type prefixed with `#:`
#
-# source://rbi//lib/rbi/model.rb#78
+# pkg:gem/rbi#lib/rbi/model.rb:78
class RBI::RBSComment < ::RBI::Comment
- # source://rbi//lib/rbi/model.rb#80
+ # pkg:gem/rbi#lib/rbi/model.rb:80
sig { params(other: ::Object).returns(T::Boolean) }
def ==(other); end
end
-# source://rbi//lib/rbi/rbs_printer.rb#5
+# pkg:gem/rbi#lib/rbi/rbs_printer.rb:5
class RBI::RBSPrinter < ::RBI::Visitor
- # @return [RBSPrinter] a new instance of RBSPrinter
- #
- # source://rbi//lib/rbi/rbs_printer.rb#30
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:30
sig do
params(
out: T.any(::IO, ::StringIO),
@@ -2081,295 +2190,379 @@ class RBI::RBSPrinter < ::RBI::Visitor
end
def initialize(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), positional_names: T.unsafe(nil), max_line_length: T.unsafe(nil)); end
- # source://rbi//lib/rbi/rbs_printer.rb#15
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:15
sig { returns(::Integer) }
def current_indent; end
- # source://rbi//lib/rbi/rbs_printer.rb#49
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:49
sig { void }
def dedent; end
- # source://rbi//lib/rbi/rbs_printer.rb#9
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:9
def in_visibility_group; end
- # source://rbi//lib/rbi/rbs_printer.rb#9
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:9
def in_visibility_group=(_arg0); end
- # source://rbi//lib/rbi/rbs_printer.rb#44
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:44
sig { void }
def indent; end
- # source://rbi//lib/rbi/rbs_printer.rb#21
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:21
sig { returns(T.nilable(::Integer)) }
def max_line_length; end
- # source://rbi//lib/rbi/rbs_printer.rb#18
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:18
sig { returns(T::Boolean) }
def positional_names; end
- # source://rbi//lib/rbi/rbs_printer.rb#18
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:18
def positional_names=(_arg0); end
- # source://rbi//lib/rbi/rbs_printer.rb#12
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:12
sig { returns(T.nilable(::RBI::Node)) }
def previous_node; end
# Print a string without indentation nor `\n` at the end.
#
- # source://rbi//lib/rbi/rbs_printer.rb#55
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:55
sig { params(string: ::String).void }
def print(string); end
- # source://rbi//lib/rbi/rbs_printer.rb#302
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:302
sig { params(node: ::RBI::Attr, sig: ::RBI::Sig).void }
def print_attr_sig(node, sig); end
- # source://rbi//lib/rbi/rbs_printer.rb#9
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:9
sig { returns(T::Boolean) }
def print_locs; end
- # source://rbi//lib/rbi/rbs_printer.rb#9
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:9
def print_locs=(_arg0); end
- # source://rbi//lib/rbi/rbs_printer.rb#400
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:400
sig { params(node: ::RBI::Method, sig: ::RBI::Sig).void }
def print_method_sig(node, sig); end
- # source://rbi//lib/rbi/rbs_printer.rb#417
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:417
sig { params(node: ::RBI::Method, sig: ::RBI::Sig).void }
def print_method_sig_inline(node, sig); end
- # source://rbi//lib/rbi/rbs_printer.rb#479
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:479
sig { params(node: ::RBI::Method, sig: ::RBI::Sig).void }
def print_method_sig_multiline(node, sig); end
# Print a string with indentation and `\n` at the end.
#
- # source://rbi//lib/rbi/rbs_printer.rb#75
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:75
sig { params(string: ::String).void }
def printl(string); end
# Print a string without indentation but with a `\n` at the end.
#
- # source://rbi//lib/rbi/rbs_printer.rb#61
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:61
sig { params(string: T.nilable(::String)).void }
def printn(string = T.unsafe(nil)); end
# Print a string with indentation but without a `\n` at the end.
#
- # source://rbi//lib/rbi/rbs_printer.rb#68
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:68
sig { params(string: T.nilable(::String)).void }
def printt(string = T.unsafe(nil)); end
- # source://rbi//lib/rbi/rbs_printer.rb#82
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:82
sig { override.params(nodes: T::Array[::RBI::Node]).void }
def visit_all(nodes); end
- # source://rbi//lib/rbi/rbs_printer.rb#680
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:680
sig { override.params(node: ::RBI::Arg).void }
def visit_arg(node); end
- # source://rbi//lib/rbi/rbs_printer.rb#270
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:270
sig { params(node: ::RBI::Attr).void }
def visit_attr(node); end
- # source://rbi//lib/rbi/rbs_printer.rb#253
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:253
sig { override.params(node: ::RBI::AttrAccessor).void }
def visit_attr_accessor(node); end
- # source://rbi//lib/rbi/rbs_printer.rb#259
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:259
sig { override.params(node: ::RBI::AttrReader).void }
def visit_attr_reader(node); end
- # source://rbi//lib/rbi/rbs_printer.rb#265
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:265
sig { override.params(node: ::RBI::AttrWriter).void }
def visit_attr_writer(node); end
- # source://rbi//lib/rbi/rbs_printer.rb#124
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:124
sig { override.params(node: ::RBI::BlankLine).void }
def visit_blank_line(node); end
- # source://rbi//lib/rbi/rbs_printer.rb#612
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:612
sig { override.params(node: ::RBI::BlockParam).void }
def visit_block_param(node); end
- # source://rbi//lib/rbi/rbs_printer.rb#144
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:144
sig { override.params(node: ::RBI::Class).void }
def visit_class(node); end
- # source://rbi//lib/rbi/rbs_printer.rb#107
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:107
sig { override.params(node: ::RBI::Comment).void }
def visit_comment(node); end
- # source://rbi//lib/rbi/rbs_printer.rb#816
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:816
sig { override.params(node: ::RBI::ConflictTree).void }
def visit_conflict_tree(node); end
- # source://rbi//lib/rbi/rbs_printer.rb#237
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:237
sig { override.params(node: ::RBI::Const).void }
def visit_const(node); end
- # source://rbi//lib/rbi/rbs_printer.rb#624
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:624
sig { override.params(node: ::RBI::Extend).void }
def visit_extend(node); end
- # source://rbi//lib/rbi/rbs_printer.rb#94
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:94
sig { override.params(file: ::RBI::File).void }
def visit_file(file); end
- # source://rbi//lib/rbi/rbs_printer.rb#789
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:789
sig { override.params(node: ::RBI::Group).void }
def visit_group(node); end
- # source://rbi//lib/rbi/rbs_printer.rb#777
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:777
sig { override.params(node: ::RBI::Helper).void }
def visit_helper(node); end
- # source://rbi//lib/rbi/rbs_printer.rb#618
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:618
sig { override.params(node: ::RBI::Include).void }
def visit_include(node); end
- # source://rbi//lib/rbi/rbs_printer.rb#686
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:686
sig { override.params(node: ::RBI::KwArg).void }
def visit_kw_arg(node); end
- # source://rbi//lib/rbi/rbs_printer.rb#600
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:600
sig { override.params(node: ::RBI::KwOptParam).void }
def visit_kw_opt_param(node); end
- # source://rbi//lib/rbi/rbs_printer.rb#594
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:594
sig { override.params(node: ::RBI::KwParam).void }
def visit_kw_param(node); end
- # source://rbi//lib/rbi/rbs_printer.rb#606
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:606
sig { override.params(node: ::RBI::KwRestParam).void }
def visit_kw_rest_param(node); end
- # source://rbi//lib/rbi/rbs_printer.rb#325
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:325
sig { override.params(node: ::RBI::Method).void }
def visit_method(node); end
- # source://rbi//lib/rbi/rbs_printer.rb#783
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:783
sig { override.params(node: ::RBI::MixesInClassMethods).void }
def visit_mixes_in_class_methods(node); end
- # source://rbi//lib/rbi/rbs_printer.rb#629
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:629
sig { params(node: ::RBI::Mixin).void }
def visit_mixin(node); end
- # source://rbi//lib/rbi/rbs_printer.rb#138
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:138
sig { override.params(node: ::RBI::Module).void }
def visit_module(node); end
- # source://rbi//lib/rbi/rbs_printer.rb#574
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:574
sig { override.params(node: ::RBI::OptParam).void }
def visit_opt_param(node); end
- # source://rbi//lib/rbi/rbs_printer.rb#659
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:659
sig { override.params(node: ::RBI::Private).void }
def visit_private(node); end
- # source://rbi//lib/rbi/rbs_printer.rb#653
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:653
sig { override.params(node: ::RBI::Protected).void }
def visit_protected(node); end
- # source://rbi//lib/rbi/rbs_printer.rb#647
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:647
sig { override.params(node: ::RBI::Public).void }
def visit_public(node); end
- # source://rbi//lib/rbi/rbs_printer.rb#564
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:564
sig { override.params(node: ::RBI::ReqParam).void }
def visit_req_param(node); end
- # source://rbi//lib/rbi/rbs_printer.rb#810
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:810
sig { override.params(node: ::RBI::RequiresAncestor).void }
def visit_requires_ancestor(node); end
- # source://rbi//lib/rbi/rbs_printer.rb#584
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:584
sig { override.params(node: ::RBI::RestParam).void }
def visit_rest_param(node); end
- # source://rbi//lib/rbi/rbs_printer.rb#161
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:161
sig { params(node: ::RBI::Scope).void }
def visit_scope(node); end
- # source://rbi//lib/rbi/rbs_printer.rb#224
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:224
sig { params(node: ::RBI::Scope).void }
def visit_scope_body(node); end
- # source://rbi//lib/rbi/rbs_printer.rb#826
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:826
sig { override.params(node: ::RBI::ScopeConflict).void }
def visit_scope_conflict(node); end
- # source://rbi//lib/rbi/rbs_printer.rb#171
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:171
sig { params(node: ::RBI::Scope).void }
def visit_scope_header(node); end
- # source://rbi//lib/rbi/rbs_printer.rb#674
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:674
sig { override.params(node: ::RBI::Send).void }
def visit_send(node); end
- # source://rbi//lib/rbi/rbs_printer.rb#545
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:545
sig { params(node: ::RBI::Sig).void }
def visit_sig(node); end
- # source://rbi//lib/rbi/rbs_printer.rb#558
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:558
sig { params(node: ::RBI::SigParam).void }
def visit_sig_param(node); end
- # source://rbi//lib/rbi/rbs_printer.rb#156
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:156
sig { override.params(node: ::RBI::SingletonClass).void }
def visit_singleton_class(node); end
- # source://rbi//lib/rbi/rbs_printer.rb#150
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:150
sig { override.params(node: ::RBI::Struct).void }
def visit_struct(node); end
- # source://rbi//lib/rbi/rbs_printer.rb#743
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:743
sig { override.params(node: ::RBI::TEnum).void }
def visit_tenum(node); end
- # source://rbi//lib/rbi/rbs_printer.rb#749
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:749
sig { override.params(node: ::RBI::TEnumBlock).void }
def visit_tenum_block(node); end
- # source://rbi//lib/rbi/rbs_printer.rb#755
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:755
sig { override.params(node: ::RBI::TEnumValue).void }
def visit_tenum_value(node); end
- # source://rbi//lib/rbi/rbs_printer.rb#130
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:130
sig { override.params(node: ::RBI::Tree).void }
def visit_tree(node); end
- # source://rbi//lib/rbi/rbs_printer.rb#692
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:692
sig { override.params(node: ::RBI::TStruct).void }
def visit_tstruct(node); end
- # source://rbi//lib/rbi/rbs_printer.rb#727
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:727
sig { override.params(node: ::RBI::TStructConst).void }
def visit_tstruct_const(node); end
- # source://rbi//lib/rbi/rbs_printer.rb#735
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:735
sig { override.params(node: ::RBI::TStructProp).void }
def visit_tstruct_prop(node); end
- # source://rbi//lib/rbi/rbs_printer.rb#771
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:771
sig { override.params(node: ::RBI::TypeMember).void }
def visit_type_member(node); end
- # source://rbi//lib/rbi/rbs_printer.rb#664
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:664
sig { params(node: ::RBI::Visibility).void }
def visit_visibility(node); end
- # source://rbi//lib/rbi/rbs_printer.rb#796
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:796
sig { override.params(node: ::RBI::VisibilityGroup).void }
def visit_visibility_group(node); end
private
- # @return [Boolean]
- #
- # source://rbi//lib/rbi/rbs_printer.rb#929
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:929
sig { params(node: ::RBI::Node).returns(T::Boolean) }
def oneline?(node); end
@@ -2377,193 +2570,183 @@ class RBI::RBSPrinter < ::RBI::Visitor
#
# Returns `nil` is the string is not a `T.let`.
#
- # source://rbi//lib/rbi/rbs_printer.rb#963
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:963
sig { params(code: T.nilable(::String)).returns(T.nilable(::String)) }
def parse_t_let(code); end
- # source://rbi//lib/rbi/rbs_printer.rb#951
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:951
sig { params(type: T.any(::RBI::Type, ::String)).returns(::RBI::Type) }
def parse_type(type); end
- # source://rbi//lib/rbi/rbs_printer.rb#842
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:842
sig { params(node: ::RBI::Node).void }
def print_blank_line_before(node); end
- # source://rbi//lib/rbi/rbs_printer.rb#861
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:861
sig { params(node: ::RBI::Node).void }
def print_loc(node); end
- # source://rbi//lib/rbi/rbs_printer.rb#903
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:903
sig { params(node: ::RBI::Param, last: T::Boolean).void }
def print_param_comment_leading_space(node, last:); end
- # source://rbi//lib/rbi/rbs_printer.rb#867
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:867
sig { params(node: ::RBI::Method, param: ::RBI::SigParam).void }
def print_sig_param(node, param); end
- # source://rbi//lib/rbi/rbs_printer.rb#921
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:921
sig { params(node: ::RBI::SigParam, last: T::Boolean).void }
def print_sig_param_comment_leading_space(node, last:); end
end
-# source://rbi//lib/rbi/rbs_printer.rb#6
+# pkg:gem/rbi#lib/rbi/rbs_printer.rb:6
class RBI::RBSPrinter::Error < ::RBI::Error; end
-# source://rbi//lib/rbi/model.rb#5
+# pkg:gem/rbi#lib/rbi/model.rb:5
class RBI::ReplaceNodeError < ::RBI::Error; end
-# source://rbi//lib/rbi/model.rb#569
+# pkg:gem/rbi#lib/rbi/model.rb:630
class RBI::ReqParam < ::RBI::Param
- # @return [ReqParam] a new instance of ReqParam
- #
- # source://rbi//lib/rbi/model.rb#571
+ # pkg:gem/rbi#lib/rbi/model.rb:632
sig do
params(
name: ::String,
loc: T.nilable(::RBI::Loc),
- comments: T::Array[::RBI::Comment],
+ comments: T.nilable(T::Array[::RBI::Comment]),
block: T.nilable(T.proc.params(node: ::RBI::ReqParam).void)
).void
end
def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
-
- # source://rbi//lib/rbi/model.rb#577
- sig { params(other: T.nilable(::Object)).returns(T::Boolean) }
- def ==(other); end
end
-# source://rbi//lib/rbi/model.rb#1204
+# pkg:gem/rbi#lib/rbi/model.rb:1250
class RBI::RequiresAncestor < ::RBI::NodeWithComments
include ::RBI::Indexable
- # @return [RequiresAncestor] a new instance of RequiresAncestor
- #
- # source://rbi//lib/rbi/model.rb#1209
- sig { params(name: ::String, loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void }
+ # pkg:gem/rbi#lib/rbi/model.rb:1255
+ sig { params(name: ::String, loc: T.nilable(::RBI::Loc), comments: T.nilable(T::Array[::RBI::Comment])).void }
def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil)); end
- # source://rbi//lib/rbi/index.rb#154
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/index.rb:154
sig { override.returns(T::Array[::String]) }
def index_ids; end
- # source://rbi//lib/rbi/model.rb#1206
+ # pkg:gem/rbi#lib/rbi/model.rb:1252
sig { returns(::String) }
def name; end
- # source://rbi//lib/rbi/model.rb#1216
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/model.rb:1262
sig { override.returns(::String) }
def to_s; end
end
-# source://rbi//lib/rbi/model.rb#599
+# pkg:gem/rbi#lib/rbi/model.rb:650
class RBI::RestParam < ::RBI::Param
- # @return [RestParam] a new instance of RestParam
- #
- # source://rbi//lib/rbi/model.rb#601
+ # pkg:gem/rbi#lib/rbi/model.rb:652
sig do
params(
name: ::String,
loc: T.nilable(::RBI::Loc),
- comments: T::Array[::RBI::Comment],
+ comments: T.nilable(T::Array[::RBI::Comment]),
block: T.nilable(T.proc.params(node: ::RBI::RestParam).void)
).void
end
def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
- # source://rbi//lib/rbi/model.rb#613
- sig { params(other: T.nilable(::Object)).returns(T::Boolean) }
- def ==(other); end
-
- # source://rbi//lib/rbi/model.rb#608
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/model.rb:659
sig { override.returns(::String) }
def to_s; end
end
-# source://rbi//lib/rbi/rewriters/add_sig_templates.rb#5
+# pkg:gem/rbi#lib/rbi/rewriters/add_sig_templates.rb:5
module RBI::Rewriters; end
-# source://rbi//lib/rbi/rewriters/add_sig_templates.rb#6
+# pkg:gem/rbi#lib/rbi/rewriters/add_sig_templates.rb:6
class RBI::Rewriters::AddSigTemplates < ::RBI::Visitor
- # @return [AddSigTemplates] a new instance of AddSigTemplates
- #
- # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#8
+ # pkg:gem/rbi#lib/rbi/rewriters/add_sig_templates.rb:8
sig { params(with_todo_comment: T::Boolean).void }
def initialize(with_todo_comment: T.unsafe(nil)); end
- # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#15
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/rewriters/add_sig_templates.rb:15
sig { override.params(node: T.nilable(::RBI::Node)).void }
def visit(node); end
private
- # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#29
+ # pkg:gem/rbi#lib/rbi/rewriters/add_sig_templates.rb:29
sig { params(attr: ::RBI::Attr).void }
def add_attr_sig(attr); end
- # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#44
+ # pkg:gem/rbi#lib/rbi/rewriters/add_sig_templates.rb:44
sig { params(method: ::RBI::Method).void }
def add_method_sig(method); end
- # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#55
+ # pkg:gem/rbi#lib/rbi/rewriters/add_sig_templates.rb:55
sig { params(node: ::RBI::NodeWithComments).void }
def add_todo_comment(node); end
end
-# source://rbi//lib/rbi/rewriters/annotate.rb#6
+# pkg:gem/rbi#lib/rbi/rewriters/annotate.rb:6
class RBI::Rewriters::Annotate < ::RBI::Visitor
- # @return [Annotate] a new instance of Annotate
- #
- # source://rbi//lib/rbi/rewriters/annotate.rb#8
+ # pkg:gem/rbi#lib/rbi/rewriters/annotate.rb:8
sig { params(annotation: ::String, annotate_scopes: T::Boolean, annotate_properties: T::Boolean).void }
def initialize(annotation, annotate_scopes: T.unsafe(nil), annotate_properties: T.unsafe(nil)); end
- # source://rbi//lib/rbi/rewriters/annotate.rb#17
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/rewriters/annotate.rb:17
sig { override.params(node: T.nilable(::RBI::Node)).void }
def visit(node); end
private
- # source://rbi//lib/rbi/rewriters/annotate.rb#30
+ # pkg:gem/rbi#lib/rbi/rewriters/annotate.rb:30
sig { params(node: ::RBI::NodeWithComments).void }
def annotate_node(node); end
- # @return [Boolean]
- #
- # source://rbi//lib/rbi/rewriters/annotate.rb#37
+ # pkg:gem/rbi#lib/rbi/rewriters/annotate.rb:37
sig { params(node: ::RBI::Node).returns(T::Boolean) }
def root?(node); end
end
-# source://rbi//lib/rbi/rewriters/attr_to_methods.rb#22
+# pkg:gem/rbi#lib/rbi/rewriters/attr_to_methods.rb:22
class RBI::Rewriters::AttrToMethods < ::RBI::Visitor
- # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#25
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/rewriters/attr_to_methods.rb:25
sig { override.params(node: T.nilable(::RBI::Node)).void }
def visit(node); end
private
- # @raise [ReplaceNodeError]
- #
- # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#38
+ # pkg:gem/rbi#lib/rbi/rewriters/attr_to_methods.rb:38
sig { params(node: ::RBI::Node, with: T::Array[::RBI::Node]).void }
def replace(node, with:); end
end
-# source://rbi//lib/rbi/rewriters/deannotate.rb#6
+# pkg:gem/rbi#lib/rbi/rewriters/deannotate.rb:6
class RBI::Rewriters::Deannotate < ::RBI::Visitor
- # @return [Deannotate] a new instance of Deannotate
- #
- # source://rbi//lib/rbi/rewriters/deannotate.rb#8
+ # pkg:gem/rbi#lib/rbi/rewriters/deannotate.rb:8
sig { params(annotation: ::String).void }
def initialize(annotation); end
- # source://rbi//lib/rbi/rewriters/deannotate.rb#15
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/rewriters/deannotate.rb:15
sig { override.params(node: T.nilable(::RBI::Node)).void }
def visit(node); end
private
- # source://rbi//lib/rbi/rewriters/deannotate.rb#26
+ # pkg:gem/rbi#lib/rbi/rewriters/deannotate.rb:26
sig { params(node: ::RBI::NodeWithComments).void }
def deannotate_node(node); end
end
@@ -2620,26 +2803,26 @@ end
# RBI with no versions:
# - RBI with no version annotations are automatically counted towards ALL versions
#
-# source://rbi//lib/rbi/rewriters/filter_versions.rb#57
+# pkg:gem/rbi#lib/rbi/rewriters/filter_versions.rb:57
class RBI::Rewriters::FilterVersions < ::RBI::Visitor
- # @return [FilterVersions] a new instance of FilterVersions
- #
- # source://rbi//lib/rbi/rewriters/filter_versions.rb#69
+ # pkg:gem/rbi#lib/rbi/rewriters/filter_versions.rb:69
sig { params(version: ::Gem::Version).void }
def initialize(version); end
- # source://rbi//lib/rbi/rewriters/filter_versions.rb#76
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/rewriters/filter_versions.rb:76
sig { override.params(node: T.nilable(::RBI::Node)).void }
def visit(node); end
class << self
- # source://rbi//lib/rbi/rewriters/filter_versions.rb#62
+ # pkg:gem/rbi#lib/rbi/rewriters/filter_versions.rb:62
sig { params(tree: ::RBI::Tree, version: ::Gem::Version).void }
def filter(tree, version); end
end
end
-# source://rbi//lib/rbi/rewriters/filter_versions.rb#58
+# pkg:gem/rbi#lib/rbi/rewriters/filter_versions.rb:58
RBI::Rewriters::FilterVersions::VERSION_PREFIX = T.let(T.unsafe(nil), String)
# Rewrite non-singleton methods inside singleton classes to singleton methods
@@ -2667,9 +2850,11 @@ RBI::Rewriters::FilterVersions::VERSION_PREFIX = T.let(T.unsafe(nil), String)
# end
# ~~~
#
-# source://rbi//lib/rbi/rewriters/flatten_singleton_methods.rb#30
+# pkg:gem/rbi#lib/rbi/rewriters/flatten_singleton_methods.rb:30
class RBI::Rewriters::FlattenSingletonMethods < ::RBI::Visitor
- # source://rbi//lib/rbi/rewriters/flatten_singleton_methods.rb#33
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/rewriters/flatten_singleton_methods.rb:33
sig { override.params(node: T.nilable(::RBI::Node)).void }
def visit(node); end
end
@@ -2696,28 +2881,30 @@ end
# end
# ~~~
#
-# source://rbi//lib/rbi/rewriters/flatten_visibilities.rb#27
+# pkg:gem/rbi#lib/rbi/rewriters/flatten_visibilities.rb:27
class RBI::Rewriters::FlattenVisibilities < ::RBI::Visitor
- # @return [FlattenVisibilities] a new instance of FlattenVisibilities
- #
- # source://rbi//lib/rbi/rewriters/flatten_visibilities.rb#29
+ # pkg:gem/rbi#lib/rbi/rewriters/flatten_visibilities.rb:29
sig { void }
def initialize; end
- # source://rbi//lib/rbi/rewriters/flatten_visibilities.rb#37
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/rewriters/flatten_visibilities.rb:37
sig { override.params(node: T.nilable(::RBI::Node)).void }
def visit(node); end
end
-# source://rbi//lib/rbi/rewriters/group_nodes.rb#8
+# pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:8
class RBI::Rewriters::GroupNodes < ::RBI::Visitor
- # source://rbi//lib/rbi/rewriters/group_nodes.rb#11
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:11
sig { override.params(node: T.nilable(::RBI::Node)).void }
def visit(node); end
private
- # source://rbi//lib/rbi/rewriters/group_nodes.rb#35
+ # pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:37
sig { params(node: ::RBI::Node).returns(::RBI::Group::Kind) }
def group_kind(node); end
end
@@ -2756,24 +2943,22 @@ end
# end
# ~~~
#
-# source://rbi//lib/rbi/rewriters/merge_trees.rb#39
+# pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:39
class RBI::Rewriters::Merge
- # @return [Merge] a new instance of Merge
- #
- # source://rbi//lib/rbi/rewriters/merge_trees.rb#66
+ # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:66
sig { params(left_name: ::String, right_name: ::String, keep: ::RBI::Rewriters::Merge::Keep).void }
def initialize(left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end
- # source://rbi//lib/rbi/rewriters/merge_trees.rb#75
+ # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:75
sig { params(tree: ::RBI::Tree).void }
def merge(tree); end
- # source://rbi//lib/rbi/rewriters/merge_trees.rb#63
+ # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:63
sig { returns(::RBI::MergeTree) }
def tree; end
class << self
- # source://rbi//lib/rbi/rewriters/merge_trees.rb#50
+ # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:50
sig do
params(
left: ::RBI::Tree,
@@ -2789,29 +2974,27 @@ end
# Used for logging / error displaying purpose
#
-# source://rbi//lib/rbi/rewriters/merge_trees.rb#82
+# pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:82
class RBI::Rewriters::Merge::Conflict
- # @return [Conflict] a new instance of Conflict
- #
- # source://rbi//lib/rbi/rewriters/merge_trees.rb#90
+ # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:90
sig { params(left: ::RBI::Node, right: ::RBI::Node, left_name: ::String, right_name: ::String).void }
def initialize(left:, right:, left_name:, right_name:); end
- # source://rbi//lib/rbi/rewriters/merge_trees.rb#84
+ # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:84
sig { returns(::RBI::Node) }
def left; end
- # source://rbi//lib/rbi/rewriters/merge_trees.rb#87
+ # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:87
sig { returns(::String) }
def left_name; end
- # source://rbi//lib/rbi/rewriters/merge_trees.rb#84
+ # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:84
def right; end
- # source://rbi//lib/rbi/rewriters/merge_trees.rb#87
+ # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:87
def right_name; end
- # source://rbi//lib/rbi/rewriters/merge_trees.rb#98
+ # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:98
sig { returns(::String) }
def to_s; end
end
@@ -2847,47 +3030,49 @@ end
# end
# ~~~
#
-# source://rbi//lib/rbi/rewriters/merge_trees.rb#247
+# pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:258
class RBI::Rewriters::Merge::ConflictTreeMerger < ::RBI::Visitor
- # source://rbi//lib/rbi/rewriters/merge_trees.rb#250
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:261
sig { override.params(node: T.nilable(::RBI::Node)).void }
def visit(node); end
- # source://rbi//lib/rbi/rewriters/merge_trees.rb#256
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:267
sig { override.params(nodes: T::Array[::RBI::Node]).void }
def visit_all(nodes); end
private
- # source://rbi//lib/rbi/rewriters/merge_trees.rb#277
+ # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:290
sig { params(left: ::RBI::Tree, right: ::RBI::Tree).void }
def merge_conflict_trees(left, right); end
end
-# source://rbi//lib/rbi/rewriters/merge_trees.rb#40
+# pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:40
class RBI::Rewriters::Merge::Keep
class << self
private
- # source://rbi//lib/rbi/rewriters/merge_trees.rb#45
+ # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:45
def new(*_arg0); end
end
end
-# source://rbi//lib/rbi/rewriters/merge_trees.rb#42
+# pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:42
RBI::Rewriters::Merge::Keep::LEFT = T.let(T.unsafe(nil), RBI::Rewriters::Merge::Keep)
-# source://rbi//lib/rbi/rewriters/merge_trees.rb#41
+# pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:41
RBI::Rewriters::Merge::Keep::NONE = T.let(T.unsafe(nil), RBI::Rewriters::Merge::Keep)
-# source://rbi//lib/rbi/rewriters/merge_trees.rb#43
+# pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:43
RBI::Rewriters::Merge::Keep::RIGHT = T.let(T.unsafe(nil), RBI::Rewriters::Merge::Keep)
-# source://rbi//lib/rbi/rewriters/merge_trees.rb#103
+# pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:103
class RBI::Rewriters::Merge::TreeMerger < ::RBI::Visitor
- # @return [TreeMerger] a new instance of TreeMerger
- #
- # source://rbi//lib/rbi/rewriters/merge_trees.rb#108
+ # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:108
sig do
params(
output: ::RBI::Tree,
@@ -2898,47 +3083,53 @@ class RBI::Rewriters::Merge::TreeMerger < ::RBI::Visitor
end
def initialize(output, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end
- # source://rbi//lib/rbi/rewriters/merge_trees.rb#105
+ # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:105
sig { returns(T::Array[::RBI::Rewriters::Merge::Conflict]) }
def conflicts; end
- # source://rbi//lib/rbi/rewriters/merge_trees.rb#121
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:121
sig { override.params(node: T.nilable(::RBI::Node)).void }
def visit(node); end
private
- # source://rbi//lib/rbi/rewriters/merge_trees.rb#170
+ # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:181
sig { returns(::RBI::Tree) }
def current_scope; end
- # source://rbi//lib/rbi/rewriters/merge_trees.rb#187
+ # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:198
sig { params(left: ::RBI::Scope, right: ::RBI::Scope).void }
def make_conflict_scope(left, right); end
- # source://rbi//lib/rbi/rewriters/merge_trees.rb#194
+ # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:205
sig { params(left: ::RBI::Node, right: ::RBI::Node).void }
def make_conflict_tree(left, right); end
- # source://rbi//lib/rbi/rewriters/merge_trees.rb#175
+ # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:186
sig { params(node: ::RBI::Node).returns(T.nilable(::RBI::Node)) }
def previous_definition(node); end
- # source://rbi//lib/rbi/rewriters/merge_trees.rb#206
+ # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:217
sig { params(left: ::RBI::Scope, right: ::RBI::Scope).returns(::RBI::Scope) }
def replace_scope_header(left, right); end
end
-# source://rbi//lib/rbi/rewriters/nest_non_public_members.rb#6
+# pkg:gem/rbi#lib/rbi/rewriters/nest_non_public_members.rb:6
class RBI::Rewriters::NestNonPublicMembers < ::RBI::Visitor
- # source://rbi//lib/rbi/rewriters/nest_non_public_members.rb#9
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/rewriters/nest_non_public_members.rb:9
sig { override.params(node: T.nilable(::RBI::Node)).void }
def visit(node); end
end
-# source://rbi//lib/rbi/rewriters/nest_singleton_methods.rb#6
+# pkg:gem/rbi#lib/rbi/rewriters/nest_singleton_methods.rb:6
class RBI::Rewriters::NestSingletonMethods < ::RBI::Visitor
- # source://rbi//lib/rbi/rewriters/nest_singleton_methods.rb#9
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/rewriters/nest_singleton_methods.rb:9
sig { override.params(node: T.nilable(::RBI::Node)).void }
def visit(node); end
end
@@ -2960,15 +3151,15 @@ end
# end
# ~~~
#
-# source://rbi//lib/rbi/rewriters/nest_top_level_members.rb#22
+# pkg:gem/rbi#lib/rbi/rewriters/nest_top_level_members.rb:22
class RBI::Rewriters::NestTopLevelMembers < ::RBI::Visitor
- # @return [NestTopLevelMembers] a new instance of NestTopLevelMembers
- #
- # source://rbi//lib/rbi/rewriters/nest_top_level_members.rb#24
+ # pkg:gem/rbi#lib/rbi/rewriters/nest_top_level_members.rb:24
sig { void }
def initialize; end
- # source://rbi//lib/rbi/rewriters/nest_top_level_members.rb#32
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/rewriters/nest_top_level_members.rb:32
sig { override.params(node: T.nilable(::RBI::Node)).void }
def visit(node); end
end
@@ -3016,44 +3207,42 @@ end
# OPERATIONS
# ~~~
#
-# source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#48
+# pkg:gem/rbi#lib/rbi/rewriters/remove_known_definitions.rb:48
class RBI::Rewriters::RemoveKnownDefinitions < ::RBI::Visitor
- # @return [RemoveKnownDefinitions] a new instance of RemoveKnownDefinitions
- #
- # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#53
+ # pkg:gem/rbi#lib/rbi/rewriters/remove_known_definitions.rb:53
sig { params(index: ::RBI::Index).void }
def initialize(index); end
- # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#50
+ # pkg:gem/rbi#lib/rbi/rewriters/remove_known_definitions.rb:50
sig { returns(T::Array[::RBI::Rewriters::RemoveKnownDefinitions::Operation]) }
def operations; end
- # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#75
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/rewriters/remove_known_definitions.rb:75
sig { override.params(node: T.nilable(::RBI::Node)).void }
def visit(node); end
- # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#69
+ # pkg:gem/rbi#lib/rbi/rewriters/remove_known_definitions.rb:69
sig { params(nodes: T::Array[::RBI::Node]).void }
def visit_all(nodes); end
private
- # @return [Boolean]
- #
- # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#103
+ # pkg:gem/rbi#lib/rbi/rewriters/remove_known_definitions.rb:103
sig { params(node: ::RBI::Node, previous: ::RBI::Node).returns(T::Boolean) }
def can_delete_node?(node, previous); end
- # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#121
+ # pkg:gem/rbi#lib/rbi/rewriters/remove_known_definitions.rb:121
sig { params(node: ::RBI::Node, previous: ::RBI::Node).void }
def delete_node(node, previous); end
- # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#94
+ # pkg:gem/rbi#lib/rbi/rewriters/remove_known_definitions.rb:94
sig { params(node: ::RBI::Indexable).returns(T.nilable(::RBI::Node)) }
def previous_definition_for(node); end
class << self
- # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#61
+ # pkg:gem/rbi#lib/rbi/rewriters/remove_known_definitions.rb:61
sig do
params(
tree: ::RBI::Tree,
@@ -3064,80 +3253,86 @@ class RBI::Rewriters::RemoveKnownDefinitions < ::RBI::Visitor
end
end
-# source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#126
+# pkg:gem/rbi#lib/rbi/rewriters/remove_known_definitions.rb:126
class RBI::Rewriters::RemoveKnownDefinitions::Operation
- # @return [Operation] a new instance of Operation
- #
- # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#131
+ # pkg:gem/rbi#lib/rbi/rewriters/remove_known_definitions.rb:131
sig { params(deleted_node: ::RBI::Node, duplicate_of: ::RBI::Node).void }
def initialize(deleted_node:, duplicate_of:); end
- # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#128
+ # pkg:gem/rbi#lib/rbi/rewriters/remove_known_definitions.rb:128
sig { returns(::RBI::Node) }
def deleted_node; end
- # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#128
+ # pkg:gem/rbi#lib/rbi/rewriters/remove_known_definitions.rb:128
def duplicate_of; end
- # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#137
+ # pkg:gem/rbi#lib/rbi/rewriters/remove_known_definitions.rb:137
sig { returns(::String) }
def to_s; end
end
-# source://rbi//lib/rbi/rewriters/sort_nodes.rb#6
+# pkg:gem/rbi#lib/rbi/rewriters/sort_nodes.rb:6
class RBI::Rewriters::SortNodes < ::RBI::Visitor
- # source://rbi//lib/rbi/rewriters/sort_nodes.rb#9
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/rewriters/sort_nodes.rb:9
sig { override.params(node: T.nilable(::RBI::Node)).void }
def visit(node); end
private
- # source://rbi//lib/rbi/rewriters/sort_nodes.rb#74
+ # pkg:gem/rbi#lib/rbi/rewriters/sort_nodes.rb:71
sig { params(kind: ::RBI::Group::Kind).returns(::Integer) }
def group_rank(kind); end
- # source://rbi//lib/rbi/rewriters/sort_nodes.rb#95
+ # pkg:gem/rbi#lib/rbi/rewriters/sort_nodes.rb:92
sig { params(node: ::RBI::Node).returns(T.nilable(::String)) }
def node_name(node); end
- # source://rbi//lib/rbi/rewriters/sort_nodes.rb#46
+ # pkg:gem/rbi#lib/rbi/rewriters/sort_nodes.rb:43
sig { params(node: ::RBI::Node).returns(::Integer) }
def node_rank(node); end
- # source://rbi//lib/rbi/rewriters/sort_nodes.rb#107
+ # pkg:gem/rbi#lib/rbi/rewriters/sort_nodes.rb:104
sig { params(node: ::RBI::Node).void }
def sort_node_names!(node); end
end
# Translate all RBS signature comments to Sorbet RBI signatures
#
-# source://rbi//lib/rbi/rewriters/translate_rbs_sigs.rb#7
+# pkg:gem/rbi#lib/rbi/rewriters/translate_rbs_sigs.rb:7
class RBI::Rewriters::TranslateRBSSigs < ::RBI::Visitor
- # source://rbi//lib/rbi/rewriters/translate_rbs_sigs.rb#12
+ # pkg:gem/rbi#lib/rbi/rewriters/translate_rbs_sigs.rb:11
+ sig { void }
+ def initialize; end
+
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/rewriters/translate_rbs_sigs.rb:18
sig { override.params(node: T.nilable(::RBI::Node)).void }
def visit(node); end
private
- # source://rbi//lib/rbi/rewriters/translate_rbs_sigs.rb#34
+ # pkg:gem/rbi#lib/rbi/rewriters/translate_rbs_sigs.rb:40
sig { params(node: T.any(::RBI::Attr, ::RBI::Method)).returns(T::Array[::RBI::RBSComment]) }
def extract_rbs_comments(node); end
- # source://rbi//lib/rbi/rewriters/translate_rbs_sigs.rb#61
+ # pkg:gem/rbi#lib/rbi/rewriters/translate_rbs_sigs.rb:67
sig { params(node: ::RBI::Attr, comment: ::RBI::RBSComment).returns(::RBI::Sig) }
def translate_rbs_attr_type(node, comment); end
- # source://rbi//lib/rbi/rewriters/translate_rbs_sigs.rb#53
+ # pkg:gem/rbi#lib/rbi/rewriters/translate_rbs_sigs.rb:59
sig { params(node: ::RBI::Method, comment: ::RBI::RBSComment).returns(::RBI::Sig) }
def translate_rbs_method_type(node, comment); end
end
-# source://rbi//lib/rbi/rewriters/translate_rbs_sigs.rb#8
+# pkg:gem/rbi#lib/rbi/rewriters/translate_rbs_sigs.rb:8
class RBI::Rewriters::TranslateRBSSigs::Error < ::RBI::Error; end
# @abstract
#
-# source://rbi//lib/rbi/model.rb#163
+# pkg:gem/rbi#lib/rbi/model.rb:185
class RBI::Scope < ::RBI::Tree
include ::RBI::Indexable
@@ -3145,22 +3340,25 @@ class RBI::Scope < ::RBI::Tree
# Duplicate `self` scope without its body
#
- # source://rbi//lib/rbi/rewriters/merge_trees.rb#350
+ # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:363
sig { returns(T.self_type) }
def dup_empty; end
# @abstract
- # @raise [NotImplementedError]
#
- # source://rbi//lib/rbi/model.rb#166
+ # pkg:gem/rbi#lib/rbi/model.rb:188
sig { abstract.returns(::String) }
def fully_qualified_name; end
- # source://rbi//lib/rbi/index.rb#84
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/index.rb:84
sig { override.returns(T::Array[::String]) }
def index_ids; end
- # source://rbi//lib/rbi/model.rb#170
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/model.rb:192
sig { override.returns(::String) }
def to_s; end
end
@@ -3178,90 +3376,86 @@ end
# end
# ~~~
#
-# source://rbi//lib/rbi/rewriters/merge_trees.rb#590
+# pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:622
class RBI::ScopeConflict < ::RBI::Tree
- # @return [ScopeConflict] a new instance of ScopeConflict
- #
- # source://rbi//lib/rbi/rewriters/merge_trees.rb#598
+ # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:630
sig { params(left: ::RBI::Scope, right: ::RBI::Scope, left_name: ::String, right_name: ::String).void }
def initialize(left:, right:, left_name: T.unsafe(nil), right_name: T.unsafe(nil)); end
- # source://rbi//lib/rbi/rewriters/merge_trees.rb#592
+ # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:624
sig { returns(::RBI::Scope) }
def left; end
- # source://rbi//lib/rbi/rewriters/merge_trees.rb#595
+ # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:627
sig { returns(::String) }
def left_name; end
- # source://rbi//lib/rbi/rewriters/merge_trees.rb#592
+ # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:624
def right; end
- # source://rbi//lib/rbi/rewriters/merge_trees.rb#595
+ # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:627
def right_name; end
end
# Sends
#
-# source://rbi//lib/rbi/model.rb#802
+# pkg:gem/rbi#lib/rbi/model.rb:831
class RBI::Send < ::RBI::NodeWithComments
include ::RBI::Indexable
- # @return [Send] a new instance of Send
- #
- # source://rbi//lib/rbi/model.rb#810
+ # pkg:gem/rbi#lib/rbi/model.rb:839
sig do
params(
method: ::String,
args: T::Array[::RBI::Arg],
loc: T.nilable(::RBI::Loc),
- comments: T::Array[::RBI::Comment],
+ comments: T.nilable(T::Array[::RBI::Comment]),
block: T.nilable(T.proc.params(node: ::RBI::Send).void)
).void
end
def initialize(method, args = T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
- # source://rbi//lib/rbi/model.rb#818
+ # pkg:gem/rbi#lib/rbi/model.rb:847
sig { params(arg: ::RBI::Arg).void }
def <<(arg); end
- # source://rbi//lib/rbi/model.rb#823
+ # pkg:gem/rbi#lib/rbi/model.rb:852
sig { params(other: T.nilable(::Object)).returns(T::Boolean) }
def ==(other); end
- # source://rbi//lib/rbi/model.rb#807
+ # pkg:gem/rbi#lib/rbi/model.rb:836
sig { returns(T::Array[::RBI::Arg]) }
def args; end
- # @return [Boolean]
+ # @override
#
- # source://rbi//lib/rbi/rewriters/merge_trees.rb#516
+ # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:548
sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
def compatible_with?(other); end
- # source://rbi//lib/rbi/index.rb#184
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/index.rb:184
sig { override.returns(T::Array[::String]) }
def index_ids; end
- # source://rbi//lib/rbi/model.rb#804
+ # pkg:gem/rbi#lib/rbi/model.rb:833
sig { returns(::String) }
def method; end
- # source://rbi//lib/rbi/model.rb#828
+ # pkg:gem/rbi#lib/rbi/model.rb:857
sig { returns(::String) }
def to_s; end
end
# Sorbet's sigs
#
-# source://rbi//lib/rbi/model.rb#877
+# pkg:gem/rbi#lib/rbi/model.rb:906
class RBI::Sig < ::RBI::NodeWithComments
- # @return [Sig] a new instance of Sig
- #
- # source://rbi//lib/rbi/model.rb#926
+ # pkg:gem/rbi#lib/rbi/model.rb:964
sig do
params(
- params: T::Array[::RBI::SigParam],
+ params: T.nilable(T::Array[::RBI::SigParam]),
return_type: T.any(::RBI::Type, ::String),
is_abstract: T::Boolean,
is_override: T::Boolean,
@@ -3270,536 +3464,484 @@ class RBI::Sig < ::RBI::NodeWithComments
allow_incompatible_override: T::Boolean,
allow_incompatible_override_visibility: T::Boolean,
without_runtime: T::Boolean,
- type_params: T::Array[::String],
+ type_params: T.nilable(T::Array[::String]),
checked: T.nilable(::Symbol),
loc: T.nilable(::RBI::Loc),
- comments: T::Array[::RBI::Comment],
+ comments: T.nilable(T::Array[::RBI::Comment]),
block: T.nilable(T.proc.params(node: ::RBI::Sig).void)
).void
end
def initialize(params: T.unsafe(nil), return_type: T.unsafe(nil), is_abstract: T.unsafe(nil), is_override: T.unsafe(nil), is_overridable: T.unsafe(nil), is_final: T.unsafe(nil), allow_incompatible_override: T.unsafe(nil), allow_incompatible_override_visibility: T.unsafe(nil), without_runtime: T.unsafe(nil), type_params: T.unsafe(nil), checked: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
- # source://rbi//lib/rbi/model.rb#958
+ # pkg:gem/rbi#lib/rbi/model.rb:996
sig { params(param: ::RBI::SigParam).void }
def <<(param); end
- # source://rbi//lib/rbi/model.rb#968
+ # pkg:gem/rbi#lib/rbi/model.rb:1006
sig { params(other: ::Object).returns(T::Boolean) }
def ==(other); end
- # source://rbi//lib/rbi/model.rb#963
+ # pkg:gem/rbi#lib/rbi/model.rb:1001
sig { params(name: ::String, type: T.any(::RBI::Type, ::String)).void }
def add_param(name, type); end
- # source://rbi//lib/rbi/model.rb#897
+ # pkg:gem/rbi#lib/rbi/model.rb:928
sig { returns(T::Boolean) }
def allow_incompatible_override; end
- # source://rbi//lib/rbi/model.rb#897
+ # pkg:gem/rbi#lib/rbi/model.rb:928
def allow_incompatible_override=(_arg0); end
- # source://rbi//lib/rbi/model.rb#900
+ # pkg:gem/rbi#lib/rbi/model.rb:931
sig { returns(T::Boolean) }
def allow_incompatible_override_visibility; end
- # source://rbi//lib/rbi/model.rb#900
+ # pkg:gem/rbi#lib/rbi/model.rb:931
def allow_incompatible_override_visibility=(_arg0); end
- # source://rbi//lib/rbi/model.rb#909
+ # pkg:gem/rbi#lib/rbi/model.rb:947
sig { returns(T.nilable(::Symbol)) }
def checked; end
- # source://rbi//lib/rbi/model.rb#909
+ # pkg:gem/rbi#lib/rbi/model.rb:947
def checked=(_arg0); end
- # source://rbi//lib/rbi/model.rb#885
+ # pkg:gem/rbi#lib/rbi/model.rb:916
sig { returns(T::Boolean) }
def is_abstract; end
- # source://rbi//lib/rbi/model.rb#885
+ # pkg:gem/rbi#lib/rbi/model.rb:916
def is_abstract=(_arg0); end
- # source://rbi//lib/rbi/model.rb#894
+ # pkg:gem/rbi#lib/rbi/model.rb:925
sig { returns(T::Boolean) }
def is_final; end
- # source://rbi//lib/rbi/model.rb#894
+ # pkg:gem/rbi#lib/rbi/model.rb:925
def is_final=(_arg0); end
- # source://rbi//lib/rbi/model.rb#891
+ # pkg:gem/rbi#lib/rbi/model.rb:922
sig { returns(T::Boolean) }
def is_overridable; end
- # source://rbi//lib/rbi/model.rb#891
+ # pkg:gem/rbi#lib/rbi/model.rb:922
def is_overridable=(_arg0); end
- # source://rbi//lib/rbi/model.rb#888
+ # pkg:gem/rbi#lib/rbi/model.rb:919
sig { returns(T::Boolean) }
def is_override; end
- # source://rbi//lib/rbi/model.rb#888
+ # pkg:gem/rbi#lib/rbi/model.rb:919
def is_override=(_arg0); end
- # source://rbi//lib/rbi/model.rb#879
+ # pkg:gem/rbi#lib/rbi/model.rb:908
sig { returns(T::Array[::RBI::SigParam]) }
def params; end
- # source://rbi//lib/rbi/model.rb#882
+ # pkg:gem/rbi#lib/rbi/model.rb:913
sig { returns(T.any(::RBI::Type, ::String)) }
def return_type; end
- # source://rbi//lib/rbi/model.rb#882
+ # pkg:gem/rbi#lib/rbi/model.rb:913
def return_type=(_arg0); end
- # source://rbi//lib/rbi/model.rb#906
+ # pkg:gem/rbi#lib/rbi/model.rb:937
sig { returns(T::Array[::String]) }
def type_params; end
- # source://rbi//lib/rbi/model.rb#903
+ # pkg:gem/rbi#lib/rbi/model.rb:942
+ sig { returns(T::Boolean) }
+ def type_params?; end
+
+ # pkg:gem/rbi#lib/rbi/model.rb:934
sig { returns(T::Boolean) }
def without_runtime; end
- # source://rbi//lib/rbi/model.rb#903
+ # pkg:gem/rbi#lib/rbi/model.rb:934
def without_runtime=(_arg0); end
end
-# source://rbi//lib/rbi/model.rb#977
+# pkg:gem/rbi#lib/rbi/model.rb:1015
class RBI::SigParam < ::RBI::NodeWithComments
- # @return [SigParam] a new instance of SigParam
- #
- # source://rbi//lib/rbi/model.rb#985
+ # pkg:gem/rbi#lib/rbi/model.rb:1023
sig do
params(
name: ::String,
type: T.any(::RBI::Type, ::String),
loc: T.nilable(::RBI::Loc),
- comments: T::Array[::RBI::Comment],
+ comments: T.nilable(T::Array[::RBI::Comment]),
block: T.nilable(T.proc.params(node: ::RBI::SigParam).void)
).void
end
def initialize(name, type, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
- # source://rbi//lib/rbi/model.rb#993
+ # pkg:gem/rbi#lib/rbi/model.rb:1037
sig { params(other: ::Object).returns(T::Boolean) }
def ==(other); end
- # source://rbi//lib/rbi/model.rb#979
+ # pkg:gem/rbi#lib/rbi/model.rb:1032
+ sig { returns(T::Boolean) }
+ def anonymous?; end
+
+ # pkg:gem/rbi#lib/rbi/model.rb:1017
sig { returns(::String) }
def name; end
- # source://rbi//lib/rbi/model.rb#982
+ # pkg:gem/rbi#lib/rbi/model.rb:1020
sig { returns(T.any(::RBI::Type, ::String)) }
def type; end
end
-# source://rbi//lib/rbi/model.rb#219
+# pkg:gem/rbi#lib/rbi/model.rb:246
class RBI::SingletonClass < ::RBI::Scope
- # @return [SingletonClass] a new instance of SingletonClass
- #
- # source://rbi//lib/rbi/model.rb#221
+ # pkg:gem/rbi#lib/rbi/model.rb:248
sig do
params(
loc: T.nilable(::RBI::Loc),
- comments: T::Array[::RBI::Comment],
+ comments: T.nilable(T::Array[::RBI::Comment]),
block: T.nilable(T.proc.params(node: ::RBI::SingletonClass).void)
).void
end
def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
- # source://rbi//lib/rbi/model.rb#228
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/model.rb:255
sig { override.returns(::String) }
def fully_qualified_name; end
end
-# source://rbi//lib/rbi/model.rb#233
+# pkg:gem/rbi#lib/rbi/model.rb:260
class RBI::Struct < ::RBI::Scope
- # @return [Struct] a new instance of Struct
- #
- # source://rbi//lib/rbi/model.rb#250
+ # pkg:gem/rbi#lib/rbi/model.rb:277
sig do
params(
name: ::String,
members: T::Array[::Symbol],
keyword_init: T::Boolean,
loc: T.nilable(::RBI::Loc),
- comments: T::Array[::RBI::Comment],
+ comments: T.nilable(T::Array[::RBI::Comment]),
block: T.nilable(T.proc.params(struct: ::RBI::Struct).void)
).void
end
def initialize(name, members: T.unsafe(nil), keyword_init: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
- # @return [Boolean]
+ # @override
#
- # source://rbi//lib/rbi/rewriters/merge_trees.rb#391
+ # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:404
sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
def compatible_with?(other); end
- # source://rbi//lib/rbi/model.rb#260
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/model.rb:287
sig { override.returns(::String) }
def fully_qualified_name; end
- # source://rbi//lib/rbi/model.rb#241
+ # pkg:gem/rbi#lib/rbi/model.rb:268
sig { returns(T::Boolean) }
def keyword_init; end
- # source://rbi//lib/rbi/model.rb#241
+ # pkg:gem/rbi#lib/rbi/model.rb:268
def keyword_init=(_arg0); end
- # source://rbi//lib/rbi/model.rb#238
+ # pkg:gem/rbi#lib/rbi/model.rb:265
sig { returns(T::Array[::Symbol]) }
def members; end
- # source://rbi//lib/rbi/model.rb#238
+ # pkg:gem/rbi#lib/rbi/model.rb:265
def members=(_arg0); end
- # source://rbi//lib/rbi/model.rb#235
+ # pkg:gem/rbi#lib/rbi/model.rb:262
sig { returns(::String) }
def name; end
-
- # source://rbi//lib/rbi/model.rb#235
- def name=(_arg0); end
end
# Sorbet's T::Enum
#
-# source://rbi//lib/rbi/model.rb#1088
+# pkg:gem/rbi#lib/rbi/model.rb:1134
class RBI::TEnum < ::RBI::Class
- # @return [TEnum] a new instance of TEnum
- #
- # source://rbi//lib/rbi/model.rb#1090
+ # pkg:gem/rbi#lib/rbi/model.rb:1136
sig do
params(
name: ::String,
loc: T.nilable(::RBI::Loc),
- comments: T::Array[::RBI::Comment],
+ comments: T.nilable(T::Array[::RBI::Comment]),
block: T.nilable(T.proc.params(klass: ::RBI::TEnum).void)
).void
end
def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
end
-# source://rbi//lib/rbi/model.rb#1096
+# pkg:gem/rbi#lib/rbi/model.rb:1142
class RBI::TEnumBlock < ::RBI::Scope
- # @return [TEnumBlock] a new instance of TEnumBlock
- #
- # source://rbi//lib/rbi/model.rb#1098
+ # pkg:gem/rbi#lib/rbi/model.rb:1144
sig do
params(
loc: T.nilable(::RBI::Loc),
- comments: T::Array[::RBI::Comment],
+ comments: T.nilable(T::Array[::RBI::Comment]),
block: T.nilable(T.proc.params(node: ::RBI::TEnumBlock).void)
).void
end
def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
- # source://rbi//lib/rbi/model.rb#1105
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/model.rb:1151
sig { override.returns(::String) }
def fully_qualified_name; end
- # source://rbi//lib/rbi/index.rb#214
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/index.rb:214
sig { override.returns(T::Array[::String]) }
def index_ids; end
- # source://rbi//lib/rbi/model.rb#1111
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/model.rb:1157
sig { override.returns(::String) }
def to_s; end
end
-# source://rbi//lib/rbi/model.rb#1116
+# pkg:gem/rbi#lib/rbi/model.rb:1162
class RBI::TEnumValue < ::RBI::NodeWithComments
include ::RBI::Indexable
- # @return [TEnumValue] a new instance of TEnumValue
- #
- # source://rbi//lib/rbi/model.rb#1121
+ # pkg:gem/rbi#lib/rbi/model.rb:1167
sig do
params(
name: ::String,
loc: T.nilable(::RBI::Loc),
- comments: T::Array[::RBI::Comment],
+ comments: T.nilable(T::Array[::RBI::Comment]),
block: T.nilable(T.proc.params(node: ::RBI::TEnumValue).void)
).void
end
def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
- # source://rbi//lib/rbi/model.rb#1128
+ # pkg:gem/rbi#lib/rbi/model.rb:1174
sig { returns(::String) }
def fully_qualified_name; end
- # source://rbi//lib/rbi/index.rb#224
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/index.rb:224
sig { override.returns(T::Array[::String]) }
def index_ids; end
- # source://rbi//lib/rbi/model.rb#1118
+ # pkg:gem/rbi#lib/rbi/model.rb:1164
sig { returns(::String) }
def name; end
- # source://rbi//lib/rbi/model.rb#1134
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/model.rb:1180
sig { override.returns(::String) }
def to_s; end
end
# Sorbet's T::Struct
#
-# source://rbi//lib/rbi/model.rb#1000
+# pkg:gem/rbi#lib/rbi/model.rb:1046
class RBI::TStruct < ::RBI::Class
- # @return [TStruct] a new instance of TStruct
- #
- # source://rbi//lib/rbi/model.rb#1002
+ # pkg:gem/rbi#lib/rbi/model.rb:1048
sig do
params(
name: ::String,
loc: T.nilable(::RBI::Loc),
- comments: T::Array[::RBI::Comment],
+ comments: T.nilable(T::Array[::RBI::Comment]),
block: T.nilable(T.proc.params(klass: ::RBI::TStruct).void)
).void
end
def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
end
-# source://rbi//lib/rbi/model.rb#1032
+# pkg:gem/rbi#lib/rbi/model.rb:1078
class RBI::TStructConst < ::RBI::TStructField
include ::RBI::Indexable
- # @return [TStructConst] a new instance of TStructConst
- #
- # source://rbi//lib/rbi/model.rb#1040
+ # pkg:gem/rbi#lib/rbi/model.rb:1086
sig do
params(
name: ::String,
type: T.any(::RBI::Type, ::String),
default: T.nilable(::String),
loc: T.nilable(::RBI::Loc),
- comments: T::Array[::RBI::Comment],
+ comments: T.nilable(T::Array[::RBI::Comment]),
block: T.nilable(T.proc.params(node: ::RBI::TStructConst).void)
).void
end
def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
- # @return [Boolean]
+ # @override
#
- # source://rbi//lib/rbi/rewriters/merge_trees.rb#532
+ # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:564
sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
def compatible_with?(other); end
- # source://rbi//lib/rbi/model.rb#1047
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/model.rb:1093
sig { override.returns(T::Array[::String]) }
def fully_qualified_names; end
- # source://rbi//lib/rbi/index.rb#194
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/index.rb:194
sig { override.returns(T::Array[::String]) }
def index_ids; end
- # source://rbi//lib/rbi/model.rb#1054
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/model.rb:1100
sig { override.returns(::String) }
def to_s; end
end
# @abstract
#
-# source://rbi//lib/rbi/model.rb#1009
+# pkg:gem/rbi#lib/rbi/model.rb:1055
class RBI::TStructField < ::RBI::NodeWithComments
abstract!
- # @return [TStructField] a new instance of TStructField
- #
- # source://rbi//lib/rbi/model.rb#1020
+ # pkg:gem/rbi#lib/rbi/model.rb:1066
sig do
params(
name: ::String,
type: T.any(::RBI::Type, ::String),
default: T.nilable(::String),
loc: T.nilable(::RBI::Loc),
- comments: T::Array[::RBI::Comment]
+ comments: T.nilable(T::Array[::RBI::Comment])
).void
end
def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil)); end
- # @return [Boolean]
+ # @override
#
- # source://rbi//lib/rbi/rewriters/merge_trees.rb#524
+ # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:556
sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
def compatible_with?(other); end
- # source://rbi//lib/rbi/model.rb#1017
+ # pkg:gem/rbi#lib/rbi/model.rb:1063
sig { returns(T.nilable(::String)) }
def default; end
- # source://rbi//lib/rbi/model.rb#1017
+ # pkg:gem/rbi#lib/rbi/model.rb:1063
def default=(_arg0); end
# @abstract
- # @raise [NotImplementedError]
#
- # source://rbi//lib/rbi/model.rb#1029
+ # pkg:gem/rbi#lib/rbi/model.rb:1075
sig { abstract.returns(T::Array[::String]) }
def fully_qualified_names; end
- # source://rbi//lib/rbi/model.rb#1011
+ # pkg:gem/rbi#lib/rbi/model.rb:1057
sig { returns(::String) }
def name; end
- # source://rbi//lib/rbi/model.rb#1011
- def name=(_arg0); end
-
- # source://rbi//lib/rbi/model.rb#1014
+ # pkg:gem/rbi#lib/rbi/model.rb:1060
sig { returns(T.any(::RBI::Type, ::String)) }
def type; end
- # source://rbi//lib/rbi/model.rb#1014
+ # pkg:gem/rbi#lib/rbi/model.rb:1060
def type=(_arg0); end
end
-# source://rbi//lib/rbi/model.rb#1059
+# pkg:gem/rbi#lib/rbi/model.rb:1105
class RBI::TStructProp < ::RBI::TStructField
include ::RBI::Indexable
- # @return [TStructProp] a new instance of TStructProp
- #
- # source://rbi//lib/rbi/model.rb#1067
+ # pkg:gem/rbi#lib/rbi/model.rb:1113
sig do
params(
name: ::String,
type: T.any(::RBI::Type, ::String),
default: T.nilable(::String),
loc: T.nilable(::RBI::Loc),
- comments: T::Array[::RBI::Comment],
+ comments: T.nilable(T::Array[::RBI::Comment]),
block: T.nilable(T.proc.params(node: ::RBI::TStructProp).void)
).void
end
def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
- # @return [Boolean]
+ # @override
#
- # source://rbi//lib/rbi/rewriters/merge_trees.rb#540
+ # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:572
sig { override.params(other: ::RBI::Node).returns(T::Boolean) }
def compatible_with?(other); end
- # source://rbi//lib/rbi/model.rb#1074
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/model.rb:1120
sig { override.returns(T::Array[::String]) }
def fully_qualified_names; end
- # source://rbi//lib/rbi/index.rb#204
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/index.rb:204
sig { override.returns(T::Array[::String]) }
def index_ids; end
- # source://rbi//lib/rbi/model.rb#1081
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/model.rb:1127
sig { override.returns(::String) }
def to_s; end
end
-# source://rbi//lib/rbi/model.rb#108
+# pkg:gem/rbi#lib/rbi/model.rb:120
class RBI::Tree < ::RBI::NodeWithComments
- # @return [Tree] a new instance of Tree
- #
- # source://rbi//lib/rbi/model.rb#113
+ # pkg:gem/rbi#lib/rbi/model.rb:125
sig do
params(
loc: T.nilable(::RBI::Loc),
- comments: T::Array[::RBI::Comment],
+ comments: T.nilable(T::Array[::RBI::Comment]),
block: T.nilable(T.proc.params(node: ::RBI::Tree).void)
).void
end
def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
- # source://rbi//lib/rbi/model.rb#120
+ # pkg:gem/rbi#lib/rbi/model.rb:132
sig { params(node: ::RBI::Node).void }
def <<(node); end
- # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#63
+ # pkg:gem/rbi#lib/rbi/rewriters/add_sig_templates.rb:63
sig { params(with_todo_comment: T::Boolean).void }
def add_sig_templates!(with_todo_comment: T.unsafe(nil)); end
- # source://rbi//lib/rbi/rewriters/annotate.rb#46
+ # pkg:gem/rbi#lib/rbi/rewriters/annotate.rb:46
sig { params(annotation: ::String, annotate_scopes: T::Boolean, annotate_properties: T::Boolean).void }
def annotate!(annotation, annotate_scopes: T.unsafe(nil), annotate_properties: T.unsafe(nil)); end
- sig do
- params(
- name: ::String,
- superclass_name: T.nilable(::String),
- block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)
- ).returns(::RBI::Scope)
- end
- def create_class(name, superclass_name: T.unsafe(nil), &block); end
-
- sig { params(name: ::String, value: ::String).void }
- def create_constant(name, value:); end
-
- sig { params(name: ::String).void }
- def create_extend(name); end
-
- sig { params(name: ::String).void }
- def create_include(name); end
-
- sig do
- params(
- name: ::String,
- parameters: T::Array[::RBI::TypedParam],
- return_type: T.nilable(::String),
- class_method: T::Boolean,
- visibility: ::RBI::Visibility,
- comments: T::Array[::RBI::Comment],
- block: T.nilable(T.proc.params(node: ::RBI::Method).void)
- ).void
- end
- def create_method(name, parameters: T.unsafe(nil), return_type: T.unsafe(nil), class_method: T.unsafe(nil), visibility: T.unsafe(nil), comments: T.unsafe(nil), &block); end
-
- sig { params(name: ::String).void }
- def create_mixes_in_class_methods(name); end
-
- sig { params(name: ::String, block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)).returns(::RBI::Scope) }
- def create_module(name, &block); end
-
- sig { params(node: ::RBI::Node).returns(::RBI::Node) }
- def create_node(node); end
-
- sig { params(constant: ::Module, block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)).returns(::RBI::Scope) }
- def create_path(constant, &block); end
-
- sig do
- params(
- name: ::String,
- type: ::String,
- variance: ::Symbol,
- fixed: T.nilable(::String),
- upper: T.nilable(::String),
- lower: T.nilable(::String)
- ).void
- end
- def create_type_variable(name, type:, variance: T.unsafe(nil), fixed: T.unsafe(nil), upper: T.unsafe(nil), lower: T.unsafe(nil)); end
-
- # source://rbi//lib/rbi/rewriters/deannotate.rb#38
+ # pkg:gem/rbi#lib/rbi/rewriters/deannotate.rb:38
sig { params(annotation: ::String).void }
def deannotate!(annotation); end
- # @return [Boolean]
- #
- # source://rbi//lib/rbi/model.rb#126
+ # pkg:gem/rbi#lib/rbi/model.rb:138
sig { returns(T::Boolean) }
def empty?; end
- # source://rbi//lib/rbi/rewriters/filter_versions.rb#113
+ # pkg:gem/rbi#lib/rbi/rewriters/filter_versions.rb:113
sig { params(version: ::Gem::Version).void }
def filter_versions!(version); end
- # source://rbi//lib/rbi/rewriters/flatten_singleton_methods.rb#58
+ # pkg:gem/rbi#lib/rbi/rewriters/flatten_singleton_methods.rb:58
sig { void }
def flatten_singleton_methods!; end
- # source://rbi//lib/rbi/rewriters/flatten_visibilities.rb#57
+ # pkg:gem/rbi#lib/rbi/rewriters/flatten_visibilities.rb:57
sig { void }
def flatten_visibilities!; end
- # source://rbi//lib/rbi/rewriters/group_nodes.rb#78
+ # pkg:gem/rbi#lib/rbi/rewriters/group_nodes.rb:80
sig { void }
def group_nodes!; end
- # source://rbi//lib/rbi/index.rb#62
+ # pkg:gem/rbi#lib/rbi/index.rb:62
sig { returns(::RBI::Index) }
def index; end
- # source://rbi//lib/rbi/rewriters/merge_trees.rb#323
+ # pkg:gem/rbi#lib/rbi/rewriters/merge_trees.rb:336
sig do
params(
other: ::RBI::Tree,
@@ -3810,66 +3952,59 @@ class RBI::Tree < ::RBI::NodeWithComments
end
def merge(other, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end
- # source://rbi//lib/rbi/rewriters/nest_non_public_members.rb#43
+ # pkg:gem/rbi#lib/rbi/rewriters/nest_non_public_members.rb:52
sig { void }
def nest_non_public_members!; end
- # source://rbi//lib/rbi/rewriters/nest_singleton_methods.rb#33
+ # pkg:gem/rbi#lib/rbi/rewriters/nest_singleton_methods.rb:41
sig { void }
def nest_singleton_methods!; end
- # source://rbi//lib/rbi/rewriters/nest_top_level_members.rb#60
+ # pkg:gem/rbi#lib/rbi/rewriters/nest_top_level_members.rb:60
sig { void }
def nest_top_level_members!; end
- # source://rbi//lib/rbi/model.rb#110
+ # pkg:gem/rbi#lib/rbi/model.rb:122
sig { returns(T::Array[::RBI::Node]) }
def nodes; end
- sig { returns(T::Hash[::String, ::RBI::Node]) }
- def nodes_cache; end
-
- # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#50
+ # pkg:gem/rbi#lib/rbi/rewriters/attr_to_methods.rb:50
sig { void }
def replace_attributes_with_methods!; end
- # source://rbi//lib/rbi/rewriters/sort_nodes.rb#118
+ # pkg:gem/rbi#lib/rbi/rewriters/sort_nodes.rb:115
sig { void }
def sort_nodes!; end
- # source://rbi//lib/rbi/rewriters/translate_rbs_sigs.rb#82
+ # pkg:gem/rbi#lib/rbi/rewriters/translate_rbs_sigs.rb:88
sig { void }
def translate_rbs_sigs!; end
end
# The base class for all RBI types.
-#
# @abstract
#
-# source://rbi//lib/rbi/type.rb#7
+# pkg:gem/rbi#lib/rbi/type.rb:7
class RBI::Type
abstract!
- # @return [Type] a new instance of Type
- #
- # source://rbi//lib/rbi/type.rb#951
+ # pkg:gem/rbi#lib/rbi/type.rb:993
sig { void }
def initialize; end
# @abstract
- # @raise [NotImplementedError]
#
- # source://rbi//lib/rbi/type.rb#1022
+ # pkg:gem/rbi#lib/rbi/type.rb:1064
sig { abstract.params(other: ::BasicObject).returns(T::Boolean) }
def ==(other); end
- # @return [Boolean]
- #
- # source://rbi//lib/rbi/type.rb#1025
+ # pkg:gem/rbi#lib/rbi/type.rb:1067
sig { params(other: ::BasicObject).returns(T::Boolean) }
def eql?(other); end
- # source://rbi//lib/rbi/type.rb#1031
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:1073
sig { override.returns(::Integer) }
def hash; end
@@ -3879,19 +4014,17 @@ class RBI::Type
# ```ruby
# type = RBI::Type.simple("String")
# type.to_rbi # => "String"
- # type.nilable.to_rbi # => "T.nilable(String)"
- # type.nilable.nilable.to_rbi # => "T.nilable(String)"
+ # type.nilable.to_rbi # => "::T.nilable(String)"
+ # type.nilable.nilable.to_rbi # => "::T.nilable(String)"
# ```
#
- # source://rbi//lib/rbi/type.rb#965
+ # pkg:gem/rbi#lib/rbi/type.rb:1007
sig { returns(::RBI::Type) }
def nilable; end
# Returns whether the type is nilable.
#
- # @return [Boolean]
- #
- # source://rbi//lib/rbi/type.rb#992
+ # pkg:gem/rbi#lib/rbi/type.rb:1034
sig { returns(T::Boolean) }
def nilable?; end
@@ -3901,12 +4034,12 @@ class RBI::Type
#
# ```ruby
# type = RBI::Type.nilable(RBI::Type.simple("String"))
- # type.to_rbi # => "T.nilable(String)"
+ # type.to_rbi # => "::T.nilable(String)"
# type.non_nilable.to_rbi # => "String"
# type.non_nilable.non_nilable.to_rbi # => "String"
# ```
#
- # source://rbi//lib/rbi/type.rb#980
+ # pkg:gem/rbi#lib/rbi/type.rb:1022
sig { returns(::RBI::Type) }
def non_nilable; end
@@ -3918,15 +4051,13 @@ class RBI::Type
#
# This is the inverse of `#simplify`.
#
- #
# @abstract
- # @raise [NotImplementedError]
#
- # source://rbi//lib/rbi/type.rb#1006
+ # pkg:gem/rbi#lib/rbi/type.rb:1048
sig { abstract.returns(::RBI::Type) }
def normalize; end
- # source://rbi//lib/rbi/rbs_printer.rb#1242
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1266
sig { returns(::String) }
def rbs_string; end
@@ -3938,22 +4069,21 @@ class RBI::Type
#
# This is the inverse of `#normalize`.
#
- #
# @abstract
- # @raise [NotImplementedError]
#
- # source://rbi//lib/rbi/type.rb#1018
+ # pkg:gem/rbi#lib/rbi/type.rb:1060
sig { abstract.returns(::RBI::Type) }
def simplify; end
# @abstract
- # @raise [NotImplementedError]
#
- # source://rbi//lib/rbi/type.rb#1037
+ # pkg:gem/rbi#lib/rbi/type.rb:1079
sig { abstract.returns(::String) }
def to_rbi; end
- # source://rbi//lib/rbi/type.rb#1041
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:1083
sig { override.returns(::String) }
def to_s; end
@@ -3963,7 +4093,7 @@ class RBI::Type
# Note that this method transforms types such as `T.all(String, String)` into `String`, so
# it may return something other than a `All`.
#
- # source://rbi//lib/rbi/type.rb#887
+ # pkg:gem/rbi#lib/rbi/type.rb:929
sig { params(type1: ::RBI::Type, type2: ::RBI::Type, types: ::RBI::Type).returns(::RBI::Type) }
def all(type1, type2, *types); end
@@ -3972,37 +4102,37 @@ class RBI::Type
# Note that this method transforms types such as `T.any(String, NilClass)` into `T.nilable(String)`, so
# it may return something other than a `Any`.
#
- # source://rbi//lib/rbi/type.rb#896
+ # pkg:gem/rbi#lib/rbi/type.rb:938
sig { params(type1: ::RBI::Type, type2: ::RBI::Type, types: ::RBI::Type).returns(::RBI::Type) }
def any(type1, type2, *types); end
# Builds a type that represents `T.anything`.
#
- # source://rbi//lib/rbi/type.rb#818
+ # pkg:gem/rbi#lib/rbi/type.rb:854
sig { returns(::RBI::Type::Anything) }
def anything; end
# Builds a type that represents `T.attached_class`.
#
- # source://rbi//lib/rbi/type.rb#824
+ # pkg:gem/rbi#lib/rbi/type.rb:860
sig { returns(::RBI::Type::AttachedClass) }
def attached_class; end
# Builds a type that represents `T::Boolean`.
#
- # source://rbi//lib/rbi/type.rb#830
+ # pkg:gem/rbi#lib/rbi/type.rb:866
sig { returns(::RBI::Type::Boolean) }
def boolean; end
# Builds a type that represents the singleton class of another type like `T.class_of(Foo)`.
#
- # source://rbi//lib/rbi/type.rb#868
+ # pkg:gem/rbi#lib/rbi/type.rb:910
sig { params(type: ::RBI::Type::Simple, type_parameter: T.nilable(::RBI::Type)).returns(::RBI::Type::ClassOf) }
def class_of(type, type_parameter = T.unsafe(nil)); end
# Builds a type that represents a generic type like `T::Array[String]` or `T::Hash[Symbol, Integer]`.
#
- # source://rbi//lib/rbi/type.rb#904
+ # pkg:gem/rbi#lib/rbi/type.rb:946
sig { params(name: ::String, params: T.any(::RBI::Type, T::Array[::RBI::Type])).returns(::RBI::Type::Generic) }
def generic(name, *params); end
@@ -4011,41 +4141,39 @@ class RBI::Type
# Note that this method transforms types such as `T.nilable(T.untyped)` into `T.untyped`, so
# it may return something other than a `RBI::Type::Nilable`.
#
- # source://rbi//lib/rbi/type.rb#877
+ # pkg:gem/rbi#lib/rbi/type.rb:919
sig { params(type: ::RBI::Type).returns(::RBI::Type) }
def nilable(type); end
# Builds a type that represents `T.noreturn`.
#
- # source://rbi//lib/rbi/type.rb#836
+ # pkg:gem/rbi#lib/rbi/type.rb:872
sig { returns(::RBI::Type::NoReturn) }
def noreturn; end
- # source://rbi//lib/rbi/type_parser.rb#26
+ # pkg:gem/rbi#lib/rbi/type_parser.rb:26
sig { params(node: ::Prism::Node).returns(::RBI::Type) }
def parse_node(node); end
- # @raise [Error]
- #
- # source://rbi//lib/rbi/type_parser.rb#10
+ # pkg:gem/rbi#lib/rbi/type_parser.rb:10
sig { params(string: ::String).returns(::RBI::Type) }
def parse_string(string); end
# Builds a type that represents a proc type like `T.proc.void`.
#
- # source://rbi//lib/rbi/type.rb#938
+ # pkg:gem/rbi#lib/rbi/type.rb:980
sig { returns(::RBI::Type::Proc) }
def proc; end
# Builds a type that represents `T.self_type`.
#
- # source://rbi//lib/rbi/type.rb#842
+ # pkg:gem/rbi#lib/rbi/type.rb:878
sig { returns(::RBI::Type::SelfType) }
def self_type; end
# Builds a type that represents a shape type like `{name: String, age: Integer}`.
#
- # source://rbi//lib/rbi/type.rb#930
+ # pkg:gem/rbi#lib/rbi/type.rb:972
sig { params(types: T::Hash[T.any(::String, ::Symbol), ::RBI::Type]).returns(::RBI::Type::Shape) }
def shape(types = T.unsafe(nil)); end
@@ -4053,129 +4181,119 @@ class RBI::Type
#
# It raises a `NameError` if the name is not a valid Ruby class identifier.
#
- # @raise [NameError]
- #
- # source://rbi//lib/rbi/type.rb#807
+ # pkg:gem/rbi#lib/rbi/type.rb:843
sig { params(name: ::String).returns(::RBI::Type::Simple) }
def simple(name); end
# Builds a type that represents the class of another type like `T::Class[Foo]`.
#
- # source://rbi//lib/rbi/type.rb#862
+ # pkg:gem/rbi#lib/rbi/type.rb:898
sig { params(type: ::RBI::Type).returns(::RBI::Type::Class) }
def t_class(type); end
+ # Builds a type that represents the module of another type like `T::Module[Foo]`.
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:904
+ sig { params(type: ::RBI::Type).returns(::RBI::Type::Module) }
+ def t_module(type); end
+
# Builds a type that represents a tuple type like `[String, Integer]`.
#
- # source://rbi//lib/rbi/type.rb#924
+ # pkg:gem/rbi#lib/rbi/type.rb:966
sig { params(types: T.any(::RBI::Type, T::Array[::RBI::Type])).returns(::RBI::Type::Tuple) }
def tuple(*types); end
# Builds a type that represents a type alias like `MyTypeAlias`.
#
- # source://rbi//lib/rbi/type.rb#916
+ # pkg:gem/rbi#lib/rbi/type.rb:958
sig { params(name: ::String, aliased_type: ::RBI::Type).returns(::RBI::Type::TypeAlias) }
def type_alias(name, aliased_type); end
# Builds a type that represents a type parameter like `T.type_parameter(:U)`.
#
- # source://rbi//lib/rbi/type.rb#910
+ # pkg:gem/rbi#lib/rbi/type.rb:952
sig { params(name: ::Symbol).returns(::RBI::Type::TypeParameter) }
def type_parameter(name); end
# Builds a type that represents `T.untyped`.
#
- # source://rbi//lib/rbi/type.rb#848
+ # pkg:gem/rbi#lib/rbi/type.rb:884
sig { returns(::RBI::Type::Untyped) }
def untyped; end
# Builds a type that represents `void`.
#
- # source://rbi//lib/rbi/type.rb#854
+ # pkg:gem/rbi#lib/rbi/type.rb:890
sig { returns(::RBI::Type::Void) }
def void; end
private
- # source://rbi//lib/rbi/type_parser.rb#314
+ # pkg:gem/rbi#lib/rbi/type_parser.rb:322
sig { params(node: ::Prism::CallNode).returns(T::Array[::Prism::Node]) }
def call_chain(node); end
- # source://rbi//lib/rbi/type_parser.rb#301
+ # pkg:gem/rbi#lib/rbi/type_parser.rb:309
sig { params(node: ::Prism::CallNode, count: ::Integer).returns(T::Array[::Prism::Node]) }
def check_arguments_at_least!(node, count); end
- # source://rbi//lib/rbi/type_parser.rb#286
+ # pkg:gem/rbi#lib/rbi/type_parser.rb:294
sig { params(node: ::Prism::CallNode, count: ::Integer).returns(T::Array[::Prism::Node]) }
def check_arguments_exactly!(node, count); end
- # @raise [Error]
- #
- # source://rbi//lib/rbi/type_parser.rb#96
+ # pkg:gem/rbi#lib/rbi/type_parser.rb:96
sig { params(node: ::Prism::CallNode).returns(::RBI::Type) }
def parse_call(node); end
- # source://rbi//lib/rbi/type_parser.rb#56
+ # pkg:gem/rbi#lib/rbi/type_parser.rb:56
sig { params(node: T.any(::Prism::ConstantPathNode, ::Prism::ConstantReadNode)).returns(::RBI::Type) }
def parse_constant(node); end
- # source://rbi//lib/rbi/type_parser.rb#73
+ # pkg:gem/rbi#lib/rbi/type_parser.rb:73
sig { params(node: T.any(::Prism::ConstantPathWriteNode, ::Prism::ConstantWriteNode)).returns(::RBI::Type) }
def parse_constant_assignment(node); end
- # @raise [Error]
- #
- # source://rbi//lib/rbi/type_parser.rb#236
+ # pkg:gem/rbi#lib/rbi/type_parser.rb:244
sig { params(node: ::Prism::CallNode).returns(::RBI::Type) }
def parse_proc(node); end
- # source://rbi//lib/rbi/type_parser.rb#215
+ # pkg:gem/rbi#lib/rbi/type_parser.rb:223
sig { params(node: T.any(::Prism::HashNode, ::Prism::KeywordHashNode)).returns(::RBI::Type) }
def parse_shape(node); end
- # source://rbi//lib/rbi/type_parser.rb#210
+ # pkg:gem/rbi#lib/rbi/type_parser.rb:218
sig { params(node: ::Prism::ArrayNode).returns(::RBI::Type) }
def parse_tuple(node); end
- # @return [Boolean]
- #
- # source://rbi//lib/rbi/type_parser.rb#327
+ # pkg:gem/rbi#lib/rbi/type_parser.rb:335
sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) }
def t?(node); end
- # @return [Boolean]
- #
- # source://rbi//lib/rbi/type_parser.rb#346
+ # pkg:gem/rbi#lib/rbi/type_parser.rb:354
sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) }
def t_boolean?(node); end
- # @return [Boolean]
- #
- # source://rbi//lib/rbi/type_parser.rb#353
+ # pkg:gem/rbi#lib/rbi/type_parser.rb:361
sig { params(node: ::Prism::ConstantPathNode).returns(T::Boolean) }
def t_class?(node); end
- # @return [Boolean]
- #
- # source://rbi//lib/rbi/type_parser.rb#358
+ # pkg:gem/rbi#lib/rbi/type_parser.rb:371
sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) }
def t_class_of?(node); end
- # @return [Boolean]
- #
- # source://rbi//lib/rbi/type_parser.rb#365
+ # pkg:gem/rbi#lib/rbi/type_parser.rb:366
+ sig { params(node: ::Prism::ConstantPathNode).returns(T::Boolean) }
+ def t_module?(node); end
+
+ # pkg:gem/rbi#lib/rbi/type_parser.rb:378
sig { params(node: ::Prism::CallNode).returns(T::Boolean) }
def t_proc?(node); end
- # @return [Boolean]
- #
- # source://rbi//lib/rbi/type_parser.rb#339
+ # pkg:gem/rbi#lib/rbi/type_parser.rb:347
sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) }
def t_type_alias?(node); end
- # @return [Boolean]
- #
- # source://rbi//lib/rbi/type.rb#945
+ # pkg:gem/rbi#lib/rbi/type.rb:987
sig { params(name: ::String).returns(T::Boolean) }
def valid_identifier?(name); end
end
@@ -4183,389 +4301,511 @@ end
# A type that is intersection of multiple types like `T.all(String, Integer)`.
#
-# source://rbi//lib/rbi/type.rb#384
+# pkg:gem/rbi#lib/rbi/type.rb:420
class RBI::Type::All < ::RBI::Type::Composite
- # source://rbi//lib/rbi/type.rb#393
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:429
sig { override.returns(::RBI::Type) }
def normalize; end
- # source://rbi//lib/rbi/type.rb#413
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:449
sig { override.returns(::RBI::Type) }
def simplify; end
- # source://rbi//lib/rbi/type.rb#387
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:423
sig { override.returns(::String) }
def to_rbi; end
end
# A type that is union of multiple types like `T.any(String, Integer)`.
#
-# source://rbi//lib/rbi/type.rb#426
+# pkg:gem/rbi#lib/rbi/type.rb:462
class RBI::Type::Any < ::RBI::Type::Composite
- # @return [Boolean]
- #
- # source://rbi//lib/rbi/type.rb#434
+ # pkg:gem/rbi#lib/rbi/type.rb:470
sig { returns(T::Boolean) }
def nilable?; end
- # source://rbi//lib/rbi/type.rb#440
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:476
sig { override.returns(::RBI::Type) }
def normalize; end
- # source://rbi//lib/rbi/type.rb#460
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:496
sig { override.returns(::RBI::Type) }
def simplify; end
- # source://rbi//lib/rbi/type.rb#429
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:465
sig { override.returns(::String) }
def to_rbi; end
end
# `T.anything`.
#
-# source://rbi//lib/rbi/type.rb#51
+# pkg:gem/rbi#lib/rbi/type.rb:51
class RBI::Type::Anything < ::RBI::Type
- # source://rbi//lib/rbi/type.rb#54
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:54
sig { override.params(other: ::BasicObject).returns(T::Boolean) }
def ==(other); end
- # source://rbi//lib/rbi/type.rb#66
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:66
sig { override.returns(::RBI::Type) }
def normalize; end
- # source://rbi//lib/rbi/type.rb#72
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:72
sig { override.returns(::RBI::Type) }
def simplify; end
- # source://rbi//lib/rbi/type.rb#60
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:60
sig { override.returns(::String) }
def to_rbi; end
end
# `T.attached_class`.
#
-# source://rbi//lib/rbi/type.rb#78
+# pkg:gem/rbi#lib/rbi/type.rb:78
class RBI::Type::AttachedClass < ::RBI::Type
- # source://rbi//lib/rbi/type.rb#81
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:81
sig { override.params(other: ::BasicObject).returns(T::Boolean) }
def ==(other); end
- # source://rbi//lib/rbi/type.rb#93
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:93
sig { override.returns(::RBI::Type) }
def normalize; end
- # source://rbi//lib/rbi/type.rb#99
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:99
sig { override.returns(::RBI::Type) }
def simplify; end
- # source://rbi//lib/rbi/type.rb#87
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:87
sig { override.returns(::String) }
def to_rbi; end
end
# `T::Boolean`.
#
-# source://rbi//lib/rbi/type.rb#105
+# pkg:gem/rbi#lib/rbi/type.rb:105
class RBI::Type::Boolean < ::RBI::Type
- # source://rbi//lib/rbi/type.rb#108
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:108
sig { override.params(other: ::BasicObject).returns(T::Boolean) }
def ==(other); end
- # source://rbi//lib/rbi/type.rb#120
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:120
sig { override.returns(::RBI::Type) }
def normalize; end
- # source://rbi//lib/rbi/type.rb#126
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:126
sig { override.returns(::RBI::Type) }
def simplify; end
- # source://rbi//lib/rbi/type.rb#114
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:114
sig { override.returns(::String) }
def to_rbi; end
end
# The class of another type like `T::Class[Foo]`.
#
-# source://rbi//lib/rbi/type.rb#242
+# pkg:gem/rbi#lib/rbi/type.rb:242
class RBI::Type::Class < ::RBI::Type
- # @return [Class] a new instance of Class
- #
- # source://rbi//lib/rbi/type.rb#247
+ # pkg:gem/rbi#lib/rbi/type.rb:247
sig { params(type: ::RBI::Type).void }
def initialize(type); end
- # source://rbi//lib/rbi/type.rb#254
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:254
sig { override.params(other: ::BasicObject).returns(T::Boolean) }
def ==(other); end
- # source://rbi//lib/rbi/type.rb#266
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:266
sig { override.returns(::RBI::Type) }
def normalize; end
- # source://rbi//lib/rbi/type.rb#272
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:272
sig { override.returns(::RBI::Type) }
def simplify; end
- # source://rbi//lib/rbi/type.rb#260
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:260
sig { override.returns(::String) }
def to_rbi; end
- # source://rbi//lib/rbi/type.rb#244
+ # pkg:gem/rbi#lib/rbi/type.rb:244
sig { returns(::RBI::Type) }
def type; end
end
# The singleton class of another type like `T.class_of(Foo)`.
#
-# source://rbi//lib/rbi/type.rb#278
+# pkg:gem/rbi#lib/rbi/type.rb:314
class RBI::Type::ClassOf < ::RBI::Type
- # @return [ClassOf] a new instance of ClassOf
- #
- # source://rbi//lib/rbi/type.rb#286
+ # pkg:gem/rbi#lib/rbi/type.rb:322
sig { params(type: ::RBI::Type::Simple, type_parameter: T.nilable(::RBI::Type)).void }
def initialize(type, type_parameter = T.unsafe(nil)); end
- # source://rbi//lib/rbi/type.rb#294
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:330
sig { override.params(other: ::BasicObject).returns(T::Boolean) }
def ==(other); end
- # source://rbi//lib/rbi/type.rb#310
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:346
sig { override.returns(::RBI::Type) }
def normalize; end
- # source://rbi//lib/rbi/type.rb#316
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:352
sig { override.returns(::RBI::Type) }
def simplify; end
- # source://rbi//lib/rbi/type.rb#300
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:336
sig { override.returns(::String) }
def to_rbi; end
- # source://rbi//lib/rbi/type.rb#280
+ # pkg:gem/rbi#lib/rbi/type.rb:316
sig { returns(::RBI::Type::Simple) }
def type; end
- # source://rbi//lib/rbi/type.rb#283
+ # pkg:gem/rbi#lib/rbi/type.rb:319
sig { returns(T.nilable(::RBI::Type)) }
def type_parameter; end
end
# A type that is composed of multiple types like `T.all(String, Integer)`.
-#
# @abstract
#
-# source://rbi//lib/rbi/type.rb#366
+# pkg:gem/rbi#lib/rbi/type.rb:402
class RBI::Type::Composite < ::RBI::Type
abstract!
- # @return [Composite] a new instance of Composite
- #
- # source://rbi//lib/rbi/type.rb#371
+ # pkg:gem/rbi#lib/rbi/type.rb:407
sig { params(types: T::Array[::RBI::Type]).void }
def initialize(types); end
- # source://rbi//lib/rbi/type.rb#378
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:414
sig { override.params(other: ::BasicObject).returns(T::Boolean) }
def ==(other); end
- # source://rbi//lib/rbi/type.rb#368
+ # pkg:gem/rbi#lib/rbi/type.rb:404
sig { returns(T::Array[::RBI::Type]) }
def types; end
end
-# source://rbi//lib/rbi/type_parser.rb#6
+# pkg:gem/rbi#lib/rbi/type_parser.rb:6
class RBI::Type::Error < ::RBI::Error; end
# A generic type like `T::Array[String]` or `T::Hash[Symbol, Integer]`.
#
-# source://rbi//lib/rbi/type.rb#511
+# pkg:gem/rbi#lib/rbi/type.rb:547
class RBI::Type::Generic < ::RBI::Type
- # @return [Generic] a new instance of Generic
- #
- # source://rbi//lib/rbi/type.rb#519
+ # pkg:gem/rbi#lib/rbi/type.rb:555
sig { params(name: ::String, params: ::RBI::Type).void }
def initialize(name, *params); end
- # source://rbi//lib/rbi/type.rb#527
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:563
sig { override.params(other: ::BasicObject).returns(T::Boolean) }
def ==(other); end
- # source://rbi//lib/rbi/type.rb#513
+ # pkg:gem/rbi#lib/rbi/type.rb:549
sig { returns(::String) }
def name; end
- # source://rbi//lib/rbi/type.rb#539
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:575
sig { override.returns(::RBI::Type) }
def normalize; end
- # source://rbi//lib/rbi/type.rb#516
+ # pkg:gem/rbi#lib/rbi/type.rb:552
sig { returns(T::Array[::RBI::Type]) }
def params; end
- # source://rbi//lib/rbi/type.rb#545
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:581
+ sig { override.returns(::RBI::Type) }
+ def simplify; end
+
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:569
+ sig { override.returns(::String) }
+ def to_rbi; end
+end
+
+# The module of another type like `T::Module[Foo]`.
+#
+# pkg:gem/rbi#lib/rbi/type.rb:278
+class RBI::Type::Module < ::RBI::Type
+ # pkg:gem/rbi#lib/rbi/type.rb:283
+ sig { params(type: ::RBI::Type).void }
+ def initialize(type); end
+
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:290
+ sig { override.params(other: ::BasicObject).returns(T::Boolean) }
+ def ==(other); end
+
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:302
+ sig { override.returns(::RBI::Type) }
+ def normalize; end
+
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:308
sig { override.returns(::RBI::Type) }
def simplify; end
- # source://rbi//lib/rbi/type.rb#533
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:296
sig { override.returns(::String) }
def to_rbi; end
+
+ # pkg:gem/rbi#lib/rbi/type.rb:280
+ sig { returns(::RBI::Type) }
+ def type; end
end
# A type that can be `nil` like `T.nilable(String)`.
#
-# source://rbi//lib/rbi/type.rb#322
+# pkg:gem/rbi#lib/rbi/type.rb:358
class RBI::Type::Nilable < ::RBI::Type
- # @return [Nilable] a new instance of Nilable
- #
- # source://rbi//lib/rbi/type.rb#327
+ # pkg:gem/rbi#lib/rbi/type.rb:363
sig { params(type: ::RBI::Type).void }
def initialize(type); end
- # source://rbi//lib/rbi/type.rb#334
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:370
sig { override.params(other: ::BasicObject).returns(T::Boolean) }
def ==(other); end
- # source://rbi//lib/rbi/type.rb#346
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:382
sig { override.returns(::RBI::Type) }
def normalize; end
- # source://rbi//lib/rbi/type.rb#352
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:388
sig { override.returns(::RBI::Type) }
def simplify; end
- # source://rbi//lib/rbi/type.rb#340
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:376
sig { override.returns(::String) }
def to_rbi; end
- # source://rbi//lib/rbi/type.rb#324
+ # pkg:gem/rbi#lib/rbi/type.rb:360
sig { returns(::RBI::Type) }
def type; end
end
# `T.noreturn`.
#
-# source://rbi//lib/rbi/type.rb#132
+# pkg:gem/rbi#lib/rbi/type.rb:132
class RBI::Type::NoReturn < ::RBI::Type
- # source://rbi//lib/rbi/type.rb#135
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:135
sig { override.params(other: ::BasicObject).returns(T::Boolean) }
def ==(other); end
- # source://rbi//lib/rbi/type.rb#147
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:147
sig { override.returns(::RBI::Type) }
def normalize; end
- # source://rbi//lib/rbi/type.rb#153
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:153
sig { override.returns(::RBI::Type) }
def simplify; end
- # source://rbi//lib/rbi/type.rb#141
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:141
sig { override.returns(::String) }
def to_rbi; end
end
# A proc type like `T.proc.void`.
#
-# source://rbi//lib/rbi/type.rb#707
+# pkg:gem/rbi#lib/rbi/type.rb:743
class RBI::Type::Proc < ::RBI::Type
- # @return [Proc] a new instance of Proc
- #
- # source://rbi//lib/rbi/type.rb#718
+ # pkg:gem/rbi#lib/rbi/type.rb:754
sig { void }
def initialize; end
- # source://rbi//lib/rbi/type.rb#727
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:763
sig { override.params(other: ::BasicObject).returns(T::Boolean) }
def ==(other); end
- # source://rbi//lib/rbi/type.rb#755
+ # pkg:gem/rbi#lib/rbi/type.rb:791
sig { params(type: T.untyped).returns(T.self_type) }
def bind(type); end
- # source://rbi//lib/rbi/type.rb#787
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:823
sig { override.returns(::RBI::Type) }
def normalize; end
- # source://rbi//lib/rbi/type.rb#737
+ # pkg:gem/rbi#lib/rbi/type.rb:773
sig { params(params: ::RBI::Type).returns(T.self_type) }
def params(**params); end
- # source://rbi//lib/rbi/type.rb#715
+ # pkg:gem/rbi#lib/rbi/type.rb:751
sig { returns(T.nilable(::RBI::Type)) }
def proc_bind; end
- # source://rbi//lib/rbi/type.rb#709
+ # pkg:gem/rbi#lib/rbi/type.rb:745
sig { returns(T::Hash[::Symbol, ::RBI::Type]) }
def proc_params; end
- # source://rbi//lib/rbi/type.rb#712
+ # pkg:gem/rbi#lib/rbi/type.rb:748
sig { returns(::RBI::Type) }
def proc_returns; end
- # source://rbi//lib/rbi/type.rb#743
+ # pkg:gem/rbi#lib/rbi/type.rb:779
sig { params(type: T.untyped).returns(T.self_type) }
def returns(type); end
- # source://rbi//lib/rbi/type.rb#793
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:829
sig { override.returns(::RBI::Type) }
def simplify; end
- # source://rbi//lib/rbi/type.rb#762
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:798
sig { override.returns(::String) }
def to_rbi; end
- # source://rbi//lib/rbi/type.rb#749
+ # pkg:gem/rbi#lib/rbi/type.rb:785
sig { returns(T.self_type) }
def void; end
end
# `T.self_type`.
#
-# source://rbi//lib/rbi/type.rb#159
+# pkg:gem/rbi#lib/rbi/type.rb:159
class RBI::Type::SelfType < ::RBI::Type
- # source://rbi//lib/rbi/type.rb#162
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:162
sig { override.params(other: ::BasicObject).returns(T::Boolean) }
def ==(other); end
- # source://rbi//lib/rbi/type.rb#174
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:174
sig { override.returns(::RBI::Type) }
def normalize; end
- # source://rbi//lib/rbi/type.rb#180
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:180
sig { override.returns(::RBI::Type) }
def simplify; end
- # source://rbi//lib/rbi/type.rb#168
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:168
sig { override.returns(::String) }
def to_rbi; end
end
# A shape type like `{name: String, age: Integer}`.
#
-# source://rbi//lib/rbi/type.rb#665
+# pkg:gem/rbi#lib/rbi/type.rb:701
class RBI::Type::Shape < ::RBI::Type
- # @return [Shape] a new instance of Shape
- #
- # source://rbi//lib/rbi/type.rb#670
+ # pkg:gem/rbi#lib/rbi/type.rb:706
sig { params(types: T::Hash[T.any(::String, ::Symbol), ::RBI::Type]).void }
def initialize(types); end
- # source://rbi//lib/rbi/type.rb#677
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:713
sig { override.params(other: ::BasicObject).returns(T::Boolean) }
def ==(other); end
- # source://rbi//lib/rbi/type.rb#693
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:729
sig { override.returns(::RBI::Type) }
def normalize; end
- # source://rbi//lib/rbi/type.rb#699
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:735
sig { override.returns(::RBI::Type) }
def simplify; end
- # source://rbi//lib/rbi/type.rb#683
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:719
sig { override.returns(::String) }
def to_rbi; end
- # source://rbi//lib/rbi/type.rb#667
+ # pkg:gem/rbi#lib/rbi/type.rb:703
sig { returns(T::Hash[T.any(::String, ::Symbol), ::RBI::Type]) }
def types; end
end
@@ -4574,676 +4814,706 @@ end
#
# It can also be a qualified name like `::Foo` or `Foo::Bar`.
#
-# source://rbi//lib/rbi/type.rb#13
+# pkg:gem/rbi#lib/rbi/type.rb:13
class RBI::Type::Simple < ::RBI::Type
- # @return [Simple] a new instance of Simple
- #
- # source://rbi//lib/rbi/type.rb#18
+ # pkg:gem/rbi#lib/rbi/type.rb:18
sig { params(name: ::String).void }
def initialize(name); end
- # source://rbi//lib/rbi/type.rb#25
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:25
sig { override.params(other: ::BasicObject).returns(T::Boolean) }
def ==(other); end
- # source://rbi//lib/rbi/type.rb#15
+ # pkg:gem/rbi#lib/rbi/type.rb:15
sig { returns(::String) }
def name; end
- # source://rbi//lib/rbi/type.rb#37
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:37
sig { override.returns(::RBI::Type) }
def normalize; end
- # source://rbi//lib/rbi/type.rb#43
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:43
sig { override.returns(::RBI::Type) }
def simplify; end
- # source://rbi//lib/rbi/type.rb#31
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:31
sig { override.returns(::String) }
def to_rbi; end
end
# A tuple type like `[String, Integer]`.
#
-# source://rbi//lib/rbi/type.rb#629
+# pkg:gem/rbi#lib/rbi/type.rb:665
class RBI::Type::Tuple < ::RBI::Type
- # @return [Tuple] a new instance of Tuple
- #
- # source://rbi//lib/rbi/type.rb#634
+ # pkg:gem/rbi#lib/rbi/type.rb:670
sig { params(types: T::Array[::RBI::Type]).void }
def initialize(types); end
- # source://rbi//lib/rbi/type.rb#641
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:677
sig { override.params(other: ::BasicObject).returns(T::Boolean) }
def ==(other); end
- # source://rbi//lib/rbi/type.rb#653
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:689
sig { override.returns(::RBI::Type) }
def normalize; end
- # source://rbi//lib/rbi/type.rb#659
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:695
sig { override.returns(::RBI::Type) }
def simplify; end
- # source://rbi//lib/rbi/type.rb#647
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:683
sig { override.returns(::String) }
def to_rbi; end
- # source://rbi//lib/rbi/type.rb#631
+ # pkg:gem/rbi#lib/rbi/type.rb:667
sig { returns(T::Array[::RBI::Type]) }
def types; end
end
# A type alias that references another type by name like `MyTypeAlias`.
#
-# source://rbi//lib/rbi/type.rb#587
+# pkg:gem/rbi#lib/rbi/type.rb:623
class RBI::Type::TypeAlias < ::RBI::Type
- # @return [TypeAlias] a new instance of TypeAlias
- #
- # source://rbi//lib/rbi/type.rb#595
+ # pkg:gem/rbi#lib/rbi/type.rb:631
sig { params(name: ::String, aliased_type: ::RBI::Type).void }
def initialize(name, aliased_type); end
- # source://rbi//lib/rbi/type.rb#603
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:639
sig { override.params(other: ::BasicObject).returns(T::Boolean) }
def ==(other); end
- # source://rbi//lib/rbi/type.rb#592
+ # pkg:gem/rbi#lib/rbi/type.rb:628
sig { returns(::RBI::Type) }
def aliased_type; end
- # source://rbi//lib/rbi/type.rb#589
+ # pkg:gem/rbi#lib/rbi/type.rb:625
sig { returns(::String) }
def name; end
- # source://rbi//lib/rbi/type.rb#615
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:651
sig { override.returns(::RBI::Type) }
def normalize; end
- # source://rbi//lib/rbi/type.rb#621
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:657
sig { override.returns(::RBI::Type) }
def simplify; end
- # source://rbi//lib/rbi/type.rb#609
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:645
sig { override.returns(::String) }
def to_rbi; end
end
# A type parameter like `T.type_parameter(:U)`.
#
-# source://rbi//lib/rbi/type.rb#551
+# pkg:gem/rbi#lib/rbi/type.rb:587
class RBI::Type::TypeParameter < ::RBI::Type
- # @return [TypeParameter] a new instance of TypeParameter
- #
- # source://rbi//lib/rbi/type.rb#556
+ # pkg:gem/rbi#lib/rbi/type.rb:592
sig { params(name: ::Symbol).void }
def initialize(name); end
- # source://rbi//lib/rbi/type.rb#563
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:599
sig { override.params(other: ::BasicObject).returns(T::Boolean) }
def ==(other); end
- # source://rbi//lib/rbi/type.rb#553
+ # pkg:gem/rbi#lib/rbi/type.rb:589
sig { returns(::Symbol) }
def name; end
- # source://rbi//lib/rbi/type.rb#575
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:611
sig { override.returns(::RBI::Type) }
def normalize; end
- # source://rbi//lib/rbi/type.rb#581
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:617
sig { override.returns(::RBI::Type) }
def simplify; end
- # source://rbi//lib/rbi/type.rb#569
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:605
sig { override.returns(::String) }
def to_rbi; end
end
# `T.untyped`.
#
-# source://rbi//lib/rbi/type.rb#186
+# pkg:gem/rbi#lib/rbi/type.rb:186
class RBI::Type::Untyped < ::RBI::Type
- # source://rbi//lib/rbi/type.rb#189
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:189
sig { override.params(other: ::BasicObject).returns(T::Boolean) }
def ==(other); end
- # source://rbi//lib/rbi/type.rb#201
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:201
sig { override.returns(::RBI::Type) }
def normalize; end
- # source://rbi//lib/rbi/type.rb#207
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:207
sig { override.returns(::RBI::Type) }
def simplify; end
- # source://rbi//lib/rbi/type.rb#195
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:195
sig { override.returns(::String) }
def to_rbi; end
end
-# source://rbi//lib/rbi/type_visitor.rb#6
+# pkg:gem/rbi#lib/rbi/type_visitor.rb:6
class RBI::Type::Visitor
- # source://rbi//lib/rbi/type_visitor.rb#10
+ # pkg:gem/rbi#lib/rbi/type_visitor.rb:10
sig { params(node: ::RBI::Type).void }
def visit(node); end
private
- # source://rbi//lib/rbi/type_visitor.rb#58
+ # pkg:gem/rbi#lib/rbi/type_visitor.rb:58
sig { params(type: ::RBI::Type::All).void }
def visit_all(type); end
- # source://rbi//lib/rbi/type_visitor.rb#61
+ # pkg:gem/rbi#lib/rbi/type_visitor.rb:61
sig { params(type: ::RBI::Type::Any).void }
def visit_any(type); end
- # source://rbi//lib/rbi/type_visitor.rb#64
+ # pkg:gem/rbi#lib/rbi/type_visitor.rb:64
sig { params(type: ::RBI::Type::Anything).void }
def visit_anything(type); end
- # source://rbi//lib/rbi/type_visitor.rb#67
+ # pkg:gem/rbi#lib/rbi/type_visitor.rb:67
sig { params(type: ::RBI::Type::AttachedClass).void }
def visit_attached_class(type); end
- # source://rbi//lib/rbi/type_visitor.rb#70
+ # pkg:gem/rbi#lib/rbi/type_visitor.rb:70
sig { params(type: ::RBI::Type::Boolean).void }
def visit_boolean(type); end
- # source://rbi//lib/rbi/type_visitor.rb#73
+ # pkg:gem/rbi#lib/rbi/type_visitor.rb:73
sig { params(type: ::RBI::Type::Class).void }
def visit_class(type); end
- # source://rbi//lib/rbi/type_visitor.rb#76
+ # pkg:gem/rbi#lib/rbi/type_visitor.rb:76
sig { params(type: ::RBI::Type::ClassOf).void }
def visit_class_of(type); end
- # source://rbi//lib/rbi/type_visitor.rb#79
+ # pkg:gem/rbi#lib/rbi/type_visitor.rb:79
sig { params(type: ::RBI::Type::Generic).void }
def visit_generic(type); end
- # source://rbi//lib/rbi/type_visitor.rb#82
+ # pkg:gem/rbi#lib/rbi/type_visitor.rb:82
sig { params(type: ::RBI::Type::Nilable).void }
def visit_nilable(type); end
- # source://rbi//lib/rbi/type_visitor.rb#88
+ # pkg:gem/rbi#lib/rbi/type_visitor.rb:88
sig { params(type: ::RBI::Type::NoReturn).void }
def visit_no_return(type); end
- # source://rbi//lib/rbi/type_visitor.rb#91
+ # pkg:gem/rbi#lib/rbi/type_visitor.rb:91
sig { params(type: ::RBI::Type::Proc).void }
def visit_proc(type); end
- # source://rbi//lib/rbi/type_visitor.rb#94
+ # pkg:gem/rbi#lib/rbi/type_visitor.rb:94
sig { params(type: ::RBI::Type::SelfType).void }
def visit_self_type(type); end
- # source://rbi//lib/rbi/type_visitor.rb#100
+ # pkg:gem/rbi#lib/rbi/type_visitor.rb:100
sig { params(type: ::RBI::Type::Shape).void }
def visit_shape(type); end
- # source://rbi//lib/rbi/type_visitor.rb#85
+ # pkg:gem/rbi#lib/rbi/type_visitor.rb:85
sig { params(type: ::RBI::Type::Simple).void }
def visit_simple(type); end
- # source://rbi//lib/rbi/type_visitor.rb#103
+ # pkg:gem/rbi#lib/rbi/type_visitor.rb:103
sig { params(type: ::RBI::Type::Tuple).void }
def visit_tuple(type); end
- # source://rbi//lib/rbi/type_visitor.rb#112
+ # pkg:gem/rbi#lib/rbi/type_visitor.rb:112
sig { params(type: ::RBI::Type::TypeAlias).void }
def visit_type_alias(type); end
- # source://rbi//lib/rbi/type_visitor.rb#106
+ # pkg:gem/rbi#lib/rbi/type_visitor.rb:106
sig { params(type: ::RBI::Type::TypeParameter).void }
def visit_type_parameter(type); end
- # source://rbi//lib/rbi/type_visitor.rb#109
+ # pkg:gem/rbi#lib/rbi/type_visitor.rb:109
sig { params(type: ::RBI::Type::Untyped).void }
def visit_untyped(type); end
- # source://rbi//lib/rbi/type_visitor.rb#97
+ # pkg:gem/rbi#lib/rbi/type_visitor.rb:97
sig { params(type: ::RBI::Type::Void).void }
def visit_void(type); end
end
-# source://rbi//lib/rbi/type_visitor.rb#7
+# pkg:gem/rbi#lib/rbi/type_visitor.rb:7
class RBI::Type::Visitor::Error < ::RBI::Error; end
# `void`.
#
-# source://rbi//lib/rbi/type.rb#213
+# pkg:gem/rbi#lib/rbi/type.rb:213
class RBI::Type::Void < ::RBI::Type
- # source://rbi//lib/rbi/type.rb#216
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:216
sig { override.params(other: ::BasicObject).returns(T::Boolean) }
def ==(other); end
- # source://rbi//lib/rbi/type.rb#228
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:228
sig { override.returns(::RBI::Type) }
def normalize; end
- # source://rbi//lib/rbi/type.rb#234
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:234
sig { override.returns(::RBI::Type) }
def simplify; end
- # source://rbi//lib/rbi/type.rb#222
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/type.rb:222
sig { override.returns(::String) }
def to_rbi; end
end
-# source://rbi//lib/rbi/model.rb#1159
+# pkg:gem/rbi#lib/rbi/model.rb:1205
class RBI::TypeMember < ::RBI::NodeWithComments
include ::RBI::Indexable
- # @return [TypeMember] a new instance of TypeMember
- #
- # source://rbi//lib/rbi/model.rb#1164
+ # pkg:gem/rbi#lib/rbi/model.rb:1210
sig do
params(
name: ::String,
value: ::String,
loc: T.nilable(::RBI::Loc),
- comments: T::Array[::RBI::Comment],
+ comments: T.nilable(T::Array[::RBI::Comment]),
block: T.nilable(T.proc.params(node: ::RBI::TypeMember).void)
).void
end
def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
- # source://rbi//lib/rbi/model.rb#1172
+ # pkg:gem/rbi#lib/rbi/model.rb:1218
sig { returns(::String) }
def fully_qualified_name; end
- # source://rbi//lib/rbi/index.rb#174
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/index.rb:174
sig { override.returns(T::Array[::String]) }
def index_ids; end
- # source://rbi//lib/rbi/model.rb#1161
+ # pkg:gem/rbi#lib/rbi/model.rb:1207
sig { returns(::String) }
def name; end
- # source://rbi//lib/rbi/model.rb#1180
+ # @override
+ #
+ # pkg:gem/rbi#lib/rbi/model.rb:1226
sig { override.returns(::String) }
def to_s; end
- # source://rbi//lib/rbi/model.rb#1161
+ # pkg:gem/rbi#lib/rbi/model.rb:1207
def value; end
end
-# source://rbi//lib/rbi/rbs_printer.rb#984
+# pkg:gem/rbi#lib/rbi/rbs_printer.rb:984
class RBI::TypePrinter
- # @return [TypePrinter] a new instance of TypePrinter
- #
- # source://rbi//lib/rbi/rbs_printer.rb#989
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:989
sig { params(max_line_length: T.nilable(::Integer)).void }
def initialize(max_line_length: T.unsafe(nil)); end
- # source://rbi//lib/rbi/rbs_printer.rb#986
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:986
sig { returns(::String) }
def string; end
- # source://rbi//lib/rbi/rbs_printer.rb#995
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:995
sig { params(node: ::RBI::Type).void }
def visit(node); end
- # source://rbi//lib/rbi/rbs_printer.rb#1110
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1117
sig { params(type: ::RBI::Type::All).void }
def visit_all(type); end
- # source://rbi//lib/rbi/rbs_printer.rb#1120
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1127
sig { params(type: ::RBI::Type::Any).void }
def visit_any(type); end
- # source://rbi//lib/rbi/rbs_printer.rb#1060
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1062
sig { params(type: ::RBI::Type::Anything).void }
def visit_anything(type); end
- # source://rbi//lib/rbi/rbs_printer.rb#1085
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1087
sig { params(type: ::RBI::Type::AttachedClass).void }
def visit_attached_class(type); end
- # source://rbi//lib/rbi/rbs_printer.rb#1044
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1046
sig { params(type: ::RBI::Type::Boolean).void }
def visit_boolean(type); end
- # source://rbi//lib/rbi/rbs_printer.rb#1187
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1194
sig { params(type: ::RBI::Type::Class).void }
def visit_class(type); end
- # source://rbi//lib/rbi/rbs_printer.rb#1103
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1105
sig { params(type: ::RBI::Type::ClassOf).void }
def visit_class_of(type); end
- # source://rbi//lib/rbi/rbs_printer.rb#1049
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1051
sig { params(type: ::RBI::Type::Generic).void }
def visit_generic(type); end
- # source://rbi//lib/rbi/rbs_printer.rb#1090
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1201
+ sig { params(type: ::RBI::Type::Module).void }
+ def visit_module(type); end
+
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1092
sig { params(type: ::RBI::Type::Nilable).void }
def visit_nilable(type); end
- # source://rbi//lib/rbi/rbs_printer.rb#1070
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1072
sig { params(type: ::RBI::Type::NoReturn).void }
def visit_no_return(type); end
- # source://rbi//lib/rbi/rbs_printer.rb#1160
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1167
sig { params(type: ::RBI::Type::Proc).void }
def visit_proc(type); end
- # source://rbi//lib/rbi/rbs_printer.rb#1080
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1082
sig { params(type: ::RBI::Type::SelfType).void }
def visit_self_type(type); end
- # source://rbi//lib/rbi/rbs_printer.rb#1140
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1147
sig { params(type: ::RBI::Type::Shape).void }
def visit_shape(type); end
- # source://rbi//lib/rbi/rbs_printer.rb#1039
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1041
sig { params(type: ::RBI::Type::Simple).void }
def visit_simple(type); end
- # source://rbi//lib/rbi/rbs_printer.rb#1130
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1137
sig { params(type: ::RBI::Type::Tuple).void }
def visit_tuple(type); end
- # source://rbi//lib/rbi/rbs_printer.rb#1182
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1189
sig { params(type: ::RBI::Type::TypeParameter).void }
def visit_type_parameter(type); end
- # source://rbi//lib/rbi/rbs_printer.rb#1075
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1077
sig { params(type: ::RBI::Type::Untyped).void }
def visit_untyped(type); end
- # source://rbi//lib/rbi/rbs_printer.rb#1065
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1067
sig { params(type: ::RBI::Type::Void).void }
def visit_void(type); end
private
- # source://rbi//lib/rbi/rbs_printer.rb#1196
+ # pkg:gem/rbi#lib/rbi/rbs_printer.rb:1210
sig { params(type_name: ::String).returns(::String) }
def translate_t_type(type_name); end
end
-# source://rbi//lib/rbi/rewriters/attr_to_methods.rb#5
+# pkg:gem/rbi#lib/rbi/rewriters/attr_to_methods.rb:5
class RBI::UnexpectedMultipleSigsError < ::RBI::Error
- # @return [UnexpectedMultipleSigsError] a new instance of UnexpectedMultipleSigsError
- #
- # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#10
+ # pkg:gem/rbi#lib/rbi/rewriters/attr_to_methods.rb:10
sig { params(node: ::RBI::Node).void }
def initialize(node); end
- # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#7
+ # pkg:gem/rbi#lib/rbi/rewriters/attr_to_methods.rb:7
sig { returns(::RBI::Node) }
def node; end
end
-# source://rbi//lib/rbi/parser.rb#18
+# pkg:gem/rbi#lib/rbi/parser.rb:18
class RBI::UnexpectedParserError < ::RBI::Error
- # @return [UnexpectedParserError] a new instance of UnexpectedParserError
- #
- # source://rbi//lib/rbi/parser.rb#23
+ # pkg:gem/rbi#lib/rbi/parser.rb:23
sig { params(parent_exception: ::Exception, last_location: ::RBI::Loc).void }
def initialize(parent_exception, last_location); end
- # source://rbi//lib/rbi/parser.rb#20
+ # pkg:gem/rbi#lib/rbi/parser.rb:20
sig { returns(::RBI::Loc) }
def last_location; end
- # source://rbi//lib/rbi/parser.rb#30
+ # pkg:gem/rbi#lib/rbi/parser.rb:30
sig { params(io: T.any(::IO, ::StringIO)).void }
def print_debug(io: T.unsafe(nil)); end
end
-# source://rbi//lib/rbi/version.rb#5
+# pkg:gem/rbi#lib/rbi/version.rb:5
RBI::VERSION = T.let(T.unsafe(nil), String)
# @abstract
#
-# source://rbi//lib/rbi/model.rb#743
+# pkg:gem/rbi#lib/rbi/model.rb:769
class RBI::Visibility < ::RBI::NodeWithComments
abstract!
- # @return [Visibility] a new instance of Visibility
- #
- # source://rbi//lib/rbi/model.rb#748
- sig { params(visibility: ::Symbol, loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void }
+ # pkg:gem/rbi#lib/rbi/model.rb:774
+ sig { params(visibility: ::Symbol, loc: T.nilable(::RBI::Loc), comments: T.nilable(T::Array[::RBI::Comment])).void }
def initialize(visibility, loc: T.unsafe(nil), comments: T.unsafe(nil)); end
- # source://rbi//lib/rbi/model.rb#754
+ # pkg:gem/rbi#lib/rbi/model.rb:780
sig { params(other: T.nilable(::Object)).returns(T::Boolean) }
def ==(other); end
- # @return [Boolean]
- #
- # source://rbi//lib/rbi/model.rb#771
+ # pkg:gem/rbi#lib/rbi/model.rb:797
sig { returns(T::Boolean) }
def private?; end
- # @return [Boolean]
- #
- # source://rbi//lib/rbi/model.rb#766
+ # pkg:gem/rbi#lib/rbi/model.rb:792
sig { returns(T::Boolean) }
def protected?; end
- # @return [Boolean]
- #
- # source://rbi//lib/rbi/model.rb#761
+ # pkg:gem/rbi#lib/rbi/model.rb:787
sig { returns(T::Boolean) }
def public?; end
- # source://rbi//lib/rbi/model.rb#745
+ # pkg:gem/rbi#lib/rbi/model.rb:771
sig { returns(::Symbol) }
def visibility; end
end
-# source://rbi//lib/rbi/rewriters/nest_non_public_members.rb#49
+# pkg:gem/rbi#lib/rbi/rewriters/nest_non_public_members.rb:58
class RBI::VisibilityGroup < ::RBI::Tree
- # @return [VisibilityGroup] a new instance of VisibilityGroup
- #
- # source://rbi//lib/rbi/rewriters/nest_non_public_members.rb#54
+ # pkg:gem/rbi#lib/rbi/rewriters/nest_non_public_members.rb:63
sig { params(visibility: ::RBI::Visibility).void }
def initialize(visibility); end
- # source://rbi//lib/rbi/rewriters/nest_non_public_members.rb#51
+ # pkg:gem/rbi#lib/rbi/rewriters/nest_non_public_members.rb:60
sig { returns(::RBI::Visibility) }
def visibility; end
end
# @abstract
#
-# source://rbi//lib/rbi/visitor.rb#8
+# pkg:gem/rbi#lib/rbi/visitor.rb:8
class RBI::Visitor
abstract!
- # source://rbi//lib/rbi/visitor.rb#10
+ # pkg:gem/rbi#lib/rbi/visitor.rb:10
sig { params(node: T.nilable(::RBI::Node)).void }
def visit(node); end
- # source://rbi//lib/rbi/visitor.rb#108
+ # pkg:gem/rbi#lib/rbi/visitor.rb:108
sig { params(nodes: T::Array[::RBI::Node]).void }
def visit_all(nodes); end
- # source://rbi//lib/rbi/visitor.rb#113
+ # pkg:gem/rbi#lib/rbi/visitor.rb:113
sig { params(file: ::RBI::File).void }
def visit_file(file); end
private
- # source://rbi//lib/rbi/visitor.rb#198
+ # pkg:gem/rbi#lib/rbi/visitor.rb:198
sig { params(node: ::RBI::Arg).void }
def visit_arg(node); end
- # source://rbi//lib/rbi/visitor.rb#147
+ # pkg:gem/rbi#lib/rbi/visitor.rb:147
sig { params(node: ::RBI::AttrAccessor).void }
def visit_attr_accessor(node); end
- # source://rbi//lib/rbi/visitor.rb#150
+ # pkg:gem/rbi#lib/rbi/visitor.rb:150
sig { params(node: ::RBI::AttrReader).void }
def visit_attr_reader(node); end
- # source://rbi//lib/rbi/visitor.rb#153
+ # pkg:gem/rbi#lib/rbi/visitor.rb:153
sig { params(node: ::RBI::AttrWriter).void }
def visit_attr_writer(node); end
- # source://rbi//lib/rbi/visitor.rb#126
+ # pkg:gem/rbi#lib/rbi/visitor.rb:126
sig { params(node: ::RBI::BlankLine).void }
def visit_blank_line(node); end
- # source://rbi//lib/rbi/visitor.rb#177
+ # pkg:gem/rbi#lib/rbi/visitor.rb:177
sig { params(node: ::RBI::BlockParam).void }
def visit_block_param(node); end
- # source://rbi//lib/rbi/visitor.rb#132
+ # pkg:gem/rbi#lib/rbi/visitor.rb:132
sig { params(node: ::RBI::Class).void }
def visit_class(node); end
- # source://rbi//lib/rbi/visitor.rb#120
+ # pkg:gem/rbi#lib/rbi/visitor.rb:120
sig { params(node: ::RBI::Comment).void }
def visit_comment(node); end
- # source://rbi//lib/rbi/visitor.rb#246
+ # pkg:gem/rbi#lib/rbi/visitor.rb:246
sig { params(node: ::RBI::ConflictTree).void }
def visit_conflict_tree(node); end
- # source://rbi//lib/rbi/visitor.rb#144
+ # pkg:gem/rbi#lib/rbi/visitor.rb:144
sig { params(node: ::RBI::Const).void }
def visit_const(node); end
- # source://rbi//lib/rbi/visitor.rb#183
+ # pkg:gem/rbi#lib/rbi/visitor.rb:183
sig { params(node: ::RBI::Extend).void }
def visit_extend(node); end
- # source://rbi//lib/rbi/visitor.rb#240
+ # pkg:gem/rbi#lib/rbi/visitor.rb:240
sig { params(node: ::RBI::Group).void }
def visit_group(node); end
- # source://rbi//lib/rbi/visitor.rb#228
+ # pkg:gem/rbi#lib/rbi/visitor.rb:228
sig { params(node: ::RBI::Helper).void }
def visit_helper(node); end
- # source://rbi//lib/rbi/visitor.rb#180
+ # pkg:gem/rbi#lib/rbi/visitor.rb:180
sig { params(node: ::RBI::Include).void }
def visit_include(node); end
- # source://rbi//lib/rbi/visitor.rb#201
+ # pkg:gem/rbi#lib/rbi/visitor.rb:201
sig { params(node: ::RBI::KwArg).void }
def visit_kw_arg(node); end
- # source://rbi//lib/rbi/visitor.rb#171
+ # pkg:gem/rbi#lib/rbi/visitor.rb:171
sig { params(node: ::RBI::KwOptParam).void }
def visit_kw_opt_param(node); end
- # source://rbi//lib/rbi/visitor.rb#168
+ # pkg:gem/rbi#lib/rbi/visitor.rb:168
sig { params(node: ::RBI::KwParam).void }
def visit_kw_param(node); end
- # source://rbi//lib/rbi/visitor.rb#174
+ # pkg:gem/rbi#lib/rbi/visitor.rb:174
sig { params(node: ::RBI::KwRestParam).void }
def visit_kw_rest_param(node); end
- # source://rbi//lib/rbi/visitor.rb#156
+ # pkg:gem/rbi#lib/rbi/visitor.rb:156
sig { params(node: ::RBI::Method).void }
def visit_method(node); end
- # source://rbi//lib/rbi/visitor.rb#234
+ # pkg:gem/rbi#lib/rbi/visitor.rb:234
sig { params(node: ::RBI::MixesInClassMethods).void }
def visit_mixes_in_class_methods(node); end
- # source://rbi//lib/rbi/visitor.rb#129
+ # pkg:gem/rbi#lib/rbi/visitor.rb:129
sig { params(node: ::RBI::Module).void }
def visit_module(node); end
- # source://rbi//lib/rbi/visitor.rb#162
+ # pkg:gem/rbi#lib/rbi/visitor.rb:162
sig { params(node: ::RBI::OptParam).void }
def visit_opt_param(node); end
- # source://rbi//lib/rbi/visitor.rb#192
+ # pkg:gem/rbi#lib/rbi/visitor.rb:192
sig { params(node: ::RBI::Private).void }
def visit_private(node); end
- # source://rbi//lib/rbi/visitor.rb#189
+ # pkg:gem/rbi#lib/rbi/visitor.rb:189
sig { params(node: ::RBI::Protected).void }
def visit_protected(node); end
- # source://rbi//lib/rbi/visitor.rb#186
+ # pkg:gem/rbi#lib/rbi/visitor.rb:186
sig { params(node: ::RBI::Public).void }
def visit_public(node); end
- # source://rbi//lib/rbi/visitor.rb#123
+ # pkg:gem/rbi#lib/rbi/visitor.rb:123
sig { params(node: ::RBI::RBSComment).void }
def visit_rbs_comment(node); end
- # source://rbi//lib/rbi/visitor.rb#159
+ # pkg:gem/rbi#lib/rbi/visitor.rb:159
sig { params(node: ::RBI::ReqParam).void }
def visit_req_param(node); end
- # source://rbi//lib/rbi/visitor.rb#237
+ # pkg:gem/rbi#lib/rbi/visitor.rb:237
sig { params(node: ::RBI::RequiresAncestor).void }
def visit_requires_ancestor(node); end
- # source://rbi//lib/rbi/visitor.rb#165
+ # pkg:gem/rbi#lib/rbi/visitor.rb:165
sig { params(node: ::RBI::RestParam).void }
def visit_rest_param(node); end
- # source://rbi//lib/rbi/visitor.rb#249
+ # pkg:gem/rbi#lib/rbi/visitor.rb:249
sig { params(node: ::RBI::ScopeConflict).void }
def visit_scope_conflict(node); end
- # source://rbi//lib/rbi/visitor.rb#195
+ # pkg:gem/rbi#lib/rbi/visitor.rb:195
sig { params(node: ::RBI::Send).void }
def visit_send(node); end
- # source://rbi//lib/rbi/visitor.rb#204
+ # pkg:gem/rbi#lib/rbi/visitor.rb:204
sig { params(node: ::RBI::Sig).void }
def visit_sig(node); end
- # source://rbi//lib/rbi/visitor.rb#207
+ # pkg:gem/rbi#lib/rbi/visitor.rb:207
sig { params(node: ::RBI::SigParam).void }
def visit_sig_param(node); end
- # source://rbi//lib/rbi/visitor.rb#135
+ # pkg:gem/rbi#lib/rbi/visitor.rb:135
sig { params(node: ::RBI::SingletonClass).void }
def visit_singleton_class(node); end
- # source://rbi//lib/rbi/visitor.rb#138
+ # pkg:gem/rbi#lib/rbi/visitor.rb:138
sig { params(node: ::RBI::Struct).void }
def visit_struct(node); end
- # source://rbi//lib/rbi/visitor.rb#219
+ # pkg:gem/rbi#lib/rbi/visitor.rb:219
sig { params(node: ::RBI::TEnum).void }
def visit_tenum(node); end
- # source://rbi//lib/rbi/visitor.rb#222
+ # pkg:gem/rbi#lib/rbi/visitor.rb:222
sig { params(node: ::RBI::TEnumBlock).void }
def visit_tenum_block(node); end
- # source://rbi//lib/rbi/visitor.rb#225
+ # pkg:gem/rbi#lib/rbi/visitor.rb:225
sig { params(node: ::RBI::TEnumValue).void }
def visit_tenum_value(node); end
- # source://rbi//lib/rbi/visitor.rb#141
+ # pkg:gem/rbi#lib/rbi/visitor.rb:141
sig { params(node: ::RBI::Tree).void }
def visit_tree(node); end
- # source://rbi//lib/rbi/visitor.rb#210
+ # pkg:gem/rbi#lib/rbi/visitor.rb:210
sig { params(node: ::RBI::TStruct).void }
def visit_tstruct(node); end
- # source://rbi//lib/rbi/visitor.rb#213
+ # pkg:gem/rbi#lib/rbi/visitor.rb:213
sig { params(node: ::RBI::TStructConst).void }
def visit_tstruct_const(node); end
- # source://rbi//lib/rbi/visitor.rb#216
+ # pkg:gem/rbi#lib/rbi/visitor.rb:216
sig { params(node: ::RBI::TStructProp).void }
def visit_tstruct_prop(node); end
- # source://rbi//lib/rbi/visitor.rb#231
+ # pkg:gem/rbi#lib/rbi/visitor.rb:231
sig { params(node: ::RBI::TypeMember).void }
def visit_type_member(node); end
- # source://rbi//lib/rbi/visitor.rb#243
+ # pkg:gem/rbi#lib/rbi/visitor.rb:243
sig { params(node: ::RBI::VisibilityGroup).void }
def visit_visibility_group(node); end
end
-# source://rbi//lib/rbi/visitor.rb#5
+# pkg:gem/rbi#lib/rbi/visitor.rb:5
class RBI::VisitorError < ::RBI::Error; end
diff --git a/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi b/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi
deleted file mode 100644
index ac59d98a..00000000
--- a/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi
+++ /dev/null
@@ -1,430 +0,0 @@
-# typed: true
-
-# DO NOT EDIT MANUALLY
-# This is an autogenerated file for types exported from the `yard-sorbet` gem.
-# Please instead update this file by running `bin/tapioca gem yard-sorbet`.
-
-
-class YARD::Handlers::Ruby::ClassHandler < ::YARD::Handlers::Ruby::Base
- include ::YARDSorbet::Handlers::StructClassHandler
-end
-
-# Types are documentation
-#
-# source://yard-sorbet//lib/yard-sorbet/version.rb#5
-module YARDSorbet; end
-
-# Extract & re-add directives to a docstring
-#
-# source://yard-sorbet//lib/yard-sorbet/directives.rb#6
-module YARDSorbet::Directives
- class << self
- # source://yard-sorbet//lib/yard-sorbet/directives.rb#21
- sig { params(docstring: ::String, directives: T::Array[::String]).void }
- def add_directives(docstring, directives); end
-
- # source://yard-sorbet//lib/yard-sorbet/directives.rb#10
- sig { params(docstring: T.nilable(::String)).returns([::YARD::Docstring, T::Array[::String]]) }
- def extract_directives(docstring); end
- end
-end
-
-# Custom YARD Handlers
-#
-# @see https://rubydoc.info/gems/yard/YARD/Handlers/Base YARD Base Handler documentation
-#
-# source://yard-sorbet//lib/yard-sorbet/handlers.rb#7
-module YARDSorbet::Handlers; end
-
-# Applies an `@abstract` tag to `abstract!`/`interface!` modules (if not alerady present).
-#
-# source://yard-sorbet//lib/yard-sorbet/handlers/abstract_dsl_handler.rb#7
-class YARDSorbet::Handlers::AbstractDSLHandler < ::YARD::Handlers::Ruby::Base
- # source://yard-sorbet//lib/yard-sorbet/handlers/abstract_dsl_handler.rb#21
- sig { void }
- def process; end
-end
-
-# Extra text for class namespaces
-#
-# source://yard-sorbet//lib/yard-sorbet/handlers/abstract_dsl_handler.rb#18
-YARDSorbet::Handlers::AbstractDSLHandler::CLASS_TAG_TEXT = T.let(T.unsafe(nil), String)
-
-# The text accompanying the `@abstract` tag.
-#
-# @see https://github.com/lsegal/yard/blob/main/templates/default/docstring/html/abstract.erb The `@abstract` tag template
-#
-# source://yard-sorbet//lib/yard-sorbet/handlers/abstract_dsl_handler.rb#16
-YARDSorbet::Handlers::AbstractDSLHandler::TAG_TEXT = T.let(T.unsafe(nil), String)
-
-# Handle `enums` calls, registering enum values as constants
-#
-# source://yard-sorbet//lib/yard-sorbet/handlers/enums_handler.rb#7
-class YARDSorbet::Handlers::EnumsHandler < ::YARD::Handlers::Ruby::Base
- # source://yard-sorbet//lib/yard-sorbet/handlers/enums_handler.rb#14
- sig { void }
- def process; end
-
- private
-
- # source://yard-sorbet//lib/yard-sorbet/handlers/enums_handler.rb#29
- sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Boolean) }
- def const_assign_node?(node); end
-end
-
-# Extends any modules included via `mixes_in_class_methods`
-#
-# @see https://sorbet.org/docs/abstract#interfaces-and-the-included-hook Sorbet `mixes_in_class_methods` documentation
-#
-# source://yard-sorbet//lib/yard-sorbet/handlers/include_handler.rb#9
-class YARDSorbet::Handlers::IncludeHandler < ::YARD::Handlers::Ruby::Base
- # source://yard-sorbet//lib/yard-sorbet/handlers/include_handler.rb#16
- sig { void }
- def process; end
-
- private
-
- # source://yard-sorbet//lib/yard-sorbet/handlers/include_handler.rb#28
- sig { returns(::YARD::CodeObjects::NamespaceObject) }
- def included_in; end
-end
-
-# Tracks modules that invoke `mixes_in_class_methods` for use in {IncludeHandler}
-#
-# @see https://sorbet.org/docs/abstract#interfaces-and-the-included-hook Sorbet `mixes_in_class_methods` documentation
-#
-# source://yard-sorbet//lib/yard-sorbet/handlers/mixes_in_class_methods_handler.rb#9
-class YARDSorbet::Handlers::MixesInClassMethodsHandler < ::YARD::Handlers::Ruby::Base
- # source://yard-sorbet//lib/yard-sorbet/handlers/mixes_in_class_methods_handler.rb#21
- sig { void }
- def process; end
-
- class << self
- # source://yard-sorbet//lib/yard-sorbet/handlers/mixes_in_class_methods_handler.rb#18
- sig { params(code_obj: ::String).returns(T.nilable(T::Array[::String])) }
- def mixed_in_class_methods(code_obj); end
- end
-end
-
-# A YARD Handler for Sorbet type declarations
-#
-# source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#7
-class YARDSorbet::Handlers::SigHandler < ::YARD::Handlers::Ruby::Base
- # Swap the method definition docstring and the sig docstring.
- # Parse relevant parts of the `sig` and include them as well.
- #
- # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#24
- sig { void }
- def process; end
-
- private
-
- # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#73
- sig { params(method_objects: T::Array[::YARD::CodeObjects::MethodObject]).void }
- def document_attrs(method_objects); end
-
- # An attr* sig can be merged into a previous attr* docstring if it is the only parameter passed to the attr*
- # declaration. This is to avoid needing to rewrite the source code to separate merged and unmerged attr*
- # declarations.
- #
- # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#60
- sig { params(attr_node: ::YARD::Parser::Ruby::MethodCallNode).returns(T::Boolean) }
- def merged_into_attr?(attr_node); end
-
- # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#76
- sig do
- params(
- attach_to: T.any(::YARD::CodeObjects::MethodObject, ::YARD::Parser::Ruby::MethodCallNode, ::YARD::Parser::Ruby::MethodDefinitionNode),
- docstring: T.nilable(::String),
- include_params: T::Boolean
- ).void
- end
- def parse_node(attach_to, docstring, include_params: T.unsafe(nil)); end
-
- # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#97
- sig { params(node: ::YARD::Parser::Ruby::AstNode, docstring: ::YARD::Docstring).void }
- def parse_params(node, docstring); end
-
- # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#107
- sig { params(node: ::YARD::Parser::Ruby::AstNode, docstring: ::YARD::Docstring).void }
- def parse_return(node, docstring); end
-
- # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#85
- sig { params(docstring: ::YARD::Docstring, include_params: T::Boolean).void }
- def parse_sig(docstring, include_params: T.unsafe(nil)); end
-
- # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#50
- sig { params(attr_node: ::YARD::Parser::Ruby::MethodCallNode).void }
- def process_attr(attr_node); end
-
- # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#36
- sig { params(def_node: ::YARD::Parser::Ruby::MethodDefinitionNode).void }
- def process_def(def_node); end
-end
-
-# YARD types that can have docstrings attached to them
-#
-# source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#14
-YARDSorbet::Handlers::SigHandler::Documentable = T.type_alias { T.any(::YARD::CodeObjects::MethodObject, ::YARD::Parser::Ruby::MethodCallNode, ::YARD::Parser::Ruby::MethodDefinitionNode) }
-
-# Class-level handler that folds all `const` and `prop` declarations into the constructor documentation
-# this needs to be injected as a module otherwise the default Class handler will overwrite documentation
-#
-# @note this module is included in `YARD::Handlers::Ruby::ClassHandler`
-#
-# source://yard-sorbet//lib/yard-sorbet/handlers/struct_class_handler.rb#10
-module YARDSorbet::Handlers::StructClassHandler
- # source://yard-sorbet//lib/yard-sorbet/handlers/struct_class_handler.rb#14
- sig { void }
- def process; end
-
- private
-
- # source://yard-sorbet//lib/yard-sorbet/handlers/struct_class_handler.rb#50
- sig do
- params(
- object: ::YARD::CodeObjects::MethodObject,
- props: T::Array[::YARDSorbet::TStructProp],
- docstring: ::YARD::Docstring,
- directives: T::Array[::String]
- ).void
- end
- def decorate_t_struct_init(object, props, docstring, directives); end
-
- # Create a virtual `initialize` method with all the `prop`/`const` arguments
- #
- # source://yard-sorbet//lib/yard-sorbet/handlers/struct_class_handler.rb#30
- sig { params(props: T::Array[::YARDSorbet::TStructProp], class_ns: ::YARD::CodeObjects::ClassObject).void }
- def process_t_struct_props(props, class_ns); end
-
- # source://yard-sorbet//lib/yard-sorbet/handlers/struct_class_handler.rb#60
- sig { params(props: T::Array[::YARDSorbet::TStructProp]).returns(T::Array[[::String, T.nilable(::String)]]) }
- def to_object_parameters(props); end
-end
-
-# Handles all `const`/`prop` calls, creating accessor methods, and compiles them for later usage at the class level
-# in creating a constructor
-#
-# source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#8
-class YARDSorbet::Handlers::StructPropHandler < ::YARD::Handlers::Ruby::Base
- # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#15
- sig { void }
- def process; end
-
- private
-
- # Add the source and docstring to the method object
- #
- # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#28
- sig { params(object: ::YARD::CodeObjects::MethodObject, prop: ::YARDSorbet::TStructProp).void }
- def decorate_object(object, prop); end
-
- # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#38
- sig { returns(T::Boolean) }
- def immutable?; end
-
- # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#42
- sig { params(kwd: ::String).returns(T.nilable(::String)) }
- def kw_arg(kwd); end
-
- # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#45
- sig { params(name: ::String).returns(::YARDSorbet::TStructProp) }
- def make_prop(name); end
-
- # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#56
- sig { returns(T::Array[::YARD::Parser::Ruby::AstNode]) }
- def params; end
-
- # Register the field explicitly as an attribute.
- #
- # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#60
- sig { params(object: ::YARD::CodeObjects::MethodObject, name: ::String).void }
- def register_attrs(object, name); end
-
- # Store the prop for use in the constructor definition
- #
- # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#68
- sig { params(prop: ::YARDSorbet::TStructProp).void }
- def update_state(prop); end
-end
-
-# Helper methods for working with `YARD` AST Nodes
-#
-# source://yard-sorbet//lib/yard-sorbet/node_utils.rb#6
-module YARDSorbet::NodeUtils
- class << self
- # Traverse AST nodes in breadth-first order
- #
- # @note This will skip over some node types.
- # @yield [YARD::Parser::Ruby::AstNode]
- #
- # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#21
- sig do
- params(
- node: ::YARD::Parser::Ruby::AstNode,
- _blk: T.proc.params(n: ::YARD::Parser::Ruby::AstNode).void
- ).void
- end
- def bfs_traverse(node, &_blk); end
-
- # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#31
- sig { params(node: ::YARD::Parser::Ruby::AstNode).void }
- def delete_node(node); end
-
- # Enqueue the eligible children of a node in the BFS queue
- #
- # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#35
- sig { params(queue: ::Thread::Queue, node: ::YARD::Parser::Ruby::AstNode).void }
- def enqueue_children(queue, node); end
-
- # Gets the node that a sorbet `sig` can be attached do, bypassing visisbility modifiers and the like
- #
- # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#48
- sig do
- params(
- node: ::YARD::Parser::Ruby::AstNode
- ).returns(T.any(::YARD::Parser::Ruby::MethodCallNode, ::YARD::Parser::Ruby::MethodDefinitionNode))
- end
- def get_method_node(node); end
-
- # Find and return the adjacent node (ascending)
- #
- # @raise [IndexError] if the node does not have an adjacent sibling (ascending)
- #
- # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#53
- sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(::YARD::Parser::Ruby::AstNode) }
- def sibling_node(node); end
-
- # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#60
- sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Boolean) }
- def sigable_node?(node); end
-
- # @see https://github.com/lsegal/yard/blob/main/lib/yard/handlers/ruby/attribute_handler.rb YARD::Handlers::Ruby::AttributeHandler.validated_attribute_names
- #
- # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#71
- sig { params(attr_node: ::YARD::Parser::Ruby::MethodCallNode).returns(T::Array[::String]) }
- def validated_attribute_names(attr_node); end
- end
-end
-
-# Command node types that can have type signatures
-#
-# source://yard-sorbet//lib/yard-sorbet/node_utils.rb#10
-YARDSorbet::NodeUtils::ATTRIBUTE_METHODS = T.let(T.unsafe(nil), Array)
-
-# Skip these method contents during BFS node traversal, they can have their own nested types via `T.Proc`
-#
-# source://yard-sorbet//lib/yard-sorbet/node_utils.rb#12
-YARDSorbet::NodeUtils::SKIP_METHOD_CONTENTS = T.let(T.unsafe(nil), Array)
-
-# Node types that can have type signatures
-#
-# source://yard-sorbet//lib/yard-sorbet/node_utils.rb#14
-YARDSorbet::NodeUtils::SigableNode = T.type_alias { T.any(::YARD::Parser::Ruby::MethodCallNode, ::YARD::Parser::Ruby::MethodDefinitionNode) }
-
-# Translate `sig` type syntax to `YARD` type syntax.
-#
-# source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#6
-module YARDSorbet::SigToYARD
- class << self
- # @see https://yardoc.org/types.html
- #
- # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#23
- sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Array[::String]) }
- def convert(node); end
-
- private
-
- # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#58
- sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(::String) }
- def build_generic_type(node); end
-
- # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#67
- sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Array[::String]) }
- def convert_aref(node); end
-
- # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#79
- sig { params(node: ::YARD::Parser::Ruby::AstNode).returns([::String]) }
- def convert_array(node); end
-
- # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#87
- sig { params(node: ::YARD::Parser::Ruby::AstNode).returns([::String]) }
- def convert_collection(node); end
-
- # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#94
- sig { params(node: ::YARD::Parser::Ruby::AstNode).returns([::String]) }
- def convert_hash(node); end
-
- # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#102
- sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Array[::String]) }
- def convert_list(node); end
-
- # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#28
- sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Array[::String]) }
- def convert_node(node); end
-
- # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#40
- sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Array[::String]) }
- def convert_node_type(node); end
-
- # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#107
- sig { params(node: ::YARD::Parser::Ruby::MethodCallNode).returns(T::Array[::String]) }
- def convert_t_method(node); end
-
- # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#118
- sig { params(node: ::YARD::Parser::Ruby::AstNode).returns([::String]) }
- def convert_unknown(node); end
- end
-end
-
-# Used to store the details of a `T::Struct` `prop` definition
-#
-# source://yard-sorbet//lib/yard-sorbet/t_struct_prop.rb#6
-class YARDSorbet::TStructProp < ::T::Struct
- const :default, T.nilable(::String)
- const :doc, ::String
- const :prop_name, ::String
- const :source, ::String
- const :types, T::Array[::String]
-end
-
-# Helper methods for working with `YARD` tags
-#
-# source://yard-sorbet//lib/yard-sorbet/tag_utils.rb#6
-module YARDSorbet::TagUtils
- class << self
- # source://yard-sorbet//lib/yard-sorbet/tag_utils.rb#16
- sig do
- params(
- docstring: ::YARD::Docstring,
- tag_name: ::String,
- name: T.nilable(::String)
- ).returns(T.nilable(::YARD::Tags::Tag))
- end
- def find_tag(docstring, tag_name, name); end
-
- # Create or update a `YARD` tag with type information
- #
- # source://yard-sorbet//lib/yard-sorbet/tag_utils.rb#28
- sig do
- params(
- docstring: ::YARD::Docstring,
- tag_name: ::String,
- types: T.nilable(T::Array[::String]),
- name: T.nilable(::String),
- text: ::String
- ).void
- end
- def upsert_tag(docstring, tag_name, types = T.unsafe(nil), name = T.unsafe(nil), text = T.unsafe(nil)); end
- end
-end
-
-# The `void` return type, as a constant to reduce array allocations
-#
-# source://yard-sorbet//lib/yard-sorbet/tag_utils.rb#10
-YARDSorbet::TagUtils::VOID_RETURN_TYPE = T.let(T.unsafe(nil), Array)
-
-# {https://rubygems.org/gems/yard-sorbet Version history}
-#
-# source://yard-sorbet//lib/yard-sorbet/version.rb#7
-YARDSorbet::VERSION = T.let(T.unsafe(nil), String)
diff --git a/sorbet/rbi/gems/yard@0.9.38.rbi b/sorbet/rbi/gems/yard@0.9.38.rbi
deleted file mode 100644
index 812cd367..00000000
--- a/sorbet/rbi/gems/yard@0.9.38.rbi
+++ /dev/null
@@ -1,18425 +0,0 @@
-# typed: true
-
-# DO NOT EDIT MANUALLY
-# This is an autogenerated file for types exported from the `yard` gem.
-# Please instead update this file by running `bin/tapioca gem yard`.
-
-
-# source://yard//lib/yard.rb#61
-::RUBY18 = T.let(T.unsafe(nil), FalseClass)
-
-# source://yard//lib/yard.rb#62
-::RUBY19 = T.let(T.unsafe(nil), TrueClass)
-
-# source://yard//lib/yard/core_ext/array.rb#2
-class Array
- include ::Enumerable
-
- # Places values before or after another object (by value) in
- # an array. This is used in tandem with the before and after
- # methods of the {Insertion} class.
- #
- # @example Places an item after another
- # [:a, :b, :c].place(:x).after(:a) # => [:a, :x, :b, :c]
- # @example Places an item before another
- # [1, 2, 3].place(4).before(3) # => [1, 2, 4, 3]
- # @param values [Array] value to insert
- # @return [Insertion] an insertion object to
- # @see Insertion#after
- # @see Insertion#before
- #
- # source://yard//lib/yard/core_ext/array.rb#15
- def place(*values); end
-end
-
-# source://yard//lib/yard/core_ext/file.rb#4
-class File < ::IO
- class << self
- # Cleans a path by removing extraneous '..', '.' and '/' characters
- #
- # @example Clean a path
- # File.cleanpath('a/b//./c/../e') # => "a/b/e"
- # @param path [String] the path to clean
- # @param rel_root [Boolean] allows relative path above root value
- # @return [String] the sanitized path
- #
- # source://yard//lib/yard/core_ext/file.rb#37
- def cleanpath(path, rel_root = T.unsafe(nil)); end
-
- # Forces opening a file (for writing) by first creating the file's directory
- #
- # @param file [String] the filename to open
- # @since 0.5.2
- #
- # source://yard//lib/yard/core_ext/file.rb#57
- def open!(file, *args, &block); end
-
- # Reads a file with binary encoding
- #
- # @return [String] the ascii-8bit encoded data
- # @since 0.5.3
- #
- # source://yard//lib/yard/core_ext/file.rb#66
- def read_binary(file); end
-
- # Turns a path +to+ into a relative path from starting
- # point +from+. The argument +from+ is assumed to be
- # a filename. To treat it as a directory, make sure it
- # ends in +File::SEPARATOR+ ('/' on UNIX filesystems).
- #
- # @param from [String] the starting filename
- # (or directory with +from_isdir+ set to +true+).
- # @param to [String] the final path that should be made relative.
- # @return [String] the relative path from +from+ to +to+.
- #
- # source://yard//lib/yard/core_ext/file.rb#19
- def relative_path(from, to); end
- end
-end
-
-# source://yard//lib/yard/core_ext/file.rb#5
-File::RELATIVE_PARENTDIR = T.let(T.unsafe(nil), String)
-
-# source://yard//lib/yard/core_ext/file.rb#6
-File::RELATIVE_SAMEDIR = T.let(T.unsafe(nil), String)
-
-# :stopdoc:
-#
-# source://yard//lib/yard/rubygems/backports/gem.rb#2
-module Gem
- class << self
- # Returns the Gem::SourceIndex of specifications that are in the Gem.path
- #
- # source://yard//lib/yard/rubygems/backports/gem.rb#6
- def source_index; end
- end
-end
-
-# Cache is an alias for SourceIndex to allow older YAMLized source index
-# objects to load properly.
-#
-# source://yard//lib/yard/rubygems/backports/source_index.rb#363
-Gem::Cache = Gem::SourceIndex
-
-# The SourceIndex object indexes all the gems available from a
-# particular source (e.g. a list of gem directories, or a remote
-# source). A SourceIndex maps a gem full name to a gem
-# specification.
-#
-# NOTE:: The class used to be named Cache, but that became
-# confusing when cached source fetchers where introduced. The
-# constant Gem::Cache is an alias for this class to allow old
-# YAMLized source index objects to load properly.
-#
-# source://yard//lib/yard/rubygems/backports/source_index.rb#21
-class Gem::SourceIndex
- include ::Enumerable
-
- # Constructs a source index instance from the provided specifications, which
- # is a Hash of gem full names and Gem::Specifications.
- # --
- # TODO merge @gems and @prerelease_gems and provide a separate method
- # #prerelease_gems
- #
- # @return [SourceIndex] a new instance of SourceIndex
- #
- # source://yard//lib/yard/rubygems/backports/source_index.rb#102
- def initialize(specifications = T.unsafe(nil)); end
-
- # source://yard//lib/yard/rubygems/backports/source_index.rb#348
- def ==(other); end
-
- # Add a gem specification to the source index.
- #
- # source://yard//lib/yard/rubygems/backports/source_index.rb#193
- def add_spec(gem_spec, name = T.unsafe(nil)); end
-
- # Add gem specifications to the source index.
- #
- # source://yard//lib/yard/rubygems/backports/source_index.rb#202
- def add_specs(*gem_specs); end
-
- # TODO: remove method
- #
- # source://yard//lib/yard/rubygems/backports/source_index.rb#109
- def all_gems; end
-
- # source://yard//lib/yard/rubygems/backports/source_index.rb#352
- def dump; end
-
- # Iterate over the specifications in the source index.
- #
- # source://yard//lib/yard/rubygems/backports/source_index.rb#218
- def each(&block); end
-
- # Find a gem by an exact match on the short name.
- #
- # source://yard//lib/yard/rubygems/backports/source_index.rb#256
- def find_name(gem_name, requirement = T.unsafe(nil)); end
-
- # The signature for the given gem specification.
- #
- # source://yard//lib/yard/rubygems/backports/source_index.rb#242
- def gem_signature(gem_full_name); end
-
- # source://yard//lib/yard/rubygems/backports/source_index.rb#34
- def gems; end
-
- # The signature for the source index. Changes in the signature indicate a
- # change in the index.
- #
- # source://yard//lib/yard/rubygems/backports/source_index.rb#233
- def index_signature; end
-
- # Returns an Array specifications for the latest released versions
- # of each gem in this index.
- #
- # source://yard//lib/yard/rubygems/backports/source_index.rb#143
- def latest_specs(include_prerelease = T.unsafe(nil)); end
-
- # source://yard//lib/yard/rubygems/backports/source_index.rb#251
- def length; end
-
- # Reconstruct the source index from the specifications in +spec_dirs+.
- #
- # source://yard//lib/yard/rubygems/backports/source_index.rb#124
- def load_gems_in(*spec_dirs); end
-
- # Returns an Array of Gem::Specifications that are not up to date.
- #
- # source://yard//lib/yard/rubygems/backports/source_index.rb#330
- def outdated; end
-
- # source://yard//lib/yard/rubygems/backports/source_index.rb#113
- def prerelease_gems; end
-
- # An array including only the prerelease gemspecs
- #
- # source://yard//lib/yard/rubygems/backports/source_index.rb#179
- def prerelease_specs; end
-
- # Replaces the gems in the source index from specifications in the
- # directories this source index was created from. Raises an exception if
- # this source index wasn't created from a directory (via from_gems_in or
- # from_installed_gems, or having spec_dirs set).
- #
- # source://yard//lib/yard/rubygems/backports/source_index.rb#322
- def refresh!; end
-
- # source://yard//lib/yard/rubygems/backports/source_index.rb#117
- def released_gems; end
-
- # An array including only the released gemspecs
- #
- # source://yard//lib/yard/rubygems/backports/source_index.rb#186
- def released_specs; end
-
- # Remove a gem specification named +full_name+.
- #
- # source://yard//lib/yard/rubygems/backports/source_index.rb#211
- def remove_spec(full_name); end
-
- # Search for a gem by Gem::Dependency +gem_pattern+. If +only_platform+
- # is true, only gems matching Gem::Platform.local will be returned. An
- # Array of matching Gem::Specification objects is returned.
- #
- # For backwards compatibility, a String or Regexp pattern may be passed as
- # +gem_pattern+, and a Gem::Requirement for +platform_only+. This
- # behavior is deprecated and will be removed.
- #
- # source://yard//lib/yard/rubygems/backports/source_index.rb#270
- def search(gem_pattern, platform_only = T.unsafe(nil)); end
-
- # source://yard//lib/yard/rubygems/backports/source_index.rb#248
- def size; end
-
- # Directories to use to refresh this SourceIndex when calling refresh!
- #
- # source://yard//lib/yard/rubygems/backports/source_index.rb#39
- def spec_dirs; end
-
- # Directories to use to refresh this SourceIndex when calling refresh!
- #
- # source://yard//lib/yard/rubygems/backports/source_index.rb#39
- def spec_dirs=(_arg0); end
-
- # The gem specification given a full gem spec name.
- #
- # source://yard//lib/yard/rubygems/backports/source_index.rb#225
- def specification(full_name); end
-
- class << self
- # Creates a new SourceIndex from the ruby format gem specifications in
- # +spec_dirs+.
- #
- # source://yard//lib/yard/rubygems/backports/source_index.rb#80
- def from_gems_in(*spec_dirs); end
-
- # Factory method to construct a source index instance for a given
- # path.
- #
- # deprecated::
- # If supplied, from_installed_gems will act just like
- # +from_gems_in+. This argument is deprecated and is provided
- # just for backwards compatibility, and should not generally
- # be used.
- #
- # return::
- # SourceIndex instance
- #
- # source://yard//lib/yard/rubygems/backports/source_index.rb#61
- def from_installed_gems(*deprecated); end
-
- # Returns a list of directories from Gem.path that contain specifications.
- #
- # source://yard//lib/yard/rubygems/backports/source_index.rb#72
- def installed_spec_directories; end
-
- # Loads a ruby-format specification from +file_name+ and returns the
- # loaded spec.
- #
- # source://yard//lib/yard/rubygems/backports/source_index.rb#90
- def load_specification(file_name); end
- end
-end
-
-# source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#17
-class IRB::SLex
- # @return [SLex] a new instance of SLex
- #
- # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#25
- def initialize; end
-
- # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#60
- def create(token, preproc = T.unsafe(nil), postproc = T.unsafe(nil)); end
-
- # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#29
- def def_rule(token, preproc = T.unsafe(nil), postproc = T.unsafe(nil), &block); end
-
- # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#36
- def def_rules(*tokens, &block); end
-
- # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#77
- def inspect; end
-
- # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#64
- def match(token); end
-
- # need a check?
- #
- # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#51
- def postproc(token); end
-
- # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#45
- def preproc(token, proc); end
-
- # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#56
- def search(token); end
-end
-
-# source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#18
-IRB::SLex::DOUT = T.let(T.unsafe(nil), IRB::Notifier::CompositeNotifier)
-
-# source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#20
-IRB::SLex::D_DEBUG = T.let(T.unsafe(nil), IRB::Notifier::LeveledNotifier)
-
-# source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#21
-IRB::SLex::D_DETAIL = T.let(T.unsafe(nil), IRB::Notifier::LeveledNotifier)
-
-# source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#19
-IRB::SLex::D_WARN = T.let(T.unsafe(nil), IRB::Notifier::LeveledNotifier)
-
-# ----------------------------------------------------------------------
-#
-# class Node -
-#
-# ----------------------------------------------------------------------
-#
-# source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#86
-class IRB::SLex::Node
- # if postproc is nil, this node is an abstract node.
- # if postproc is non-nil, this node is a real node.
- #
- # @return [Node] a new instance of Node
- #
- # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#89
- def initialize(preproc = T.unsafe(nil), postproc = T.unsafe(nil)); end
-
- # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#113
- def create_subnode(chrs, preproc = T.unsafe(nil), postproc = T.unsafe(nil)); end
-
- # chrs: String
- # character array
- # io must have getc()/ungetc(); and ungetc() must be
- # able to be called arbitrary number of times.
- #
- # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#161
- def match(chrs, op = T.unsafe(nil)); end
-
- # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#198
- def match_io(io, op = T.unsafe(nil)); end
-
- # Returns the value of attribute postproc.
- #
- # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#96
- def postproc; end
-
- # Sets the attribute postproc
- #
- # @param value the value to set the attribute postproc to.
- #
- # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#96
- def postproc=(_arg0); end
-
- # Returns the value of attribute preproc.
- #
- # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#95
- def preproc; end
-
- # Sets the attribute preproc
- #
- # @param value the value to set the attribute preproc to.
- #
- # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#95
- def preproc=(_arg0); end
-
- # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#98
- def search(chrs, opt = T.unsafe(nil)); end
-end
-
-# The Insertion class inserts a value before or after another
-# value in a list.
-#
-# @example
-# Insertion.new([1, 2, 3], 4).before(3) # => [1, 2, 4, 3]
-#
-# source://yard//lib/yard/core_ext/insertion.rb#7
-class Insertion
- # Creates an insertion object on a list with a value to be
- # inserted. To finalize the insertion, call {#before} or
- # {#after} on the object.
- #
- # @param list [Array] the list to perform the insertion on
- # @param value [Object] the value to insert
- # @return [Insertion] a new instance of Insertion
- #
- # source://yard//lib/yard/core_ext/insertion.rb#14
- def initialize(list, value); end
-
- # Inserts the value after +val+.
- #
- # @example If subsections are ignored
- # Insertion.new([1, [2], 3], :X).after(1) # => [1, [2], :X, 3]
- # @param recursive [Boolean] look inside sublists
- # @param val [Object] the object the value will be inserted after
- #
- # source://yard//lib/yard/core_ext/insertion.rb#30
- def after(val, recursive = T.unsafe(nil)); end
-
- # Alias for {#after} with +recursive+ set to true
- #
- # @since 0.6.0
- #
- # source://yard//lib/yard/core_ext/insertion.rb#38
- def after_any(val); end
-
- # Inserts the value before +val+
- #
- # @param recursive [Boolean] look inside sublists
- # @param val [Object] the object the value will be inserted before
- #
- # source://yard//lib/yard/core_ext/insertion.rb#22
- def before(val, recursive = T.unsafe(nil)); end
-
- # Alias for {#before} with +recursive+ set to true
- #
- # @since 0.6.0
- #
- # source://yard//lib/yard/core_ext/insertion.rb#34
- def before_any(val); end
-
- private
-
- # This method performs the actual insertion
- #
- # @param list [Array] the list to place objects into
- # @param recursive [Boolean] look inside sublists
- # @param rel [Fixnum] the relative index (0 or 1) of where the object
- # should be placed
- # @param val [Object] the value to insert
- #
- # source://yard//lib/yard/core_ext/insertion.rb#49
- def insertion(val, rel, recursive = T.unsafe(nil), list = T.unsafe(nil)); end
-end
-
-# source://yard//lib/yard/core_ext/module.rb#2
-class Module
- # Returns the class name of a full module namespace path
- #
- # @example
- # module A::B::C; class_name end # => "C"
- # @return [String] the last part of a module path
- #
- # source://yard//lib/yard/core_ext/module.rb#8
- def class_name; end
-end
-
-class Object < ::BasicObject
- include ::Kernel
- include ::PP::ObjectMixin
-
- private
-
- # source://yard//lib/yard/globals.rb#8
- def P(namespace, name = T.unsafe(nil), type = T.unsafe(nil)); end
-
- # source://yard//lib/yard/globals.rb#20
- def log; end
-end
-
-# Keep track of Ruby version for compatibility code
-#
-# @deprecated Use {YARD.ruby18?} or {YARD.ruby19?} instead.
-#
-# source://yard//lib/yard.rb#61
-RUBY18 = T.let(T.unsafe(nil), FalseClass)
-
-# source://yard//lib/yard.rb#62
-RUBY19 = T.let(T.unsafe(nil), TrueClass)
-
-# source://yard//lib/yard/core_ext/string.rb#2
-class String
- include ::Comparable
-
- # Splits text into tokens the way a shell would, handling quoted
- # text as a single token. Use '\"' and "\'" to escape quotes and
- # '\\' to escape a backslash.
- #
- # @return [Array] an array representing the tokens
- #
- # source://yard//lib/yard/core_ext/string.rb#8
- def shell_split; end
-end
-
-# A subclass of Hash where all keys are converted into Symbols, and
-# optionally, all String values are converted into Symbols.
-#
-# source://yard//lib/yard/core_ext/symbol_hash.rb#4
-class SymbolHash < ::Hash
- # Creates a new SymbolHash object
- #
- # @param symbolize_value [Boolean] converts any String values into Symbols
- # if this is set to +true+.
- # @return [SymbolHash] a new instance of SymbolHash
- #
- # source://yard//lib/yard/core_ext/symbol_hash.rb#9
- def initialize(symbolize_value = T.unsafe(nil)); end
-
- # Accessed a symbolized key
- #
- # @param key [#to_sym] the key to access
- # @return [Object] the value associated with the key
- #
- # source://yard//lib/yard/core_ext/symbol_hash.rb#49
- def [](key); end
-
- # Assigns a value to a symbolized key
- #
- # @param key [#to_sym] the key
- # @param value [Object] the value to be assigned. If this is a String and
- # values are set to be symbolized, it will be converted into a Symbol.
- #
- # source://yard//lib/yard/core_ext/symbol_hash.rb#42
- def []=(key, value); end
-
- # Deleted a key and value associated with it
- #
- # @param key [#to_sym] the key to delete
- # @return [void]
- #
- # source://yard//lib/yard/core_ext/symbol_hash.rb#54
- def delete(key); end
-
- # Tests if a symbolized key exists
- #
- # @param key [#to_sym] the key to test
- # @return [Boolean] whether the key exists
- #
- # source://yard//lib/yard/core_ext/symbol_hash.rb#60
- def has_key?(key); end
-
- # Tests if a symbolized key exists
- #
- # @param key [#to_sym] the key to test
- # @return [Boolean] whether the key exists
- #
- # source://yard//lib/yard/core_ext/symbol_hash.rb#59
- def key?(key); end
-
- # Merges the contents of another hash into a new SymbolHash object
- #
- # @param hash [Hash] the hash of objects to copy
- # @return [SymbolHash] a new SymbolHash containing the merged data
- #
- # source://yard//lib/yard/core_ext/symbol_hash.rb#74
- def merge(hash); end
-
- # Updates the object with the contents of another Hash object.
- # This method modifies the original SymbolHash object
- #
- # @param hash [Hash] the hash object to copy the values from
- # @return [SymbolHash] self
- #
- # source://yard//lib/yard/core_ext/symbol_hash.rb#68
- def merge!(hash); end
-
- # Updates the object with the contents of another Hash object.
- # This method modifies the original SymbolHash object
- #
- # @param hash [Hash] the hash object to copy the values from
- # @return [SymbolHash] self
- #
- # source://yard//lib/yard/core_ext/symbol_hash.rb#67
- def update(hash); end
-
- class << self
- # @overload []
- # @overload []
- #
- # source://yard//lib/yard/core_ext/symbol_hash.rb#28
- def [](*hsh); end
- end
-end
-
-# Gem::YARDoc provides methods to generate YARDoc and yri data for installed gems
-# upon gem installation.
-#
-# This file is automatically required by RubyGems 1.9 and newer.
-#
-# source://yard//lib/yard.rb#2
-module YARD
- class << self
- # Loads gems that match the name 'yard-*' (recommended) or 'yard_*' except
- # those listed in +~/.yard/ignored_plugins+. This is called immediately
- # after YARD is loaded to allow plugin support.
- #
- # @deprecated Use {Config.load_plugins}
- # @return [Boolean] true if all plugins loaded successfully, false otherwise.
- #
- # source://yard//lib/yard.rb#31
- def load_plugins; end
-
- # An alias to {Parser::SourceParser}'s parsing method
- #
- # @example Parse a glob of files
- # YARD.parse('lib/**/*.rb')
- # @see Parser::SourceParser.parse
- #
- # source://yard//lib/yard.rb#20
- def parse(*args); end
-
- # An alias to {Parser::SourceParser}'s parsing method
- #
- # @example Parse a string of input
- # YARD.parse_string('class Foo; end')
- # @see Parser::SourceParser.parse_string
- #
- # source://yard//lib/yard.rb#27
- def parse_string(*args); end
-
- # @return [Boolean] whether YARD is being run in Ruby 1.8 mode
- #
- # source://yard//lib/yard.rb#44
- def ruby18?; end
-
- # @return [Boolean] whether YARD is being run in Ruby 1.9 mode
- #
- # source://yard//lib/yard.rb#47
- def ruby19?; end
-
- # @return [Boolean] whether YARD is being run in Ruby 2.0
- #
- # source://yard//lib/yard.rb#50
- def ruby2?; end
-
- # @return [Boolean] whether YARD is being run in Ruby 3.1
- #
- # source://yard//lib/yard.rb#56
- def ruby31?; end
-
- # @return [Boolean] whether YARD is being run in Ruby 3.0
- #
- # source://yard//lib/yard.rb#53
- def ruby3?; end
-
- # @return [Boolean] whether YARD is being run inside of Windows
- #
- # source://yard//lib/yard.rb#34
- def windows?; end
- end
-end
-
-# Namespace for command-line interface components
-#
-# source://yard//lib/yard/autoload.rb#6
-module YARD::CLI; end
-
-# Abstract base class for CLI utilities. Provides some helper methods for
-# the option parser
-#
-# @abstract
-# @since 0.6.0
-#
-# source://yard//lib/yard/cli/command.rb#11
-class YARD::CLI::Command
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/command.rb#16
- def description; end
-
- protected
-
- # Adds a set of common options to the tail of the OptionParser
- #
- # @param opts [OptionParser] the option parser object
- # @return [void]
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/command.rb#24
- def common_options(opts); end
-
- # Loads a Ruby script. If Config.options[:safe_mode] is enabled,
- # this method will do nothing.
- #
- # @param file [String] the path to the script to load
- # @since 0.6.2
- #
- # source://yard//lib/yard/cli/command.rb#68
- def load_script(file); end
-
- # Parses the option and gracefully handles invalid switches
- #
- # @param args [Array] the arguments passed from input. This
- # array will be modified.
- # @param opts [OptionParser] the option parser object
- # @return [void]
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/command.rb#55
- def parse_options(opts, args); end
-
- # Callback when an unrecognize option is parsed
- #
- # @param err [OptionParser::ParseError] the exception raised by the
- # option parser
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/command.rb#80
- def unrecognized_option(err); end
-
- class << self
- # Helper method to run the utility on an instance.
- #
- # @see #run
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/command.rb#14
- def run(*args); end
- end
-end
-
-# This class parses a command name out of the +yard+ CLI command and calls
-# that command in the form:
-#
-# $ yard command_name [options]
-#
-# If no command or arguments are specified, or if the arguments immediately
-# begin with a +--opt+ (not +--help+), the {default_command} will be used
-# (which itself defaults to +:doc+).
-#
-# == Adding a Command
-#
-# To add a custom command via plugin, create a mapping in {commands} from
-# the Symbolic command name to the {Command} class that implements the
-# command. To implement a command, see the documentation for the {Command}
-# class.
-#
-# @see Command
-# @see commands
-# @see default_command
-#
-# source://yard//lib/yard/cli/command_parser.rb#23
-class YARD::CLI::CommandParser
- # @return [CommandParser] a new instance of CommandParser
- #
- # source://yard//lib/yard/cli/command_parser.rb#56
- def initialize; end
-
- # Runs the {Command} object matching the command name of the first
- # argument.
- #
- # @return [void]
- #
- # source://yard//lib/yard/cli/command_parser.rb#63
- def run(*args); end
-
- private
-
- # source://yard//lib/yard/cli/command_parser.rb#80
- def commands; end
-
- # source://yard//lib/yard/cli/command_parser.rb#82
- def list_commands; end
-
- class << self
- # @return [Hash{Symbol => Command}] the mapping of command names to
- # command classes to parse the user command.
- #
- # source://yard//lib/yard/cli/command_parser.rb#27
- def commands; end
-
- # @return [Hash{Symbol => Command}] the mapping of command names to
- # command classes to parse the user command.
- #
- # source://yard//lib/yard/cli/command_parser.rb#27
- def commands=(_arg0); end
-
- # @return [Symbol] the default command name to use when no options
- # are specified or
- #
- # source://yard//lib/yard/cli/command_parser.rb#31
- def default_command; end
-
- # @return [Symbol] the default command name to use when no options
- # are specified or
- #
- # source://yard//lib/yard/cli/command_parser.rb#31
- def default_command=(_arg0); end
-
- # Convenience method to create a new CommandParser and call {#run}
- #
- # @return [void]
- #
- # source://yard//lib/yard/cli/command_parser.rb#54
- def run(*args); end
- end
-end
-
-# CLI command to view or edit configuration options
-#
-# @since 0.6.2
-#
-# source://yard//lib/yard/cli/config.rb#6
-class YARD::CLI::Config < ::YARD::CLI::Command
- # @return [Config] a new instance of Config
- # @since 0.6.2
- #
- # source://yard//lib/yard/cli/config.rb#26
- def initialize; end
-
- # @return [Boolean] whether to append values to existing key
- # @since 0.6.2
- #
- # source://yard//lib/yard/cli/config.rb#20
- def append; end
-
- # @return [Boolean] whether to append values to existing key
- # @since 0.6.2
- #
- # source://yard//lib/yard/cli/config.rb#20
- def append=(_arg0); end
-
- # @return [Boolean] whether the value being set should be inside a list
- # @since 0.6.2
- #
- # source://yard//lib/yard/cli/config.rb#17
- def as_list; end
-
- # @return [Boolean] whether the value being set should be inside a list
- # @since 0.6.2
- #
- # source://yard//lib/yard/cli/config.rb#17
- def as_list=(_arg0); end
-
- # @since 0.6.2
- #
- # source://yard//lib/yard/cli/config.rb#36
- def description; end
-
- # @return [String, nil] command to use when configuring ~/.gemrc file.
- # If the string is nil, configuration should not occur.
- # @since 0.6.2
- #
- # source://yard//lib/yard/cli/config.rb#24
- def gem_install_cmd; end
-
- # @return [String, nil] command to use when configuring ~/.gemrc file.
- # If the string is nil, configuration should not occur.
- # @since 0.6.2
- #
- # source://yard//lib/yard/cli/config.rb#24
- def gem_install_cmd=(_arg0); end
-
- # @return [Symbol, nil] the key to view/edit, if any
- # @since 0.6.2
- #
- # source://yard//lib/yard/cli/config.rb#8
- def key; end
-
- # @return [Symbol, nil] the key to view/edit, if any
- # @since 0.6.2
- #
- # source://yard//lib/yard/cli/config.rb#8
- def key=(_arg0); end
-
- # @return [Boolean] whether to reset the {#key}
- # @since 0.6.2
- #
- # source://yard//lib/yard/cli/config.rb#14
- def reset; end
-
- # @return [Boolean] whether to reset the {#key}
- # @since 0.6.2
- #
- # source://yard//lib/yard/cli/config.rb#14
- def reset=(_arg0); end
-
- # @since 0.6.2
- #
- # source://yard//lib/yard/cli/config.rb#40
- def run(*args); end
-
- # @return [Array, nil] the list of values to set (or single value), if modifying
- # @since 0.6.2
- #
- # source://yard//lib/yard/cli/config.rb#11
- def values; end
-
- # @return [Array, nil] the list of values to set (or single value), if modifying
- # @since 0.6.2
- #
- # source://yard//lib/yard/cli/config.rb#11
- def values=(_arg0); end
-
- private
-
- # @since 0.6.2
- #
- # source://yard//lib/yard/cli/config.rb#57
- def configure_gemrc; end
-
- # @since 0.6.2
- #
- # source://yard//lib/yard/cli/config.rb#111
- def encode_value(value); end
-
- # @since 0.6.2
- #
- # source://yard//lib/yard/cli/config.rb#103
- def encode_values; end
-
- # @since 0.6.2
- #
- # source://yard//lib/yard/cli/config.rb#97
- def list_configuration; end
-
- # @since 0.6.2
- #
- # source://yard//lib/yard/cli/config.rb#78
- def modify_item; end
-
- # @since 0.6.2
- #
- # source://yard//lib/yard/cli/config.rb#120
- def optparse(*args); end
-
- # @since 0.6.2
- #
- # source://yard//lib/yard/cli/config.rb#92
- def view_item; end
-end
-
-# CLI command to return the objects that were added/removed from 2 versions
-# of a project (library, gem, working copy).
-#
-# @since 0.6.0
-#
-# source://yard//lib/yard/cli/diff.rb#11
-class YARD::CLI::Diff < ::YARD::CLI::Command
- # @return [Diff] a new instance of Diff
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/diff.rb#12
- def initialize; end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/diff.rb#24
- def description; end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/diff.rb#28
- def run(*args); end
-
- private
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/diff.rb#83
- def added_objects(registry1, registry2); end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/diff.rb#78
- def all_objects; end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/diff.rb#233
- def cleanup(gemfile); end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/diff.rb#175
- def expand_and_parse(gemfile, io); end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/diff.rb#187
- def expand_gem(gemfile, io); end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/diff.rb#181
- def generate_yardoc(dir); end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/diff.rb#118
- def load_gem_data(gemfile); end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/diff.rb#102
- def load_git_commit(commit); end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/diff.rb#87
- def modified_objects(registry1, registry2); end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/diff.rb#239
- def optparse(*args); end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/diff.rb#98
- def removed_objects(registry1, registry2); end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/diff.rb#225
- def require_rubygems; end
-end
-
-# Display one object
-#
-# @since 0.8.6
-#
-# source://yard//lib/yard/cli/display.rb#6
-class YARD::CLI::Display < ::YARD::CLI::Yardoc
- # @return [Display] a new instance of Display
- # @since 0.8.6
- #
- # source://yard//lib/yard/cli/display.rb#9
- def initialize(*args); end
-
- # @since 0.8.6
- #
- # source://yard//lib/yard/cli/display.rb#7
- def description; end
-
- # @return [String] the output data for all formatted objects
- # @since 0.8.6
- #
- # source://yard//lib/yard/cli/display.rb#27
- def format_objects; end
-
- # @since 0.8.6
- #
- # source://yard//lib/yard/cli/display.rb#61
- def output_options(opts); end
-
- # Parses commandline options.
- #
- # @param args [Array] each tokenized argument
- # @since 0.8.6
- #
- # source://yard//lib/yard/cli/display.rb#46
- def parse_arguments(*args); end
-
- # Runs the commandline utility, parsing arguments and displaying an object
- # from the {Registry}.
- #
- # @param args [Array] the list of arguments.
- # @return [void]
- # @since 0.8.6
- #
- # source://yard//lib/yard/cli/display.rb#21
- def run(*args); end
-
- # @since 0.8.6
- #
- # source://yard//lib/yard/cli/display.rb#33
- def wrap_layout(contents); end
-end
-
-# @since 0.6.0
-#
-# source://yard//lib/yard/cli/gems.rb#5
-class YARD::CLI::Gems < ::YARD::CLI::Command
- # @return [Gems] a new instance of Gems
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/gems.rb#6
- def initialize; end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/gems.rb#11
- def description; end
-
- # Runs the commandline utility, parsing arguments and generating
- # YARD indexes for gems.
- #
- # @param args [Array] the list of arguments
- # @return [void]
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/gems.rb#18
- def run(*args); end
-
- private
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/gems.rb#47
- def add_gems(gems); end
-
- # Builds .yardoc files for all non-existing gems
- #
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/gems.rb#27
- def build_gems; end
-
- # Parses options
- #
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/gems.rb#61
- def optparse(*args); end
-end
-
-# A command-line utility to generate Graphviz graphs from
-# a set of objects
-#
-# @see Graph#run
-# @since 0.6.0
-#
-# source://yard//lib/yard/cli/graph.rb#24
-class YARD::CLI::Graph < ::YARD::CLI::YardoptsCommand
- # Creates a new instance of the command-line utility
- #
- # @return [Graph] a new instance of Graph
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/graph.rb#34
- def initialize; end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/graph.rb#42
- def description; end
-
- # The set of objects to include in the graph.
- #
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/graph.rb#31
- def objects; end
-
- # The options parsed out of the commandline.
- # Default options are:
- # :format => :dot
- #
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/graph.rb#28
- def options; end
-
- # Runs the command-line utility.
- #
- # @example
- # grapher = Graph.new
- # grapher.run('--private')
- # @param args [Array] each tokenized argument
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/graph.rb#52
- def run(*args); end
-
- private
-
- # Parses commandline options.
- #
- # @param args [Array] each tokenized argument
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/graph.rb#69
- def optparse(*args); end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/graph.rb#65
- def unrecognized_option(err); end
-end
-
-# Options to pass to the {Graph} CLI.
-#
-# source://yard//lib/yard/cli/graph.rb#5
-class YARD::CLI::GraphOptions < ::YARD::Templates::TemplateOptions
- # @return [String] any contents to pass to the digraph
- #
- # source://yard//lib/yard/cli/graph.rb#16
- def contents; end
-
- # @return [String] any contents to pass to the digraph
- #
- # source://yard//lib/yard/cli/graph.rb#16
- def contents=(_arg0); end
-
- # @return [Boolean] whether to show the object dependencies
- #
- # source://yard//lib/yard/cli/graph.rb#13
- def dependencies; end
-
- # @return [Boolean] whether to show the object dependencies
- #
- # source://yard//lib/yard/cli/graph.rb#13
- def dependencies=(_arg0); end
-
- # @return [:dot] the default output format
- #
- # source://yard//lib/yard/cli/graph.rb#7
- def format; end
-
- # source://yard//lib/yard/cli/graph.rb#7
- def format=(_arg0); end
-
- # @return [Boolean] whether to list the full class diagram
- #
- # source://yard//lib/yard/cli/graph.rb#10
- def full; end
-
- # @return [Boolean] whether to list the full class diagram
- #
- # source://yard//lib/yard/cli/graph.rb#10
- def full=(_arg0); end
-end
-
-# Handles help for commands
-#
-# @since 0.6.0
-#
-# source://yard//lib/yard/cli/help.rb#6
-class YARD::CLI::Help < ::YARD::CLI::Command
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/help.rb#7
- def description; end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/help.rb#9
- def run(*args); end
-end
-
-# CLI command to support internationalization (a.k.a. i18n).
-# I18n feature is based on gettext technology.
-# This command generates .pot file from docstring and extra
-# documentation.
-#
-# @since 0.8.0
-# @todo Support msgminit and msgmerge features?
-#
-# source://yard//lib/yard/cli/i18n.rb#13
-class YARD::CLI::I18n < ::YARD::CLI::Yardoc
- # @return [I18n] a new instance of I18n
- # @since 0.8.0
- #
- # source://yard//lib/yard/cli/i18n.rb#14
- def initialize; end
-
- # @since 0.8.0
- #
- # source://yard//lib/yard/cli/i18n.rb#19
- def description; end
-
- # @since 0.8.0
- #
- # source://yard//lib/yard/cli/i18n.rb#23
- def run(*args); end
-
- private
-
- # @since 0.8.0
- #
- # source://yard//lib/yard/cli/i18n.rb#44
- def general_options(opts); end
-
- # @since 0.8.0
- #
- # source://yard//lib/yard/cli/i18n.rb#61
- def generate_pot(relative_base_path); end
-end
-
-# Lists all constant and method names in the codebase. Uses {Yardoc} --list.
-#
-# source://yard//lib/yard/cli/list.rb#5
-class YARD::CLI::List < ::YARD::CLI::Command
- # source://yard//lib/yard/cli/list.rb#6
- def description; end
-
- # Runs the commandline utility, parsing arguments and displaying a
- # list of objects
- #
- # @param args [Array] the list of arguments.
- # @return [void]
- #
- # source://yard//lib/yard/cli/list.rb#13
- def run(*args); end
-end
-
-# Lists all markup types
-#
-# @since 0.8.6
-#
-# source://yard//lib/yard/cli/markup_types.rb#6
-class YARD::CLI::MarkupTypes < ::YARD::CLI::Command
- # @since 0.8.6
- #
- # source://yard//lib/yard/cli/markup_types.rb#7
- def description; end
-
- # Runs the commandline utility, parsing arguments and displaying a
- # list of markup types
- #
- # @param args [Array] the list of arguments.
- # @return [void]
- # @since 0.8.6
- #
- # source://yard//lib/yard/cli/markup_types.rb#14
- def run(*args); end
-end
-
-# A local documentation server
-#
-# @since 0.6.0
-#
-# source://yard//lib/yard/cli/server.rb#7
-class YARD::CLI::Server < ::YARD::CLI::Command
- # Creates a new instance of the Server command line utility
- #
- # @return [Server] a new instance of Server
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/server.rb#29
- def initialize; end
-
- # @return [YARD::Server::Adapter] the adapter to use for loading the web server
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/server.rb#18
- def adapter; end
-
- # @return [YARD::Server::Adapter] the adapter to use for loading the web server
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/server.rb#18
- def adapter=(_arg0); end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/server.rb#41
- def description; end
-
- # @return [Hash] a list of library names and yardoc files to serve
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/server.rb#15
- def libraries; end
-
- # @return [Hash] a list of library names and yardoc files to serve
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/server.rb#15
- def libraries=(_arg0); end
-
- # @return [Hash] a list of options to pass to the doc server
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/server.rb#9
- def options; end
-
- # @return [Hash] a list of options to pass to the doc server
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/server.rb#9
- def options=(_arg0); end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/server.rb#45
- def run(*args); end
-
- # @return [Array] a list of scripts to load
- # @since 0.6.2
- #
- # source://yard//lib/yard/cli/server.rb#22
- def scripts; end
-
- # @return [Array] a list of scripts to load
- # @since 0.6.2
- #
- # source://yard//lib/yard/cli/server.rb#22
- def scripts=(_arg0); end
-
- # @return [Hash] a list of options to pass to the web server
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/server.rb#12
- def server_options; end
-
- # @return [Hash] a list of options to pass to the web server
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/server.rb#12
- def server_options=(_arg0); end
-
- # @return [Array] a list of template paths to register
- # @since 0.6.2
- #
- # source://yard//lib/yard/cli/server.rb#26
- def template_paths; end
-
- # @return [Array] a list of template paths to register
- # @since 0.6.2
- #
- # source://yard//lib/yard/cli/server.rb#26
- def template_paths=(_arg0); end
-
- private
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/server.rb#131
- def add_gems; end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/server.rb#140
- def add_gems_from_gemfile(gemfile = T.unsafe(nil)); end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/server.rb#76
- def add_libraries(args); end
-
- # @param dir [String, nil] The argument provided on the CLI after the
- # library name. Is supposed to point to either a project directory
- # with a Yard options file, or a yardoc db.
- # @param library [String] The library name.
- # @return [LibraryVersion, nil]
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/server.rb#115
- def create_library_version_if_yardopts_exist(library, dir); end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/server.rb#249
- def extract_db_from_options_file(options_file); end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/server.rb#239
- def generate_doc_for_first_time(libver); end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/server.rb#56
- def load_scripts; end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/server.rb#60
- def load_template_paths; end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/server.rb#156
- def optparse(*args); end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/server.rb#66
- def select_adapter; end
-end
-
-# @since 0.6.0
-#
-# source://yard//lib/yard/cli/stats.rb#5
-class YARD::CLI::Stats < ::YARD::CLI::Yardoc
- include ::YARD::Templates::Helpers::BaseHelper
-
- # @param parse [Boolean] whether to parse and load registry (see {#parse})
- # @return [Stats] a new instance of Stats
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/stats.rb#18
- def initialize(parse = T.unsafe(nil)); end
-
- # @return [Array] all the parsed objects in the registry,
- # removing any objects that are not visible (private, protected) depending
- # on the arguments passed to the command.
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/stats.rb#108
- def all_objects; end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/stats.rb#25
- def description; end
-
- # Prints a statistic to standard out. This method is optimized for
- # getting Integer values, though it allows any data to be printed.
- #
- # @param data [Integer, String] the numeric (or any) data representing
- # the statistic. If +data+ is an Integer, it should represent the
- # total objects of a type.
- # @param name [String] the statistic name
- # @param undoc [Integer, nil] number of undocumented objects for the type
- # @return [void]
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/stats.rb#162
- def output(name, data, undoc = T.unsafe(nil)); end
-
- # @return [Boolean] whether to parse and load registry
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/stats.rb#15
- def parse; end
-
- # @return [Boolean] whether to parse and load registry
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/stats.rb#15
- def parse=(_arg0); end
-
- # Prints statistics for different object types
- #
- # To add statistics for a specific type, add a method +#stats_for_TYPE+
- # to this class that calls {#output}.
- #
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/stats.rb#54
- def print_statistics; end
-
- # Prints list of undocumented objects
- #
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/stats.rb#79
- def print_undocumented_objects; end
-
- # Runs the commandline utility, parsing arguments and generating
- # output if set.
- #
- # @param args [Array] the list of arguments
- # @return [void]
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/stats.rb#34
- def run(*args); end
-
- # Statistics for attributes
- #
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/stats.rb#135
- def stats_for_attributes; end
-
- # Statistics for classes
- #
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/stats.rb#125
- def stats_for_classes; end
-
- # Statistics for constants
- #
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/stats.rb#130
- def stats_for_constants; end
-
- # Statistics for files
- #
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/stats.rb#113
- def stats_for_files; end
-
- # Statistics for methods
- #
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/stats.rb#144
- def stats_for_methods; end
-
- # Statistics for modules
- #
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/stats.rb#120
- def stats_for_modules; end
-
- private
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/stats.rb#199
- def general_options(opts); end
-
- # Parses commandline options.
- #
- # @param args [Array] each tokenized argument
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/stats.rb#185
- def optparse(*args); end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/stats.rb#176
- def type_statistics(type); end
-end
-
-# Maintains the order in which +stats_for_+ statistics methods should be
-# printed.
-#
-# @see #print_statistics
-# @since 0.6.0
-#
-# source://yard//lib/yard/cli/stats.rb#12
-YARD::CLI::Stats::STATS_ORDER = T.let(T.unsafe(nil), Array)
-
-# A tool to view documentation in the console like `ri`
-#
-# source://yard//lib/yard/cli/yri.rb#7
-class YARD::CLI::YRI < ::YARD::CLI::Command
- # @return [YRI] a new instance of YRI
- #
- # source://yard//lib/yard/cli/yri.rb#31
- def initialize; end
-
- # source://yard//lib/yard/cli/yri.rb#41
- def description; end
-
- # Runs the command-line utility.
- #
- # @example
- # YRI.new.run('String#reverse')
- # @param args [Array] each tokenized argument
- #
- # source://yard//lib/yard/cli/yri.rb#50
- def run(*args); end
-
- protected
-
- # Caches the .yardoc file where an object can be found in the {CACHE_FILE}
- #
- # @return [void]
- #
- # source://yard//lib/yard/cli/yri.rb#85
- def cache_object(name, path); end
-
- # Locates an object by name starting in the cached paths and then
- # searching through any search paths.
- #
- # @param name [String] the full name of the object
- # @return [CodeObjects::Base] an object if found
- # @return [nil] if no object is found
- #
- # source://yard//lib/yard/cli/yri.rb#113
- def find_object(name); end
-
- # @param object [CodeObjects::Base] the object to print.
- # @return [String] the formatted output for an object.
- #
- # source://yard//lib/yard/cli/yri.rb#98
- def print_object(object); end
-
- # Prints the command usage
- #
- # @return [void]
- # @since 0.5.6
- #
- # source://yard//lib/yard/cli/yri.rb#78
- def print_usage; end
-
- private
-
- # Adds paths in {SEARCH_PATHS_FILE}
- #
- # @since 0.5.1
- #
- # source://yard//lib/yard/cli/yri.rb#181
- def add_default_paths; end
-
- # Adds all RubyGems yardoc files to search paths
- #
- # @return [void]
- #
- # source://yard//lib/yard/cli/yri.rb#161
- def add_gem_paths; end
-
- # Loads {CACHE_FILE}
- #
- # @return [void]
- #
- # source://yard//lib/yard/cli/yri.rb#151
- def load_cache; end
-
- # Parses commandline options.
- #
- # @param args [Array] each tokenized argument
- #
- # source://yard//lib/yard/cli/yri.rb#190
- def optparse(*args); end
-
- # Tries to load the object with name. If successful, caches the object
- # with the cache_path
- #
- # @param cache_path [String] the location of the yardoc
- # db containing the object to cache for future lookups.
- # No caching is done if this is nil.
- # @param name [String] the object path
- # @return [void]
- #
- # source://yard//lib/yard/cli/yri.rb#143
- def try_load_object(name, cache_path); end
-
- class << self
- # Helper method to run the utility on an instance.
- #
- # @see #run
- #
- # source://yard//lib/yard/cli/yri.rb#29
- def run(*args); end
- end
-end
-
-# The location in {YARD::CONFIG_DIR} where the YRI cache file is loaded
-# from.
-#
-# source://yard//lib/yard/cli/yri.rb#10
-YARD::CLI::YRI::CACHE_FILE = T.let(T.unsafe(nil), String)
-
-# Default search paths that should be loaded dynamically into YRI. These paths
-# take precedence over all other paths ({SEARCH_PATHS_FILE} and RubyGems
-# paths). To add a path, call:
-#
-# DEFAULT_SEARCH_PATHS.push("/path/to/.yardoc")
-#
-# @return [Array] a list of extra search paths
-# @since 0.6.0
-#
-# source://yard//lib/yard/cli/yri.rb#25
-YARD::CLI::YRI::DEFAULT_SEARCH_PATHS = T.let(T.unsafe(nil), Array)
-
-# A file containing all paths, delimited by newlines, to search for
-# yardoc databases.
-#
-# @since 0.5.1
-#
-# source://yard//lib/yard/cli/yri.rb#15
-YARD::CLI::YRI::SEARCH_PATHS_FILE = T.let(T.unsafe(nil), String)
-
-# source://yard//lib/yard/cli/yardoc.rb#145
-class YARD::CLI::Yardoc < ::YARD::CLI::YardoptsCommand
- # Creates a new instance of the commandline utility
- #
- # @return [Yardoc] a new instance of Yardoc
- # @since 0.2.1
- #
- # source://yard//lib/yard/cli/yardoc.rb#207
- def initialize; end
-
- # The list of all objects to process. Override this method to change
- # which objects YARD should generate documentation for.
- #
- # @deprecated To hide methods use the +@private+ tag instead.
- # @return [Array] a list of code objects to process
- # @since 0.2.1
- #
- # source://yard//lib/yard/cli/yardoc.rb#330
- def all_objects; end
-
- # Keep track of which APIs are to be shown
- #
- # @return [Array] a list of APIs
- # @since 0.8.1
- #
- # source://yard//lib/yard/cli/yardoc.rb#180
- def apis; end
-
- # Keep track of which APIs are to be shown
- #
- # @return [Array] a list of APIs
- # @since 0.8.1
- #
- # source://yard//lib/yard/cli/yardoc.rb#180
- def apis=(_arg0); end
-
- # @return [Array] a list of assets to copy after generation
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/yardoc.rb#197
- def assets; end
-
- # @return [Array] a list of assets to copy after generation
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/yardoc.rb#197
- def assets=(_arg0); end
-
- # @since 0.2.1
- #
- # source://yard//lib/yard/cli/yardoc.rb#234
- def description; end
-
- # @return [Array] list of excluded paths (regexp matches)
- # @since 0.5.3
- #
- # source://yard//lib/yard/cli/yardoc.rb#155
- def excluded; end
-
- # @return [Array] list of excluded paths (regexp matches)
- # @since 0.5.3
- #
- # source://yard//lib/yard/cli/yardoc.rb#155
- def excluded=(_arg0); end
-
- # @return [Boolean] whether yard exits with error status code if a warning occurs
- # @since 0.2.1
- #
- # source://yard//lib/yard/cli/yardoc.rb#204
- def fail_on_warning; end
-
- # @return [Boolean] whether yard exits with error status code if a warning occurs
- # @since 0.2.1
- #
- # source://yard//lib/yard/cli/yardoc.rb#204
- def fail_on_warning=(_arg0); end
-
- # @return [Array] list of Ruby source files to process
- # @since 0.2.1
- #
- # source://yard//lib/yard/cli/yardoc.rb#151
- def files; end
-
- # @return [Array] list of Ruby source files to process
- # @since 0.2.1
- #
- # source://yard//lib/yard/cli/yardoc.rb#151
- def files=(_arg0); end
-
- # @return [Boolean] whether to generate output
- # @since 0.2.1
- #
- # source://yard//lib/yard/cli/yardoc.rb#166
- def generate; end
-
- # @return [Boolean] whether to generate output
- # @since 0.2.1
- #
- # source://yard//lib/yard/cli/yardoc.rb#166
- def generate=(_arg0); end
-
- # @return [Boolean] whether markup option was specified
- # @since 0.7.0
- #
- # source://yard//lib/yard/cli/yardoc.rb#201
- def has_markup; end
-
- # @return [Boolean] whether markup option was specified
- # @since 0.7.0
- #
- # source://yard//lib/yard/cli/yardoc.rb#201
- def has_markup=(_arg0); end
-
- # Keep track of which APIs are to be hidden
- #
- # @return [Array] a list of APIs to be hidden
- # @since 0.8.7
- #
- # source://yard//lib/yard/cli/yardoc.rb#185
- def hidden_apis; end
-
- # Keep track of which APIs are to be hidden
- #
- # @return [Array] a list of APIs to be hidden
- # @since 0.8.7
- #
- # source://yard//lib/yard/cli/yardoc.rb#185
- def hidden_apis=(_arg0); end
-
- # @return [Array] a list of tags to hide from templates
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/yardoc.rb#189
- def hidden_tags; end
-
- # @return [Array] a list of tags to hide from templates
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/yardoc.rb#189
- def hidden_tags=(_arg0); end
-
- # @return [Boolean] whether to print a list of objects
- # @since 0.5.5
- #
- # source://yard//lib/yard/cli/yardoc.rb#170
- def list; end
-
- # @return [Boolean] whether to print a list of objects
- # @since 0.5.5
- #
- # source://yard//lib/yard/cli/yardoc.rb#170
- def list=(_arg0); end
-
- # @return [Hash] the hash of options passed to the template.
- # @see Templates::Engine#render
- # @since 0.2.1
- #
- # source://yard//lib/yard/cli/yardoc.rb#148
- def options; end
-
- # Parses commandline arguments
- #
- # @param args [Array] the list of arguments
- # @return [Boolean] whether or not arguments are valid
- # @since 0.5.6
- #
- # source://yard//lib/yard/cli/yardoc.rb#291
- def parse_arguments(*args); end
-
- # Runs the commandline utility, parsing arguments and generating
- # output if set.
- #
- # @param args [Array] the list of arguments. If the list only
- # contains a single nil value, skip calling of {#parse_arguments}
- # @return [void]
- # @since 0.2.1
- #
- # source://yard//lib/yard/cli/yardoc.rb#244
- def run(*args); end
-
- # @return [Boolean] whether objects should be serialized to .yardoc db
- # @since 0.2.1
- #
- # source://yard//lib/yard/cli/yardoc.rb#163
- def save_yardoc; end
-
- # @return [Boolean] whether objects should be serialized to .yardoc db
- # @since 0.2.1
- #
- # source://yard//lib/yard/cli/yardoc.rb#163
- def save_yardoc=(_arg0); end
-
- # @return [Boolean] whether to print statistics after parsing
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/yardoc.rb#193
- def statistics; end
-
- # @return [Boolean] whether to print statistics after parsing
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/yardoc.rb#193
- def statistics=(_arg0); end
-
- # @return [Boolean] whether to use the existing yardoc db if the
- # .yardoc already exists. Also makes use of file checksums to
- # parse only changed files.
- # @since 0.2.1
- #
- # source://yard//lib/yard/cli/yardoc.rb#160
- def use_cache; end
-
- # @return [Boolean] whether to use the existing yardoc db if the
- # .yardoc already exists. Also makes use of file checksums to
- # parse only changed files.
- # @since 0.2.1
- #
- # source://yard//lib/yard/cli/yardoc.rb#160
- def use_cache=(_arg0); end
-
- # Keep track of which visibilities are to be shown
- #
- # @return [Array] a list of visibilities
- # @since 0.5.6
- #
- # source://yard//lib/yard/cli/yardoc.rb#175
- def visibilities; end
-
- # Keep track of which visibilities are to be shown
- #
- # @return [Array] a list of visibilities
- # @since 0.5.6
- #
- # source://yard//lib/yard/cli/yardoc.rb#175
- def visibilities=(_arg0); end
-
- private
-
- # Adds verifier rule for APIs
- #
- # @return [void]
- # @since 0.8.1
- #
- # source://yard//lib/yard/cli/yardoc.rb#474
- def add_api_verifier; end
-
- # Adds a set of extra documentation files to be processed
- #
- # @param files [Array] the set of documentation files
- # @since 0.2.1
- #
- # source://yard//lib/yard/cli/yardoc.rb#413
- def add_extra_files(*files); end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/yardoc.rb#507
- def add_tag(tag_data, factory_method = T.unsafe(nil)); end
-
- # Adds verifier rule for visibilities
- #
- # @return [void]
- # @since 0.5.6
- #
- # source://yard//lib/yard/cli/yardoc.rb#466
- def add_visibility_verifier; end
-
- # Applies the specified locale to collected objects
- #
- # @return [void]
- # @since 0.8.3
- #
- # source://yard//lib/yard/cli/yardoc.rb#494
- def apply_locale; end
-
- # Copies any assets to the output directory
- #
- # @return [void]
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/yardoc.rb#389
- def copy_assets; end
-
- # @param check_exists [Boolean] whether the file should exist on disk
- # @param file [String] the filename to validate
- # @return [Boolean] whether the file is allowed to be used
- # @since 0.2.1
- #
- # source://yard//lib/yard/cli/yardoc.rb#425
- def extra_file_valid?(file, check_exists = T.unsafe(nil)); end
-
- # Adds general options
- #
- # @since 0.2.1
- #
- # source://yard//lib/yard/cli/yardoc.rb#541
- def general_options(opts); end
-
- # Parses commandline options.
- #
- # @param args [Array] each tokenized argument
- # @since 0.2.1
- #
- # source://yard//lib/yard/cli/yardoc.rb#516
- def optparse(*args); end
-
- # Adds output options
- #
- # @since 0.2.1
- #
- # source://yard//lib/yard/cli/yardoc.rb#586
- def output_options(opts); end
-
- # Parses the file arguments into Ruby files and extra files, which are
- # separated by a '-' element.
- #
- # @example Parses a set of Ruby files with a separator and extra files
- # parse_files %w(file1 file2 - extrafile1 extrafile2)
- # @example Parses a set of Ruby source files
- # parse_files %w(file1 file2 file3)
- # @param files [Array] the list of files to parse
- # @return [void]
- # @since 0.2.1
- #
- # source://yard//lib/yard/cli/yardoc.rb#446
- def parse_files(*files); end
-
- # Prints a list of all objects
- #
- # @return [void]
- # @since 0.5.5
- #
- # source://yard//lib/yard/cli/yardoc.rb#403
- def print_list; end
-
- # Generates output for objects
- #
- # @param checksums [Hash, nil] if supplied, a list of checksums for files.
- # @return [void]
- # @since 0.5.1
- #
- # source://yard//lib/yard/cli/yardoc.rb#340
- def run_generate(checksums); end
-
- # Runs a list of objects against the {Verifier} object passed into the
- # template and returns the subset of verified objects.
- #
- # @param list [Array] a list of code objects
- # @return [Array] a list of code objects that match
- # the verifier. If no verifier is supplied, all objects are returned.
- #
- # source://yard//lib/yard/cli/yardoc.rb#502
- def run_verifier(list); end
-
- # Adds tag options
- #
- # @since 0.6.0
- #
- # source://yard//lib/yard/cli/yardoc.rb#753
- def tag_options(opts); end
-
- # Verifies that the markup options are valid before parsing any code.
- # Failing early is better than failing late.
- #
- # @return [Boolean] whether the markup provider was successfully loaded.
- # @since 0.2.1
- #
- # source://yard//lib/yard/cli/yardoc.rb#364
- def verify_markup_options; end
-end
-
-# Default options used in +yard doc+ command.
-#
-# source://yard//lib/yard/cli/yardoc.rb#8
-class YARD::CLI::YardocOptions < ::YARD::Templates::TemplateOptions
- # @return [CodeObjects::ExtraFileObject] the file object being rendered.
- # The +object+ key is not used so that a file may be rendered in the context
- # of an object's namespace (for generating links).
- #
- # source://yard//lib/yard/cli/yardoc.rb#48
- def file; end
-
- # @return [CodeObjects::ExtraFileObject] the file object being rendered.
- # The +object+ key is not used so that a file may be rendered in the context
- # of an object's namespace (for generating links).
- #
- # source://yard//lib/yard/cli/yardoc.rb#48
- def file=(_arg0); end
-
- # @return [Array] the list of extra files rendered along with objects
- #
- # source://yard//lib/yard/cli/yardoc.rb#11
- def files; end
-
- # source://yard//lib/yard/cli/yardoc.rb#11
- def files=(_arg0); end
-
- # @return [Symbol] the default output format (:html).
- #
- # source://yard//lib/yard/cli/yardoc.rb#24
- def format; end
-
- # source://yard//lib/yard/cli/yardoc.rb#24
- def format=(_arg0); end
-
- # @return [Numeric] An index value for rendering sequentially related templates
- #
- # source://yard//lib/yard/cli/yardoc.rb#39
- def index; end
-
- # @return [Numeric] An index value for rendering sequentially related templates
- #
- # source://yard//lib/yard/cli/yardoc.rb#39
- def index=(_arg0); end
-
- # @return [CodeObjects::Base] an extra item to send to a template that is not
- # the main rendered object
- #
- # source://yard//lib/yard/cli/yardoc.rb#43
- def item; end
-
- # @return [CodeObjects::Base] an extra item to send to a template that is not
- # the main rendered object
- #
- # source://yard//lib/yard/cli/yardoc.rb#43
- def item=(_arg0); end
-
- # @return [String] the current locale
- #
- # source://yard//lib/yard/cli/yardoc.rb#51
- def locale; end
-
- # @return [String] the current locale
- #
- # source://yard//lib/yard/cli/yardoc.rb#51
- def locale=(_arg0); end
-
- # @return [Array] the list of code objects to render
- # the templates with.
- #
- # source://yard//lib/yard/cli/yardoc.rb#36
- def objects; end
-
- # @return [Array] the list of code objects to render
- # the templates with.
- #
- # source://yard//lib/yard/cli/yardoc.rb#36
- def objects=(_arg0); end
-
- # @return [Boolean] whether the data should be rendered in a single page,
- # if the template supports it.
- #
- # source://yard//lib/yard/cli/yardoc.rb#28
- def onefile; end
-
- # source://yard//lib/yard/cli/yardoc.rb#28
- def onefile=(_arg0); end
-
- # @return [CodeObjects::ExtraFileObject] the README file object rendered
- # along with objects
- #
- # source://yard//lib/yard/cli/yardoc.rb#32
- def readme; end
-
- # @return [CodeObjects::ExtraFileObject] the README file object rendered
- # along with objects
- #
- # source://yard//lib/yard/cli/yardoc.rb#32
- def readme=(_arg0); end
-
- # @return [Serializers::Base] the default serializer for generating output
- # to disk.
- #
- # source://yard//lib/yard/cli/yardoc.rb#21
- def serializer; end
-
- # source://yard//lib/yard/cli/yardoc.rb#21
- def serializer=(_arg0); end
-
- # @return [String] the default title appended to each generated page
- #
- # source://yard//lib/yard/cli/yardoc.rb#14
- def title; end
-
- # source://yard//lib/yard/cli/yardoc.rb#14
- def title=(_arg0); end
-
- # @return [Verifier] the default verifier object to filter queries
- #
- # source://yard//lib/yard/cli/yardoc.rb#17
- def verifier; end
-
- # source://yard//lib/yard/cli/yardoc.rb#17
- def verifier=(_arg0); end
-end
-
-# Abstract base class for command that reads .yardopts file
-#
-# @abstract
-# @since 0.8.3
-#
-# source://yard//lib/yard/cli/yardopts_command.rb#10
-class YARD::CLI::YardoptsCommand < ::YARD::CLI::Command
- # Creates a new command that reads .yardopts
- #
- # @return [YardoptsCommand] a new instance of YardoptsCommand
- # @since 0.8.3
- #
- # source://yard//lib/yard/cli/yardopts_command.rb#25
- def initialize; end
-
- # The options file name (defaults to {DEFAULT_YARDOPTS_FILE})
- #
- # @return [String] the filename to load extra options from
- # @since 0.8.3
- #
- # source://yard//lib/yard/cli/yardopts_command.rb#22
- def options_file; end
-
- # The options file name (defaults to {DEFAULT_YARDOPTS_FILE})
- #
- # @return [String] the filename to load extra options from
- # @since 0.8.3
- #
- # source://yard//lib/yard/cli/yardopts_command.rb#22
- def options_file=(_arg0); end
-
- # Parses commandline arguments
- #
- # @param args [Array] the list of arguments
- # @return [Boolean] whether or not arguments are valid
- # @since 0.5.6
- #
- # source://yard//lib/yard/cli/yardopts_command.rb#36
- def parse_arguments(*args); end
-
- # @return [Boolean] whether to parse options from .document
- # @since 0.8.3
- #
- # source://yard//lib/yard/cli/yardopts_command.rb#18
- def use_document_file; end
-
- # @return [Boolean] whether to parse options from .document
- # @since 0.8.3
- #
- # source://yard//lib/yard/cli/yardopts_command.rb#18
- def use_document_file=(_arg0); end
-
- # @return [Boolean] whether to parse options from .yardopts
- # @since 0.8.3
- #
- # source://yard//lib/yard/cli/yardopts_command.rb#15
- def use_yardopts_file; end
-
- # @return [Boolean] whether to parse options from .yardopts
- # @since 0.8.3
- #
- # source://yard//lib/yard/cli/yardopts_command.rb#15
- def use_yardopts_file=(_arg0); end
-
- protected
-
- # Adds --[no-]yardopts / --[no-]document
- #
- # @since 0.8.3
- #
- # source://yard//lib/yard/cli/yardopts_command.rb#48
- def yardopts_options(opts); end
-
- private
-
- # @since 0.8.3
- #
- # source://yard//lib/yard/cli/yardopts_command.rb#92
- def parse_rdoc_document_file(file = T.unsafe(nil)); end
-
- # @since 0.8.3
- #
- # source://yard//lib/yard/cli/yardopts_command.rb#96
- def parse_yardopts(file = T.unsafe(nil)); end
-
- # Parses out the yardopts/document options
- #
- # @since 0.8.3
- #
- # source://yard//lib/yard/cli/yardopts_command.rb#78
- def parse_yardopts_options(*args); end
-
- # Reads a .document file in the directory to get source file globs
- #
- # @return [Array] an array of files parsed from .document
- # @since 0.8.3
- #
- # source://yard//lib/yard/cli/yardopts_command.rb#102
- def support_rdoc_document_file!(file = T.unsafe(nil)); end
-
- # Parses the .yardopts file for default yard options
- #
- # @return [Array] an array of options parsed from .yardopts
- # @since 0.8.3
- #
- # source://yard//lib/yard/cli/yardopts_command.rb#70
- def yardopts(file = T.unsafe(nil)); end
-end
-
-# The configuration filename to load extra options from
-#
-# @since 0.8.3
-#
-# source://yard//lib/yard/cli/yardopts_command.rb#12
-YARD::CLI::YardoptsCommand::DEFAULT_YARDOPTS_FILE = T.let(T.unsafe(nil), String)
-
-# @deprecated Use {Config::CONFIG_DIR}
-#
-# source://yard//lib/yard.rb#13
-YARD::CONFIG_DIR = T.let(T.unsafe(nil), String)
-
-# A "code object" is defined as any entity in the Ruby language.
-# Classes, modules, methods, class variables and constants are the
-# major objects, but DSL languages can create their own by inheriting
-# from {CodeObjects::Base}.
-#
-# source://yard//lib/yard/autoload.rb#29
-module YARD::CodeObjects
- extend ::YARD::CodeObjects::NamespaceMapper
-end
-
-# All builtin Ruby classes and modules.
-#
-# source://yard//lib/yard/code_objects/base.rb#91
-YARD::CodeObjects::BUILTIN_ALL = T.let(T.unsafe(nil), Array)
-
-# All builtin Ruby classes for inheritance tree.
-#
-# @note MatchingData is a 1.8.x legacy class
-#
-# source://yard//lib/yard/code_objects/base.rb#78
-YARD::CodeObjects::BUILTIN_CLASSES = T.let(T.unsafe(nil), Array)
-
-# All builtin Ruby exception classes for inheritance tree.
-#
-# source://yard//lib/yard/code_objects/base.rb#67
-YARD::CodeObjects::BUILTIN_EXCEPTIONS = T.let(T.unsafe(nil), Array)
-
-# Hash of {BUILTIN_EXCEPTIONS} as keys and true as value (for O(1) lookups)
-#
-# source://yard//lib/yard/code_objects/base.rb#94
-YARD::CodeObjects::BUILTIN_EXCEPTIONS_HASH = T.let(T.unsafe(nil), Hash)
-
-# All builtin Ruby modules for mixin handling.
-#
-# source://yard//lib/yard/code_objects/base.rb#87
-YARD::CodeObjects::BUILTIN_MODULES = T.let(T.unsafe(nil), Array)
-
-# +Base+ is the superclass of all code objects recognized by YARD. A code
-# object is any entity in the Ruby language (class, method, module). A
-# DSL might subclass +Base+ to create a new custom object representing
-# a new entity type.
-#
-# == Registry Integration
-# Any created object associated with a namespace is immediately registered
-# with the registry. This allows the Registry to act as an identity map
-# to ensure that no object is represented by more than one Ruby object
-# in memory. A unique {#path} is essential for this identity map to work
-# correctly.
-#
-# == Custom Attributes
-# Code objects allow arbitrary custom attributes to be set using the
-# {#[]=} assignment method.
-#
-# == Namespaces
-# There is a special type of object called a "namespace". These are subclasses
-# of the {NamespaceObject} and represent Ruby entities that can have
-# objects defined within them. Classically these are modules and classes,
-# though a DSL might create a custom {NamespaceObject} to describe a
-# specific set of objects.
-#
-# == Separators
-# Custom classes with different separator tokens should define their own
-# separators using the {NamespaceMapper.register_separator} method. The
-# standard Ruby separators have already been defined ('::', '#', '.', etc).
-#
-# @abstract This class should not be used directly. Instead, create a
-# subclass that implements {#path}, {#sep} or {#type}. You might also
-# need to register custom separators if {#sep} uses alternate separator
-# tokens.
-# @see #[]=
-# @see #path
-# @see NamespaceMapper.register_separator
-# @see NamespaceObject
-# @see Registry
-#
-# source://yard//lib/yard/code_objects/base.rb#133
-class YARD::CodeObjects::Base
- # Creates a new code object
- #
- # @example Create a method in the root namespace
- # CodeObjects::Base.new(:root, '#method') # => #
- # @example Create class Z inside namespace X::Y
- # CodeObjects::Base.new(P("X::Y"), :Z) # or
- # CodeObjects::Base.new(Registry.root, "X::Y")
- # @param name [Symbol, String] the name (or complex path) of the object.
- # @param namespace [NamespaceObject, :root, nil] the namespace the object belongs in,
- # {Registry.root} or :root should be provided if it is associated with
- # the top level namespace.
- # @return [Base] the newly created object
- # @yield [self] a block to perform any extra initialization on the object
- # @yieldparam self [Base] the newly initialized code object
- #
- # source://yard//lib/yard/code_objects/base.rb#238
- def initialize(namespace, name, *_arg2); end
-
- # Tests if another object is equal to this, including a proxy
- #
- # @param other [Base, Proxy] if other is a {Proxy}, tests if
- # the paths are equal
- # @return [Boolean] whether or not the objects are considered the same
- #
- # source://yard//lib/yard/code_objects/base.rb#330
- def ==(other); end
-
- # Accesses a custom attribute on the object
- #
- # @param key [#to_s] the name of the custom attribute
- # @return [Object, nil] the custom attribute or nil if not found.
- # @see #[]=
- #
- # source://yard//lib/yard/code_objects/base.rb#343
- def [](key); end
-
- # Sets a custom attribute on the object
- #
- # @param key [#to_s] the name of the custom attribute
- # @param value [Object] the value to associate
- # @return [void]
- # @see #[]
- #
- # source://yard//lib/yard/code_objects/base.rb#356
- def []=(key, value); end
-
- # Associates a file with a code object, optionally adding the line where it was defined.
- # By convention, '' should be used to associate code that comes form standard input.
- #
- # @param file [String] the filename ('' for standard input)
- # @param has_comments [Boolean] whether or not the definition has comments associated. This
- # will allow {#file} to return the definition where the comments were made instead
- # of any empty definitions that might have been parsed before (module namespaces for instance).
- # @param line [Fixnum, nil] the line number where the object lies in the file
- # @raise [ArgumentError]
- #
- # source://yard//lib/yard/code_objects/base.rb#290
- def add_file(file, line = T.unsafe(nil), has_comments = T.unsafe(nil)); end
-
- # Add tags to the {#docstring}
- #
- # @see Docstring#add_tag
- # @since 0.8.4
- #
- # source://yard//lib/yard/code_objects/base.rb#561
- def add_tag(*tags); end
-
- # The non-localized documentation string associated with the object
- #
- # @return [Docstring] the documentation string
- # @since 0.8.4
- #
- # source://yard//lib/yard/code_objects/base.rb#164
- def base_docstring; end
-
- # Copies all data in this object to another code object, except for
- # uniquely identifying information (path, namespace, name, scope).
- #
- # @param other [Base] the object to copy data to
- # @return [Base] the other object
- # @since 0.8.0
- #
- # source://yard//lib/yard/code_objects/base.rb#263
- def copy_to(other); end
-
- # The documentation string associated with the object
- #
- # @param locale [String, I18n::Locale] (I18n::Locale.default)
- # the locale of the documentation string.
- # @return [Docstring] the documentation string
- #
- # source://yard//lib/yard/code_objects/base.rb#405
- def docstring(locale = T.unsafe(nil)); end
-
- # Attaches a docstring to a code object by parsing the comments attached to the statement
- # and filling the {#tags} and {#docstring} methods with the parsed information.
- #
- # @param comments [String, Array, Docstring] the comments attached to the code object to be parsed
- # into a docstring and meta tags.
- #
- # source://yard//lib/yard/code_objects/base.rb#427
- def docstring=(comments); end
-
- # Marks whether or not the method is conditionally defined at runtime
- #
- # @return [Boolean] true if the method is conditionally defined at runtime
- #
- # source://yard//lib/yard/code_objects/base.rb#170
- def dynamic; end
-
- # Marks whether or not the method is conditionally defined at runtime
- #
- # @return [Boolean] true if the method is conditionally defined at runtime
- #
- # source://yard//lib/yard/code_objects/base.rb#170
- def dynamic=(_arg0); end
-
- # Is the object defined conditionally at runtime?
- #
- # @return [Boolean]
- # @see #dynamic
- #
- # source://yard//lib/yard/code_objects/base.rb#178
- def dynamic?; end
-
- # Tests if another object is equal to this, including a proxy
- #
- # @param other [Base, Proxy] if other is a {Proxy}, tests if
- # the paths are equal
- # @return [Boolean] whether or not the objects are considered the same
- #
- # source://yard//lib/yard/code_objects/base.rb#331
- def eql?(other); end
-
- # Tests if another object is equal to this, including a proxy
- #
- # @param other [Base, Proxy] if other is a {Proxy}, tests if
- # the paths are equal
- # @return [Boolean] whether or not the objects are considered the same
- #
- # source://yard//lib/yard/code_objects/base.rb#323
- def equal?(other); end
-
- # Returns the filename the object was first parsed at, taking
- # definitions with docstrings first.
- #
- # @return [String] a filename
- # @return [nil] if there is no file associated with the object
- #
- # source://yard//lib/yard/code_objects/base.rb#307
- def file; end
-
- # The files the object was defined in. To add a file, use {#add_file}.
- #
- # @return [Array] a list of files
- # @see #add_file
- #
- # source://yard//lib/yard/code_objects/base.rb#137
- def files; end
-
- # Renders the object using the {Templates::Engine templating system}.
- #
- # @example Formats a class in plaintext
- # puts P('MyClass').format
- # @example Formats a method in html with rdoc markup
- # puts P('MyClass#meth').format(:format => :html, :markup => :rdoc)
- # @option options
- # @option options
- # @option options
- # @option options
- # @param options [Hash] a set of options to pass to the template
- # @return [String] the rendered template
- # @see Templates::Engine#render
- #
- # source://yard//lib/yard/code_objects/base.rb#505
- def format(options = T.unsafe(nil)); end
-
- # @return [String] the group this object is associated with
- # @since 0.6.0
- #
- # source://yard//lib/yard/code_objects/base.rb#174
- def group; end
-
- # @return [String] the group this object is associated with
- # @since 0.6.0
- #
- # source://yard//lib/yard/code_objects/base.rb#174
- def group=(_arg0); end
-
- # Tests if the {#docstring} has a tag
- #
- # @return [Boolean]
- # @see Docstring#has_tag?
- #
- # source://yard//lib/yard/code_objects/base.rb#556
- def has_tag?(name); end
-
- # @return [Integer] the object's hash value (for equality checking)
- #
- # source://yard//lib/yard/code_objects/base.rb#334
- def hash; end
-
- # Inspects the object, returning the type and path
- #
- # @return [String] a string describing the object
- #
- # source://yard//lib/yard/code_objects/base.rb#513
- def inspect; end
-
- # Returns the line the object was first parsed at (or nil)
- #
- # @return [Fixnum] the line where the object was first defined.
- # @return [nil] if there is no line associated with the object
- #
- # source://yard//lib/yard/code_objects/base.rb#315
- def line; end
-
- # @overload dynamic_attr_name
- # @overload dynamic_attr_name=
- #
- # source://yard//lib/yard/code_objects/base.rb#373
- def method_missing(meth, *args, &block); end
-
- # The name of the object
- #
- # @param prefix [Boolean] whether to show a prefix. Implement
- # this in a subclass to define how the prefix is showed.
- # @return [Symbol] if prefix is false, the symbolized name
- # @return [String] if prefix is true, prefix + the name as a String.
- # This must be implemented by the subclass.
- #
- # source://yard//lib/yard/code_objects/base.rb#278
- def name(prefix = T.unsafe(nil)); end
-
- # The namespace the object is defined in. If the object is in the
- # top level namespace, this is {Registry.root}
- #
- # @return [NamespaceObject] the namespace object
- #
- # source://yard//lib/yard/code_objects/base.rb#142
- def namespace; end
-
- # Sets the namespace the object is defined in.
- #
- # @param obj [NamespaceObject, :root, nil] the new namespace (:root
- # for {Registry.root}). If obj is nil, the object is unregistered
- # from the Registry.
- #
- # source://yard//lib/yard/code_objects/base.rb#522
- def namespace=(obj); end
-
- # The namespace the object is defined in. If the object is in the
- # top level namespace, this is {Registry.root}
- #
- # @return [NamespaceObject] the namespace object
- #
- # source://yard//lib/yard/code_objects/base.rb#543
- def parent; end
-
- # Sets the namespace the object is defined in.
- #
- # @param obj [NamespaceObject, :root, nil] the new namespace (:root
- # for {Registry.root}). If obj is nil, the object is unregistered
- # from the Registry.
- #
- # source://yard//lib/yard/code_objects/base.rb#544
- def parent=(obj); end
-
- # Represents the unique path of the object. The default implementation
- # joins the path of {#namespace} with {#name} via the value of {#sep}.
- # Custom code objects should ensure that the path is unique to the code
- # object by either overriding {#sep} or this method.
- #
- # @example The path of an instance method
- # MethodObject.new(P("A::B"), :c).path # => "A::B#c"
- # @return [String] the unique path of the object
- # @see #sep
- #
- # source://yard//lib/yard/code_objects/base.rb#453
- def path; end
-
- # @param other [Base, String] another code object (or object path)
- # @return [String] the shortest relative path from this object to +other+
- # @since 0.5.3
- #
- # source://yard//lib/yard/code_objects/base.rb#475
- def relative_path(other); end
-
- # @return [Boolean] whether or not this object is a RootObject
- #
- # source://yard//lib/yard/code_objects/base.rb#567
- def root?; end
-
- # Override this method with a custom component separator. For instance,
- # {MethodObject} implements sep as '#' or '.' (depending on if the
- # method is instance or class respectively). {#path} depends on this
- # value to generate the full path in the form: namespace.path + sep + name
- #
- # @return [String] the component that separates the namespace path
- # and the name (default is {NSEP})
- #
- # source://yard//lib/yard/code_objects/base.rb#576
- def sep; end
-
- # The one line signature representing an object. For a method, this will
- # be of the form "def meth(arguments...)". This is usually the first
- # source line.
- #
- # @return [String] a line of source
- #
- # source://yard//lib/yard/code_objects/base.rb#159
- def signature; end
-
- # The one line signature representing an object. For a method, this will
- # be of the form "def meth(arguments...)". This is usually the first
- # source line.
- #
- # @return [String] a line of source
- #
- # source://yard//lib/yard/code_objects/base.rb#159
- def signature=(_arg0); end
-
- # The source code associated with the object
- #
- # @return [String, nil] source, if present, or nil
- #
- # source://yard//lib/yard/code_objects/base.rb#146
- def source; end
-
- # Attaches source code to a code object with an optional file location
- #
- # @param statement [#source, String] the +Parser::Statement+ holding the source code or the raw source
- # as a +String+ for the definition of the code object only (not the block)
- #
- # source://yard//lib/yard/code_objects/base.rb#388
- def source=(statement); end
-
- # Language of the source code associated with the object. Defaults to
- # +:ruby+.
- #
- # @return [Symbol] the language type
- #
- # source://yard//lib/yard/code_objects/base.rb#152
- def source_type; end
-
- # Language of the source code associated with the object. Defaults to
- # +:ruby+.
- #
- # @return [Symbol] the language type
- #
- # source://yard//lib/yard/code_objects/base.rb#152
- def source_type=(_arg0); end
-
- # Gets a tag from the {#docstring}
- #
- # @see Docstring#tag
- #
- # source://yard//lib/yard/code_objects/base.rb#548
- def tag(name); end
-
- # Gets a list of tags from the {#docstring}
- #
- # @see Docstring#tags
- #
- # source://yard//lib/yard/code_objects/base.rb#552
- def tags(name = T.unsafe(nil)); end
-
- # @note Override this method if your object has a special title that does
- # not match the {#path} attribute value. This title will be used
- # when linking or displaying the object.
- # @return [String] the display title for an object
- # @see 0.8.4
- #
- # source://yard//lib/yard/code_objects/base.rb#468
- def title; end
-
- # @return [nil] this object does not turn into an array
- #
- # source://yard//lib/yard/code_objects/base.rb#337
- def to_ary; end
-
- # Represents the unique path of the object. The default implementation
- # joins the path of {#namespace} with {#name} via the value of {#sep}.
- # Custom code objects should ensure that the path is unique to the code
- # object by either overriding {#sep} or this method.
- #
- # @example The path of an instance method
- # MethodObject.new(P("A::B"), :c).path # => "A::B#c"
- # @return [String] the unique path of the object
- # @see #sep
- #
- # source://yard//lib/yard/code_objects/base.rb#460
- def to_s; end
-
- # Default type is the lowercase class name without the "Object" suffix.
- # Override this method to provide a custom object type
- #
- # @return [Symbol] the type of code object this represents
- #
- # source://yard//lib/yard/code_objects/base.rb#437
- def type; end
-
- # @return [Symbol] the visibility of an object (:public, :private, :protected)
- #
- # source://yard//lib/yard/code_objects/base.rb#181
- def visibility; end
-
- # @return [Symbol] the visibility of an object (:public, :private, :protected)
- #
- # source://yard//lib/yard/code_objects/base.rb#181
- def visibility=(v); end
-
- protected
-
- # Override this method if your code object subclass does not allow
- # copying of certain attributes.
- #
- # @return [Array] the list of instance variable names (without
- # "@" prefix) that should be copied when {#copy_to} is called
- # @see #copy_to
- # @since 0.8.0
- #
- # source://yard//lib/yard/code_objects/base.rb#587
- def copyable_attributes; end
-
- private
-
- # Formats source code by removing leading indentation
- #
- # @param source [String] the source code to format
- # @return [String] formatted source
- #
- # source://yard//lib/yard/code_objects/base.rb#599
- def format_source(source); end
-
- # source://yard//lib/yard/code_objects/base.rb#606
- def translate_docstring(locale); end
-
- class << self
- # Compares the class with subclasses
- #
- # @param other [Object] the other object to compare classes with
- # @return [Boolean] true if other is a subclass of self
- #
- # source://yard//lib/yard/code_objects/base.rb#219
- def ===(other); end
-
- # Allocates a new code object
- #
- # @raise [ArgumentError]
- # @return [Base]
- # @see #initialize
- # @yield [obj]
- #
- # source://yard//lib/yard/code_objects/base.rb#189
- def new(namespace, name, *args, &block); end
- end
-end
-
-# Regular expression to match constant name
-#
-# source://yard//lib/yard/code_objects/base.rb#52
-YARD::CodeObjects::CONSTANTMATCH = T.let(T.unsafe(nil), Regexp)
-
-# Regular expression to match the beginning of a constant
-#
-# source://yard//lib/yard/code_objects/base.rb#55
-YARD::CodeObjects::CONSTANTSTART = T.let(T.unsafe(nil), Regexp)
-
-# Class method separator
-#
-# source://yard//lib/yard/code_objects/base.rb#46
-YARD::CodeObjects::CSEP = T.let(T.unsafe(nil), String)
-
-# Regex-quoted class method separator
-#
-# source://yard//lib/yard/code_objects/base.rb#49
-YARD::CodeObjects::CSEPQ = T.let(T.unsafe(nil), String)
-
-# A ClassObject represents a Ruby class in source code. It is a {ModuleObject}
-# with extra inheritance semantics through the superclass.
-#
-# source://yard//lib/yard/code_objects/class_object.rb#7
-class YARD::CodeObjects::ClassObject < ::YARD::CodeObjects::NamespaceObject
- # Creates a new class object in +namespace+ with +name+
- #
- # @return [ClassObject] a new instance of ClassObject
- # @see Base.new
- #
- # source://yard//lib/yard/code_objects/class_object.rb#15
- def initialize(namespace, name, *args, &block); end
-
- # Returns the list of constants matching the options hash.
- #
- # @option opts
- # @option opts
- # @param opts [Hash] the options hash to match
- # @return [Array] the list of constant that matched
- #
- # source://yard//lib/yard/code_objects/class_object.rb#101
- def constants(opts = T.unsafe(nil)); end
-
- # Returns the inheritance tree of the object including self.
- #
- # @param include_mods [Boolean] whether or not to include mixins in the
- # inheritance tree.
- # @return [Array] the list of code objects that make up
- # the inheritance tree.
- #
- # source://yard//lib/yard/code_objects/class_object.rb#45
- def inheritance_tree(include_mods = T.unsafe(nil)); end
-
- # Returns only the constants that were inherited.
- #
- # @return [Array] the list of inherited constant objects
- #
- # source://yard//lib/yard/code_objects/class_object.rb#109
- def inherited_constants; end
-
- # Returns only the methods that were inherited.
- #
- # @return [Array] the list of inherited method objects
- #
- # source://yard//lib/yard/code_objects/class_object.rb#79
- def inherited_meths(opts = T.unsafe(nil)); end
-
- # Whether or not the class is a Ruby Exception
- #
- # @return [Boolean] whether the object represents a Ruby exception
- #
- # source://yard//lib/yard/code_objects/class_object.rb#35
- def is_exception?; end
-
- # Returns the list of methods matching the options hash. Returns
- # all methods if hash is empty.
- #
- # @option opts
- # @option opts
- # @param opts [Hash] the options hash to match
- # @return [Array] the list of methods that matched
- #
- # source://yard//lib/yard/code_objects/class_object.rb#66
- def meths(opts = T.unsafe(nil)); end
-
- # The {ClassObject} that this class object inherits from in Ruby source.
- #
- # @return [ClassObject] a class object that is the superclass of this one
- #
- # source://yard//lib/yard/code_objects/class_object.rb#10
- def superclass; end
-
- # Sets the superclass of the object
- #
- # @param object [Base, Proxy, String, Symbol, nil] the superclass value
- # @return [void]
- #
- # source://yard//lib/yard/code_objects/class_object.rb#125
- def superclass=(object); end
-end
-
-# Represents a class variable inside a namespace. The path is expressed
-# in the form "A::B::@@classvariable"
-#
-# source://yard//lib/yard/code_objects/class_variable_object.rb#7
-class YARD::CodeObjects::ClassVariableObject < ::YARD::CodeObjects::Base
- # @return [String] the class variable's value
- #
- # source://yard//lib/yard/code_objects/class_variable_object.rb#9
- def value; end
-
- # @return [String] the class variable's value
- #
- # source://yard//lib/yard/code_objects/class_variable_object.rb#9
- def value=(_arg0); end
-end
-
-# A list of code objects. This array acts like a set (no unique items)
-# but also disallows any {Proxy} objects from being added.
-#
-# source://yard//lib/yard/code_objects/base.rb#6
-class YARD::CodeObjects::CodeObjectList < ::Array
- # Creates a new object list associated with a namespace
- #
- # @param owner [NamespaceObject] the namespace the list should be associated with
- # @return [CodeObjectList]
- #
- # source://yard//lib/yard/code_objects/base.rb#11
- def initialize(owner = T.unsafe(nil)); end
-
- # Adds a new value to the list
- #
- # @param value [Base] a code object to add
- # @return [CodeObjectList] self
- #
- # source://yard//lib/yard/code_objects/base.rb#28
- def <<(value); end
-
- # Adds a new value to the list
- #
- # @param value [Base] a code object to add
- # @return [CodeObjectList] self
- #
- # source://yard//lib/yard/code_objects/base.rb#19
- def push(value); end
-end
-
-# A +ConstantObject+ represents a Ruby constant (not a module or class).
-# To access the constant's (source code) value, use {#value}.
-#
-# source://yard//lib/yard/code_objects/constant_object.rb#7
-class YARD::CodeObjects::ConstantObject < ::YARD::CodeObjects::Base
- # The source code representing the constant's value
- #
- # @return [String] the value the constant is set to
- #
- # source://yard//lib/yard/code_objects/constant_object.rb#10
- def value; end
-
- # source://yard//lib/yard/code_objects/constant_object.rb#12
- def value=(value); end
-end
-
-# Represents an instance method of a module that was mixed into the class
-# scope of another namespace.
-#
-# @see MethodObject
-#
-# source://yard//lib/yard/code_objects/extended_method_object.rb#7
-class YARD::CodeObjects::ExtendedMethodObject
- # Sets up a delegate for {MethodObject} obj.
- #
- # @param obj [MethodObject] the instance method to treat as a mixed in
- # class method on another namespace.
- # @return [ExtendedMethodObject] a new instance of ExtendedMethodObject
- #
- # source://yard//lib/yard/code_objects/extended_method_object.rb#17
- def initialize(obj); end
-
- # Sends all methods to the {MethodObject} assigned in {#initialize}
- #
- # @see #initialize
- # @see MethodObject
- #
- # source://yard//lib/yard/code_objects/extended_method_object.rb#22
- def method_missing(sym, *args, &block); end
-
- # @return [Symbol] always +:class+
- #
- # source://yard//lib/yard/code_objects/extended_method_object.rb#11
- def scope; end
-end
-
-# An ExtraFileObject represents an extra documentation file (README or other
-# file). It is not strictly a CodeObject (does not inherit from `Base`) although
-# it implements `path`, `name` and `type`, and therefore should be structurally
-# compatible with most CodeObject interfaces.
-#
-# source://yard//lib/yard/code_objects/extra_file_object.rb#7
-class YARD::CodeObjects::ExtraFileObject
- # Creates a new extra file object.
- #
- # @param contents [String] the file contents. If not set, the contents
- # will be read from disk using the +filename+.
- # @param filename [String] the location on disk of the file
- # @return [ExtraFileObject] a new instance of ExtraFileObject
- #
- # source://yard//lib/yard/code_objects/extra_file_object.rb#18
- def initialize(filename, contents = T.unsafe(nil)); end
-
- # source://yard//lib/yard/code_objects/extra_file_object.rb#64
- def ==(other); end
-
- # source://yard//lib/yard/code_objects/extra_file_object.rb#30
- def attributes; end
-
- # Sets the attribute attributes
- #
- # @param value the value to set the attribute attributes to.
- #
- # source://yard//lib/yard/code_objects/extra_file_object.rb#9
- def attributes=(_arg0); end
-
- # source://yard//lib/yard/code_objects/extra_file_object.rb#39
- def contents; end
-
- # source://yard//lib/yard/code_objects/extra_file_object.rb#44
- def contents=(contents); end
-
- # source://yard//lib/yard/code_objects/extra_file_object.rb#68
- def eql?(other); end
-
- # source://yard//lib/yard/code_objects/extra_file_object.rb#69
- def equal?(other); end
-
- # Returns the value of attribute filename.
- #
- # source://yard//lib/yard/code_objects/extra_file_object.rb#8
- def filename; end
-
- # Sets the attribute filename
- #
- # @param value the value to set the attribute filename to.
- #
- # source://yard//lib/yard/code_objects/extra_file_object.rb#8
- def filename=(_arg0); end
-
- # source://yard//lib/yard/code_objects/extra_file_object.rb#70
- def hash; end
-
- # source://yard//lib/yard/code_objects/extra_file_object.rb#57
- def inspect; end
-
- # @since 0.8.3
- #
- # source://yard//lib/yard/code_objects/extra_file_object.rb#12
- def locale; end
-
- # @param locale [String] the locale name to be translated.
- # @return [void]
- # @since 0.8.3
- #
- # source://yard//lib/yard/code_objects/extra_file_object.rb#52
- def locale=(locale); end
-
- # Returns the value of attribute name.
- #
- # source://yard//lib/yard/code_objects/extra_file_object.rb#10
- def name; end
-
- # Sets the attribute name
- #
- # @param value the value to set the attribute name to.
- #
- # source://yard//lib/yard/code_objects/extra_file_object.rb#10
- def name=(_arg0); end
-
- # Returns the value of attribute name.
- #
- # source://yard//lib/yard/code_objects/extra_file_object.rb#28
- def path; end
-
- # source://yard//lib/yard/code_objects/extra_file_object.rb#35
- def title; end
-
- # source://yard//lib/yard/code_objects/extra_file_object.rb#60
- def to_s; end
-
- # source://yard//lib/yard/code_objects/extra_file_object.rb#62
- def type; end
-
- private
-
- # source://yard//lib/yard/code_objects/extra_file_object.rb#74
- def ensure_parsed; end
-
- # @param data [String] the file contents
- #
- # source://yard//lib/yard/code_objects/extra_file_object.rb#81
- def parse_contents(data); end
-
- # source://yard//lib/yard/code_objects/extra_file_object.rb#129
- def translate(data); end
-end
-
-# Instance method separator
-#
-# source://yard//lib/yard/code_objects/base.rb#40
-YARD::CodeObjects::ISEP = T.let(T.unsafe(nil), String)
-
-# Regex-quoted instance method separator
-#
-# source://yard//lib/yard/code_objects/base.rb#43
-YARD::CodeObjects::ISEPQ = T.let(T.unsafe(nil), String)
-
-# Regular expression to match a fully qualified method def (self.foo, Class.foo).
-#
-# source://yard//lib/yard/code_objects/base.rb#64
-YARD::CodeObjects::METHODMATCH = T.let(T.unsafe(nil), Regexp)
-
-# Regular expression to match a method name
-#
-# source://yard//lib/yard/code_objects/base.rb#61
-YARD::CodeObjects::METHODNAMEMATCH = T.let(T.unsafe(nil), Regexp)
-
-# A MacroObject represents a docstring defined through +@!macro NAME+ and can be
-# reused by specifying the tag +@!macro NAME+. You can also provide the
-# +attached+ type flag to the macro definition to have it attached to the
-# specific DSL method so it will be implicitly reused.
-#
-# Macros are fully described in the {file:docs/Tags.md#macro Tags Overview}
-# document.
-#
-# @example Creating a basic named macro
-# # @!macro prop
-# # @!method $1(${3-})
-# # @return [$2] the value of the $0
-# property :foo, String, :a, :b
-#
-# # @!macro prop
-# property :bar, Numeric, :value
-# @example Creating a macro that is attached to the method call
-# # @!macro [attach] prop2
-# # @!method $1(value)
-# property :foo
-#
-# # Extra data added to docstring
-# property :bar
-#
-# source://yard//lib/yard/code_objects/macro_object.rb#29
-class YARD::CodeObjects::MacroObject < ::YARD::CodeObjects::Base
- # @return [Boolean] whether this macro is attached to a method
- #
- # source://yard//lib/yard/code_objects/macro_object.rb#148
- def attached?; end
-
- # Expands the macro using
- #
- # @example Expanding a Macro
- # macro.expand(%w(property foo bar), 'property :foo, :bar', '') #=>
- # "...macro data interpolating this line of code..."
- # @param block_source [String] the source passed in the block of the method
- # call, if there is a block.
- # @param call_params [Array] a list of tokens that are passed
- # to the method call
- # @param full_source [String] the full method call (not including the block)
- # @see expand
- #
- # source://yard//lib/yard/code_objects/macro_object.rb#166
- def expand(call_params = T.unsafe(nil), full_source = T.unsafe(nil), block_source = T.unsafe(nil)); end
-
- # @return [String] the macro data stored on the object
- #
- # source://yard//lib/yard/code_objects/macro_object.rb#141
- def macro_data; end
-
- # @return [String] the macro data stored on the object
- #
- # source://yard//lib/yard/code_objects/macro_object.rb#141
- def macro_data=(_arg0); end
-
- # @return [CodeObjects::Base] the method object that this macro is
- # attached to.
- #
- # source://yard//lib/yard/code_objects/macro_object.rb#145
- def method_object; end
-
- # @return [CodeObjects::Base] the method object that this macro is
- # attached to.
- #
- # source://yard//lib/yard/code_objects/macro_object.rb#145
- def method_object=(_arg0); end
-
- # Overrides {Base#path} so the macro path is ".macro.MACRONAME"
- #
- # source://yard//lib/yard/code_objects/macro_object.rb#151
- def path; end
-
- # Overrides the separator to be '.'
- #
- # source://yard//lib/yard/code_objects/macro_object.rb#154
- def sep; end
-
- class << self
- # Applies a macro on a docstring by creating any macro data inside of
- # the docstring first. Equivalent to calling {find_or_create} and {apply_macro}
- # on the new macro object.
- #
- # @param block_source [String] Currently unused. Will support
- # interpolating the block data as a variable.
- # @param call_params [Array] the method name and parameters
- # to the method call. These arguments will fill $0-N
- # @param docstring [Docstring] the docstring to create a macro out of
- # @param full_source [String] the full source line (excluding block)
- # interpolated as $*
- # @return [String] the expanded macro data
- # @see find_or_create
- #
- # source://yard//lib/yard/code_objects/macro_object.rb#119
- def apply(docstring, call_params = T.unsafe(nil), full_source = T.unsafe(nil), block_source = T.unsafe(nil), _method_object = T.unsafe(nil)); end
-
- # Applies a macro to a docstring, interpolating the macro's data on the
- # docstring and appending any extra local docstring data that was in
- # the original +docstring+ object.
- #
- # @param block_source [String] Currently unused. Will support
- # interpolating the block data as a variable.
- # @param call_params [Array] the method name and parameters
- # to the method call. These arguments will fill $0-N
- # @param full_source [String] the full source line (excluding block)
- # interpolated as $*
- # @param macro [MacroObject] the macro object
- # @return [String] the expanded macro data
- #
- # source://yard//lib/yard/code_objects/macro_object.rb#135
- def apply_macro(macro, docstring, call_params = T.unsafe(nil), full_source = T.unsafe(nil), block_source = T.unsafe(nil)); end
-
- # Creates a new macro and fills in the relevant properties.
- #
- # @param data [String] the data the macro should expand when re-used
- # @param macro_name [String] the name of the macro, must be unique.
- # @param method_object [CodeObjects::Base] an object to attach this
- # macro to. If supplied, {#attached?} will be true
- # @return [MacroObject] the newly created object
- #
- # source://yard//lib/yard/code_objects/macro_object.rb#39
- def create(macro_name, data, method_object = T.unsafe(nil)); end
-
- # Parses a given docstring and determines if the macro is "new" or
- # not. If the macro has $variable names or if it has a @!macro tag
- # with the [new] or [attached] flag, it is considered new.
- #
- # If a new macro is found, the macro is created and registered. Otherwise
- # the macro name is searched and returned. If a macro is not found,
- # nil is returned.
- #
- # @param macro_name [#to_s] the name of the macro
- # @param method_object [CodeObjects::Base] an optional method to attach
- # the macro to. Only used if the macro is being created, otherwise
- # this argument is ignored.
- # @return [MacroObject] the newly created or existing macro, depending
- # on whether the @!macro tag was a new tag or not.
- # @return [nil] if the +data+ has no macro tag or if the macro is
- # not new and no macro by the macro name is found.
- #
- # source://yard//lib/yard/code_objects/macro_object.rb#73
- def create_docstring(macro_name, data, method_object = T.unsafe(nil)); end
-
- # Expands +macro_data+ using the interpolation parameters.
- #
- # Interpolation rules:
- # * $0, $1, $2, ... = the Nth parameter in +call_params+
- # * $* = the full statement source (excluding block)
- # * Also supports $!{N-M} ranges, as well as negative indexes on N or M
- # * Use \$ to escape the variable name in a macro.
- #
- # @param macro_data [String] the macro data to expand (taken from {#macro_data})
- #
- # source://yard//lib/yard/code_objects/macro_object.rb#92
- def expand(macro_data, call_params = T.unsafe(nil), full_source = T.unsafe(nil), block_source = T.unsafe(nil)); end
-
- # Finds a macro using +macro_name+
- #
- # @param macro_name [#to_s] the name of the macro
- # @return [MacroObject] if a macro is found
- # @return [nil] if there is no registered macro by that name
- #
- # source://yard//lib/yard/code_objects/macro_object.rb#50
- def find(macro_name); end
-
- # Parses a given docstring and determines if the macro is "new" or
- # not. If the macro has $variable names or if it has a @!macro tag
- # with the [new] or [attached] flag, it is considered new.
- #
- # If a new macro is found, the macro is created and registered. Otherwise
- # the macro name is searched and returned. If a macro is not found,
- # nil is returned.
- #
- # @param macro_name [#to_s] the name of the macro
- # @param method_object [CodeObjects::Base] an optional method to attach
- # the macro to. Only used if the macro is being created, otherwise
- # this argument is ignored.
- # @return [MacroObject] the newly created or existing macro, depending
- # on whether the @!macro tag was a new tag or not.
- # @return [nil] if the +data+ has no macro tag or if the macro is
- # not new and no macro by the macro name is found.
- #
- # source://yard//lib/yard/code_objects/macro_object.rb#70
- def find_or_create(macro_name, data, method_object = T.unsafe(nil)); end
- end
-end
-
-# source://yard//lib/yard/code_objects/macro_object.rb#30
-YARD::CodeObjects::MacroObject::MACRO_MATCH = T.let(T.unsafe(nil), Regexp)
-
-# Represents a Ruby method in source
-#
-# source://yard//lib/yard/code_objects/method_object.rb#7
-class YARD::CodeObjects::MethodObject < ::YARD::CodeObjects::Base
- # Creates a new method object in +namespace+ with +name+ and an instance
- # or class +scope+
- #
- # If scope is +:module+, this object is instantiated as a public
- # method in +:class+ scope, but also creates a new (empty) method
- # as a private +:instance+ method on the same class or module.
- #
- # @param name [String, Symbol] the method name
- # @param namespace [NamespaceObject] the namespace
- # @param scope [Symbol] +:instance+, +:class+, or +:module+
- # @return [MethodObject] a new instance of MethodObject
- #
- # source://yard//lib/yard/code_objects/method_object.rb#37
- def initialize(namespace, name, scope = T.unsafe(nil), &block); end
-
- # Returns all alias names of the object
- #
- # @return [Array] the alias names
- #
- # source://yard//lib/yard/code_objects/method_object.rb#149
- def aliases; end
-
- # Returns the read/writer info for the attribute if it is one
- #
- # @return [SymbolHash] if there is information about the attribute
- # @return [nil] if the method is not an attribute
- # @since 0.5.3
- #
- # source://yard//lib/yard/code_objects/method_object.rb#93
- def attr_info; end
-
- # @return [Boolean] whether or not the method is the #initialize constructor method
- #
- # source://yard//lib/yard/code_objects/method_object.rb#78
- def constructor?; end
-
- # Whether the object is explicitly defined in source or whether it was
- # inferred by a handler. For instance, attribute methods are generally
- # inferred and therefore not explicitly defined in source.
- #
- # @return [Boolean] whether the object is explicitly defined in source.
- #
- # source://yard//lib/yard/code_objects/method_object.rb#18
- def explicit; end
-
- # Whether the object is explicitly defined in source or whether it was
- # inferred by a handler. For instance, attribute methods are generally
- # inferred and therefore not explicitly defined in source.
- #
- # @return [Boolean] whether the object is explicitly defined in source.
- #
- # source://yard//lib/yard/code_objects/method_object.rb#18
- def explicit=(_arg0); end
-
- # Tests if the object is defined as an alias of another method
- #
- # @return [Boolean] whether the object is an alias
- #
- # source://yard//lib/yard/code_objects/method_object.rb#126
- def is_alias?; end
-
- # Tests if the object is defined as an attribute in the namespace
- #
- # @return [Boolean] whether the object is an attribute
- #
- # source://yard//lib/yard/code_objects/method_object.rb#114
- def is_attribute?; end
-
- # Tests boolean {#explicit} value.
- #
- # @return [Boolean] whether the method is explicitly defined in source
- #
- # source://yard//lib/yard/code_objects/method_object.rb#134
- def is_explicit?; end
-
- # @return [Boolean] whether or not this method was created as a module
- # function
- # @since 0.8.0
- #
- # source://yard//lib/yard/code_objects/method_object.rb#85
- def module_function?; end
-
- # Returns the name of the object.
- #
- # @example The name of a class method (with prefix)
- # a_class_method.name(true) # => "mymethod"
- # @example The name of an instance method (with prefix)
- # an_instance_method.name(true) # => "#mymethod"
- # @param prefix [Boolean] whether or not to show the prefix
- # @return [String] returns {#sep} + +name+ for an instance method if
- # prefix is true
- # @return [Symbol] the name without {#sep} if prefix is set to false
- #
- # source://yard//lib/yard/code_objects/method_object.rb#175
- def name(prefix = T.unsafe(nil)); end
-
- # @return [MethodObject] the object that this method overrides
- # @return [nil] if it does not override a method
- # @since 0.6.0
- #
- # source://yard//lib/yard/code_objects/method_object.rb#141
- def overridden_method; end
-
- # Returns the list of parameters parsed out of the method signature
- # with their default values.
- #
- # @return [Array] a list of parameter names followed
- # by their default values (or nil)
- #
- # source://yard//lib/yard/code_objects/method_object.rb#25
- def parameters; end
-
- # Returns the list of parameters parsed out of the method signature
- # with their default values.
- #
- # @return [Array] a list of parameter names followed
- # by their default values (or nil)
- #
- # source://yard//lib/yard/code_objects/method_object.rb#25
- def parameters=(_arg0); end
-
- # Override path handling for instance methods in the root namespace
- # (they should still have a separator as a prefix).
- #
- # @return [String] the path of a method
- #
- # source://yard//lib/yard/code_objects/method_object.rb#161
- def path; end
-
- # @return [Boolean] whether the method is a reader attribute
- # @since 0.5.3
- #
- # source://yard//lib/yard/code_objects/method_object.rb#107
- def reader?; end
-
- # The scope of the method (+:class+ or +:instance+)
- #
- # @return [Symbol] the scope
- #
- # source://yard//lib/yard/code_objects/method_object.rb#11
- def scope; end
-
- # Changes the scope of an object from :instance or :class
- #
- # @param v [Symbol] the new scope
- #
- # source://yard//lib/yard/code_objects/method_object.rb#58
- def scope=(v); end
-
- # Override separator to differentiate between class and instance
- # methods.
- #
- # @return [String] "#" for an instance method, "." for class
- #
- # source://yard//lib/yard/code_objects/method_object.rb#182
- def sep; end
-
- # @return [Boolean] whether the method is a writer attribute
- # @since 0.5.3
- #
- # source://yard//lib/yard/code_objects/method_object.rb#100
- def writer?; end
-
- protected
-
- # source://yard//lib/yard/code_objects/method_object.rb#192
- def copyable_attributes; end
-end
-
-# Represents a Ruby module.
-#
-# source://yard//lib/yard/code_objects/module_object.rb#6
-class YARD::CodeObjects::ModuleObject < ::YARD::CodeObjects::NamespaceObject
- # Returns the inheritance tree of mixins.
- #
- # @param include_mods [Boolean] if true, will include mixed in
- # modules (which is likely what is wanted).
- # @return [Array] a list of namespace objects
- #
- # source://yard//lib/yard/code_objects/module_object.rb#12
- def inheritance_tree(include_mods = T.unsafe(nil)); end
-end
-
-# Regular expression to match namespaces (const A or complex path A::B)
-#
-# source://yard//lib/yard/code_objects/base.rb#58
-YARD::CodeObjects::NAMESPACEMATCH = T.let(T.unsafe(nil), Regexp)
-
-# Namespace separator
-#
-# source://yard//lib/yard/code_objects/base.rb#34
-YARD::CodeObjects::NSEP = T.let(T.unsafe(nil), String)
-
-# Regex-quoted namespace separator
-#
-# source://yard//lib/yard/code_objects/base.rb#37
-YARD::CodeObjects::NSEPQ = T.let(T.unsafe(nil), String)
-
-# This module controls registration and accessing of namespace separators
-# for {Registry} lookup.
-#
-# @since 0.9.1
-#
-# source://yard//lib/yard/code_objects/namespace_mapper.rb#8
-module YARD::CodeObjects::NamespaceMapper
- # Clears the map of separators.
- #
- # @return [void]
- # @since 0.9.1
- #
- # source://yard//lib/yard/code_objects/namespace_mapper.rb#55
- def clear_separators; end
-
- # Gets or sets the default separator value to use when no
- # separator for the namespace can be determined.
- #
- # @example
- # default_separator "::"
- # @param value [String, nil] the default separator, or nil to return the
- # value
- # @since 0.9.1
- #
- # source://yard//lib/yard/code_objects/namespace_mapper.rb#68
- def default_separator(value = T.unsafe(nil)); end
-
- # Registers a separator with an optional set of valid types that
- # must follow the separator lexically.
- #
- # Calls all callbacks defined by {NamespaceMapper.on_invalidate} after
- # the separator is registered.
- #
- # @example Registering separators for a method object
- # # Anything after a "#" denotes a method object
- # register_separator "#", :method
- # # Anything after a "." denotes a method object
- # register_separator ".", :method
- # @param sep [String] the separator string for the namespace
- # @param valid_types [Array] a list of object types that
- # must follow the separator. If the list is empty, any type can
- # follow the separator.
- # @see .on_invalidate
- # @since 0.9.1
- #
- # source://yard//lib/yard/code_objects/namespace_mapper.rb#27
- def register_separator(sep, *valid_types); end
-
- # @return [Array] all of the registered separators
- # @since 0.9.1
- #
- # source://yard//lib/yard/code_objects/namespace_mapper.rb#80
- def separators; end
-
- # @param type [String] the type to return separators for
- # @return [Array] a list of separators registered to a type
- # @since 0.9.1
- #
- # source://yard//lib/yard/code_objects/namespace_mapper.rb#97
- def separators_for_type(type); end
-
- # @return [Regexp] the regexp match of all separators
- # @since 0.9.1
- #
- # source://yard//lib/yard/code_objects/namespace_mapper.rb#85
- def separators_match; end
-
- # @param sep [String] the separator to return types for
- # @return [Array] a list of types registered to a separator
- # @since 0.9.1
- #
- # source://yard//lib/yard/code_objects/namespace_mapper.rb#91
- def types_for_separator(sep); end
-
- # Unregisters a separator by a type.
- #
- # @param type [Symbol] the type to unregister
- # @see #register_separator
- # @since 0.9.1
- #
- # source://yard//lib/yard/code_objects/namespace_mapper.rb#43
- def unregister_separator_by_type(type); end
-
- class << self
- # @return [String] the default separator when no separator can begin
- # determined.
- # @since 0.9.1
- #
- # source://yard//lib/yard/code_objects/namespace_mapper.rb#137
- def default_separator; end
-
- # @return [String] the default separator when no separator can begin
- # determined.
- # @since 0.9.1
- #
- # source://yard//lib/yard/code_objects/namespace_mapper.rb#137
- def default_separator=(_arg0); end
-
- # Invalidates all separators
- #
- # @return [void]
- # @since 0.9.1
- #
- # source://yard//lib/yard/code_objects/namespace_mapper.rb#125
- def invalidate; end
-
- # @return [Hash] a mapping of types to separators
- # @since 0.9.1
- #
- # source://yard//lib/yard/code_objects/namespace_mapper.rb#114
- def map; end
-
- # @return [Regexp] the full list of separators as a regexp match
- # @since 0.9.1
- #
- # source://yard//lib/yard/code_objects/namespace_mapper.rb#131
- def map_match; end
-
- # Adds a callback that triggers when a new separator is registered or
- # the cache is cleared by invalidation.
- #
- # @since 0.9.1
- #
- # source://yard//lib/yard/code_objects/namespace_mapper.rb#107
- def on_invalidate(&block); end
-
- # @return [Hash] a reverse mapping of separators to types
- # @since 0.9.1
- #
- # source://yard//lib/yard/code_objects/namespace_mapper.rb#119
- def rev_map; end
- end
-end
-
-# A "namespace" is any object that can store other objects within itself.
-# The two main Ruby objects that can act as namespaces are modules
-# ({ModuleObject}) and classes ({ClassObject}).
-#
-# source://yard//lib/yard/code_objects/namespace_object.rb#9
-class YARD::CodeObjects::NamespaceObject < ::YARD::CodeObjects::Base
- # Creates a new namespace object inside +namespace+ with +name+.
- #
- # @return [NamespaceObject] a new instance of NamespaceObject
- # @see Base#initialize
- #
- # source://yard//lib/yard/code_objects/namespace_object.rb#56
- def initialize(namespace, name, *args, &block); end
-
- # A hash containing two keys, :class and :instance, each containing
- # a hash of objects and their alias names.
- #
- # @return [Hash] a list of methods
- #
- # source://yard//lib/yard/code_objects/namespace_object.rb#44
- def aliases; end
-
- # A hash containing two keys, class and instance, each containing
- # the attribute name with a { :read, :write } hash for the read and
- # write objects respectively.
- #
- # @example The attributes of an object
- # >> Registry.at('YARD::Docstring').attributes
- # => {
- # :class => { },
- # :instance => {
- # :ref_tags => {
- # :read => #,
- # :write => nil
- # },
- # :object => {
- # :read => #,
- # :write => #
- # },
- # ...
- # }
- # }
- # @return [Hash] a list of methods
- #
- # source://yard//lib/yard/code_objects/namespace_object.rb#39
- def attributes; end
-
- # Looks for a child that matches the attributes specified by +opts+.
- #
- # @example Finds a child by name and scope
- # namespace.child(:name => :to_s, :scope => :instance)
- # # => #
- # @return [Base, nil] the first matched child object, or nil
- #
- # source://yard//lib/yard/code_objects/namespace_object.rb#86
- def child(opts = T.unsafe(nil)); end
-
- # The list of objects defined in this namespace
- #
- # @return [Array] a list of objects
- #
- # source://yard//lib/yard/code_objects/namespace_object.rb#16
- def children; end
-
- # Only the class attributes
- #
- # @return [Hash] a list of method names and their read/write objects
- # @see #attributes
- #
- # source://yard//lib/yard/code_objects/namespace_object.rb#69
- def class_attributes; end
-
- # Class mixins
- #
- # @return [Array] a list of mixins
- #
- # source://yard//lib/yard/code_objects/namespace_object.rb#48
- def class_mixins; end
-
- # Returns all constants in the namespace
- #
- # @option opts
- # @param opts [Hash] a customizable set of options
- # @return [Array] a list of constant objects
- #
- # source://yard//lib/yard/code_objects/namespace_object.rb#164
- def constants(opts = T.unsafe(nil)); end
-
- # Returns class variables defined in this namespace.
- #
- # @return [Array] a list of class variable objects
- #
- # source://yard//lib/yard/code_objects/namespace_object.rb#186
- def cvars; end
-
- # @return [Array] a list of ordered group names inside the namespace
- # @since 0.6.0
- #
- # source://yard//lib/yard/code_objects/namespace_object.rb#12
- def groups; end
-
- # @return [Array] a list of ordered group names inside the namespace
- # @since 0.6.0
- #
- # source://yard//lib/yard/code_objects/namespace_object.rb#12
- def groups=(_arg0); end
-
- # Returns constants included from any mixins
- #
- # @return [Array] a list of constant objects
- #
- # source://yard//lib/yard/code_objects/namespace_object.rb#172
- def included_constants; end
-
- # Returns methods included from any mixins that match the attributes
- # specified by +opts+. If no options are specified, returns all included
- # methods.
- #
- # @option opts
- # @option opts
- # @option opts
- # @param opts [Hash] a customizable set of options
- # @see #meths
- #
- # source://yard//lib/yard/code_objects/namespace_object.rb#144
- def included_meths(opts = T.unsafe(nil)); end
-
- # Only the instance attributes
- #
- # @return [Hash] a list of method names and their read/write objects
- # @see #attributes
- #
- # source://yard//lib/yard/code_objects/namespace_object.rb#76
- def instance_attributes; end
-
- # Instance mixins
- #
- # @return [Array] a list of mixins
- #
- # source://yard//lib/yard/code_objects/namespace_object.rb#52
- def instance_mixins; end
-
- # Returns all methods that match the attributes specified by +opts+. If
- # no options are provided, returns all methods.
- #
- # @example Finds all private and protected class methods
- # namespace.meths(:visibility => [:private, :protected], :scope => :class)
- # # => [#, #]
- # @option opts
- # @option opts
- # @option opts
- # @param opts [Hash] a customizable set of options
- # @return [Array] a list of method objects
- #
- # source://yard//lib/yard/code_objects/namespace_object.rb#113
- def meths(opts = T.unsafe(nil)); end
-
- # Returns for specific scopes. If no scopes are provided, returns all mixins.
- #
- # @param scopes [Array] a list of scopes (:class, :instance) to
- # return mixins for. If this is empty, all scopes will be returned.
- # @return [Array] a list of mixins
- #
- # source://yard//lib/yard/code_objects/namespace_object.rb#194
- def mixins(*scopes); end
-end
-
-# @private
-#
-# source://yard//lib/yard/code_objects/proxy.rb#8
-YARD::CodeObjects::PROXY_MATCH = T.let(T.unsafe(nil), Regexp)
-
-# The Proxy class is a way to lazily resolve code objects in
-# cases where the object may not yet exist. A proxy simply stores
-# an unresolved path until a method is called on the object, at which
-# point it does a lookup using {Registry.resolve}. If the object is
-# not found, a warning is raised and {ProxyMethodError} might be raised.
-#
-# @example Creates a Proxy to the String class from a module
-# # When the String class is parsed this method will
-# # begin to act like the String ClassObject.
-# Proxy.new(mymoduleobj, "String")
-# @see ProxyMethodError
-# @see Registry.resolve
-#
-# source://yard//lib/yard/code_objects/proxy.rb#24
-class YARD::CodeObjects::Proxy
- # Creates a new Proxy
- #
- # @raise [ArgumentError] if namespace is not a NamespaceObject
- # @return [Proxy] self
- #
- # source://yard//lib/yard/code_objects/proxy.rb#34
- def initialize(namespace, name, type = T.unsafe(nil)); end
-
- # @return [Boolean]
- #
- # source://yard//lib/yard/code_objects/proxy.rb#118
- def <=>(other); end
-
- # @return [Boolean]
- #
- # source://yard//lib/yard/code_objects/proxy.rb#134
- def ==(other); end
-
- # @return [Boolean]
- #
- # source://yard//lib/yard/code_objects/proxy.rb#113
- def ===(other); end
-
- # Returns the class name of the object the proxy is mimicking, if
- # resolved. Otherwise returns +Proxy+.
- #
- # @return [Class] the resolved object's class or +Proxy+
- #
- # source://yard//lib/yard/code_objects/proxy.rb#142
- def class; end
-
- # @return [Boolean]
- #
- # source://yard//lib/yard/code_objects/proxy.rb#127
- def equal?(other); end
-
- # @return [Integer] the object's hash value (for equality checking)
- #
- # source://yard//lib/yard/code_objects/proxy.rb#137
- def hash; end
-
- # Returns a text representation of the Proxy
- #
- # @return [String] the object's #inspect method or P(OBJECTPATH)
- #
- # source://yard//lib/yard/code_objects/proxy.rb#91
- def inspect; end
-
- # @return [Boolean]
- #
- # source://yard//lib/yard/code_objects/proxy.rb#161
- def instance_of?(klass); end
-
- # @return [Boolean]
- #
- # source://yard//lib/yard/code_objects/proxy.rb#108
- def is_a?(klass); end
-
- # @return [Boolean]
- #
- # source://yard//lib/yard/code_objects/proxy.rb#166
- def kind_of?(klass); end
-
- # Dispatches the method to the resolved object.
- #
- # @raise [ProxyMethodError] if the proxy cannot find the real object
- #
- # source://yard//lib/yard/code_objects/proxy.rb#178
- def method_missing(meth, *args, &block); end
-
- # The name of the object
- #
- # @param prefix [Boolean] whether to show a prefix. Implement
- # this in a subclass to define how the prefix is showed.
- # @return [Symbol] if prefix is false, the symbolized name
- # @return [String] if prefix is true, prefix + the name as a String.
- # This must be implemented by the subclass.
- #
- # source://yard//lib/yard/code_objects/proxy.rb#85
- def name(prefix = T.unsafe(nil)); end
-
- # Returns the value of attribute namespace.
- #
- # source://yard//lib/yard/code_objects/proxy.rb#27
- def namespace; end
-
- # Returns the value of attribute namespace.
- #
- # source://yard//lib/yard/code_objects/proxy.rb#28
- def parent; end
-
- # If the proxy resolves to an object, returns its path, otherwise
- # guesses at the correct path using the original namespace and name.
- #
- # @return [String] the assumed path of the proxy (or the real path
- # of the resolved object)
- #
- # source://yard//lib/yard/code_objects/proxy.rb#100
- def path; end
-
- # @return [Boolean]
- #
- # source://yard//lib/yard/code_objects/proxy.rb#171
- def respond_to?(meth, include_private = T.unsafe(nil)); end
-
- # This class is never a root object
- #
- # @return [Boolean]
- #
- # source://yard//lib/yard/code_objects/proxy.rb#200
- def root?; end
-
- # If the proxy resolves to an object, returns its path, otherwise
- # guesses at the correct path using the original namespace and name.
- #
- # @return [String] the assumed path of the proxy (or the real path
- # of the resolved object)
- #
- # source://yard//lib/yard/code_objects/proxy.rb#105
- def title; end
-
- # If the proxy resolves to an object, returns its path, otherwise
- # guesses at the correct path using the original namespace and name.
- #
- # @return [String] the assumed path of the proxy (or the real path
- # of the resolved object)
- #
- # source://yard//lib/yard/code_objects/proxy.rb#103
- def to_s; end
-
- # If the proxy resolves to an object, returns its path, otherwise
- # guesses at the correct path using the original namespace and name.
- #
- # @return [String] the assumed path of the proxy (or the real path
- # of the resolved object)
- #
- # source://yard//lib/yard/code_objects/proxy.rb#104
- def to_str; end
-
- # Returns the type of the proxy. If it cannot be resolved at the
- # time of the call, it will either return the inferred proxy type
- # (see {#type=}) or +:proxy+
- #
- # @return [Symbol] the Proxy's type
- # @see #type=
- #
- # source://yard//lib/yard/code_objects/proxy.rb#151
- def type; end
-
- # Allows a parser to infer the type of the proxy by its path.
- #
- # @param type [#to_sym] the proxy's inferred type
- # @return [void]
- #
- # source://yard//lib/yard/code_objects/proxy.rb#158
- def type=(type); end
-
- private
-
- # source://yard//lib/yard/code_objects/proxy.rb#228
- def proxy_path; end
-
- # @note this method fixes a bug in 1.9.2: http://gist.github.com/437136
- #
- # source://yard//lib/yard/code_objects/proxy.rb#205
- def to_ary; end
-
- # Attempts to find the object that this unresolved object
- # references by checking if any objects by this name are
- # registered all the way up the namespace tree.
- #
- # @return [Base, nil] the registered code object or nil
- #
- # source://yard//lib/yard/code_objects/proxy.rb#212
- def to_obj; end
-
- class << self
- # source://yard//lib/yard/code_objects/proxy.rb#25
- def ===(other); end
- end
-end
-
-# A special type of +NoMethodError+ when raised from a {Proxy}
-#
-# source://yard//lib/yard/code_objects/proxy.rb#5
-class YARD::CodeObjects::ProxyMethodError < ::NoMethodError; end
-
-# Represents the root namespace object (the invisible Ruby module that
-# holds all top level modules, class and other objects).
-#
-# source://yard//lib/yard/code_objects/root_object.rb#6
-class YARD::CodeObjects::RootObject < ::YARD::CodeObjects::ModuleObject
- # @return [Boolean]
- #
- # source://yard//lib/yard/code_objects/root_object.rb#12
- def equal?(other); end
-
- # source://yard//lib/yard/code_objects/root_object.rb#16
- def hash; end
-
- # source://yard//lib/yard/code_objects/root_object.rb#8
- def inspect; end
-
- # source://yard//lib/yard/code_objects/root_object.rb#7
- def path; end
-
- # @return [Boolean]
- #
- # source://yard//lib/yard/code_objects/root_object.rb#9
- def root?; end
-
- # source://yard//lib/yard/code_objects/root_object.rb#10
- def title; end
-end
-
-# This class maintains all system-wide configuration for YARD and handles
-# the loading of plugins. To access options call {options}, and to load
-# a plugin use {load_plugin}. All other public methods are used by YARD
-# during load time.
-#
-# == User Configuration Files
-#
-# Persistent user configuration files can be stored in the file
-# +~/.yard/config+, which is read when YARD first loads. The file should
-# be formatted as YAML, and should contain a map of keys and values.
-#
-# Although you can specify any key-value mapping in the configuration file,
-# YARD defines special keys specified in {DEFAULT_CONFIG_OPTIONS}.
-#
-# An example of a configuration file is listed below:
-#
-# !!!yaml
-# load_plugins: true # Auto-load plugins when YARD starts
-# ignored_plugins:
-# - yard-broken
-# - broken2 # yard- prefix not necessary
-# autoload_plugins:
-# - yard-rspec
-#
-# == Automatic Loading of Plugins
-#
-# YARD 0.6.2 will no longer automatically load all plugins by default. This
-# option can be reset by setting 'load_plugins' to true in the configuration
-# file. In addition, you can specify a set of specific plugins to load on
-# load through the 'autoload_plugins' list setting. This setting is
-# independent of the 'load_plugins' value and will always be processed.
-#
-# == Ignored Plugins File
-#
-# YARD 0.5 and below used a +~/.yard/ignored_plugins+ file to specify
-# plugins to be ignored at load time. Ignored plugins in 0.6.2 and above
-# should now be specified in the main configuration file, though YARD
-# will support the +ignored_plugins+ file until 0.7.x.
-#
-# == Safe Mode
-#
-# YARD supports running in safe-mode. By doing this, it will avoid executing
-# any user code such as require files or queries. Plugins will still be
-# loaded with safe mode on, because plugins are properly namespaced with
-# a 'yard-' prefix, must be installed as a gem, and therefore cannot be
-# touched by the user. To specify safe mode, use the +safe_mode+ key.
-#
-# == Plugin Specific Configuration
-#
-# Additional settings can be defined within the configuration file
-# specifically to provide configuration for a plugin. A plugin that utilizes
-# the YARD configuration is strongly encouraged to utilize namespacing of
-# their configuration content.
-#
-# !!!yaml
-# load_plugins: true # Auto-load plugins when YARD starts
-# ignored_plugins:
-# - yard-broken
-# - broken2 # yard- prefix not necessary
-# autoload_plugins:
-# - yard-rspec
-# # Plugin Specific Configuration
-# yard-sample-plugin:
-# show-results-inline: true
-#
-# As the configuration is available system wide, it can be
-# accessed within the plugin code.
-#
-#
-# if YARD::Config.options['yard-sample-plugin'] and
-# YARD::Config.options['yard-sample-plugin']['show-results-inline']
-# # ... perform the action that places the results inline ...
-# else
-# # ... do the default behavior of not showing the results inline ...
-# end
-#
-# When accessing the configuration, be aware that this file is user managed
-# so configuration keys and values may not be present. Make no assumptions and
-# instead ensure that you check for the existence of keys before proceeding to
-# retrieve values.
-#
-# @see options
-# @since 0.6.2
-#
-# source://yard//lib/yard/config.rb#86
-class YARD::Config
- class << self
- # Legacy support for {IGNORED_PLUGINS}
- #
- # @since 0.6.2
- #
- # source://yard//lib/yard/config.rb#221
- def add_ignored_plugins_file; end
-
- # @return [Array] arguments from commandline and yardopts file
- # @since 0.6.2
- #
- # source://yard//lib/yard/config.rb#268
- def arguments; end
-
- # Loads settings from {CONFIG_FILE}. This method is called by YARD at
- # load time and should not be called by the user.
- #
- # @return [void]
- # @since 0.6.2
- #
- # source://yard//lib/yard/config.rb#119
- def load; end
-
- # Load plugins set in :autoload_plugins
- #
- # @since 0.6.2
- #
- # source://yard//lib/yard/config.rb#189
- def load_autoload_plugins; end
-
- # Load plugins from {arguments}
- #
- # @since 0.6.2
- #
- # source://yard//lib/yard/config.rb#194
- def load_commandline_plugins; end
-
- # Check for command-line safe_mode switch in {arguments}
- #
- # @since 0.6.2
- #
- # source://yard//lib/yard/config.rb#204
- def load_commandline_safemode; end
-
- # Load gem plugins if :load_plugins is true
- #
- # @since 0.6.2
- #
- # source://yard//lib/yard/config.rb#169
- def load_gem_plugins; end
-
- # Loads an individual plugin by name. It is not necessary to include the
- # +yard-+ plugin prefix here.
- #
- # @param name [String] the name of the plugin (with or without +yard-+ prefix)
- # @return [Boolean] whether the plugin was successfully loaded
- # @since 0.6.2
- #
- # source://yard//lib/yard/config.rb#157
- def load_plugin(name); end
-
- # Print a warning if the plugin failed to load
- #
- # @return [false]
- # @since 0.6.2
- #
- # source://yard//lib/yard/config.rb#214
- def load_plugin_failed(name, exception); end
-
- # Loads gems that match the name 'yard-*' (recommended) or 'yard_*' except
- # those listed in +~/.yard/ignored_plugins+. This is called immediately
- # after YARD is loaded to allow plugin support.
- #
- # @return [Boolean] true if all plugins loaded successfully, false otherwise.
- # @since 0.6.2
- #
- # source://yard//lib/yard/config.rb#146
- def load_plugins; end
-
- # The system-wide configuration options for YARD
- #
- # @return [SymbolHash] a map a key-value pair settings.
- # @see DEFAULT_CONFIG_OPTIONS
- # @since 0.6.2
- #
- # source://yard//lib/yard/config.rb#91
- def options; end
-
- # The system-wide configuration options for YARD
- #
- # @return [SymbolHash] a map a key-value pair settings.
- # @see DEFAULT_CONFIG_OPTIONS
- # @since 0.6.2
- #
- # source://yard//lib/yard/config.rb#91
- def options=(_arg0); end
-
- # Loads the YAML configuration file into memory
- #
- # @return [Hash] the contents of the YAML file from disk
- # @see CONFIG_FILE
- # @since 0.6.2
- #
- # source://yard//lib/yard/config.rb#236
- def read_config_file; end
-
- # Saves settings to {CONFIG_FILE}.
- #
- # @return [void]
- # @since 0.6.2
- #
- # source://yard//lib/yard/config.rb#135
- def save; end
-
- # Sanitizes and normalizes a plugin name to include the 'yard-' prefix.
- #
- # @param name [String] the plugin name
- # @return [String] the sanitized and normalized plugin name.
- # @since 0.6.2
- #
- # source://yard//lib/yard/config.rb#252
- def translate_plugin_name(name); end
-
- # Translates plugin names to add yard- prefix.
- #
- # @since 0.6.2
- #
- # source://yard//lib/yard/config.rb#228
- def translate_plugin_names; end
-
- # Temporarily loads .yardopts file into @yardopts
- #
- # @since 0.6.2
- #
- # source://yard//lib/yard/config.rb#259
- def with_yardopts; end
- end
-end
-
-# The location where YARD stores user-specific settings
-#
-# @since 0.6.2
-#
-# source://yard//lib/yard/config.rb#95
-YARD::Config::CONFIG_DIR = T.let(T.unsafe(nil), String)
-
-# The main configuration YAML file.
-#
-# @since 0.6.2
-#
-# source://yard//lib/yard/config.rb#98
-YARD::Config::CONFIG_FILE = T.let(T.unsafe(nil), String)
-
-# Default configuration options
-#
-# @since 0.6.2
-#
-# source://yard//lib/yard/config.rb#105
-YARD::Config::DEFAULT_CONFIG_OPTIONS = T.let(T.unsafe(nil), Hash)
-
-# File listing all ignored plugins
-#
-# @deprecated Set `ignored_plugins` in the {CONFIG_FILE} instead.
-# @since 0.6.2
-#
-# source://yard//lib/yard/config.rb#102
-YARD::Config::IGNORED_PLUGINS = T.let(T.unsafe(nil), String)
-
-# The prefix used for YARD plugins. Name your gem with this prefix
-# to allow it to be used as a plugin.
-#
-# @since 0.6.2
-#
-# source://yard//lib/yard/config.rb#114
-YARD::Config::YARD_PLUGIN_PREFIX = T.let(T.unsafe(nil), Regexp)
-
-# A documentation string, or "docstring" for short, encapsulates the
-# comments and metadata, or "tags", of an object. Meta-data is expressed
-# in the form +@tag VALUE+, where VALUE can span over multiple lines as
-# long as they are indented. The following +@example+ tag shows how tags
-# can be indented:
-#
-# # @example My example
-# # a = "hello world"
-# # a.reverse
-# # @version 1.0
-#
-# Tags can be nested in a documentation string, though the {Tags::Tag}
-# itself is responsible for parsing the inner tags.
-#
-# source://yard//lib/yard/docstring.rb#16
-class YARD::Docstring < ::String
- # Creates a new docstring with the raw contents attached to an optional
- # object. Parsing will be done by the {DocstringParser} class.
- #
- # @example
- # Docstring.new("hello world\n@return Object return", someobj)
- # @note To properly parse directives with proper parser context within
- # handlers, you should not use this method to create a Docstring.
- # Instead, use the {parser}, which takes a handler object that
- # can pass parser state onto directives. If a Docstring is created
- # with this method, directives do not have access to any parser
- # state, and may not function as expected.
- # @param content [String] the raw comments to be parsed into a docstring
- # and associated meta-data.
- # @param object [CodeObjects::Base] an object to associate the docstring
- # with.
- # @return [Docstring] a new instance of Docstring
- #
- # source://yard//lib/yard/docstring.rb#103
- def initialize(content = T.unsafe(nil), object = T.unsafe(nil)); end
-
- # Adds another {Docstring}, copying over tags.
- #
- # @param other [Docstring, String] the other docstring (or string) to
- # add.
- # @return [Docstring] a new docstring with both docstrings combines
- #
- # source://yard//lib/yard/docstring.rb#116
- def +(other); end
-
- # Adds a tag or reftag object to the tag list. If you want to parse
- # tag data based on the {Tags::DefaultFactory} tag factory, use
- # {DocstringParser} instead.
- #
- # @param tags [Tags::Tag, Tags::RefTag] list of tag objects to add
- # @return [void]
- #
- # source://yard//lib/yard/docstring.rb#242
- def add_tag(*tags); end
-
- # @return [String] the raw documentation (including raw tag text)
- #
- # source://yard//lib/yard/docstring.rb#53
- def all; end
-
- # Replaces the docstring with new raw content. Called by {#all=}.
- #
- # @param content [String] the raw comments to be parsed
- #
- # source://yard//lib/yard/docstring.rb#144
- def all=(content, parse = T.unsafe(nil)); end
-
- # Returns true if the docstring has no content that is visible to a template.
- #
- # @param only_visible_tags [Boolean] whether only {Tags::Library.visible_tags}
- # should be checked, or if all tags should be considered.
- # @return [Boolean] whether or not the docstring has content
- #
- # source://yard//lib/yard/docstring.rb#310
- def blank?(only_visible_tags = T.unsafe(nil)); end
-
- # Deletes all tags where the block returns true
- #
- # @return [void]
- # @since 0.7.0
- # @yieldparam tag [Tags::Tag] the tag that is being tested
- # @yieldreturn [Boolean] true if the tag should be deleted
- #
- # source://yard//lib/yard/docstring.rb#300
- def delete_tag_if(&block); end
-
- # Delete all tags with +name+
- #
- # @param name [String] the tag name
- # @return [void]
- # @since 0.7.0
- #
- # source://yard//lib/yard/docstring.rb#291
- def delete_tags(name); end
-
- # Deep-copies a docstring
- #
- # @note This method creates a new docstring with new tag lists, but does
- # not create new individual tags. Modifying the tag objects will still
- # affect the original tags.
- # @return [Docstring] a new copied docstring
- # @since 0.7.0
- #
- # source://yard//lib/yard/docstring.rb#153
- def dup; end
-
- # Returns true if at least one tag by the name +name+ was declared
- #
- # @param name [String] the tag name to search for
- # @return [Boolean] whether or not the tag +name+ was declared
- #
- # source://yard//lib/yard/docstring.rb#283
- def has_tag?(name); end
-
- # @return [Boolean] whether the docstring was started with "##"
- #
- # source://yard//lib/yard/docstring.rb#56
- def hash_flag; end
-
- # source://yard//lib/yard/docstring.rb#57
- def hash_flag=(v); end
-
- # @return [Fixnum] the first line of the {#line_range}
- # @return [nil] if there is no associated {#line_range}
- #
- # source://yard//lib/yard/docstring.rb#167
- def line; end
-
- # @return [Range] line range in the {#object}'s file where the docstring was parsed from
- #
- # source://yard//lib/yard/docstring.rb#50
- def line_range; end
-
- # @return [Range] line range in the {#object}'s file where the docstring was parsed from
- #
- # source://yard//lib/yard/docstring.rb#50
- def line_range=(_arg0); end
-
- # @return [CodeObjects::Base] the object that owns the docstring.
- #
- # source://yard//lib/yard/docstring.rb#47
- def object; end
-
- # @return [CodeObjects::Base] the object that owns the docstring.
- #
- # source://yard//lib/yard/docstring.rb#47
- def object=(_arg0); end
-
- # @return [Array] the list of reference tags
- #
- # source://yard//lib/yard/docstring.rb#44
- def ref_tags; end
-
- # Replaces the docstring with new raw content. Called by {#all=}.
- #
- # @param content [String] the raw comments to be parsed
- #
- # source://yard//lib/yard/docstring.rb#132
- def replace(content, parse = T.unsafe(nil)); end
-
- # Resolves unresolved other docstring reference if there is
- # unresolved reference. Does nothing if there is no unresolved
- # reference.
- #
- # Normally, you don't need to call this method
- # explicitly. Resolving unresolved reference is done implicitly.
- #
- # @return [void]
- #
- # source://yard//lib/yard/docstring.rb#328
- def resolve_reference; end
-
- # Gets the first line of a docstring to the period or the first paragraph.
- #
- # @return [String] The first line or paragraph of the docstring; always ends with a period.
- #
- # source://yard//lib/yard/docstring.rb#173
- def summary; end
-
- # Convenience method to return the first tag
- # object in the list of tag objects of that name
- #
- # @example
- # doc = Docstring.new("@return zero when nil")
- # doc.tag(:return).text # => "zero when nil"
- # @param name [#to_s] the tag name to return data for
- # @return [Tags::Tag] the first tag in the list of {#tags}
- #
- # source://yard//lib/yard/docstring.rb#265
- def tag(name); end
-
- # Returns a list of tags specified by +name+ or all tags if +name+ is not specified.
- #
- # @param name [#to_s] the tag name to return data for, or nil for all tags
- # @return [Array] the list of tags by the specified tag name
- #
- # source://yard//lib/yard/docstring.rb#273
- def tags(name = T.unsafe(nil)); end
-
- # Reformats and returns a raw representation of the tag data using the
- # current tag and docstring data, not the original text.
- #
- # @return [String] the updated raw formatted docstring data
- # @since 0.7.0
- # @todo Add Tags::Tag#to_raw and refactor
- #
- # source://yard//lib/yard/docstring.rb#207
- def to_raw; end
-
- # source://yard//lib/yard/docstring.rb#125
- def to_s; end
-
- private
-
- # Maps valid reference tags
- #
- # @return [Array] the list of valid reference tags
- #
- # source://yard//lib/yard/docstring.rb#344
- def convert_ref_tags; end
-
- # Parses out comments split by newlines into a new code object
- #
- # @param comments [String] the newline delimited array of comments. If the comments
- # are passed as a String, they will be split by newlines.
- # @return [String] the non-metadata portion of the comments to
- # be used as a docstring
- #
- # source://yard//lib/yard/docstring.rb#369
- def parse_comments(comments); end
-
- # A stable sort_by method.
- #
- # @param list [Enumerable] the list to sort.
- # @return [Array] a stable sorted list.
- #
- # source://yard//lib/yard/docstring.rb#382
- def stable_sort_by(list); end
-
- class << self
- # @note Plugin developers should make sure to reset this value
- # after parsing finishes. This can be done via the
- # {Parser::SourceParser.after_parse_list} callback. This will
- # ensure that YARD can properly parse multiple projects in
- # the same process.
- # @return [Class] the parser class used to parse
- # text and optional meta-data from docstrings. Defaults to
- # {DocstringParser}.
- # @see DocstringParser
- # @see Parser::SourceParser.after_parse_list
- #
- # source://yard//lib/yard/docstring.rb#28
- def default_parser; end
-
- # @note Plugin developers should make sure to reset this value
- # after parsing finishes. This can be done via the
- # {Parser::SourceParser.after_parse_list} callback. This will
- # ensure that YARD can properly parse multiple projects in
- # the same process.
- # @return [Class] the parser class used to parse
- # text and optional meta-data from docstrings. Defaults to
- # {DocstringParser}.
- # @see DocstringParser
- # @see Parser::SourceParser.after_parse_list
- #
- # source://yard//lib/yard/docstring.rb#28
- def default_parser=(_arg0); end
-
- # Creates a new docstring without performing any parsing through
- # a {DocstringParser}. This method is called by +DocstringParser+
- # when creating the new docstring object.
- #
- # @param object [CodeObjects::Base, nil] the object associated with the
- # docstring. May be nil.
- # @param raw_data [String] the complete docstring, including all
- # original formatting and any unparsed tags/directives.
- # @param ref_object [CodeObjects::Base, nil] a reference object used for
- # the base set of documentation / tag information.
- # @param tags [Array] the list of tag objects in the docstring
- # @param text [String] the textual portion of the docstring
- #
- # source://yard//lib/yard/docstring.rb#77
- def new!(text, tags = T.unsafe(nil), object = T.unsafe(nil), raw_data = T.unsafe(nil), ref_object = T.unsafe(nil)); end
-
- # Creates a parser object using the current {default_parser}.
- # Equivalent to:
- # Docstring.default_parser.new(*args)
- #
- # @param args arguments are passed to the {DocstringParser}
- # class. See {DocstringParser#initialize} for details on
- # arguments.
- # @return [DocstringParser] the parser object used to parse a
- # docstring.
- #
- # source://yard//lib/yard/docstring.rb#38
- def parser(*args); end
- end
-end
-
-# Matches a tag at the start of a comment line
-#
-# @deprecated Use {DocstringParser::META_MATCH}
-#
-# source://yard//lib/yard/docstring.rb#61
-YARD::Docstring::META_MATCH = T.let(T.unsafe(nil), Regexp)
-
-# Parses text and creates a {Docstring} object to represent documentation
-# for a {CodeObjects::Base}. To create a new docstring, you should initialize
-# the parser and call {#parse} followed by {#to_docstring}.
-#
-# == Subclassing Notes
-#
-# The DocstringParser can be subclassed and substituted during parsing by
-# setting the {Docstring.default_parser} attribute with the name of the
-# subclass. This allows developers to change the way docstrings are
-# parsed, allowing for completely different docstring syntaxes.
-#
-# @example Creating a Custom DocstringParser
-# # Parses docstrings backwards!
-# class ReverseDocstringParser
-# def parse_content(content)
-# super(content.reverse)
-# end
-# end
-#
-# # Set the parser as default when parsing
-# YARD::Docstring.default_parser = ReverseDocstringParser
-# @example Creating a Docstring with a DocstringParser
-# DocstringParser.new.parse("text here").to_docstring
-# @see #parse_content
-# @since 0.8.0
-#
-# source://yard//lib/yard/docstring_parser.rb#29
-class YARD::DocstringParser
- # Creates a new parser to parse docstring data
- #
- # @param library [Tags::Library] a tag library for recognizing
- # tags.
- # @return [DocstringParser] a new instance of DocstringParser
- # @since 0.8.0
- #
- # source://yard//lib/yard/docstring_parser.rb#80
- def initialize(library = T.unsafe(nil)); end
-
- # Creates a new directive using the registered {#library}
- #
- # @return [Tags::Directive] the directive object that is created
- # @since 0.8.0
- #
- # source://yard//lib/yard/docstring_parser.rb#231
- def create_directive(tag_name, tag_buf); end
-
- # Creates a {Tags::RefTag}
- #
- # @since 0.8.0
- #
- # source://yard//lib/yard/docstring_parser.rb#225
- def create_ref_tag(tag_name, name, object_name); end
-
- # Creates a tag from the {Tags::DefaultFactory tag factory}.
- #
- # To add an already created tag object, append it to {#tags}.
- #
- # @param tag_buf [String] the text attached to the tag with newlines removed.
- # @param tag_name [String] the tag name
- # @return [Tags::Tag, Tags::RefTag] a tag
- # @since 0.8.0
- #
- # source://yard//lib/yard/docstring_parser.rb#208
- def create_tag(tag_name, tag_buf = T.unsafe(nil)); end
-
- # @return [Array] a list of directives identified
- # by the parser. This list will not be passed on to the
- # Docstring object.
- # @since 0.8.0
- #
- # source://yard//lib/yard/docstring_parser.rb#44
- def directives; end
-
- # @return [Array] a list of directives identified
- # by the parser. This list will not be passed on to the
- # Docstring object.
- # @since 0.8.0
- #
- # source://yard//lib/yard/docstring_parser.rb#44
- def directives=(_arg0); end
-
- # @return [Handlers::Base, nil] the handler parsing this
- # docstring. May be nil if this docstring parser is not
- # initialized through
- # @since 0.8.0
- #
- # source://yard//lib/yard/docstring_parser.rb#65
- def handler; end
-
- # @return [Handlers::Base, nil] the handler parsing this
- # docstring. May be nil if this docstring parser is not
- # initialized through
- # @since 0.8.0
- #
- # source://yard//lib/yard/docstring_parser.rb#65
- def handler=(_arg0); end
-
- # @return [Tags::Library] the tag library being used to
- # identify registered tags in the docstring.
- # @since 0.8.0
- #
- # source://yard//lib/yard/docstring_parser.rb#69
- def library; end
-
- # @return [Tags::Library] the tag library being used to
- # identify registered tags in the docstring.
- # @since 0.8.0
- #
- # source://yard//lib/yard/docstring_parser.rb#69
- def library=(_arg0); end
-
- # @return [CodeObjects::Base, nil] the object associated with
- # the docstring being parsed. May be nil if the docstring is
- # not attached to any object.
- # @since 0.8.0
- #
- # source://yard//lib/yard/docstring_parser.rb#55
- def object; end
-
- # @return [CodeObjects::Base, nil] the object associated with
- # the docstring being parsed. May be nil if the docstring is
- # not attached to any object.
- # @since 0.8.0
- #
- # source://yard//lib/yard/docstring_parser.rb#55
- def object=(_arg0); end
-
- # Parses all content and returns itself.
- #
- # @param content [String] the docstring text to parse
- # @param handler [Handlers::Base, nil] the handler object that is
- # parsing this object. May be nil if this parser is not being
- # called from a {Parser::SourceParser} context.
- # @param object [CodeObjects::Base] the object that the docstring
- # is attached to. Will be passed to directives to act on
- # this object.
- # @return [self] the parser object. To get the docstring,
- # call {#to_docstring}.
- # @see #to_docstring
- # @since 0.8.0
- #
- # source://yard//lib/yard/docstring_parser.rb#112
- def parse(content, object = T.unsafe(nil), handler = T.unsafe(nil)); end
-
- # Parses a given block of text.
- #
- # @note Subclasses can override this method to perform custom
- # parsing of content data.
- # @param content [String] the content to parse
- # @since 0.8.0
- #
- # source://yard//lib/yard/docstring_parser.rb#128
- def parse_content(content); end
-
- # Call post processing callbacks on parser.
- # This is called implicitly by parser. Use this when
- # manually configuring a {Docstring} object.
- #
- # @return [void]
- # @since 0.8.0
- #
- # source://yard//lib/yard/docstring_parser.rb#195
- def post_process; end
-
- # @return [String] the complete input string to the parser.
- # @since 0.8.0
- #
- # source://yard//lib/yard/docstring_parser.rb#35
- def raw_text; end
-
- # @return [String] the complete input string to the parser.
- # @since 0.8.0
- #
- # source://yard//lib/yard/docstring_parser.rb#35
- def raw_text=(_arg0); end
-
- # @return [CodeObjects::Base, nil] the object referenced by
- # the docstring being parsed. May be nil if the docstring doesn't
- # refer to any object.
- # @since 0.8.0
- #
- # source://yard//lib/yard/docstring_parser.rb#60
- def reference; end
-
- # @return [CodeObjects::Base, nil] the object referenced by
- # the docstring being parsed. May be nil if the docstring doesn't
- # refer to any object.
- # @since 0.8.0
- #
- # source://yard//lib/yard/docstring_parser.rb#60
- def reference=(_arg0); end
-
- # @return [OpenStruct] any arbitrary state to be passed between
- # tags during parsing. Mainly used by directives to coordinate
- # behaviour (so that directives can be aware of other directives
- # used in a docstring).
- # @since 0.8.0
- #
- # source://yard//lib/yard/docstring_parser.rb#50
- def state; end
-
- # @return [OpenStruct] any arbitrary state to be passed between
- # tags during parsing. Mainly used by directives to coordinate
- # behaviour (so that directives can be aware of other directives
- # used in a docstring).
- # @since 0.8.0
- #
- # source://yard//lib/yard/docstring_parser.rb#50
- def state=(_arg0); end
-
- # Backward compatibility to detect old tags that should be specified
- # as directives in 0.8 and onward.
- #
- # @return [Boolean]
- # @since 0.8.0
- #
- # source://yard//lib/yard/docstring_parser.rb#251
- def tag_is_directive?(tag_name); end
-
- # @return [Array] the list of meta-data tags identified
- # by the parser
- # @since 0.8.0
- #
- # source://yard//lib/yard/docstring_parser.rb#39
- def tags; end
-
- # @return [Array] the list of meta-data tags identified
- # by the parser
- # @since 0.8.0
- #
- # source://yard//lib/yard/docstring_parser.rb#39
- def tags=(_arg0); end
-
- # @return [String] the parsed text portion of the docstring,
- # with tags removed.
- # @since 0.8.0
- #
- # source://yard//lib/yard/docstring_parser.rb#32
- def text; end
-
- # @return [String] the parsed text portion of the docstring,
- # with tags removed.
- # @since 0.8.0
- #
- # source://yard//lib/yard/docstring_parser.rb#32
- def text=(_arg0); end
-
- # @return [Docstring] translates parsed text into
- # a Docstring object.
- # @since 0.8.0
- #
- # source://yard//lib/yard/docstring_parser.rb#94
- def to_docstring; end
-
- private
-
- # Calls all {after_parse} callbacks
- #
- # @since 0.8.0
- #
- # source://yard//lib/yard/docstring_parser.rb#323
- def call_after_parse_callbacks; end
-
- # Calls the {Tags::Directive#after_parse} callback on all the
- # created directives.
- #
- # @since 0.8.0
- #
- # source://yard//lib/yard/docstring_parser.rb#318
- def call_directives_after_parse; end
-
- # @since 0.8.0
- #
- # source://yard//lib/yard/docstring_parser.rb#304
- def detect_reference(content); end
-
- # @since 0.8.0
- #
- # source://yard//lib/yard/docstring_parser.rb#300
- def namespace; end
-
- class << self
- # Creates a callback that is called after a docstring is successfully
- # parsed. Use this method to perform sanity checks on a docstring's
- # tag data, or add any extra tags automatically to a docstring.
- #
- # @return [void]
- # @since 0.8.0
- # @yield [parser] a block to be called after a docstring is parsed
- # @yieldparam parser [DocstringParser] the docstring parser object
- # with all directives and tags created.
- # @yieldreturn [void]
- #
- # source://yard//lib/yard/docstring_parser.rb#265
- def after_parse(&block); end
-
- # @return [Array] the {after_parse} callback proc objects
- # @since 0.8.0
- #
- # source://yard//lib/yard/docstring_parser.rb#270
- def after_parse_callbacks; end
- end
-end
-
-# The regular expression to match the tag syntax
-#
-# @since 0.8.0
-#
-# source://yard//lib/yard/docstring_parser.rb#72
-YARD::DocstringParser::META_MATCH = T.let(T.unsafe(nil), Regexp)
-
-# source://yard//lib/yard/gem_index.rb#6
-module YARD::GemIndex
- private
-
- # source://yard//lib/yard/gem_index.rb#25
- def all; end
-
- # source://yard//lib/yard/gem_index.rb#17
- def each(&block); end
-
- # source://yard//lib/yard/gem_index.rb#9
- def find_all_by_name(*args); end
-
- class << self
- # source://yard//lib/yard/gem_index.rb#25
- def all; end
-
- # source://yard//lib/yard/gem_index.rb#17
- def each(&block); end
-
- # source://yard//lib/yard/gem_index.rb#9
- def find_all_by_name(*args); end
- end
-end
-
-# Handlers are called during the data processing part of YARD's
-# parsing phase. This allows YARD as well as any custom extension to
-# analyze source and generate {CodeObjects} to be stored for later use.
-#
-# source://yard//lib/yard/autoload.rb#66
-module YARD::Handlers; end
-
-# Handlers are pluggable semantic parsers for YARD's code generation
-# phase. They allow developers to control what information gets
-# generated by YARD, giving them the ability to, for instance, document
-# any Ruby DSLs that a customized framework may use. A good example
-# of this would be the ability to document and generate meta data for
-# the 'describe' declaration of the RSpec testing framework by simply
-# adding a handler for such a keyword. Similarly, any Ruby API that
-# takes advantage of class level declarations could add these to the
-# documentation in a very explicit format by treating them as first-
-# class objects in any outputted documentation.
-#
-# == Overview of a Typical Handler Scenario
-#
-# Generally, a handler class will declare a set of statements which
-# it will handle using the {handles} class declaration. It will then
-# implement the {#process} method to do the work. The processing would
-# usually involve the manipulation of the {#namespace}, {#owner}
-# {CodeObjects::Base code objects} or the creation of new ones, in
-# which case they should be registered by {#register}, a method that
-# sets some basic attributes for the new objects.
-#
-# Handlers are usually simple and take up to a page of code to process
-# and register a new object or add new attributes to the current +namespace+.
-#
-# == Setting up a Handler for Use
-#
-# A Handler is automatically registered when it is subclassed from the
-# base class. The only other thing that needs to be done is to specify
-# which statement the handler will process. This is done with the +handles+
-# declaration, taking either a {Parser::Ruby::Legacy::RubyToken}, {String} or `Regexp`.
-# Here is a simple example which processes module statements.
-#
-# class MyModuleHandler < YARD::Handlers::Base
-# handles TkMODULE
-#
-# def process
-# # do something
-# end
-# end
-#
-# == Processing Handler Data
-#
-# The goal of a specific handler is really up to the developer, and as
-# such there is no real guideline on how to process the data. However,
-# it is important to know where the data is coming from to be able to use
-# it.
-#
-# === +statement+ Attribute
-#
-# The +statement+ attribute pertains to the {Parser::Ruby::Legacy::Statement} object
-# containing a set of tokens parsed in by the parser. This is the main set
-# of data to be analyzed and processed. The comments attached to the statement
-# can be accessed by the {Parser::Ruby::Legacy::Statement#comments} method, but generally
-# the data to be processed will live in the +tokens+ attribute. This list
-# can be converted to a +String+ using +#to_s+ to parse the data with
-# regular expressions (or other text processing mechanisms), if needed.
-#
-# === +namespace+ Attribute
-#
-# The +namespace+ attribute is a {CodeObjects::NamespaceObject namespace object}
-# which represents the current namespace that the parser is in. For instance:
-#
-# module SomeModule
-# class MyClass
-# def mymethod; end
-# end
-# end
-#
-# If a handler was to parse the 'class MyClass' statement, it would
-# be necessary to know that it belonged inside the SomeModule module.
-# This is the value that +namespace+ would return when processing such
-# a statement. If the class was then entered and another handler was
-# called on the method, the +namespace+ would be set to the 'MyClass'
-# code object.
-#
-# === +owner+ Attribute
-#
-# The +owner+ attribute is similar to the +namespace+ attribute in that
-# it also follows the scope of the code during parsing. However, a namespace
-# object is loosely defined as a module or class and YARD has the ability
-# to parse beyond module and class blocks (inside methods, for instance),
-# so the +owner+ attribute would not be limited to modules and classes.
-#
-# To put this into context, the example from above will be used. If a method
-# handler was added to the mix and decided to parse inside the method body,
-# the +owner+ would be set to the method object but the namespace would remain
-# set to the class. This would allow the developer to process any method
-# definitions set inside a method (def x; def y; 2 end end) by adding them
-# to the correct namespace (the class, not the method).
-#
-# In summary, the distinction between +namespace+ and +owner+ can be thought
-# of as the difference between first-class Ruby objects (namespaces) and
-# second-class Ruby objects (methods).
-#
-# === +visibility+ and +scope+ Attributes
-#
-# Mainly needed for parsing methods, the +visibility+ and +scope+ attributes
-# refer to the public/protected/private and class/instance values (respectively)
-# of the current parsing position.
-#
-# == Parsing Blocks in Statements
-#
-# In addition to parsing a statement and creating new objects, some
-# handlers may wish to continue parsing the code inside the statement's
-# block (if there is one). In this context, a block means the inside
-# of any statement, be it class definition, module definition, if
-# statement or classic 'Ruby block'.
-#
-# For example, a class statement would be "class MyClass" and the block
-# would be a list of statements including the method definitions inside
-# the class. For a class handler, the programmer would execute the
-# {#parse_block} method to continue parsing code inside the block, with
-# the +namespace+ now pointing to the class object the handler created.
-#
-# YARD has the ability to continue into any block: class, module, method,
-# even if statements. For this reason, the block parsing method must be
-# invoked explicitly out of efficiency sake.
-#
-# @abstract Subclass this class to provide a handler for YARD to use
-# during the processing phase.
-# @see #namespace
-# @see #owner
-# @see #parse_block
-# @see #register
-# @see CodeObjects::Base
-# @see CodeObjects::NamespaceObject
-# @see handles
-#
-# source://yard//lib/yard/handlers/base.rb#149
-class YARD::Handlers::Base
- include ::YARD::CodeObjects
- include ::YARD::Parser
-
- # @return [Base] a new instance of Base
- #
- # source://yard//lib/yard/handlers/base.rb#276
- def initialize(source_parser, stmt); end
-
- # Aborts a handler by raising {Handlers::HandlerAborted}.
- # An exception will only be logged in debugging mode for
- # this kind of handler exit.
- #
- # @raise [Handlers::HandlerAborted]
- # @since 0.8.4
- #
- # source://yard//lib/yard/handlers/base.rb#355
- def abort!; end
-
- # @abstract Implement this method to return the parameters in a method call
- # statement. It should return an empty list if the statement is not a
- # method call.
- # @raise [NotImplementedError]
- # @return [Array] a list of argument names
- #
- # source://yard//lib/yard/handlers/base.rb#603
- def call_params; end
-
- # @abstract Implement this method to return the method being called in
- # a method call. It should return nil if the statement is not a method
- # call.
- # @raise [NotImplementedError]
- # @return [String] the method name being called
- # @return [nil] if the statement is not a method call
- #
- # source://yard//lib/yard/handlers/base.rb#612
- def caller_method; end
-
- # Ensures that a specific +object+ has been parsed and loaded into the
- # registry. This is necessary when adding data to a namespace, for instance,
- # since the namespace may not have been processed yet (it can be located
- # in a file that has not been handled).
- #
- # Calling this method defers the handler until all other files have been
- # processed. If the object gets resolved, the rest of the handler continues,
- # otherwise an exception is raised.
- #
- # @example Adding a mixin to the String class programmatically
- # ensure_loaded! P('String')
- # # "String" is now guaranteed to be loaded
- # P('String').mixins << P('MyMixin')
- # @param max_retries [Integer] the number of times to defer the handler
- # before raising a +NamespaceMissingError+.
- # @param object [Proxy, CodeObjects::Base] the object to resolve.
- # @raise [NamespaceMissingError] if the object is not resolved within
- # +max_retries+ attempts, this exception is raised and the handler
- # finishes processing.
- #
- # source://yard//lib/yard/handlers/base.rb#583
- def ensure_loaded!(object, max_retries = T.unsafe(nil)); end
-
- # Returns the value of attribute extra_state.
- #
- # source://yard//lib/yard/handlers/base.rb#333
- def extra_state; end
-
- # Returns the value of attribute globals.
- #
- # source://yard//lib/yard/handlers/base.rb#330
- def globals; end
-
- # Returns the value of attribute namespace.
- #
- # source://yard//lib/yard/handlers/base.rb#321
- def namespace; end
-
- # Sets the attribute namespace
- #
- # @param value the value to set the attribute namespace to.
- #
- # source://yard//lib/yard/handlers/base.rb#321
- def namespace=(v); end
-
- # Returns the value of attribute owner.
- #
- # source://yard//lib/yard/handlers/base.rb#318
- def owner; end
-
- # Sets the attribute owner
- #
- # @param value the value to set the attribute owner to.
- #
- # source://yard//lib/yard/handlers/base.rb#318
- def owner=(v); end
-
- # Parses the semantic "block" contained in the statement node.
- #
- # @abstract Subclasses should call {Processor#process parser.process}
- # @raise [NotImplementedError]
- #
- # source://yard//lib/yard/handlers/base.rb#304
- def parse_block(*_arg0); end
-
- # @return [Processor] the processor object that manages all global state
- # during handling.
- #
- # source://yard//lib/yard/handlers/base.rb#310
- def parser; end
-
- # The main handler method called by the parser on a statement
- # that matches the {handles} declaration.
- #
- # Subclasses should override this method to provide the handling
- # functionality for the class.
- #
- # @raise [NotImplementedError]
- # @return [Array, CodeObjects::Base, Object] If this method returns a code object (or a list of them),
- # they are passed to the +#register+ method which adds basic
- # attributes. It is not necessary to return any objects and in
- # some cases you may want to explicitly avoid the returning of
- # any objects for post-processing by the register method.
- # @see #register
- # @see handles
- #
- # source://yard//lib/yard/handlers/base.rb#297
- def process; end
-
- # Executes a given block with specific state values for {#owner},
- # {#namespace} and {#scope}.
- #
- # @option opts
- # @option opts
- # @option opts
- # @param opts [Hash] a customizable set of options
- # @yield a block to execute with the given state values.
- #
- # source://yard//lib/yard/handlers/base.rb#370
- def push_state(opts = T.unsafe(nil)); end
-
- # Do some post processing on a list of code objects.
- # Adds basic attributes to the list of objects like
- # the filename, line number, {CodeObjects::Base#dynamic},
- # source code and {CodeObjects::Base#docstring},
- # but only if they don't exist.
- #
- # @param objects [Array] the list of objects to post-process.
- # @return [CodeObjects::Base, Array] returns whatever is passed in, for chainability.
- #
- # source://yard//lib/yard/handlers/base.rb#407
- def register(*objects); end
-
- # Registers any docstring found for the object and expands macros
- #
- # @param object [CodeObjects::Base] the object to register
- # @return [void]
- # @since 0.8.0
- #
- # source://yard//lib/yard/handlers/base.rb#450
- def register_docstring(object, docstring = T.unsafe(nil), stmt = T.unsafe(nil)); end
-
- # Registers the object as dynamic if the object is defined inside
- # a method or block (owner != namespace)
- #
- # @param object [CodeObjects::Base] the object to register
- # @return [void]
- # @since 0.8.0
- #
- # source://yard//lib/yard/handlers/base.rb#559
- def register_dynamic(object); end
-
- # Ensures that the object's namespace is loaded before attaching it
- # to the namespace.
- #
- # @param object [CodeObjects::Base] the object to register
- # @return [void]
- # @since 0.8.0
- #
- # source://yard//lib/yard/handlers/base.rb#429
- def register_ensure_loaded(object); end
-
- # Registers the file/line of the declaration with the object
- #
- # @param object [CodeObjects::Base] the object to register
- # @return [void]
- # @since 0.8.0
- #
- # source://yard//lib/yard/handlers/base.rb#441
- def register_file_info(object, file = T.unsafe(nil), line = T.unsafe(nil), comments = T.unsafe(nil)); end
-
- # Registers the object as being inside a specific group
- #
- # @param object [CodeObjects::Base] the object to register
- # @return [void]
- # @since 0.8.0
- #
- # source://yard//lib/yard/handlers/base.rb#485
- def register_group(object, group = T.unsafe(nil)); end
-
- # Registers the same method information on the module function, if
- # the object was defined as a module function.
- #
- # @param object [CodeObjects::Base] the possible module function object
- # to copy data for
- # @since 0.8.0
- #
- # source://yard//lib/yard/handlers/base.rb#545
- def register_module_function(object); end
-
- # @param object [CodeObjects::Base] the object to register
- # @return [void]
- # @since 0.8.0
- #
- # source://yard//lib/yard/handlers/base.rb#511
- def register_source(object, source = T.unsafe(nil), type = T.unsafe(nil)); end
-
- # Registers any transitive tags from the namespace on the object
- #
- # @param object [CodeObjects::Base, nil] the object to register
- # @return [void]
- # @since 0.8.0
- #
- # source://yard//lib/yard/handlers/base.rb#499
- def register_transitive_tags(object); end
-
- # Registers visibility on a method object. If the object does not
- # respond to setting visibility, nothing is done.
- #
- # @param object [#visibility=] the object to register
- # @param visibility [Symbol] the visibility to set on the object
- # @since 0.8.0
- #
- # source://yard//lib/yard/handlers/base.rb#523
- def register_visibility(object, visibility = T.unsafe(nil)); end
-
- # Returns the value of attribute scope.
- #
- # source://yard//lib/yard/handlers/base.rb#327
- def scope; end
-
- # Sets the attribute scope
- #
- # @param value the value to set the attribute scope to.
- #
- # source://yard//lib/yard/handlers/base.rb#327
- def scope=(v); end
-
- # @return [Object] the statement object currently being processed. Usually
- # refers to one semantic language statement, though the strict definition
- # depends on the parser used.
- #
- # source://yard//lib/yard/handlers/base.rb#315
- def statement; end
-
- # Returns the value of attribute visibility.
- #
- # source://yard//lib/yard/handlers/base.rb#324
- def visibility; end
-
- # Sets the attribute visibility
- #
- # @param value the value to set the attribute visibility to.
- #
- # source://yard//lib/yard/handlers/base.rb#324
- def visibility=(v); end
-
- class << self
- # Clear all registered subclasses. Testing purposes only
- #
- # @return [void]
- #
- # source://yard//lib/yard/handlers/base.rb#159
- def clear_subclasses; end
-
- # @return [Array] a list of matchers for the handler object.
- # @see handles?
- #
- # source://yard//lib/yard/handlers/base.rb#211
- def handlers; end
-
- # Declares the statement type which will be processed
- # by this handler.
- #
- # A match need not be unique to a handler. Multiple
- # handlers can process the same statement. However,
- # in this case, care should be taken to make sure that
- # {#parse_block} would only be executed by one of
- # the handlers, otherwise the same code will be parsed
- # multiple times and slow YARD down.
- #
- # @param matches [Parser::Ruby::Legacy::RubyToken, Symbol, String, Regexp] statements that match the declaration will be
- # processed by this handler. A {String} match is
- # equivalent to a +/\Astring/+ regular expression
- # (match from the beginning of the line), and all
- # token matches match only the first token of the
- # statement.
- #
- # source://yard//lib/yard/handlers/base.rb#192
- def handles(*matches); end
-
- # This class is implemented by {Ruby::Base} and {Ruby::Legacy::Base}.
- # To implement a base handler class for another language, implement
- # this method to return true if the handler should process the given
- # statement object. Use {handlers} to enumerate the matchers declared
- # for the handler class.
- #
- # @param statement a statement object or node (depends on language type)
- # @raise [NotImplementedError]
- # @return [Boolean] whether or not this handler object should process
- # the given statement
- #
- # source://yard//lib/yard/handlers/base.rb#205
- def handles?(statement); end
-
- # Declares that a handler should only be called when inside a filename
- # by its basename or a regex match for the full path.
- #
- # @param filename [String, Regexp] a matching filename or regex
- # @return [void]
- # @since 0.6.2
- #
- # source://yard//lib/yard/handlers/base.rb#235
- def in_file(filename); end
-
- # @private
- #
- # source://yard//lib/yard/handlers/base.rb#169
- def inherited(subclass); end
-
- # @return [Boolean] whether the filename matches the declared file
- # match for a handler. If no file match is specified, returns true.
- # @since 0.6.2
- #
- # source://yard//lib/yard/handlers/base.rb#242
- def matches_file?(filename); end
-
- # Declares that the handler should only be called when inside a
- # {CodeObjects::NamespaceObject}, not a method body.
- #
- # @return [void]
- #
- # source://yard//lib/yard/handlers/base.rb#219
- def namespace_only; end
-
- # @return [Boolean] whether the handler should only be processed inside
- # a namespace.
- #
- # source://yard//lib/yard/handlers/base.rb#225
- def namespace_only?; end
-
- # Generates a +process+ method, equivalent to +def process; ... end+.
- # Blocks defined with this syntax will be wrapped inside an anonymous
- # module so that the handler class can be extended with mixins that
- # override the +process+ method without alias chaining.
- #
- # @return [void]
- # @see #process
- # @since 0.5.4
- #
- # source://yard//lib/yard/handlers/base.rb#269
- def process(&block); end
-
- # Returns all registered handler subclasses.
- #
- # @return [Array] a list of handlers
- #
- # source://yard//lib/yard/handlers/base.rb#165
- def subclasses; end
- end
-end
-
-# CRuby Handlers
-#
-# @since 0.8.0
-#
-# source://yard//lib/yard/autoload.rb#74
-module YARD::Handlers::C; end
-
-# @since 0.8.0
-#
-# source://yard//lib/yard/handlers/c/alias_handler.rb#2
-class YARD::Handlers::C::AliasHandler < ::YARD::Handlers::C::Base; end
-
-# @since 0.8.0
-#
-# source://yard//lib/yard/handlers/c/alias_handler.rb#3
-YARD::Handlers::C::AliasHandler::MATCH = T.let(T.unsafe(nil), Regexp)
-
-# @since 0.8.0
-#
-# source://yard//lib/yard/handlers/c/attribute_handler.rb#2
-class YARD::Handlers::C::AttributeHandler < ::YARD::Handlers::C::Base; end
-
-# @since 0.8.0
-#
-# source://yard//lib/yard/handlers/c/attribute_handler.rb#3
-YARD::Handlers::C::AttributeHandler::MATCH = T.let(T.unsafe(nil), Regexp)
-
-# @since 0.8.0
-#
-# source://yard//lib/yard/handlers/c/base.rb#5
-class YARD::Handlers::C::Base < ::YARD::Handlers::Base
- include ::YARD::Parser::C
- include ::YARD::Handlers::Common::MethodHandler
- include ::YARD::Handlers::C::HandlerMethods
-
- # @since 0.8.0
- #
- # source://yard//lib/yard/handlers/c/base.rb#77
- def ensure_variable_defined!(var, max_retries = T.unsafe(nil)); end
-
- # @since 0.8.0
- #
- # source://yard//lib/yard/handlers/c/base.rb#64
- def namespace_for_variable(var); end
-
- # @since 0.8.0
- #
- # source://yard//lib/yard/handlers/c/base.rb#94
- def namespaces; end
-
- # @since 0.8.0
- #
- # source://yard//lib/yard/handlers/c/base.rb#60
- def override_comments; end
-
- # @since 0.8.0
- #
- # source://yard//lib/yard/handlers/c/base.rb#104
- def parse_block(opts = T.unsafe(nil)); end
-
- # @since 0.8.0
- #
- # source://yard//lib/yard/handlers/c/base.rb#113
- def process_file(file, object); end
-
- # @since 0.8.0
- #
- # source://yard//lib/yard/handlers/c/base.rb#98
- def processed_files; end
-
- # @since 0.8.0
- #
- # source://yard//lib/yard/handlers/c/base.rb#38
- def register_docstring(object, docstring = T.unsafe(nil), stmt = T.unsafe(nil)); end
-
- # @since 0.8.0
- #
- # source://yard//lib/yard/handlers/c/base.rb#42
- def register_file_info(object, file = T.unsafe(nil), line = T.unsafe(nil), comments = T.unsafe(nil)); end
-
- # @since 0.8.0
- #
- # source://yard//lib/yard/handlers/c/base.rb#46
- def register_source(object, source = T.unsafe(nil), type = T.unsafe(nil)); end
-
- # @since 0.8.0
- #
- # source://yard//lib/yard/handlers/c/base.rb#50
- def register_visibility(object, visibility = T.unsafe(nil)); end
-
- # @since 0.8.0
- #
- # source://yard//lib/yard/handlers/c/base.rb#56
- def symbols; end
-
- private
-
- # @since 0.8.0
- #
- # source://yard//lib/yard/handlers/c/base.rb#158
- def remove_var_prefix(var); end
-
- class << self
- # @return [Boolean] whether the handler handles this statement
- # @since 0.8.0
- #
- # source://yard//lib/yard/handlers/c/base.rb#10
- def handles?(statement, processor); end
-
- # @since 0.8.0
- #
- # source://yard//lib/yard/handlers/c/base.rb#28
- def statement_class(type = T.unsafe(nil)); end
- end
-end
-
-# Generated by update_error_map.rb (Copy+past results)
-#
-# @since 0.8.0
-#
-# source://yard//lib/yard/handlers/c/base.rb#131
-YARD::Handlers::C::Base::ERROR_CLASS_NAMES = T.let(T.unsafe(nil), Hash)
-
-# @since 0.8.0
-#
-# source://yard//lib/yard/handlers/c/class_handler.rb#2
-class YARD::Handlers::C::ClassHandler < ::YARD::Handlers::C::Base; end
-
-# @since 0.8.0
-#
-# source://yard//lib/yard/handlers/c/class_handler.rb#3
-YARD::Handlers::C::ClassHandler::MATCH1 = T.let(T.unsafe(nil), Regexp)
-
-# @since 0.8.0
-#
-# source://yard//lib/yard/handlers/c/class_handler.rb#9
-YARD::Handlers::C::ClassHandler::MATCH2 = T.let(T.unsafe(nil), Regexp)
-
-# @since 0.8.0
-#
-# source://yard//lib/yard/handlers/c/constant_handler.rb#2
-class YARD::Handlers::C::ConstantHandler < ::YARD::Handlers::C::Base; end
-
-# @since 0.8.0
-#
-# source://yard//lib/yard/handlers/c/constant_handler.rb#3
-YARD::Handlers::C::ConstantHandler::MATCH = T.let(T.unsafe(nil), Regexp)
-
-# @since 0.8.0
-#
-# source://yard//lib/yard/handlers/c/handler_methods.rb#5
-module YARD::Handlers::C::HandlerMethods
- include ::YARD::Parser::C
- include ::YARD::CodeObjects
- include ::YARD::Handlers::Common::MethodHandler
-
- # @since 0.8.0
- #
- # source://yard//lib/yard/handlers/c/handler_methods.rb#86
- def handle_alias(var_name, new_name, old_name); end
-
- # @since 0.8.0
- #
- # source://yard//lib/yard/handlers/c/handler_methods.rb#75
- def handle_attribute(var_name, name, read, write); end
-
- # @since 0.8.0
- #
- # source://yard//lib/yard/handlers/c/handler_methods.rb#10
- def handle_class(var_name, class_name, parent, in_module = T.unsafe(nil)); end
-
- # @since 0.8.0
- #
- # source://yard//lib/yard/handlers/c/handler_methods.rb#109
- def handle_constants(type, var_name, const_name, value); end
-
- # @since 0.8.0
- #
- # source://yard//lib/yard/handlers/c/handler_methods.rb#46
- def handle_method(scope, var_name, name, func_name, _source_file = T.unsafe(nil)); end
-
- # @since 0.8.0
- #
- # source://yard//lib/yard/handlers/c/handler_methods.rb#33
- def handle_module(var_name, module_name, in_module = T.unsafe(nil)); end
-
- private
-
- # @since 0.8.0
- #
- # source://yard//lib/yard/handlers/c/handler_methods.rb#123
- def find_constant_docstring(object); end
-
- # @since 0.8.0
- #
- # source://yard//lib/yard/handlers/c/handler_methods.rb#154
- def find_method_body(object, symbol); end
-
- # @since 0.8.0
- #
- # source://yard//lib/yard/handlers/c/handler_methods.rb#196
- def record_parameters(object, symbol, src); end
-end
-
-# Handles the Init_Libname() method
-#
-# @since 0.8.0
-#
-# source://yard//lib/yard/handlers/c/init_handler.rb#3
-class YARD::Handlers::C::InitHandler < ::YARD::Handlers::C::Base; end
-
-# @since 0.8.0
-#
-# source://yard//lib/yard/handlers/c/init_handler.rb#4
-YARD::Handlers::C::InitHandler::MATCH = T.let(T.unsafe(nil), Regexp)
-
-# @since 0.8.0
-#
-# source://yard//lib/yard/handlers/c/method_handler.rb#2
-class YARD::Handlers::C::MethodHandler < ::YARD::Handlers::C::Base; end
-
-# @since 0.8.0
-#
-# source://yard//lib/yard/handlers/c/method_handler.rb#3
-YARD::Handlers::C::MethodHandler::MATCH1 = T.let(T.unsafe(nil), Regexp)
-
-# @since 0.8.0
-#
-# source://yard//lib/yard/handlers/c/method_handler.rb#14
-YARD::Handlers::C::MethodHandler::MATCH2 = T.let(T.unsafe(nil), Regexp)
-
-# @since 0.8.0
-#
-# source://yard//lib/yard/handlers/c/method_handler.rb#18
-YARD::Handlers::C::MethodHandler::MATCH3 = T.let(T.unsafe(nil), Regexp)
-
-# @since 0.8.0
-#
-# source://yard//lib/yard/handlers/c/mixin_handler.rb#2
-class YARD::Handlers::C::MixinHandler < ::YARD::Handlers::C::Base; end
-
-# @since 0.8.0
-#
-# source://yard//lib/yard/handlers/c/mixin_handler.rb#3
-YARD::Handlers::C::MixinHandler::MATCH = T.let(T.unsafe(nil), Regexp)
-
-# @since 0.8.0
-#
-# source://yard//lib/yard/handlers/c/module_handler.rb#2
-class YARD::Handlers::C::ModuleHandler < ::YARD::Handlers::C::Base; end
-
-# @since 0.8.0
-#
-# source://yard//lib/yard/handlers/c/module_handler.rb#3
-YARD::Handlers::C::ModuleHandler::MATCH1 = T.let(T.unsafe(nil), Regexp)
-
-# @since 0.8.0
-#
-# source://yard//lib/yard/handlers/c/module_handler.rb#4
-YARD::Handlers::C::ModuleHandler::MATCH2 = T.let(T.unsafe(nil), Regexp)
-
-# Parses comments
-#
-# @since 0.8.0
-#
-# source://yard//lib/yard/handlers/c/override_comment_handler.rb#3
-class YARD::Handlers::C::OverrideCommentHandler < ::YARD::Handlers::C::Base
- # @since 0.8.0
- #
- # source://yard//lib/yard/handlers/c/override_comment_handler.rb#24
- def register_docstring(object, docstring = T.unsafe(nil), stmt = T.unsafe(nil)); end
-
- # @since 0.8.0
- #
- # source://yard//lib/yard/handlers/c/override_comment_handler.rb#28
- def register_file_info(object, file = T.unsafe(nil), line = T.unsafe(nil), comments = T.unsafe(nil)); end
-end
-
-# @since 0.8.0
-#
-# source://yard//lib/yard/handlers/c/path_handler.rb#2
-class YARD::Handlers::C::PathHandler < ::YARD::Handlers::C::Base; end
-
-# @since 0.8.0
-#
-# source://yard//lib/yard/handlers/c/path_handler.rb#3
-YARD::Handlers::C::PathHandler::MATCH = T.let(T.unsafe(nil), Regexp)
-
-# @since 0.8.0
-#
-# source://yard//lib/yard/handlers/c/struct_handler.rb#2
-class YARD::Handlers::C::StructHandler < ::YARD::Handlers::C::Base; end
-
-# @since 0.8.0
-#
-# source://yard//lib/yard/handlers/c/struct_handler.rb#3
-YARD::Handlers::C::StructHandler::MATCH = T.let(T.unsafe(nil), Regexp)
-
-# Keeps track of function bodies for symbol lookup during Ruby method declarations
-#
-# @since 0.8.0
-#
-# source://yard//lib/yard/handlers/c/symbol_handler.rb#3
-class YARD::Handlers::C::SymbolHandler < ::YARD::Handlers::C::Base; end
-
-# @since 0.8.0
-#
-# source://yard//lib/yard/handlers/c/symbol_handler.rb#4
-YARD::Handlers::C::SymbolHandler::MATCH = T.let(T.unsafe(nil), Regexp)
-
-# Shared logic between C and Ruby handlers.
-#
-# source://yard//lib/yard/autoload.rb#68
-module YARD::Handlers::Common; end
-
-# Shared functionality between Ruby and C method handlers.
-#
-# source://yard//lib/yard/handlers/common/method_handler.rb#6
-module YARD::Handlers::Common::MethodHandler
- # @param obj [MethodObject]
- #
- # source://yard//lib/yard/handlers/common/method_handler.rb#8
- def add_predicate_return_tag(obj); end
-end
-
-# Raise this error when a handler should exit before completing.
-# The exception will be silenced, allowing the next handler(s) in the
-# queue to be executed.
-#
-# @since 0.8.4
-#
-# source://yard//lib/yard/handlers/base.rb#8
-class YARD::Handlers::HandlerAborted < ::RuntimeError; end
-
-# Raised during processing phase when a handler needs to perform
-# an operation on an object's namespace but the namespace could
-# not be resolved.
-#
-# source://yard//lib/yard/handlers/base.rb#13
-class YARD::Handlers::NamespaceMissingError < ::YARD::Parser::UndocumentableError
- # @return [NamespaceMissingError] a new instance of NamespaceMissingError
- #
- # source://yard//lib/yard/handlers/base.rb#18
- def initialize(object); end
-
- # The object the error occurred on
- #
- # @return [CodeObjects::Base] a code object
- #
- # source://yard//lib/yard/handlers/base.rb#16
- def object; end
-
- # The object the error occurred on
- #
- # @return [CodeObjects::Base] a code object
- #
- # source://yard//lib/yard/handlers/base.rb#16
- def object=(_arg0); end
-end
-
-# Iterates over all statements in a file and delegates them to the
-# {Handlers::Base} objects that are registered to handle the statement.
-#
-# This class is passed to each handler and keeps overall processing state.
-# For example, if the {#visibility} is set in a handler, all following
-# statements will have access to this state. This allows "public",
-# "protected" and "private" statements to be handled in classes and modules.
-# In addition, the {#namespace} can be set during parsing to control
-# where objects are being created from. You can also access extra stateful
-# properties that any handler can set during the duration of the post
-# processing of a file from {#extra_state}. If you need to access state
-# across different files, look at {#globals}.
-#
-# @see Handlers::Base
-#
-# source://yard//lib/yard/handlers/processor.rb#19
-class YARD::Handlers::Processor
- # Creates a new Processor for a +file+.
- #
- # @param parser [Parser::SourceParser] the parser used to initialize the processor
- # @return [Processor] a new instance of Processor
- #
- # source://yard//lib/yard/handlers/processor.rb#91
- def initialize(parser); end
-
- # Share state across different handlers inside of a file.
- # This attribute is similar to {#visibility}, {#scope}, {#namespace}
- # and {#owner}, in that they all maintain state across all handlers
- # for the entire source file. Use this attribute to store any data
- # your handler might need to save during the parsing of a file. If
- # you need to save state across files, see {#globals}.
- #
- # @return [OpenStruct] an open structure that can store arbitrary data
- # @see #globals
- #
- # source://yard//lib/yard/handlers/processor.rb#87
- def extra_state; end
-
- # Share state across different handlers inside of a file.
- # This attribute is similar to {#visibility}, {#scope}, {#namespace}
- # and {#owner}, in that they all maintain state across all handlers
- # for the entire source file. Use this attribute to store any data
- # your handler might need to save during the parsing of a file. If
- # you need to save state across files, see {#globals}.
- #
- # @return [OpenStruct] an open structure that can store arbitrary data
- # @see #globals
- #
- # source://yard//lib/yard/handlers/processor.rb#87
- def extra_state=(_arg0); end
-
- # @return [String] the filename
- #
- # source://yard//lib/yard/handlers/processor.rb#40
- def file; end
-
- # @return [String] the filename
- #
- # source://yard//lib/yard/handlers/processor.rb#40
- def file=(_arg0); end
-
- # Searches for all handlers in {Base.subclasses} that match the +statement+
- #
- # @param statement the statement object to match.
- # @return [Array] a list of handlers to process the statement with.
- #
- # source://yard//lib/yard/handlers/processor.rb#150
- def find_handlers(statement); end
-
- # Handlers can share state for the entire post processing stage through
- # this attribute. Note that post processing stage spans multiple files.
- # To share state only within a single file, use {#extra_state}
- #
- # @example Sharing state among two handlers
- # class Handler1 < YARD::Handlers::Ruby::Base
- # handles :class
- # process { globals.foo = :bar }
- # end
- #
- # class Handler2 < YARD::Handlers::Ruby::Base
- # handles :method
- # process { puts globals.foo }
- # end
- # @return [OpenStruct] global shared state for post-processing stage
- # @see #extra_state
- #
- # source://yard//lib/yard/handlers/processor.rb#76
- def globals; end
-
- # Handlers can share state for the entire post processing stage through
- # this attribute. Note that post processing stage spans multiple files.
- # To share state only within a single file, use {#extra_state}
- #
- # @example Sharing state among two handlers
- # class Handler1 < YARD::Handlers::Ruby::Base
- # handles :class
- # process { globals.foo = :bar }
- # end
- #
- # class Handler2 < YARD::Handlers::Ruby::Base
- # handles :method
- # process { puts globals.foo }
- # end
- # @return [OpenStruct] global shared state for post-processing stage
- # @see #extra_state
- #
- # source://yard//lib/yard/handlers/processor.rb#76
- def globals=(_arg0); end
-
- # @return [CodeObjects::NamespaceObject] the current namespace
- #
- # source://yard//lib/yard/handlers/processor.rb#43
- def namespace; end
-
- # @return [CodeObjects::NamespaceObject] the current namespace
- #
- # source://yard//lib/yard/handlers/processor.rb#43
- def namespace=(_arg0); end
-
- # @return [CodeObjects::Base, nil] unlike the namespace, the owner
- # is a non-namespace object that should be stored between statements.
- # For instance, when parsing a method body, the {CodeObjects::MethodObject}
- # is set as the owner, in case any extra method information is processed.
- #
- # source://yard//lib/yard/handlers/processor.rb#55
- def owner; end
-
- # @return [CodeObjects::Base, nil] unlike the namespace, the owner
- # is a non-namespace object that should be stored between statements.
- # For instance, when parsing a method body, the {CodeObjects::MethodObject}
- # is set as the owner, in case any extra method information is processed.
- #
- # source://yard//lib/yard/handlers/processor.rb#55
- def owner=(_arg0); end
-
- # Continue parsing the remainder of the files in the +globals.ordered_parser+
- # object. After the remainder of files are parsed, processing will continue
- # on the current file.
- #
- # @return [void]
- # @see Parser::OrderedParser
- #
- # source://yard//lib/yard/handlers/processor.rb#139
- def parse_remaining_files; end
-
- # @return [Symbol] the parser type (:ruby, :ruby18, :c)
- #
- # source://yard//lib/yard/handlers/processor.rb#58
- def parser_type; end
-
- # @return [Symbol] the parser type (:ruby, :ruby18, :c)
- #
- # source://yard//lib/yard/handlers/processor.rb#58
- def parser_type=(_arg0); end
-
- # Processes a list of statements by finding handlers to process each
- # one.
- #
- # @param statements [Array] a list of statements
- # @return [void]
- #
- # source://yard//lib/yard/handlers/processor.rb#109
- def process(statements); end
-
- # @return [Symbol] the current scope (class, instance)
- #
- # source://yard//lib/yard/handlers/processor.rb#49
- def scope; end
-
- # @return [Symbol] the current scope (class, instance)
- #
- # source://yard//lib/yard/handlers/processor.rb#49
- def scope=(_arg0); end
-
- # @return [Symbol] the current visibility (public, private, protected)
- #
- # source://yard//lib/yard/handlers/processor.rb#46
- def visibility; end
-
- # @return [Symbol] the current visibility (public, private, protected)
- #
- # source://yard//lib/yard/handlers/processor.rb#46
- def visibility=(_arg0); end
-
- private
-
- # Returns the handler base class
- #
- # @return [Base] the base class
- #
- # source://yard//lib/yard/handlers/processor.rb#171
- def handler_base_class; end
-
- # The module holding the handlers to be loaded
- #
- # @return [Module] the module containing the handlers depending on
- # {#parser_type}.
- #
- # source://yard//lib/yard/handlers/processor.rb#179
- def handler_base_namespace; end
-
- # @return [Boolean]
- #
- # source://yard//lib/yard/handlers/processor.rb#160
- def handles?(handler, statement); end
-
- # Loads handlers from {#handler_base_namespace}. This ensures that
- # Ruby1.9 handlers are never loaded into 1.8; also lowers the amount
- # of modules that are loaded
- #
- # @return [void]
- #
- # source://yard//lib/yard/handlers/processor.rb#187
- def load_handlers; end
-
- class << self
- # @private
- # @return [Hash] a list of registered parser type extensions
- # @since 0.6.0
- #
- # source://yard//lib/yard/handlers/processor.rb#30
- def namespace_for_handler; end
-
- # Registers a new namespace for handlers of the given type.
- #
- # @since 0.6.0
- #
- # source://yard//lib/yard/handlers/processor.rb#23
- def register_handler_namespace(type, ns); end
- end
-end
-
-# All Ruby handlers
-#
-# source://yard//lib/yard/autoload.rb#92
-module YARD::Handlers::Ruby; end
-
-# Handles alias and alias_method calls
-#
-# source://yard//lib/yard/handlers/ruby/alias_handler.rb#3
-class YARD::Handlers::Ruby::AliasHandler < ::YARD::Handlers::Ruby::Base; end
-
-# Handles +attr_*+ statements in modules/classes
-#
-# source://yard//lib/yard/handlers/ruby/attribute_handler.rb#3
-class YARD::Handlers::Ruby::AttributeHandler < ::YARD::Handlers::Ruby::Base
- protected
-
- # Strips out any non-essential arguments from the attr statement.
- #
- # @param params [Array] a list of the parameters
- # in the attr call.
- # @raise [Parser::UndocumentableError] if the arguments are not valid.
- # @return [Array] the validated attribute names
- #
- # source://yard//lib/yard/handlers/ruby/attribute_handler.rb#75
- def validated_attribute_names(params); end
-end
-
-# This is the base handler class for the new-style (1.9) Ruby parser.
-# All handlers that subclass this base class will be used when the
-# new-style parser is used. For implementing legacy handlers, see
-# {Legacy::Base}.
-#
-# @abstract See {Handlers::Base} for subclassing information.
-# @see Handlers::Base
-# @see Legacy::Base
-#
-# source://yard//lib/yard/handlers/ruby/base.rb#65
-class YARD::Handlers::Ruby::Base < ::YARD::Handlers::Base
- include ::YARD::Parser::Ruby
- extend ::YARD::Parser::Ruby
-
- # source://yard//lib/yard/handlers/ruby/base.rb#144
- def call_params; end
-
- # source://yard//lib/yard/handlers/ruby/base.rb#155
- def caller_method; end
-
- # source://yard//lib/yard/handlers/ruby/base.rb#135
- def parse_block(inner_node, opts = T.unsafe(nil)); end
-
- class << self
- # @return [Boolean] whether or not an {AstNode} object should be
- # handled by this handler
- #
- # source://yard//lib/yard/handlers/ruby/base.rb#113
- def handles?(node); end
-
- # Matcher for handling a node with a specific meta-type. An {AstNode}
- # has a {AstNode#type} to define its type but can also be associated
- # with a set of types. For instance, +:if+ and +:unless+ are both
- # of the meta-type +:condition+.
- #
- # A meta-type is any method on the {AstNode} class ending in "?",
- # though you should not include the "?" suffix in your declaration.
- # Some examples are: "condition", "call", "literal", "kw", "token",
- # "ref".
- #
- # @example Handling any conditional statement (if, unless)
- # handles meta_type(:condition)
- # @param type [Symbol] the meta-type to match. A meta-type can be
- # any method name + "?" that {AstNode} responds to.
- # @return [void]
- #
- # source://yard//lib/yard/handlers/ruby/base.rb#105
- def meta_type(type); end
-
- # Matcher for handling any type of method call. Method calls can
- # be expressed by many {AstNode} types depending on the syntax
- # with which it is called, so YARD allows you to use this matcher
- # to simplify matching a method call.
- #
- # @example Match the "describe" method call
- # handles method_call(:describe)
- #
- # # The following will be matched:
- # # describe(...)
- # # object.describe(...)
- # # describe "argument" do ... end
- # @param name [#to_s] matches the method call of this name
- # @return [void]
- #
- # source://yard//lib/yard/handlers/ruby/base.rb#86
- def method_call(name = T.unsafe(nil)); end
- end
-end
-
-# Matches if/unless conditions inside classes and attempts to process only
-# one branch (by evaluating the condition if possible).
-#
-# @example A simple class conditional
-# class Foo
-# if 0
-# # This method is ignored
-# def xyz; end
-# end
-# end
-#
-# source://yard//lib/yard/handlers/ruby/class_condition_handler.rb#12
-class YARD::Handlers::Ruby::ClassConditionHandler < ::YARD::Handlers::Ruby::Base
- protected
-
- # Parses the condition part of the if/unless statement
- #
- # @return [true, false, nil] true if the condition can be definitely
- # parsed to true, false if not, and nil if the condition cannot be
- # parsed with certainty (it's dynamic)
- #
- # source://yard//lib/yard/handlers/ruby/class_condition_handler.rb#36
- def parse_condition; end
-
- # source://yard//lib/yard/handlers/ruby/class_condition_handler.rb#87
- def parse_else_block; end
-
- # source://yard//lib/yard/handlers/ruby/class_condition_handler.rb#83
- def parse_then_block; end
-end
-
-# Handles class declarations
-#
-# source://yard//lib/yard/handlers/ruby/class_handler.rb#3
-class YARD::Handlers::Ruby::ClassHandler < ::YARD::Handlers::Ruby::Base
- include ::YARD::Handlers::Ruby::StructHandlerMethods
-
- private
-
- # source://yard//lib/yard/handlers/ruby/class_handler.rb#73
- def create_struct_superclass(superclass, superclass_def); end
-
- # Extract the parameters from the Struct.new AST node, returning them as a list
- # of strings
- #
- # @param superclass [MethodCallNode] the AST node for the Struct.new call
- # @return [Array] the member names to generate methods for
- #
- # source://yard//lib/yard/handlers/ruby/class_handler.rb#67
- def extract_parameters(superclass); end
-
- # source://yard//lib/yard/handlers/ruby/class_handler.rb#92
- def parse_struct_superclass(klass, superclass); end
-
- # source://yard//lib/yard/handlers/ruby/class_handler.rb#98
- def parse_superclass(superclass); end
-
- # source://yard//lib/yard/handlers/ruby/class_handler.rb#82
- def struct_superclass_name(superclass); end
-end
-
-# Handles a class variable (@@variable)
-#
-# source://yard//lib/yard/handlers/ruby/class_variable_handler.rb#3
-class YARD::Handlers::Ruby::ClassVariableHandler < ::YARD::Handlers::Ruby::Base; end
-
-# Handles any lone comment statement in a Ruby file
-#
-# source://yard//lib/yard/handlers/ruby/comment_handler.rb#3
-class YARD::Handlers::Ruby::CommentHandler < ::YARD::Handlers::Ruby::Base; end
-
-# Handles any constant assignment
-#
-# source://yard//lib/yard/handlers/ruby/constant_handler.rb#3
-class YARD::Handlers::Ruby::ConstantHandler < ::YARD::Handlers::Ruby::Base
- include ::YARD::Handlers::Ruby::StructHandlerMethods
-
- private
-
- # Extract the parameters from the Struct.new or Data.define AST node, returning them as a list
- # of strings
- #
- # @param superclass [MethodCallNode] the AST node for the Struct.new or Data.define call
- # @return [Array] the member names to generate methods for
- #
- # source://yard//lib/yard/handlers/ruby/constant_handler.rb#66
- def extract_parameters(superclass); end
-
- # source://yard//lib/yard/handlers/ruby/constant_handler.rb#24
- def process_constant(statement); end
-
- # source://yard//lib/yard/handlers/ruby/constant_handler.rb#47
- def process_dataclass(statement); end
-
- # source://yard//lib/yard/handlers/ruby/constant_handler.rb#36
- def process_structclass(statement); end
-end
-
-# Handles automatic detection of dsl-style methods
-#
-# source://yard//lib/yard/handlers/ruby/dsl_handler.rb#6
-class YARD::Handlers::Ruby::DSLHandler < ::YARD::Handlers::Ruby::Base
- include ::YARD::Handlers::Ruby::DSLHandlerMethods
-end
-
-# source://yard//lib/yard/handlers/ruby/dsl_handler_methods.rb#5
-module YARD::Handlers::Ruby::DSLHandlerMethods
- include ::YARD::CodeObjects
- include ::YARD::Parser
-
- # source://yard//lib/yard/handlers/ruby/dsl_handler_methods.rb#14
- def handle_comments; end
-
- # source://yard//lib/yard/handlers/ruby/dsl_handler_methods.rb#48
- def register_docstring(object, docstring = T.unsafe(nil), stmt = T.unsafe(nil)); end
-
- private
-
- # source://yard//lib/yard/handlers/ruby/dsl_handler_methods.rb#72
- def find_attached_macro; end
-
- # @return [Boolean]
- #
- # source://yard//lib/yard/handlers/ruby/dsl_handler_methods.rb#54
- def implicit_docstring?; end
-
- # @return [Boolean] whether caller method matches a macro or
- # its alias names.
- #
- # source://yard//lib/yard/handlers/ruby/dsl_handler_methods.rb#85
- def macro_name_matches(macro); end
-
- # source://yard//lib/yard/handlers/ruby/dsl_handler_methods.rb#59
- def method_name; end
-
- # source://yard//lib/yard/handlers/ruby/dsl_handler_methods.rb#68
- def method_signature; end
-end
-
-# source://yard//lib/yard/handlers/ruby/dsl_handler_methods.rb#9
-YARD::Handlers::Ruby::DSLHandlerMethods::IGNORE_METHODS = T.let(T.unsafe(nil), Hash)
-
-# Helper methods to assist with processing decorators.
-#
-# source://yard//lib/yard/handlers/ruby/decorator_handler_methods.rb#3
-module YARD::Handlers::Ruby::DecoratorHandlerMethods
- # @overload process_decorator
- #
- # source://yard//lib/yard/handlers/ruby/decorator_handler_methods.rb#43
- def process_decorator(*nodes, &block); end
-
- private
-
- # @yield [method, node, name.to_sym]
- #
- # source://yard//lib/yard/handlers/ruby/decorator_handler_methods.rb#78
- def process_decorator_parameter(node, opts = T.unsafe(nil), &block); end
-end
-
-# Handles 'raise' calls inside methods
-#
-# source://yard//lib/yard/handlers/ruby/exception_handler.rb#3
-class YARD::Handlers::Ruby::ExceptionHandler < ::YARD::Handlers::Ruby::Base; end
-
-# Handles 'extend' call to include modules into the class scope of another
-#
-# @see MixinHandler
-#
-# source://yard//lib/yard/handlers/ruby/extend_handler.rb#4
-class YARD::Handlers::Ruby::ExtendHandler < ::YARD::Handlers::Ruby::MixinHandler
- # source://yard//lib/yard/handlers/ruby/extend_handler.rb#8
- def scope; end
-
- private
-
- # source://yard//lib/yard/handlers/ruby/extend_handler.rb#12
- def process_mixin(mixin); end
-end
-
-# To implement a custom handler matcher, subclass this class and implement
-# {#matches?} to return whether a node matches the handler.
-#
-# @example A Custom Handler Matcher Extension
-# # Implements a handler that checks for a specific string
-# # in the node's source.
-# class MyExtension < HandlesExtension
-# def matches?(node) node.source.include?(name) end
-# end
-#
-# # This handler will handle any node where the source includes 'foo'
-# class MyHandler < Handlers::Ruby::Base
-# handles MyExtension.new('foo')
-# end
-#
-# source://yard//lib/yard/handlers/ruby/base.rb#19
-class YARD::Handlers::Ruby::HandlesExtension
- # Creates a new extension with a specific matcher value +name+
- #
- # @param name [Object] the matcher value to check against {#matches?}
- # @return [HandlesExtension] a new instance of HandlesExtension
- #
- # source://yard//lib/yard/handlers/ruby/base.rb#22
- def initialize(name); end
-
- # Tests if the node matches the handler
- #
- # @param node [Parser::Ruby::AstNode] a Ruby node
- # @raise [NotImplementedError]
- # @return [Boolean] whether the +node+ matches the handler
- #
- # source://yard//lib/yard/handlers/ruby/base.rb#27
- def matches?(node); end
-
- protected
-
- # @return [String] the extension matcher value
- #
- # source://yard//lib/yard/handlers/ruby/base.rb#34
- def name; end
-end
-
-# Handlers for old Ruby 1.8 parser
-#
-# source://yard//lib/yard/autoload.rb#93
-module YARD::Handlers::Ruby::Legacy; end
-
-# Handles alias and alias_method calls
-#
-# source://yard//lib/yard/handlers/ruby/legacy/alias_handler.rb#3
-class YARD::Handlers::Ruby::Legacy::AliasHandler < ::YARD::Handlers::Ruby::Legacy::Base; end
-
-# Handles +attr_*+ statements in modules/classes
-#
-# source://yard//lib/yard/handlers/ruby/legacy/attribute_handler.rb#3
-class YARD::Handlers::Ruby::Legacy::AttributeHandler < ::YARD::Handlers::Ruby::Legacy::Base; end
-
-# This is the base handler for the legacy parser. To implement a legacy
-# handler, subclass this class.
-#
-# @abstract See {Handlers::Base} for subclassing information.
-#
-# source://yard//lib/yard/handlers/ruby/legacy/base.rb#9
-class YARD::Handlers::Ruby::Legacy::Base < ::YARD::Handlers::Base
- include ::YARD::Parser::Ruby::Legacy::RubyToken
-
- # source://yard//lib/yard/handlers/ruby/legacy/base.rb#44
- def call_params; end
-
- # source://yard//lib/yard/handlers/ruby/legacy/base.rb#53
- def caller_method; end
-
- # Parses a statement's block with a set of state values. If the
- # statement has no block, nothing happens. A description of state
- # values can be found at {Handlers::Base#push_state}
- #
- # @option opts
- # @option opts
- # @option opts
- # @param opts [Hash] State options
- # @see Handlers::Base#push_state #push_state
- #
- # source://yard//lib/yard/handlers/ruby/legacy/base.rb#35
- def parse_block(opts = T.unsafe(nil)); end
-
- private
-
- # Extracts method information for macro expansion only
- #
- # @return [Array>>] the method name followed by method
- # arguments (name and optional value)
- # @todo This is a duplicate implementation of {MethodHandler}. Refactor.
- #
- # source://yard//lib/yard/handlers/ruby/legacy/base.rb#68
- def extract_method_details; end
-
- # The string value of a token. For example, the return value for the symbol :sym
- # would be :sym. The return value for a string +"foo #{ bar}"+ would be the literal
- # +"foo #{ bar}"+ without any interpolation. The return value of the identifier
- # 'test' would be the same value: 'test'. Here is a list of common types and
- # their return values:
- #
- # @example
- # tokval(TokenList.new('"foo"').first) => "foo"
- # tokval(TokenList.new(':foo').first) => :foo
- # tokval(TokenList.new('CONSTANT').first, RubyToken::TkId) => "CONSTANT"
- # tokval(TokenList.new('identifier').first, RubyToken::TkId) => "identifier"
- # tokval(TokenList.new('3.25').first) => 3.25
- # tokval(TokenList.new('/xyz/i').first) => /xyz/i
- # @param accepted_types [Array>, Symbol] The allowed token types that this token can be. Defaults to [{TkVal}].
- # A list of types would be, for example, [+TkSTRING+, +TkSYMBOL+], to return
- # the token's value if it is either of those types. If +TkVal+ is accepted,
- # +TkNode+ is also accepted.
- #
- # Certain symbol keys are allowed to specify multiple types in one fell swoop.
- # These symbols are:
- # :string => +TkSTRING+, +TkDSTRING+, +TkDXSTRING+ and +TkXSTRING+
- # :attr => +TkSYMBOL+ and +TkSTRING+
- # :identifier => +TkIDENTIFIER, +TkFID+ and +TkGVAR+.
- # :number => +TkFLOAT+, +TkINTEGER+
- # @param token [Token] The token of the class
- # @return [Object] if the token is one of the accepted types, in its real value form.
- # It should be noted that identifiers and constants are kept in String form.
- # @return [nil] if the token is not any of the specified accepted types
- #
- # source://yard//lib/yard/handlers/ruby/legacy/base.rb#112
- def tokval(token, *accepted_types); end
-
- # Returns a list of symbols or string values from a statement.
- # The list must be a valid comma delimited list, and values
- # will only be returned to the end of the list only.
- #
- # Example:
- # attr_accessor :a, 'b', :c, :d => ['a', 'b', 'c', 'd']
- # attr_accessor 'a', UNACCEPTED_TYPE, 'c' => ['a', 'c']
- #
- # The tokval list of a {Parser::Ruby::Legacy::TokenList} of the above
- # code would be the {#tokval} value of :a, 'b',
- # :c and :d.
- #
- # It should also be noted that this function stops immediately at
- # any ruby keyword encountered:
- # "attr_accessor :a, :b, :c if x == 5" => ['a', 'b', 'c']
- #
- # @param accepted_types [Array>] passed to {#tokval}
- # @param tokenlist [TokenList] The list of tokens to process.
- # @return [Array] the list of tokvalues in the list.
- # @return [Array] if there are no symbols or Strings in the list
- # @see #tokval
- #
- # source://yard//lib/yard/handlers/ruby/legacy/base.rb#178
- def tokval_list(tokenlist, *accepted_types); end
-
- class << self
- # @return [Boolean] whether or not a {Parser::Ruby::Legacy::Statement} object should be handled
- # by this handler.
- #
- # source://yard//lib/yard/handlers/ruby/legacy/base.rb#15
- def handles?(stmt); end
- end
-end
-
-# Matches if/unless conditions inside classes and attempts to process only
-# one branch (by evaluating the condition if possible).
-#
-# @example A simple class conditional
-# class Foo
-# if 0
-# # This method is ignored
-# def xyz; end
-# end
-# end
-# @since 0.5.4
-#
-# source://yard//lib/yard/handlers/ruby/legacy/class_condition_handler.rb#4
-class YARD::Handlers::Ruby::Legacy::ClassConditionHandler < ::YARD::Handlers::Ruby::Legacy::Base
- protected
-
- # Parses the condition part of the if/unless statement
- #
- # @return [true, false, nil] true if the condition can be definitely
- # parsed to true, false if not, and nil if the condition cannot be
- # parsed with certainty (it's dynamic)
- # @since 0.5.5
- #
- # source://yard//lib/yard/handlers/ruby/legacy/class_condition_handler.rb#29
- def parse_condition; end
-
- # @since 0.5.5
- #
- # source://yard//lib/yard/handlers/ruby/legacy/class_condition_handler.rb#73
- def parse_else_block; end
-
- # @since 0.5.5
- #
- # source://yard//lib/yard/handlers/ruby/legacy/class_condition_handler.rb#68
- def parse_then_block; end
-end
-
-# Handles class declarations
-#
-# source://yard//lib/yard/handlers/ruby/legacy/class_handler.rb#3
-class YARD::Handlers::Ruby::Legacy::ClassHandler < ::YARD::Handlers::Ruby::Legacy::Base
- include ::YARD::Handlers::Ruby::StructHandlerMethods
-
- private
-
- # source://yard//lib/yard/handlers/ruby/legacy/class_handler.rb#74
- def create_struct_superclass(superclass, superclass_def); end
-
- # Extracts the parameter list from the Struct.new declaration and returns it
- # formatted as a list of member names. Expects the user will have used symbols
- # to define the struct member names
- #
- # @param superstring [String] the string declaring the superclass
- # @return [Array] a list of member names
- #
- # source://yard//lib/yard/handlers/ruby/legacy/class_handler.rb#69
- def extract_parameters(superstring); end
-
- # source://yard//lib/yard/handlers/ruby/legacy/class_handler.rb#95
- def parse_struct_subclass(klass, superclass_def); end
-
- # source://yard//lib/yard/handlers/ruby/legacy/class_handler.rb#102
- def parse_superclass(superclass); end
-
- # source://yard//lib/yard/handlers/ruby/legacy/class_handler.rb#83
- def struct_superclass_name(superclass); end
-end
-
-# Handles a class variable (@@variable)
-#
-# source://yard//lib/yard/handlers/ruby/legacy/class_variable_handler.rb#3
-class YARD::Handlers::Ruby::Legacy::ClassVariableHandler < ::YARD::Handlers::Ruby::Legacy::Base; end
-
-# source://yard//lib/yard/handlers/ruby/legacy/class_variable_handler.rb#4
-YARD::Handlers::Ruby::Legacy::ClassVariableHandler::HANDLER_MATCH = T.let(T.unsafe(nil), Regexp)
-
-# Handles any lone comment statement in a Ruby file
-#
-# source://yard//lib/yard/handlers/ruby/legacy/comment_handler.rb#3
-class YARD::Handlers::Ruby::Legacy::CommentHandler < ::YARD::Handlers::Ruby::Legacy::Base; end
-
-# Handles any constant assignment
-#
-# source://yard//lib/yard/handlers/ruby/legacy/constant_handler.rb#3
-class YARD::Handlers::Ruby::Legacy::ConstantHandler < ::YARD::Handlers::Ruby::Legacy::Base
- include ::YARD::Handlers::Ruby::StructHandlerMethods
-
- private
-
- # source://yard//lib/yard/handlers/ruby/legacy/constant_handler.rb#25
- def extract_parameters(parameters); end
-
- # source://yard//lib/yard/handlers/ruby/legacy/constant_handler.rb#20
- def process_structclass(classname, parameters); end
-end
-
-# source://yard//lib/yard/handlers/ruby/legacy/constant_handler.rb#5
-YARD::Handlers::Ruby::Legacy::ConstantHandler::HANDLER_MATCH = T.let(T.unsafe(nil), Regexp)
-
-# Handles automatic detection of dsl-style methods
-#
-# source://yard//lib/yard/handlers/ruby/legacy/dsl_handler.rb#7
-class YARD::Handlers::Ruby::Legacy::DSLHandler < ::YARD::Handlers::Ruby::Legacy::Base
- include ::YARD::Handlers::Ruby::DSLHandlerMethods
-end
-
-# Handles 'raise' calls inside methods
-#
-# source://yard//lib/yard/handlers/ruby/legacy/exception_handler.rb#3
-class YARD::Handlers::Ruby::Legacy::ExceptionHandler < ::YARD::Handlers::Ruby::Legacy::Base; end
-
-# Handles 'extend' call to include modules into the class scope of another
-#
-# @see MixinHandler
-#
-# source://yard//lib/yard/handlers/ruby/legacy/extend_handler.rb#3
-class YARD::Handlers::Ruby::Legacy::ExtendHandler < ::YARD::Handlers::Ruby::Legacy::MixinHandler
- # source://yard//lib/yard/handlers/ruby/legacy/extend_handler.rb#7
- def scope; end
-
- private
-
- # source://yard//lib/yard/handlers/ruby/legacy/extend_handler.rb#11
- def process_mixin(mixin); end
-end
-
-# Handles a method definition
-#
-# source://yard//lib/yard/handlers/ruby/legacy/method_handler.rb#3
-class YARD::Handlers::Ruby::Legacy::MethodHandler < ::YARD::Handlers::Ruby::Legacy::Base; end
-
-# Handles the 'include' statement to mixin a module in the instance scope
-#
-# source://yard//lib/yard/handlers/ruby/legacy/mixin_handler.rb#3
-class YARD::Handlers::Ruby::Legacy::MixinHandler < ::YARD::Handlers::Ruby::Legacy::Base
- private
-
- # @raise [YARD::Parser::UndocumentableError]
- #
- # source://yard//lib/yard/handlers/ruby/legacy/mixin_handler.rb#26
- def process_mixin(mixin); end
-end
-
-# Handles module_function calls to turn methods into public class methods.
-# Also creates a private instance copy of the method.
-#
-# source://yard//lib/yard/handlers/ruby/legacy/module_function_handler.rb#3
-class YARD::Handlers::Ruby::Legacy::ModuleFunctionHandler < ::YARD::Handlers::Ruby::Legacy::Base; end
-
-# Handles the declaration of a module
-#
-# source://yard//lib/yard/handlers/ruby/legacy/module_handler.rb#3
-class YARD::Handlers::Ruby::Legacy::ModuleHandler < ::YARD::Handlers::Ruby::Legacy::Base; end
-
-# Sets visibility of a class method to private.
-#
-# source://yard//lib/yard/handlers/ruby/legacy/private_class_method_handler.rb#3
-class YARD::Handlers::Ruby::Legacy::PrivateClassMethodHandler < ::YARD::Handlers::Ruby::Legacy::Base
- private
-
- # source://yard//lib/yard/handlers/ruby/legacy/private_class_method_handler.rb#15
- def privatize_class_method(name); end
-end
-
-# Sets visibility of a constant (class, module, const)
-#
-# source://yard//lib/yard/handlers/ruby/legacy/private_constant_handler.rb#3
-class YARD::Handlers::Ruby::Legacy::PrivateConstantHandler < ::YARD::Handlers::Ruby::Legacy::Base
- private
-
- # source://yard//lib/yard/handlers/ruby/legacy/private_constant_handler.rb#15
- def privatize_constant(name); end
-end
-
-# Handles 'private', 'protected', and 'public' calls.
-#
-# source://yard//lib/yard/handlers/ruby/legacy/visibility_handler.rb#3
-class YARD::Handlers::Ruby::Legacy::VisibilityHandler < ::YARD::Handlers::Ruby::Legacy::Base; end
-
-# Handles 'yield' calls
-#
-# source://yard//lib/yard/handlers/ruby/legacy/yield_handler.rb#3
-class YARD::Handlers::Ruby::Legacy::YieldHandler < ::YARD::Handlers::Ruby::Legacy::Base; end
-
-# source://yard//lib/yard/handlers/ruby/base.rb#37
-class YARD::Handlers::Ruby::MethodCallWrapper < ::YARD::Handlers::Ruby::HandlesExtension
- # @return [Boolean]
- #
- # source://yard//lib/yard/handlers/ruby/base.rb#38
- def matches?(node); end
-end
-
-# Handles a conditional inside a method
-#
-# source://yard//lib/yard/handlers/ruby/method_condition_handler.rb#3
-class YARD::Handlers::Ruby::MethodConditionHandler < ::YARD::Handlers::Ruby::Base; end
-
-# Handles a method definition
-#
-# source://yard//lib/yard/handlers/ruby/method_handler.rb#3
-class YARD::Handlers::Ruby::MethodHandler < ::YARD::Handlers::Ruby::Base
- include ::YARD::Handlers::Common::MethodHandler
-
- # source://yard//lib/yard/handlers/ruby/method_handler.rb#69
- def format_args; end
-end
-
-# Handles the 'include' statement to mixin a module in the instance scope
-#
-# source://yard//lib/yard/handlers/ruby/mixin_handler.rb#3
-class YARD::Handlers::Ruby::MixinHandler < ::YARD::Handlers::Ruby::Base
- protected
-
- # @raise [YARD::Parser::UndocumentableError]
- #
- # source://yard//lib/yard/handlers/ruby/mixin_handler.rb#25
- def process_mixin(mixin); end
-
- # source://yard//lib/yard/handlers/ruby/mixin_handler.rb#50
- def recipient(mixin); end
-end
-
-# Handles module_function calls to turn methods into public class methods.
-# Also creates a private instance copy of the method.
-#
-# source://yard//lib/yard/handlers/ruby/module_function_handler.rb#4
-class YARD::Handlers::Ruby::ModuleFunctionHandler < ::YARD::Handlers::Ruby::Base
- include ::YARD::Handlers::Ruby::DecoratorHandlerMethods
-
- # source://yard//lib/yard/handlers/ruby/module_function_handler.rb#34
- def make_module_function(instance_method, namespace); end
-end
-
-# Handles the declaration of a module
-#
-# source://yard//lib/yard/handlers/ruby/module_handler.rb#3
-class YARD::Handlers::Ruby::ModuleHandler < ::YARD::Handlers::Ruby::Base; end
-
-# Sets visibility of a class method to private.
-#
-# source://yard//lib/yard/handlers/ruby/private_class_method_handler.rb#3
-class YARD::Handlers::Ruby::PrivateClassMethodHandler < ::YARD::Handlers::Ruby::Base
- include ::YARD::Handlers::Ruby::DecoratorHandlerMethods
-end
-
-# Sets visibility of a constant (class, module, const)
-#
-# source://yard//lib/yard/handlers/ruby/private_constant_handler.rb#6
-class YARD::Handlers::Ruby::PrivateConstantHandler < ::YARD::Handlers::Ruby::Base
- private
-
- # source://yard//lib/yard/handlers/ruby/private_constant_handler.rb#28
- def privatize_constant(node); end
-end
-
-# Sets visibility of a class method to public.
-#
-# source://yard//lib/yard/handlers/ruby/public_class_method_handler.rb#3
-class YARD::Handlers::Ruby::PublicClassMethodHandler < ::YARD::Handlers::Ruby::Base
- include ::YARD::Handlers::Ruby::DecoratorHandlerMethods
-end
-
-# Helper methods to parse @attr_* tags on a class.
-#
-# @deprecated The use of +@attr+ tags are deprecated since 0.8.0 in favour of
-# the +@!attribute+ directive. This module should not be relied on.
-# @since 0.5.6
-#
-# source://yard//lib/yard/handlers/ruby/struct_handler_methods.rb#7
-module YARD::Handlers::Ruby::StructHandlerMethods
- include ::YARD::CodeObjects
-
- # Creates the auto-generated docstring for the getter method of a struct's
- # member. This is used so the generated documentation will look just like that
- # of an attribute defined using attr_accessor.
- #
- # @param klass [ClassObject] the class whose members we're working with
- # @param member [String] the name of the member we're generating documentation for
- # @return [String] a docstring to be attached to the getter method for this member
- # @since 0.5.6
- #
- # source://yard//lib/yard/handlers/ruby/struct_handler_methods.rb#62
- def add_reader_tags(klass, new_method, member); end
-
- # Creates the auto-generated docstring for the setter method of a struct's
- # member. This is used so the generated documentation will look just like that
- # of an attribute defined using attr_accessor.
- #
- # @param klass [ClassObject] the class whose members we're working with
- # @param member [String] the name of the member we're generating documentation for
- # @return [String] a docstring to be attached to the setter method for this member
- # @since 0.5.6
- #
- # source://yard//lib/yard/handlers/ruby/struct_handler_methods.rb#77
- def add_writer_tags(klass, new_method, member); end
-
- # Creates the given member methods and attaches them to the given ClassObject.
- #
- # @param klass [ClassObject] the class to generate attributes for
- # @param members [Array] a list of member names
- # @since 0.5.6
- #
- # source://yard//lib/yard/handlers/ruby/struct_handler_methods.rb#134
- def create_attributes(klass, members); end
-
- # Creates and registers a class object with the given name and superclass name.
- # Returns it for further use.
- #
- # @param classname [String] the name of the class
- # @param superclass [String] the name of the superclass
- # @return [ClassObject] the class object for further processing/method attaching
- # @since 0.5.6
- #
- # source://yard//lib/yard/handlers/ruby/struct_handler_methods.rb#92
- def create_class(classname, superclass); end
-
- # Determines whether to create an attribute method based on the class's
- # tags.
- #
- # @param klass [ClassObject] the class whose tags we're searching
- # @param member [String] the name of the struct member we need
- # @param type [Symbol] (:read) reader method, or writer method?
- # @return [Boolean] should the attribute be created?
- # @since 0.5.6
- #
- # source://yard//lib/yard/handlers/ruby/struct_handler_methods.rb#38
- def create_member_method?(klass, member, type = T.unsafe(nil)); end
-
- # Creates the getter (reader) method and attaches it to the class as an attribute.
- # Also sets up the docstring to prettify the documentation output.
- #
- # @param klass [ClassObject] the class to attach the method to
- # @param member [String] the name of the member we're generating a method for
- # @since 0.5.6
- #
- # source://yard//lib/yard/handlers/ruby/struct_handler_methods.rb#121
- def create_reader(klass, member); end
-
- # Creates the setter (writer) method and attaches it to the class as an attribute.
- # Also sets up the docstring to prettify the documentation output.
- #
- # @param klass [ClassObject] the class to attach the method to
- # @param member [String] the name of the member we're generating a method for
- # @since 0.5.6
- #
- # source://yard//lib/yard/handlers/ruby/struct_handler_methods.rb#104
- def create_writer(klass, member); end
-
- # Extracts the user's defined @member tag for a given class and its member. Returns
- # nil if the user did not define a @member tag for this struct entry.
- #
- # @param klass [ClassObject] the class whose tags we're searching
- # @param member [String] the name of the struct member we need
- # @param type [Symbol] reader method, or writer method?
- # @return [Tags::Tag, nil] the tag matching the request, or nil if not found
- # @since 0.5.6
- #
- # source://yard//lib/yard/handlers/ruby/struct_handler_methods.rb#17
- def member_tag_for_member(klass, member, type = T.unsafe(nil)); end
-
- # Retrieves all members defined in @attr* tags
- #
- # @param klass [ClassObject] the class with the attributes
- # @return [Array] the list of members defined as attributes on the class
- # @since 0.5.6
- #
- # source://yard//lib/yard/handlers/ruby/struct_handler_methods.rb#26
- def members_from_tags(klass); end
-
- # Gets the return type for the member in a nicely formatted string. Used
- # to be injected into auto-generated docstrings.
- #
- # @param member_tag [Tags::Tag] the tag object to check for types
- # @return [String] the user-declared type of the struct member, or [Object] if
- # the user did not define a type for this member.
- # @since 0.5.6
- #
- # source://yard//lib/yard/handlers/ruby/struct_handler_methods.rb#51
- def return_type_from_tag(member_tag); end
-end
-
-# source://yard//lib/yard/handlers/ruby/base.rb#53
-class YARD::Handlers::Ruby::TestNodeWrapper < ::YARD::Handlers::Ruby::HandlesExtension
- # @return [Boolean]
- #
- # source://yard//lib/yard/handlers/ruby/base.rb#54
- def matches?(node); end
-end
-
-# Handles 'private', 'protected', and 'public' calls.
-#
-# source://yard//lib/yard/handlers/ruby/visibility_handler.rb#3
-class YARD::Handlers::Ruby::VisibilityHandler < ::YARD::Handlers::Ruby::Base
- include ::YARD::Handlers::Ruby::DecoratorHandlerMethods
-
- # @return [Boolean]
- #
- # source://yard//lib/yard/handlers/ruby/visibility_handler.rb#32
- def is_attribute_method?(node); end
-end
-
-# Handles 'yield' calls
-#
-# source://yard//lib/yard/handlers/ruby/yield_handler.rb#3
-class YARD::Handlers::Ruby::YieldHandler < ::YARD::Handlers::Ruby::Base; end
-
-# Namespace for internationalization (i18n)
-#
-# @since 0.8.0
-#
-# source://yard//lib/yard/autoload.rb#151
-module YARD::I18n; end
-
-# +Locale+ is a unit of translation. It has {#name} and a set of
-# messages.
-#
-# @since 0.8.2
-#
-# source://yard//lib/yard/i18n/locale.rb#8
-class YARD::I18n::Locale
- # Creates a locale for +name+ locale.
- #
- # @param name [String] the locale name.
- # @return [Locale] a new instance of Locale
- # @since 0.8.2
- #
- # source://yard//lib/yard/i18n/locale.rb#34
- def initialize(name); end
-
- # Loads translation messages from +locale_directory+/{#name}.po.
- #
- # @param locale_directory [String] the directory path that has
- # {#name}.po.
- # @return [Boolean] +true+ if PO file exists, +false+ otherwise.
- # @since 0.8.2
- #
- # source://yard//lib/yard/i18n/locale.rb#44
- def load(locale_directory); end
-
- # @return [String] the name of the locale. It used IETF language
- # tag format +[language[_territory][.codeset][@modifier]]+.
- # @see http://tools.ietf.org/rfc/bcp/bcp47.txt BCP 47 - Tags for Identifying Languages
- # @since 0.8.2
- #
- # source://yard//lib/yard/i18n/locale.rb#29
- def name; end
-
- # @param message [String] the translation target message.
- # @return [String] translated message. If translation isn't
- # registered, the +message+ is returned.
- # @since 0.8.2
- #
- # source://yard//lib/yard/i18n/locale.rb#62
- def translate(message); end
-
- class << self
- # @return [String, nil] the default locale name.
- # @since 0.8.4
- #
- # source://yard//lib/yard/i18n/locale.rb#12
- def default; end
-
- # @return [String, nil] the default locale name.
- # @since 0.8.4
- #
- # source://yard//lib/yard/i18n/locale.rb#12
- def default=(locale); end
- end
-end
-
-# +Message+ is a translation target message. It has message ID as
-# {#id} and some properties {#locations} and {#comments}.
-#
-# @since 0.8.1
-#
-# source://yard//lib/yard/i18n/message.rb#10
-class YARD::I18n::Message
- # Creates a translate target message for message ID +id+.
- #
- # @param id [String] the message ID of the translate target message.
- # @return [Message] a new instance of Message
- # @since 0.8.1
- #
- # source://yard//lib/yard/i18n/message.rb#24
- def initialize(id); end
-
- # @param other [Message] the +Message+ to be compared.
- # @return [Boolean] checks whether this message is equal to another.
- # @since 0.8.1
- #
- # source://yard//lib/yard/i18n/message.rb#49
- def ==(other); end
-
- # Adds a comment for the message.
- #
- # @param comment [String] the comment for the message to be added.
- # @return [void]
- # @since 0.8.1
- #
- # source://yard//lib/yard/i18n/message.rb#43
- def add_comment(comment); end
-
- # Adds location information for the message.
- #
- # @param line [Integer] the line number where the message appears.
- # @param path [String] the path where the message appears.
- # @return [void]
- # @since 0.8.1
- #
- # source://yard//lib/yard/i18n/message.rb#35
- def add_location(path, line); end
-
- # @return [Set] the set of comments for the messages.
- # @since 0.8.1
- #
- # source://yard//lib/yard/i18n/message.rb#19
- def comments; end
-
- # @return [String] the message ID of the translation target message.
- # @since 0.8.1
- #
- # source://yard//lib/yard/i18n/message.rb#12
- def id; end
-
- # path and line number where the message is appeared.
- #
- # @return [Set] the set of locations. Location is an array of
- # @since 0.8.1
- #
- # source://yard//lib/yard/i18n/message.rb#16
- def locations; end
-end
-
-# Acts as a container for {Message} objects.
-#
-# @since 0.8.1
-#
-# source://yard//lib/yard/i18n/messages.rb#7
-class YARD::I18n::Messages
- include ::Enumerable
-
- # Creates a new container.
- #
- # @return [Messages] a new instance of Messages
- # @since 0.8.1
- #
- # source://yard//lib/yard/i18n/messages.rb#11
- def initialize; end
-
- # Checks if this messages list is equal to another messages list.
- #
- # @param other [Messages] the container to compare.
- # @return [Boolean] whether +self+ and +other+ is equivalence or not.
- # @since 0.8.1
- #
- # source://yard//lib/yard/i18n/messages.rb#45
- def ==(other); end
-
- # @param id [String] the message ID to perform a lookup on.
- # @return [Message, nil] a registered message for the given +id+,
- # or nil if no message for the ID is found.
- # @since 0.8.1
- #
- # source://yard//lib/yard/i18n/messages.rb#27
- def [](id); end
-
- # Enumerates each {Message} in the container.
- #
- # @return [void]
- # @since 0.8.1
- # @yieldparam message [Message] the next message object in
- # the enumeration.
- #
- # source://yard//lib/yard/i18n/messages.rb#20
- def each(&block); end
-
- # Registers a {Message}, the message ID of which is +id+. If
- # corresponding +Message+ is already registered, the previously
- # registered object is returned.
- #
- # @param id [String] the ID of the message to be registered.
- # @return [Message] the registered +Message+.
- # @since 0.8.1
- #
- # source://yard//lib/yard/i18n/messages.rb#37
- def register(id); end
-
- protected
-
- # @return [Hash{String=>Message}] the set of message objects
- # @since 0.8.1
- #
- # source://yard//lib/yard/i18n/messages.rb#53
- def messages; end
-end
-
-# The +PotGenerator+ generates POT format string from
-# {CodeObjects::Base} and {CodeObjects::ExtraFileObject}.
-#
-# == POT and PO
-#
-# POT is an acronym for "Portable Object Template". POT is a
-# template file to create PO file. The extension for POT is
-# ".pot". PO file is an acronym for "Portable Object". PO file has
-# many parts of message ID (msgid) that is translation target
-# message and message string (msgstr) that is translated message
-# of message ID. If you want to translate "Hello" in English into
-# "Bonjour" in French, "Hello" is the msgid ID and "Bonjour" is
-# msgstr. The extension for PO is ".po".
-#
-# == How to extract msgids
-#
-# The +PotGenerator+ has two parse methods:
-#
-# * {#parse_objects} for {CodeObjects::Base}
-# * {#parse_files} for {CodeObjects::ExtraFileObject}
-#
-# {#parse_objects} extracts msgids from docstring and tags of
-# {CodeObjects::Base} objects. The docstring of
-# {CodeObjects::Base} object is parsed and a paragraph is
-# extracted as a msgid. Tag name and tag text are extracted as
-# msgids from a tag.
-#
-# {#parse_files} extracts msgids from
-# {CodeObjects::ExtraFileObject} objects. The file content of
-# {CodeObjects::ExtraFileObject} object is parsed and a paragraph
-# is extracted as a msgid.
-#
-# == Usage
-#
-# To create a .pot file by +PotGenerator+, instantiate a
-# +PotGenerator+ with a relative working directory path from a
-# directory path that has created .pot file, parse
-# {CodeObjects::Base} objects and {CodeObjects::ExtraFileObject}
-# objects, generate a POT and write the generated POT to a .pot
-# file. The relative working directory path is ".." when the
-# working directory path is "." and the POT is wrote into
-# "po/yard.pot".
-#
-# @example Generate a .pot file
-# po_file_path = "po/yard.pot"
-# po_file_directory_pathname = Pathname.new(po_file_path).directory)
-# working_directory_pathname = Pathname.new(".")
-# relative_base_path = working_directory_pathname.relative_path_from(po_file_directory_pathname).to_s
-# # relative_base_path -> ".."
-# generator = YARD::I18n::PotGenerator.new(relative_base_path)
-# generator.parse_objects(objects)
-# generator.parse_files(files)
-# pot = generator.generate
-# po_file_directory_pathname.mkpath
-# File.open(po_file_path, "w") do |pot_file|
-# pot_file.print(pot)
-# end
-# @see http://www.gnu.org/software/gettext/manual/html_node/PO-Files.html GNU gettext manual about details of PO file
-# @since 0.8.0
-#
-# source://yard//lib/yard/i18n/pot_generator.rb#65
-class YARD::I18n::PotGenerator
- # Creates a POT generator that uses +relative_base_path+ to
- # generate locations for a msgid. +relative_base_path+ is
- # prepended to all locations.
- #
- # @param relative_base_path [String] a relative working
- # directory path from a directory path that has created .pot
- # file.
- # @return [PotGenerator] a new instance of PotGenerator
- # @since 0.8.0
- #
- # source://yard//lib/yard/i18n/pot_generator.rb#79
- def initialize(relative_base_path); end
-
- # Generates POT from +@messages+.
- #
- # One PO file entry is generated from a +Message+ in
- # +@messages+.
- #
- # Locations of the +Message+ are used to generate the reference
- # line that is started with "#: ". +relative_base_path+ passed
- # when the generator is created is prepended to each path in location.
- #
- # Comments of the +Message+ are used to generate the
- # translator-comment line that is started with "# ".
- #
- # @return [String] POT format string
- # @since 0.8.0
- #
- # source://yard//lib/yard/i18n/pot_generator.rb#122
- def generate; end
-
- # Extracted messages.
- #
- # @return [Messages]
- # @since 0.8.1
- #
- # source://yard//lib/yard/i18n/pot_generator.rb#70
- def messages; end
-
- # Parses {CodeObjects::ExtraFileObject} objects and stores
- # extracted msgids into {#messages}.
- #
- # @param files [Array] a list
- # of {CodeObjects::ExtraFileObject} objects to be parsed.
- # @return [void]
- # @since 0.8.0
- #
- # source://yard//lib/yard/i18n/pot_generator.rb#103
- def parse_files(files); end
-
- # Parses {CodeObjects::Base} objects and stores extracted msgids
- # into {#messages}
- #
- # @param objects [Array] a list of
- # {CodeObjects::Base} to be parsed.
- # @return [void]
- # @since 0.8.0
- #
- # source://yard//lib/yard/i18n/pot_generator.rb#91
- def parse_objects(objects); end
-
- private
-
- # @since 0.8.0
- #
- # source://yard//lib/yard/i18n/pot_generator.rb#160
- def current_time; end
-
- # @since 0.8.0
- #
- # source://yard//lib/yard/i18n/pot_generator.rb#183
- def escape_message_id(message_id); end
-
- # @since 0.8.0
- #
- # source://yard//lib/yard/i18n/pot_generator.rb#194
- def extract_documents(object); end
-
- # @since 0.8.0
- #
- # source://yard//lib/yard/i18n/pot_generator.rb#268
- def extract_paragraphs(file); end
-
- # @since 0.8.0
- #
- # source://yard//lib/yard/i18n/pot_generator.rb#235
- def extract_tag_documents(tag); end
-
- # @since 0.8.0
- #
- # source://yard//lib/yard/i18n/pot_generator.rb#242
- def extract_tag_name(tag); end
-
- # @since 0.8.0
- #
- # source://yard//lib/yard/i18n/pot_generator.rb#255
- def extract_tag_text(tag); end
-
- # @since 0.8.0
- #
- # source://yard//lib/yard/i18n/pot_generator.rb#168
- def generate_message(pot, message); end
-
- # @since 0.8.0
- #
- # source://yard//lib/yard/i18n/pot_generator.rb#164
- def generate_pot_creation_date_value; end
-
- # @since 0.8.0
- #
- # source://yard//lib/yard/i18n/pot_generator.rb#136
- def header; end
-
- # @since 0.8.0
- #
- # source://yard//lib/yard/i18n/pot_generator.rb#190
- def register_message(id); end
-end
-
-# Provides some convenient features for translating a text.
-#
-# @since 0.8.0
-#
-# source://yard//lib/yard/i18n/text.rb#5
-class YARD::I18n::Text
- # Creates a text object that has translation related features for
- # the input text.
- #
- # @option options
- # @param input [#each_line] a text to be translated.
- # @param options [Hash] a customizable set of options
- # @return [Text] a new instance of Text
- # @since 0.8.0
- #
- # source://yard//lib/yard/i18n/text.rb#12
- def initialize(input, options = T.unsafe(nil)); end
-
- # Extracts translation target messages from +@input+.
- #
- # @return [void]
- # @since 0.8.0
- # @yield [:attribute, name, value, line_no] the block that
- # receives extracted an attribute in header. It may called many
- # times.
- # @yield [:paragraph, text, start_line_no] the block that
- # receives extracted a paragraph in body. Paragraph is a text
- # block separated by one or more empty lines. Empty line is a
- # line that contains only zero or more whitespaces. It may
- # called many times.
- # @yieldparam line_no [Integer] the defined line number of extracted
- # attribute.
- # @yieldparam name [String] the name of extracted attribute.
- # @yieldparam start_line_no [Integer] the start line number of
- # extracted paragraph.
- # @yieldparam text [String] the text of extracted paragraph.
- # @yieldparam value [String] the value of extracted attribute.
- #
- # source://yard//lib/yard/i18n/text.rb#35
- def extract_messages; end
-
- # Translates into +locale+.
- #
- # @param locale [Locale] the translation target locale.
- # @return [String] translated text.
- # @since 0.8.0
- #
- # source://yard//lib/yard/i18n/text.rb#52
- def translate(locale); end
-
- private
-
- # @since 0.8.0
- # @yield [part]
- #
- # source://yard//lib/yard/i18n/text.rb#134
- def emit_attribute_event(match_data, line_no); end
-
- # @since 0.8.0
- # @yield [part]
- #
- # source://yard//lib/yard/i18n/text.rb#147
- def emit_empty_line_event(line, line_no); end
-
- # @since 0.8.0
- # @yield [part]
- #
- # source://yard//lib/yard/i18n/text.rb#125
- def emit_markup_event(line, line_no); end
-
- # @since 0.8.0
- #
- # source://yard//lib/yard/i18n/text.rb#156
- def emit_paragraph_event(paragraph, paragraph_start_line, line_no, &block); end
-
- # @since 0.8.0
- #
- # source://yard//lib/yard/i18n/text.rb#76
- def parse(&block); end
-end
-
-# Handles console logging for info, warnings and errors.
-# Uses the stdlib Logger class in Ruby for all the backend logic.
-#
-# source://yard//lib/yard/logging.rb#8
-class YARD::Logger
- include ::YARD::Logger::Severity
-
- # Creates a new logger
- #
- # @private
- # @return [Logger] a new instance of Logger
- #
- # source://yard//lib/yard/logging.rb#82
- def initialize(pipe, *args); end
-
- # Displays an unformatted line to the logger output stream.
- #
- # @param msg [String] the message to display
- # @return [void]
- # @since 0.8.2
- #
- # source://yard//lib/yard/logging.rb#209
- def <<(msg = T.unsafe(nil)); end
-
- # Prints the backtrace +exc+ to the logger as error data.
- #
- # @param exc [Array] the backtrace list
- # @param level_meth [Symbol] the level to log backtrace at
- # @return [void]
- #
- # source://yard//lib/yard/logging.rb#216
- def backtrace(exc, level_meth = T.unsafe(nil)); end
-
- # Captures the duration of a block of code for benchmark analysis. Also
- # calls {#progress} on the message to display it to the user.
- #
- # @param msg [String] the message to display
- # @param nontty_log [Symbol, nil] the level to log as if the output
- # stream is not a TTY. Use +nil+ for no alternate logging.
- # @return [void]
- # @todo Implement capture storage for reporting of benchmarks
- # @yield a block of arbitrary code to benchmark
- #
- # source://yard//lib/yard/logging.rb#234
- def capture(msg, nontty_log = T.unsafe(nil)); end
-
- # Clears the progress indicator in the TTY display.
- #
- # @return [void]
- # @since 0.8.2
- #
- # source://yard//lib/yard/logging.rb#186
- def clear_progress; end
-
- # Changes the debug level to DEBUG if $DEBUG is set and writes a debugging message.
- # Logs a message with the debug severity level.
- #
- # @param message [String] the message to log
- # @return [void]
- # @see #log
- #
- # source://yard//lib/yard/logging.rb#103
- def debug(message); end
-
- # Sets the logger level for the duration of the block
- #
- # @example
- # log.enter_level(Logger::ERROR) do
- # YARD.parse_string "def x; end"
- # end
- # @param new_level [Fixnum] the logger level for the duration of the block.
- # values can be found in Ruby's Logger class.
- # @yield the block with the logger temporarily set to +new_level+
- #
- # source://yard//lib/yard/logging.rb#142
- def enter_level(new_level = T.unsafe(nil)); end
-
- # Logs a message with the error severity level.
- #
- # @param message [String] the message to log
- # @return [void]
- # @see #log
- #
- # source://yard//lib/yard/logging.rb#103
- def error(message); end
-
- # Logs a message with the fatal severity level.
- #
- # @param message [String] the message to log
- # @return [void]
- # @see #log
- #
- # source://yard//lib/yard/logging.rb#103
- def fatal(message); end
-
- # Logs a message with the info severity level.
- #
- # @param message [String] the message to log
- # @return [void]
- # @see #log
- #
- # source://yard//lib/yard/logging.rb#103
- def info(message); end
-
- # @return [IO] the IO object being logged to
- # @since 0.8.2
- #
- # source://yard//lib/yard/logging.rb#49
- def io; end
-
- # @return [IO] the IO object being logged to
- # @since 0.8.2
- #
- # source://yard//lib/yard/logging.rb#49
- def io=(_arg0); end
-
- # @return [DEBUG, INFO, WARN, ERROR, FATAL, UNKNOWN] the logging level
- #
- # source://yard//lib/yard/logging.rb#57
- def level; end
-
- # @return [DEBUG, INFO, WARN, ERROR, FATAL, UNKNOWN] the logging level
- #
- # source://yard//lib/yard/logging.rb#57
- def level=(_arg0); end
-
- # Logs a message with a given severity
- #
- # @param message [String] the message to log
- # @param severity [DEBUG, INFO, WARN, ERROR, FATAL, UNKNOWN] the severity level
- #
- # source://yard//lib/yard/logging.rb#122
- def log(severity, message); end
-
- # Displays an unformatted line to the logger output stream.
- #
- # @param msg [String] the message to display
- # @return [void]
- # @since 0.8.2
- #
- # source://yard//lib/yard/logging.rb#205
- def print(msg = T.unsafe(nil)); end
-
- # Displays a progress indicator for a given message. This progress report
- # is only displayed on TTY displays, otherwise the message is passed to
- # the +nontty_log+ level.
- #
- # @param msg [String] the message to log
- # @param nontty_log [Symbol, nil] the level to log as if the output
- # stream is not a TTY. Use +nil+ for no alternate logging.
- # @return [void]
- # @since 0.8.2
- #
- # source://yard//lib/yard/logging.rb#161
- def progress(msg, nontty_log = T.unsafe(nil)); end
-
- # Displays an unformatted line to the logger output stream, adding
- # a newline.
- #
- # @param msg [String] the message to display
- # @return [void]
- # @since 0.8.2
- #
- # source://yard//lib/yard/logging.rb#197
- def puts(msg = T.unsafe(nil)); end
-
- # @return [Boolean] whether backtraces should be shown (by default
- # this is on).
- #
- # source://yard//lib/yard/logging.rb#53
- def show_backtraces; end
-
- # Sets the attribute show_backtraces
- #
- # @param value the value to set the attribute show_backtraces to.
- #
- # source://yard//lib/yard/logging.rb#54
- def show_backtraces=(_arg0); end
-
- # @return [Boolean] whether progress indicators should be shown when
- # logging CLIs (by default this is off).
- #
- # source://yard//lib/yard/logging.rb#64
- def show_progress; end
-
- # Sets the attribute show_progress
- #
- # @param value the value to set the attribute show_progress to.
- #
- # source://yard//lib/yard/logging.rb#70
- def show_progress=(_arg0); end
-
- # Logs a message with the unknown severity level.
- #
- # @param message [String] the message to log
- # @return [void]
- # @see #log
- #
- # source://yard//lib/yard/logging.rb#103
- def unknown(message); end
-
- # Remembers when a warning occurs and writes a warning message.
- # Logs a message with the warn severity level.
- #
- # @param message [String] the message to log
- # @return [void]
- # @see #log
- #
- # source://yard//lib/yard/logging.rb#103
- def warn(message); end
-
- # Warns that the Ruby environment does not support continuations. Applies
- # to JRuby, Rubinius and MacRuby. This warning will only display once
- # per Ruby process.
- #
- # @deprecated Continuations are no longer needed by YARD 0.8.0+.
- # @private
- # @return [void]
- #
- # source://yard//lib/yard/logging.rb#250
- def warn_no_continuations; end
-
- # @return [Boolean] whether a warn message has been emitted. Used for status tracking.
- #
- # source://yard//lib/yard/logging.rb#60
- def warned; end
-
- # @return [Boolean] whether a warn message has been emitted. Used for status tracking.
- #
- # source://yard//lib/yard/logging.rb#60
- def warned=(_arg0); end
-
- private
-
- # source://yard//lib/yard/logging.rb#255
- def clear_line; end
-
- class << self
- # @private
- #
- # source://yard//lib/yard/logging.rb#101
- def create_log_method(name); end
-
- # The logger instance
- #
- # @return [Logger] the logger instance
- #
- # source://yard//lib/yard/logging.rb#76
- def instance(pipe = T.unsafe(nil)); end
- end
-end
-
-# The list of characters displayed beside the progress bar to indicate
-# "movement".
-#
-# @since 0.8.2
-#
-# source://yard//lib/yard/logging.rb#45
-YARD::Logger::PROGRESS_INDICATORS = T.let(T.unsafe(nil), Array)
-
-# Log severity levels
-#
-# source://yard//lib/yard/logging.rb#10
-module YARD::Logger::Severity; end
-
-# Debugging log level
-#
-# source://yard//lib/yard/logging.rb#12
-YARD::Logger::Severity::DEBUG = T.let(T.unsafe(nil), Integer)
-
-# Error log level
-#
-# source://yard//lib/yard/logging.rb#21
-YARD::Logger::Severity::ERROR = T.let(T.unsafe(nil), Integer)
-
-# Fatal log level
-#
-# source://yard//lib/yard/logging.rb#24
-YARD::Logger::Severity::FATAL = T.let(T.unsafe(nil), Integer)
-
-# Information log level
-#
-# source://yard//lib/yard/logging.rb#15
-YARD::Logger::Severity::INFO = T.let(T.unsafe(nil), Integer)
-
-# @private
-#
-# source://yard//lib/yard/logging.rb#30
-YARD::Logger::Severity::SEVERITIES = T.let(T.unsafe(nil), Hash)
-
-# Unknown log level
-#
-# source://yard//lib/yard/logging.rb#27
-YARD::Logger::Severity::UNKNOWN = T.let(T.unsafe(nil), Integer)
-
-# Warning log level
-#
-# source://yard//lib/yard/logging.rb#18
-YARD::Logger::Severity::WARN = T.let(T.unsafe(nil), Integer)
-
-# An OpenStruct compatible struct class that allows for basic access of attributes
-# via +struct.attr_name+ and +struct.attr_name = value+.
-#
-# source://yard//lib/yard/open_struct.rb#4
-class YARD::OpenStruct
- # @return [OpenStruct] a new instance of OpenStruct
- #
- # source://yard//lib/yard/open_struct.rb#5
- def initialize(hash = T.unsafe(nil)); end
-
- # source://yard//lib/yard/open_struct.rb#25
- def ==(other); end
-
- # source://yard//lib/yard/open_struct.rb#41
- def [](key); end
-
- # source://yard//lib/yard/open_struct.rb#37
- def []=(key, value); end
-
- # source://yard//lib/yard/open_struct.rb#33
- def dig(*keys); end
-
- # source://yard//lib/yard/open_struct.rb#45
- def each_pair(&block); end
-
- # source://yard//lib/yard/open_struct.rb#29
- def hash; end
-
- # source://yard//lib/yard/open_struct.rb#49
- def marshal_dump; end
-
- # source://yard//lib/yard/open_struct.rb#53
- def marshal_load(data); end
-
- # @private
- #
- # source://yard//lib/yard/open_struct.rb#10
- def method_missing(name, *args); end
-
- # source://yard//lib/yard/open_struct.rb#21
- def to_h; end
-
- private
-
- # source://yard//lib/yard/open_struct.rb#59
- def __cache_lookup__(name); end
-end
-
-# Generalized options class for passing around large amounts of options between objects.
-#
-# The options class exists for better visibility and documentability of options being
-# passed through to other objects. Because YARD has parser and template architectures
-# that are heavily reliant on options, it is necessary to make these option keys easily
-# visible and understood by developers. Since the options class is more than just a
-# basic Hash, the subclass can provide aliasing and convenience methods to simplify
-# option property access, and, if needed, support backward-compatibility for deprecated
-# key names.
-#
-# == Hash and OpenStruct-like Access
-#
-# Although the options class allows for Hash-like access (opts[:key]), the recommended
-# mechanism for accessing an option key will be via standard method calls on attributes
-#
-# The options class can also act as an open ended key value storage structure (like a
-# Hash or OpenStruct), and allows for setting and getting of unregistered option keys.
-# This methodology is not recommended, however, and is only supported for backward
-# compatibility inside YARD. Whenever possible, developers should define all keys used
-# by an options class.
-#
-# == Declaring Default Values
-#
-# Note that the options class can contain default value definitions for certain options,
-# but to initialize these defaults, {#reset_defaults} must be called manually after
-# initialization; the options object is always created empty until defaults are applied.
-#
-# @abstract Subclasses should define (and document) custom attributes that are expected
-# to be made available as option keys.
-# @example Defining an Options class with custom option keys
-# class TemplateOptions < YARD::Options
-# # @return [Symbol] the output format to generate templates in
-# attr_accessor :format
-#
-# # @return [Symbol] the template to use when generating output
-# attr_accessor :template
-# end
-# @example Deprecating an option while still supporting it
-# class TemplateOptions < YARD::Options
-# # @return [Boolean] if syntax highlighting should be performed on code blocks.
-# # Defaults to true.
-# attr_accessor :highlight
-#
-# # @deprecated Use {#highlight} instead.
-# # @return [Boolean] if no syntax highlighting should be performs on code blocks.
-# # Defaults to false.
-# attr_accessor :no_highlight
-# def no_highlight=(value) @highlight = !value end
-# def no_highlight; !highlight end
-# end
-# @example Initializing default option values
-# class TemplateOptions < YARD::Options
-# def reset_defaults
-# super
-# self.format = :html
-# self.template = :default
-# self.highlight = true
-# # ...
-# end
-# end
-# @example Using +default_attr+ to create default attributes
-# class TemplateOptions < YARD::Options
-# default_attr :format, :html
-# default_attr :template, :default
-# default_attr :highlight, true
-# end
-#
-# source://yard//lib/yard/options.rb#69
-class YARD::Options
- # @return [Boolean] whether another Options object equals the
- # keys and values of this options object
- #
- # source://yard//lib/yard/options.rb#157
- def ==(other); end
-
- # Delegates calls with Hash syntax to actual method with key name
- #
- # @example Calling on an option key with Hash syntax
- # options[:format] # equivalent to: options.format
- # @param key [Symbol, String] the option name to access
- # @return the value of the option named +key+
- #
- # source://yard//lib/yard/options.rb#91
- def [](key); end
-
- # Delegates setter calls with Hash syntax to the attribute setter with the key name
- #
- # @example Setting an option with Hash syntax
- # options[:format] = :html # equivalent to: options.format = :html
- # @param key [Symbol, String] the option to set
- # @param value [Object] the value to set for the option
- # @return [Object] the value being set
- #
- # source://yard//lib/yard/options.rb#100
- def []=(key, value); end
-
- # Deletes an option value for +key+
- #
- # @param key [Symbol, String] the key to delete a value for
- # @return [Object] the value that was deleted
- #
- # source://yard//lib/yard/options.rb#207
- def delete(key); end
-
- # Yields over every option key and value
- #
- # @return [void]
- # @yield [key, value] every option key and value
- # @yieldparam key [Symbol] the option key
- # @yieldparam value [Object] the option value
- #
- # source://yard//lib/yard/options.rb#143
- def each; end
-
- # Inspects the object
- #
- # source://yard//lib/yard/options.rb#151
- def inspect; end
-
- # Creates a new options object and sets options hash or object value
- # onto that object.
- #
- # @param opts [Options, Hash]
- # @return [Options] the newly created options object
- # @see #update
- #
- # source://yard//lib/yard/options.rb#123
- def merge(opts); end
-
- # Handles setting and accessing of unregistered keys similar
- # to an OpenStruct object.
- #
- # @note It is not recommended to set and access unregistered keys on
- # an Options object. Instead, register the attribute before using it.
- #
- # source://yard//lib/yard/options.rb#170
- def method_missing(meth, *args, &block); end
-
- # Resets all values to their defaults.
- #
- # @abstract Subclasses should override this method to perform custom
- # value initialization if not using {default_attr}. Be sure to call
- # +super+ so that default initialization can take place.
- # @return [void]
- #
- # source://yard//lib/yard/options.rb#188
- def reset_defaults; end
-
- # @return [Hash] Converts options object to an options hash. All keys
- # will be symbolized.
- #
- # source://yard//lib/yard/options.rb#129
- def to_hash; end
-
- # Updates values from an options hash or options object on this object.
- # All keys passed should be key names defined by attributes on the class.
- #
- # @example Updating a set of options on an Options object
- # opts.update(:template => :guide, :type => :fulldoc)
- # @param opts [Hash, Options]
- # @return [self]
- #
- # source://yard//lib/yard/options.rb#109
- def update(opts); end
-
- class << self
- # Defines an attribute named +key+ and sets a default value for it
- #
- # @example Defining a default option key
- # default_attr :name, 'Default Name'
- # default_attr :time, lambda { Time.now }
- # @param default [Object, Proc] the default object value. If the default
- # value is a proc, it is executed upon initialization.
- # @param key [Symbol] the option key name
- #
- # source://yard//lib/yard/options.rb#80
- def default_attr(key, default); end
- end
-end
-
-# The parser namespace holds all parsing engines used by YARD.
-# Currently only Ruby and C (Ruby) parsers are implemented.
-#
-# source://yard//lib/yard/autoload.rb#161
-module YARD::Parser; end
-
-# Represents the abstract base parser class that parses source code in
-# a specific way. A parser should implement {#parse}, {#tokenize} and
-# {#enumerator}.
-#
-# == Registering a Custom Parser
-# To register a parser, see {SourceParser.register_parser_type}
-#
-# @abstract
-# @see #enumerator
-# @see #parse
-# @see #tokenize
-# @since 0.5.6
-#
-# source://yard//lib/yard/parser/base.rb#16
-class YARD::Parser::Base
- # This default constructor does nothing. The subclass is responsible for
- # storing the source contents and filename if they are required.
- #
- # @param filename [String] the name of the file if from disk
- # @param source [String] the source contents
- # @raise [NotImplementedError]
- # @return [Base] a new instance of Base
- # @since 0.5.6
- #
- # source://yard//lib/yard/parser/base.rb#26
- def initialize(source, filename); end
-
- # This method should be implemented to return a list of semantic tokens
- # representing the source code to be post-processed. Otherwise the method
- # should return nil.
- #
- # @abstract
- # @return [Array] a list of semantic tokens representing the source code
- # to be post-processed
- # @return [nil] if no post-processing should be done
- # @since 0.5.6
- #
- # source://yard//lib/yard/parser/base.rb#52
- def enumerator; end
-
- # This method should be implemented to parse the source and return itself.
- #
- # @abstract
- # @raise [NotImplementedError]
- # @return [Base] this method should return itself
- # @since 0.5.6
- #
- # source://yard//lib/yard/parser/base.rb#33
- def parse; end
-
- # This method should be implemented to tokenize given source
- #
- # @abstract
- # @raise [NotImplementedError]
- # @return [Array] a list/tree of lexical tokens
- # @since 0.5.6
- #
- # source://yard//lib/yard/parser/base.rb#40
- def tokenize; end
-
- class << self
- # Convenience method to create a new parser and {#parse}
- #
- # @since 0.5.6
- #
- # source://yard//lib/yard/parser/base.rb#18
- def parse(source, filename = T.unsafe(nil)); end
- end
-end
-
-# CRuby Parsing components
-#
-# source://yard//lib/yard/autoload.rb#162
-module YARD::Parser::C; end
-
-# source://yard//lib/yard/parser/c/statement.rb#41
-class YARD::Parser::C::BodyStatement < ::YARD::Parser::C::Statement
- # Returns the value of attribute comments.
- #
- # source://yard//lib/yard/parser/c/statement.rb#42
- def comments; end
-
- # Sets the attribute comments
- #
- # @param value the value to set the attribute comments to.
- #
- # source://yard//lib/yard/parser/c/statement.rb#42
- def comments=(_arg0); end
-end
-
-# source://yard//lib/yard/parser/c/c_parser.rb#5
-class YARD::Parser::C::CParser < ::YARD::Parser::Base
- # @return [CParser] a new instance of CParser
- #
- # source://yard//lib/yard/parser/c/c_parser.rb#6
- def initialize(source, file = T.unsafe(nil)); end
-
- # source://yard//lib/yard/parser/c/c_parser.rb#24
- def enumerator; end
-
- # source://yard//lib/yard/parser/c/c_parser.rb#19
- def parse; end
-
- # @raise [NotImplementedError]
- #
- # source://yard//lib/yard/parser/c/c_parser.rb#28
- def tokenize; end
-
- private
-
- # source://yard//lib/yard/parser/c/c_parser.rb#213
- def advance(num = T.unsafe(nil)); end
-
- # source://yard//lib/yard/parser/c/c_parser.rb#216
- def advance_loop; end
-
- # source://yard//lib/yard/parser/c/c_parser.rb#195
- def attach_comment(statement); end
-
- # source://yard//lib/yard/parser/c/c_parser.rb#214
- def back(num = T.unsafe(nil)); end
-
- # source://yard//lib/yard/parser/c/c_parser.rb#225
- def char(num = T.unsafe(nil)); end
-
- # source://yard//lib/yard/parser/c/c_parser.rb#96
- def consume_body_statements; end
-
- # source://yard//lib/yard/parser/c/c_parser.rb#136
- def consume_comment(add_comment = T.unsafe(nil)); end
-
- # source://yard//lib/yard/parser/c/c_parser.rb#59
- def consume_directive; end
-
- # source://yard//lib/yard/parser/c/c_parser.rb#47
- def consume_quote(type = T.unsafe(nil)); end
-
- # source://yard//lib/yard/parser/c/c_parser.rb#73
- def consume_toplevel_statement; end
-
- # source://yard//lib/yard/parser/c/c_parser.rb#169
- def consume_until(end_char, bracket_level = T.unsafe(nil), brace_level = T.unsafe(nil), add_comment = T.unsafe(nil)); end
-
- # source://yard//lib/yard/parser/c/c_parser.rb#132
- def consume_whitespace; end
-
- # source://yard//lib/yard/parser/c/c_parser.rb#227
- def nextchar(num = T.unsafe(nil)); end
-
- # source://yard//lib/yard/parser/c/c_parser.rb#220
- def nextline; end
-
- # source://yard//lib/yard/parser/c/c_parser.rb#34
- def parse_toplevel; end
-
- # source://yard//lib/yard/parser/c/c_parser.rb#226
- def prevchar(num = T.unsafe(nil)); end
-
- # source://yard//lib/yard/parser/c/c_parser.rb#118
- def strip_non_statement_data; end
-
- # source://yard//lib/yard/parser/c/c_parser.rb#229
- def struct; end
-end
-
-# source://yard//lib/yard/parser/c/statement.rb#51
-class YARD::Parser::C::Comment < ::YARD::Parser::C::Statement
- include ::YARD::Parser::C::CommentParser
-
- # @return [Comment] a new instance of Comment
- #
- # source://yard//lib/yard/parser/c/statement.rb#58
- def initialize(source, file = T.unsafe(nil), line = T.unsafe(nil)); end
-
- # source://yard//lib/yard/parser/c/statement.rb#62
- def comments; end
-
- # Returns the value of attribute overrides.
- #
- # source://yard//lib/yard/parser/c/statement.rb#55
- def overrides; end
-
- # Sets the attribute overrides
- #
- # @param value the value to set the attribute overrides to.
- #
- # source://yard//lib/yard/parser/c/statement.rb#55
- def overrides=(_arg0); end
-
- # Returns the value of attribute statement.
- #
- # source://yard//lib/yard/parser/c/statement.rb#56
- def statement; end
-
- # Sets the attribute statement
- #
- # @param value the value to set the attribute statement to.
- #
- # source://yard//lib/yard/parser/c/statement.rb#56
- def statement=(_arg0); end
-
- # Returns the value of attribute type.
- #
- # source://yard//lib/yard/parser/c/statement.rb#54
- def type; end
-
- # Sets the attribute type
- #
- # @param value the value to set the attribute type to.
- #
- # source://yard//lib/yard/parser/c/statement.rb#54
- def type=(_arg0); end
-end
-
-# source://yard//lib/yard/parser/c/comment_parser.rb#5
-module YARD::Parser::C::CommentParser
- protected
-
- # source://yard//lib/yard/parser/c/comment_parser.rb#8
- def parse_comments(comments); end
-
- private
-
- # source://yard//lib/yard/parser/c/comment_parser.rb#42
- def parse_callseq(comments); end
-
- # source://yard//lib/yard/parser/c/comment_parser.rb#30
- def parse_overrides(comments); end
-
- # source://yard//lib/yard/parser/c/comment_parser.rb#87
- def parse_types(types); end
-
- # source://yard//lib/yard/parser/c/comment_parser.rb#126
- def remove_private_comments(comment); end
-end
-
-# source://yard//lib/yard/parser/c/statement.rb#5
-class YARD::Parser::C::Statement
- # @return [Statement] a new instance of Statement
- #
- # source://yard//lib/yard/parser/c/statement.rb#16
- def initialize(source, file = T.unsafe(nil), line = T.unsafe(nil)); end
-
- # Returns the value of attribute comments_hash_flag.
- #
- # source://yard//lib/yard/parser/c/statement.rb#14
- def comments_hash_flag; end
-
- # Sets the attribute comments_hash_flag
- #
- # @param value the value to set the attribute comments_hash_flag to.
- #
- # source://yard//lib/yard/parser/c/statement.rb#14
- def comments_hash_flag=(_arg0); end
-
- # source://yard//lib/yard/parser/c/statement.rb#26
- def comments_range; end
-
- # Returns the value of attribute file.
- #
- # source://yard//lib/yard/parser/c/statement.rb#8
- def file; end
-
- # Sets the attribute file
- #
- # @param value the value to set the attribute file to.
- #
- # source://yard//lib/yard/parser/c/statement.rb#8
- def file=(_arg0); end
-
- # source://yard//lib/yard/parser/c/statement.rb#30
- def first_line; end
-
- # @deprecated Groups are now defined by directives
- # @see Tags::GroupDirective
- #
- # source://yard//lib/yard/parser/c/statement.rb#12
- def group; end
-
- # @deprecated Groups are now defined by directives
- # @see Tags::GroupDirective
- #
- # source://yard//lib/yard/parser/c/statement.rb#12
- def group=(_arg0); end
-
- # Returns the value of attribute line.
- #
- # source://yard//lib/yard/parser/c/statement.rb#7
- def line; end
-
- # Sets the attribute line
- #
- # @param value the value to set the attribute line to.
- #
- # source://yard//lib/yard/parser/c/statement.rb#7
- def line=(_arg0); end
-
- # source://yard//lib/yard/parser/c/statement.rb#22
- def line_range; end
-
- # source://yard//lib/yard/parser/c/statement.rb#36
- def show; end
-
- # source://yard//lib/yard/parser/c/statement.rb#34
- def signature; end
-
- # Returns the value of attribute source.
- #
- # source://yard//lib/yard/parser/c/statement.rb#6
- def source; end
-
- # Sets the attribute source
- #
- # @param value the value to set the attribute source to.
- #
- # source://yard//lib/yard/parser/c/statement.rb#6
- def source=(_arg0); end
-end
-
-# source://yard//lib/yard/parser/c/statement.rb#45
-class YARD::Parser::C::ToplevelStatement < ::YARD::Parser::C::Statement
- # Returns the value of attribute block.
- #
- # source://yard//lib/yard/parser/c/statement.rb#46
- def block; end
-
- # Sets the attribute block
- #
- # @param value the value to set the attribute block to.
- #
- # source://yard//lib/yard/parser/c/statement.rb#46
- def block=(_arg0); end
-
- # Returns the value of attribute comments.
- #
- # source://yard//lib/yard/parser/c/statement.rb#48
- def comments; end
-
- # Sets the attribute comments
- #
- # @param value the value to set the attribute comments to.
- #
- # source://yard//lib/yard/parser/c/statement.rb#48
- def comments=(_arg0); end
-
- # Returns the value of attribute declaration.
- #
- # source://yard//lib/yard/parser/c/statement.rb#47
- def declaration; end
-
- # Sets the attribute declaration
- #
- # @param value the value to set the attribute declaration to.
- #
- # source://yard//lib/yard/parser/c/statement.rb#47
- def declaration=(_arg0); end
-end
-
-# Responsible for parsing a list of files in order. The
-# {#parse} method of this class can be called from the
-# {SourceParser#globals} globals state list to re-enter
-# parsing for the remainder of files in the list recursively.
-#
-# @see Processor#parse_remaining_files
-#
-# source://yard//lib/yard/parser/source_parser.rb#20
-class YARD::Parser::OrderedParser
- # Creates a new OrderedParser with the global state and a list
- # of files to parse.
- #
- # @note OrderedParser sets itself as the +ordered_parser+ key on
- # global_state for later use in {Handlers::Processor}.
- # @param files [Array] the list of files to parse
- # @param global_state [OpenStruct] a structure containing all global
- # state during parsing
- # @return [OrderedParser] a new instance of OrderedParser
- #
- # source://yard//lib/yard/parser/source_parser.rb#32
- def initialize(global_state, files); end
-
- # @return [Array] the list of remaining files to parse
- #
- # source://yard//lib/yard/parser/source_parser.rb#22
- def files; end
-
- # @return [Array] the list of remaining files to parse
- #
- # source://yard//lib/yard/parser/source_parser.rb#22
- def files=(_arg0); end
-
- # Parses the remainder of the {#files} list.
- #
- # @see Processor#parse_remaining_files
- #
- # source://yard//lib/yard/parser/source_parser.rb#41
- def parse; end
-end
-
-# Raised when the parser sees a Ruby syntax error
-#
-# source://yard//lib/yard/parser/source_parser.rb#12
-class YARD::Parser::ParserSyntaxError < ::YARD::Parser::UndocumentableError; end
-
-# Ruby parsing components.
-#
-# source://yard//lib/yard/autoload.rb#171
-module YARD::Parser::Ruby
- # Builds and s-expression by creating {AstNode} objects with
- # the type provided by the first argument.
- #
- # @example A method call
- # s(:command, s(:var_ref, "mymethod"))
- # @example An implicit list of keywords
- # ast = s(s(:kw, "if"), s(:kw, "else"))
- # ast.type # => :list
- # @overload s
- # @overload s
- # @see AstNode#initialize
- #
- # source://yard//lib/yard/parser/ruby/ast_node.rb#25
- def s(*args); end
-end
-
-# An AST node is characterized by a type and a list of children. It
-# is most easily represented by the s-expression {#s} such as:
-# # AST for "if true; 5 end":
-# s(s(:if, s(:var_ref, s(:kw, "true")), s(s(:int, "5")), nil))
-#
-# The node type is not considered part of the list, only its children.
-# So +ast[0]+ does not refer to the type, but rather the first child
-# (or object). Items that are not +AstNode+ objects can be part of the
-# list, like Strings or Symbols representing names. To return only
-# the AstNode children of the node, use {#children}.
-#
-# source://yard//lib/yard/parser/ruby/ast_node.rb#41
-class YARD::Parser::Ruby::AstNode < ::Array
- # Creates a new AST node
- #
- # @option opts
- # @option opts
- # @option opts
- # @option opts
- # @option opts
- # @param arr [Array] the child nodes
- # @param opts [Hash] any extra line options
- # @param type [Symbol] the type of node being created
- # @return [AstNode] a new instance of AstNode
- #
- # source://yard//lib/yard/parser/ruby/ast_node.rb#153
- def initialize(type, arr, opts = T.unsafe(nil)); end
-
- # @private
- # @return [Boolean] whether the node is equal to another by checking
- # the list and type
- #
- # source://yard//lib/yard/parser/ruby/ast_node.rb#167
- def ==(other); end
-
- # @return [Boolean] whether the node has a block
- #
- # source://yard//lib/yard/parser/ruby/ast_node.rb#261
- def block?; end
-
- # @return [Boolean] whether the node is a method call
- #
- # source://yard//lib/yard/parser/ruby/ast_node.rb#241
- def call?; end
-
- # @return [Array] the {AstNode} children inside the node
- #
- # source://yard//lib/yard/parser/ruby/ast_node.rb#199
- def children; end
-
- # Returns the value of attribute docstring.
- #
- # source://yard//lib/yard/parser/ruby/ast_node.rb#50
- def comments; end
-
- # Returns the value of attribute docstring_hash_flag.
- #
- # source://yard//lib/yard/parser/ruby/ast_node.rb#52
- def comments_hash_flag; end
-
- # Returns the value of attribute docstring_range.
- #
- # source://yard//lib/yard/parser/ruby/ast_node.rb#51
- def comments_range; end
-
- # @return [Boolean] whether the node is a if/elsif/else condition
- #
- # source://yard//lib/yard/parser/ruby/ast_node.rb#251
- def condition?; end
-
- # @return [Boolean] whether the node is a method definition
- #
- # source://yard//lib/yard/parser/ruby/ast_node.rb#246
- def def?; end
-
- # Returns the value of attribute docstring.
- #
- # source://yard//lib/yard/parser/ruby/ast_node.rb#43
- def docstring; end
-
- # Sets the attribute docstring
- #
- # @param value the value to set the attribute docstring to.
- #
- # source://yard//lib/yard/parser/ruby/ast_node.rb#43
- def docstring=(_arg0); end
-
- # Returns the value of attribute docstring_hash_flag.
- #
- # source://yard//lib/yard/parser/ruby/ast_node.rb#42
- def docstring_hash_flag; end
-
- # Sets the attribute docstring_hash_flag
- #
- # @param value the value to set the attribute docstring_hash_flag to.
- #
- # source://yard//lib/yard/parser/ruby/ast_node.rb#42
- def docstring_hash_flag=(_arg0); end
-
- # Returns the value of attribute docstring_range.
- #
- # source://yard//lib/yard/parser/ruby/ast_node.rb#43
- def docstring_range; end
-
- # Sets the attribute docstring_range
- #
- # @param value the value to set the attribute docstring_range to.
- #
- # source://yard//lib/yard/parser/ruby/ast_node.rb#43
- def docstring_range=(_arg0); end
-
- # @return [String] the filename the node was parsed from
- #
- # source://yard//lib/yard/parser/ruby/ast_node.rb#76
- def file; end
-
- # Sets the attribute file
- #
- # @param value the value to set the attribute file to.
- #
- # source://yard//lib/yard/parser/ruby/ast_node.rb#49
- def file=(_arg0); end
-
- # @return [String] the first line of source represented by the node.
- #
- # source://yard//lib/yard/parser/ruby/ast_node.rb#278
- def first_line; end
-
- # @return [String] the full source that the node was parsed from
- #
- # source://yard//lib/yard/parser/ruby/ast_node.rb#82
- def full_source; end
-
- # Sets the attribute full_source
- #
- # @param value the value to set the attribute full_source to.
- #
- # source://yard//lib/yard/parser/ruby/ast_node.rb#49
- def full_source=(_arg0); end
-
- # @deprecated Groups are now defined by directives
- # @see Tags::GroupDirective
- #
- # source://yard//lib/yard/parser/ruby/ast_node.rb#47
- def group; end
-
- # @deprecated Groups are now defined by directives
- # @see Tags::GroupDirective
- #
- # source://yard//lib/yard/parser/ruby/ast_node.rb#47
- def group=(_arg0); end
-
- # @return [Boolean] whether the node has a {#line_range} set
- #
- # source://yard//lib/yard/parser/ruby/ast_node.rb#268
- def has_line?; end
-
- # @return [String] inspects the object
- #
- # source://yard//lib/yard/parser/ruby/ast_node.rb#323
- def inspect; end
-
- # Searches through the node and all descendants and returns the
- # first node with a type matching any of +node_types+, otherwise
- # returns the original node (self).
- #
- # @example If the node types are not present in the AST
- # ast = YARD.parse("def x; end")
- # ast.jump(:def)
- # @example Returns first 'def' or 'class' statement
- # ast = YARD.parse_string("class X; def y; end end")
- # ast.jump(:def, :class).first
- # # =>
- # @example Returns the first method definition in a block of code
- # ast = YARD.parse_string("if true; def x; end end").ast
- # ast.jump(:def)
- # # => s(:def, s(:ident, "x"), s(:params, nil, nil, nil, nil,
- # # nil), s(s(:void_stmt, )))
- # @param node_types [Array] a set of node types to match
- # @return [AstNode] the matching node, if one was found
- # @return [self] if no node was found
- #
- # source://yard//lib/yard/parser/ruby/ast_node.rb#193
- def jump(*node_types); end
-
- # @return [Boolean] whether the node is a keyword
- #
- # source://yard//lib/yard/parser/ruby/ast_node.rb#236
- def kw?; end
-
- # @return [Fixnum] the starting line number of the node
- #
- # source://yard//lib/yard/parser/ruby/ast_node.rb#273
- def line; end
-
- # @return [Range] the line range in {#full_source} represented
- # by the node
- #
- # source://yard//lib/yard/parser/ruby/ast_node.rb#70
- def line_range; end
-
- # Sets the attribute line_range
- #
- # @param value the value to set the attribute line_range to.
- #
- # source://yard//lib/yard/parser/ruby/ast_node.rb#49
- def line_range=(_arg0); end
-
- # @return [Boolean] whether the node is a literal value
- #
- # source://yard//lib/yard/parser/ruby/ast_node.rb#231
- def literal?; end
-
- # @return [Boolean] whether the node is a loop
- #
- # source://yard//lib/yard/parser/ruby/ast_node.rb#256
- def loop?; end
-
- # @return [AstNode, nil] the node's parent or nil if it is a root node.
- #
- # source://yard//lib/yard/parser/ruby/ast_node.rb#59
- def parent; end
-
- # @return [AstNode, nil] the node's parent or nil if it is a root node.
- #
- # source://yard//lib/yard/parser/ruby/ast_node.rb#59
- def parent=(_arg0); end
-
- # @return [nil] pretty prints the node
- #
- # source://yard//lib/yard/parser/ruby/ast_node.rb#290
- def pretty_print(q); end
-
- # @return [Boolean] whether the node is a reference (variable,
- # constant name)
- #
- # source://yard//lib/yard/parser/ruby/ast_node.rb#226
- def ref?; end
-
- # @return [String] the first line of source the node represents
- #
- # source://yard//lib/yard/parser/ruby/ast_node.rb#285
- def show; end
-
- # @return [String] the parse of {#full_source} that the node represents
- #
- # source://yard//lib/yard/parser/ruby/ast_node.rb#43
- def source; end
-
- # Sets the attribute source
- #
- # @param value the value to set the attribute source to.
- #
- # source://yard//lib/yard/parser/ruby/ast_node.rb#43
- def source=(_arg0); end
-
- # @return [Range] the character range in {#full_source} represented
- # by the node
- #
- # source://yard//lib/yard/parser/ruby/ast_node.rb#63
- def source_range; end
-
- # Sets the attribute source_range
- #
- # @param value the value to set the attribute source_range to.
- #
- # source://yard//lib/yard/parser/ruby/ast_node.rb#49
- def source_range=(_arg0); end
-
- # Returns the value of attribute source.
- #
- # source://yard//lib/yard/parser/ruby/ast_node.rb#53
- def to_s; end
-
- # @return [Boolean] whether the node is a token
- #
- # source://yard//lib/yard/parser/ruby/ast_node.rb#220
- def token?; end
-
- # Traverses the object and yields each node (including descendants) in order.
- #
- # @return [void]
- # @yield each descendant node in order
- # @yieldparam self, [AstNode] or a child/descendant node
- #
- # source://yard//lib/yard/parser/ruby/ast_node.rb#208
- def traverse; end
-
- # @return [Symbol] the node's unique symbolic type
- #
- # source://yard//lib/yard/parser/ruby/ast_node.rb#56
- def type; end
-
- # @return [Symbol] the node's unique symbolic type
- #
- # source://yard//lib/yard/parser/ruby/ast_node.rb#56
- def type=(_arg0); end
-
- # Resets node state in tree
- #
- # source://yard//lib/yard/parser/ruby/ast_node.rb#331
- def unfreeze; end
-
- private
-
- # Resets line information
- #
- # @return [void]
- #
- # source://yard//lib/yard/parser/ruby/ast_node.rb#341
- def reset_line_info; end
-
- class << self
- # Finds the node subclass that should be instantiated for a specific
- # node type
- #
- # @param type [Symbol] the node type to find a subclass for
- # @return [Class] a subclass of AstNode to instantiate the node with.
- #
- # source://yard//lib/yard/parser/ruby/ast_node.rb#111
- def node_class_for(type); end
- end
-end
-
-# List of all known keywords
-#
-# @return [Hash]
-#
-# source://yard//lib/yard/parser/ruby/ast_node.rb#96
-YARD::Parser::Ruby::AstNode::KEYWORDS = T.let(T.unsafe(nil), Hash)
-
-# source://yard//lib/yard/parser/ruby/ast_node.rb#531
-class YARD::Parser::Ruby::ClassNode < ::YARD::Parser::Ruby::KeywordNode
- # source://yard//lib/yard/parser/ruby/ast_node.rb#534
- def block; end
-
- # source://yard//lib/yard/parser/ruby/ast_node.rb#532
- def class_name; end
-
- # source://yard//lib/yard/parser/ruby/ast_node.rb#533
- def superclass; end
-end
-
-# Represents a lone comment block in source
-#
-# source://yard//lib/yard/parser/ruby/ast_node.rb#549
-class YARD::Parser::Ruby::CommentNode < ::YARD::Parser::Ruby::AstNode
- # source://yard//lib/yard/parser/ruby/ast_node.rb#552
- def comments; end
-
- # source://yard//lib/yard/parser/ruby/ast_node.rb#550
- def docstring; end
-
- # source://yard//lib/yard/parser/ruby/ast_node.rb#551
- def docstring=(value); end
-
- # source://yard//lib/yard/parser/ruby/ast_node.rb#555
- def first_line; end
-
- # source://yard//lib/yard/parser/ruby/ast_node.rb#554
- def source; end
-end
-
-# source://yard//lib/yard/parser/ruby/ast_node.rb#516
-class YARD::Parser::Ruby::ConditionalNode < ::YARD::Parser::Ruby::KeywordNode
- # source://yard//lib/yard/parser/ruby/ast_node.rb#518
- def condition; end
-
- # @return [Boolean]
- #
- # source://yard//lib/yard/parser/ruby/ast_node.rb#517
- def condition?; end
-
- # source://yard//lib/yard/parser/ruby/ast_node.rb#521
- def else_block; end
-
- # source://yard//lib/yard/parser/ruby/ast_node.rb#519
- def then_block; end
-
- private
-
- # @return [Boolean]
- #
- # source://yard//lib/yard/parser/ruby/ast_node.rb#528
- def cmod?; end
-end
-
-# source://yard//lib/yard/parser/ruby/ast_node.rb#376
-class YARD::Parser::Ruby::KeywordNode < ::YARD::Parser::Ruby::AstNode
- # @return [Boolean]
- #
- # source://yard//lib/yard/parser/ruby/ast_node.rb#377
- def kw?; end
-end
-
-# Handles Ruby parsing in Ruby 1.8.
-#
-# source://yard//lib/yard/autoload.rb#172
-module YARD::Parser::Ruby::Legacy; end
-
-# Lexical analyzer for Ruby source
-#
-# @private
-#
-# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#314
-class YARD::Parser::Ruby::Legacy::RubyLex
- include ::YARD::Parser::Ruby::Legacy::RubyToken
- include ::IRB
-
- # @return [RubyLex] a new instance of RubyLex
- #
- # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#437
- def initialize(content); end
-
- # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#472
- def char_no; end
-
- # Returns the value of attribute continue.
- #
- # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#430
- def continue; end
-
- # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1116
- def dedent(str); end
-
- # Returns the value of attribute exception_on_syntax_error.
- #
- # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#463
- def exception_on_syntax_error; end
-
- # Sets the attribute exception_on_syntax_error
- #
- # @param value the value to set the attribute exception_on_syntax_error to.
- #
- # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#463
- def exception_on_syntax_error=(_arg0); end
-
- # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#476
- def get_read; end
-
- # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#480
- def getc; end
-
- # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#484
- def getc_of_rests; end
-
- # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#488
- def gets; end
-
- # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1272
- def identify_comment; end
-
- # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#945
- def identify_gvar; end
-
- # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1062
- def identify_here_document; end
-
- # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#980
- def identify_identifier; end
-
- # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1145
- def identify_number(start); end
-
- # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1126
- def identify_quotation(initial_char); end
-
- # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1207
- def identify_string(ltype, quoted = T.unsafe(nil), opener = T.unsafe(nil), initial_char = T.unsafe(nil)); end
-
- # Returns the value of attribute indent.
- #
- # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#465
- def indent; end
-
- # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#510
- def lex; end
-
- # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#586
- def lex_init; end
-
- # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#759
- def lex_int2; end
-
- # Returns the value of attribute lex_state.
- #
- # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#431
- def lex_state; end
-
- # io functions
- #
- # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#468
- def line_no; end
-
- # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#506
- def peek(i = T.unsafe(nil)); end
-
- # @return [Boolean]
- #
- # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#502
- def peek_equal?(str); end
-
- # Returns the value of attribute read_auto_clean_up.
- #
- # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#462
- def read_auto_clean_up; end
-
- # Sets the attribute read_auto_clean_up
- #
- # @param value the value to set the attribute read_auto_clean_up to.
- #
- # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#462
- def read_auto_clean_up=(_arg0); end
-
- # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1295
- def read_escape; end
-
- # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1257
- def skip_inner_expression; end
-
- # Returns the value of attribute skip_space.
- #
- # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#461
- def skip_space; end
-
- # Sets the attribute skip_space
- #
- # @param value the value to set the attribute skip_space to.
- #
- # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#461
- def skip_space=(_arg0); end
-
- # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#526
- def token; end
-
- # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#498
- def ungetc(c = T.unsafe(nil)); end
-
- class << self
- # @return [Boolean]
- #
- # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#433
- def debug?; end
- end
-end
-
-# , "when"
-#
-# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#552
-YARD::Parser::Ruby::Legacy::RubyLex::ACCEPTS_COLON = T.let(T.unsafe(nil), Array)
-
-# Read an input stream character by character. We allow for unlimited
-# ungetting of characters just read.
-#
-# We simplify the implementation greatly by reading the entire input
-# into a buffer initially, and then simply traversing it using
-# pointers.
-#
-# We also have to allow for the here document diversion. This
-# little gem comes about when the lexer encounters a here
-# document. At this point we effectively need to split the input
-# stream into two parts: one to read the body of the here document,
-# the other to read the rest of the input line where the here
-# document was initially encountered. For example, we might have
-#
-# do_something(<<-A, <<-B)
-# stuff
-# for
-# A
-# stuff
-# for
-# B
-#
-# When the lexer encounters the < token_class }
-# { reading => [token_class, *opt] }
-#
-# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#271
-YARD::Parser::Ruby::Legacy::RubyToken::TkReading2Token = T.let(T.unsafe(nil), Hash)
-
-# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281
-class YARD::Parser::Ruby::Legacy::RubyToken::TkSELF < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end
-
-# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281
-class YARD::Parser::Ruby::Legacy::RubyToken::TkSEMICOLON < ::YARD::Parser::Ruby::Legacy::RubyToken::Token; end
-
-# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281
-class YARD::Parser::Ruby::Legacy::RubyToken::TkSPACE < ::YARD::Parser::Ruby::Legacy::RubyToken::TkWhitespace; end
-
-# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281
-class YARD::Parser::Ruby::Legacy::RubyToken::TkSTAR < ::YARD::Parser::Ruby::Legacy::RubyToken::Token; end
-
-# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281
-class YARD::Parser::Ruby::Legacy::RubyToken::TkSTRING < ::YARD::Parser::Ruby::Legacy::RubyToken::TkVal; end
-
-# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281
-class YARD::Parser::Ruby::Legacy::RubyToken::TkSUPER < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end
-
-# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281
-class YARD::Parser::Ruby::Legacy::RubyToken::TkSYMBEG < ::YARD::Parser::Ruby::Legacy::RubyToken::TkId; end
-
-# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281
-class YARD::Parser::Ruby::Legacy::RubyToken::TkSYMBOL < ::YARD::Parser::Ruby::Legacy::RubyToken::TkVal; end
-
-# Represents an end statement
-#
-# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#59
-class YARD::Parser::Ruby::Legacy::RubyToken::TkStatementEnd < ::YARD::Parser::Ruby::Legacy::RubyToken::Token
- # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#60
- def text; end
-end
-
-# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#272
-YARD::Parser::Ruby::Legacy::RubyToken::TkSymbol2Token = T.let(T.unsafe(nil), Hash)
-
-# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281
-class YARD::Parser::Ruby::Legacy::RubyToken::TkTHEN < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end
-
-# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281
-class YARD::Parser::Ruby::Legacy::RubyToken::TkTRUE < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end
-
-# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281
-class YARD::Parser::Ruby::Legacy::RubyToken::TkUMINUS < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp
- class << self
- # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#298
- def op_name; end
- end
-end
-
-# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281
-class YARD::Parser::Ruby::Legacy::RubyToken::TkUNDEF < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end
-
-# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281
-class YARD::Parser::Ruby::Legacy::RubyToken::TkUNLESS < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end
-
-# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281
-class YARD::Parser::Ruby::Legacy::RubyToken::TkUNLESS_MOD < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end
-
-# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281
-class YARD::Parser::Ruby::Legacy::RubyToken::TkUNTIL < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end
-
-# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281
-class YARD::Parser::Ruby::Legacy::RubyToken::TkUNTIL_MOD < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end
-
-# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281
-class YARD::Parser::Ruby::Legacy::RubyToken::TkUPLUS < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp
- class << self
- # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#298
- def op_name; end
- end
-end
-
-# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#107
-class YARD::Parser::Ruby::Legacy::RubyToken::TkUnknownChar < ::YARD::Parser::Ruby::Legacy::RubyToken::Token
- # @return [TkUnknownChar] a new instance of TkUnknownChar
- #
- # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#108
- def initialize(line_no, char_no, _id); end
-
- # Returns the value of attribute name.
- #
- # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#112
- def name; end
-end
-
-# Represents a Ruby value
-#
-# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#85
-class YARD::Parser::Ruby::Legacy::RubyToken::TkVal < ::YARD::Parser::Ruby::Legacy::RubyToken::Token
- # @return [TkVal] a new instance of TkVal
- #
- # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#86
- def initialize(line_no, char_no, value = T.unsafe(nil)); end
-end
-
-# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281
-class YARD::Parser::Ruby::Legacy::RubyToken::TkWHEN < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end
-
-# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281
-class YARD::Parser::Ruby::Legacy::RubyToken::TkWHILE < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end
-
-# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281
-class YARD::Parser::Ruby::Legacy::RubyToken::TkWHILE_MOD < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end
-
-# Represents whitespace
-#
-# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#68
-class YARD::Parser::Ruby::Legacy::RubyToken::TkWhitespace < ::YARD::Parser::Ruby::Legacy::RubyToken::Token; end
-
-# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281
-class YARD::Parser::Ruby::Legacy::RubyToken::TkXSTRING < ::YARD::Parser::Ruby::Legacy::RubyToken::TkVal; end
-
-# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281
-class YARD::Parser::Ruby::Legacy::RubyToken::TkYIELD < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end
-
-# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281
-class YARD::Parser::Ruby::Legacy::RubyToken::Tk__FILE__ < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end
-
-# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281
-class YARD::Parser::Ruby::Legacy::RubyToken::Tk__LINE__ < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end
-
-# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281
-class YARD::Parser::Ruby::Legacy::RubyToken::TklBEGIN < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end
-
-# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281
-class YARD::Parser::Ruby::Legacy::RubyToken::TklEND < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end
-
-# Represents a token in the Ruby lexer
-#
-# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#16
-class YARD::Parser::Ruby::Legacy::RubyToken::Token
- # Creates a new Token object
- #
- # @param char_no [Integer] the char number to initialize the token to
- # @param line_no [Integer] the line number to initialize the token to
- # @return [Token] a new instance of Token
- #
- # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#37
- def initialize(line_no, char_no); end
-
- # @return [Integer] the character number in the file/stream the token
- # is located.
- #
- # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#23
- def char_no; end
-
- # @return [Symbol] the lexical state at the token
- #
- # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#29
- def lex_state; end
-
- # @return [Symbol] the lexical state at the token
- #
- # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#29
- def lex_state=(_arg0); end
-
- # @return [Integer] the line number in the file/stream the token is
- # located.
- #
- # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#19
- def line_no; end
-
- # Chainable way to sets the text attribute
- #
- # @param text [String] the new text
- # @return [Token] this token object
- #
- # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#47
- def set_text(text); end
-
- # @return [String] the token text value
- #
- # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#26
- def text; end
-end
-
-# @private
-#
-# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#32
-YARD::Parser::Ruby::Legacy::RubyToken::Token::NO_TEXT = T.let(T.unsafe(nil), String)
-
-# @private
-#
-# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#147
-YARD::Parser::Ruby::Legacy::RubyToken::TokenDefinitions = T.let(T.unsafe(nil), Array)
-
-# source://yard//lib/yard/parser/ruby/legacy/statement.rb#4
-class YARD::Parser::Ruby::Legacy::Statement
- # @return [Statement] a new instance of Statement
- #
- # source://yard//lib/yard/parser/ruby/legacy/statement.rb#14
- def initialize(tokens, block = T.unsafe(nil), comments = T.unsafe(nil)); end
-
- # Returns the value of attribute block.
- #
- # source://yard//lib/yard/parser/ruby/legacy/statement.rb#5
- def block; end
-
- # Returns the value of attribute comments.
- #
- # source://yard//lib/yard/parser/ruby/legacy/statement.rb#5
- def comments; end
-
- # Returns the value of attribute comments_hash_flag.
- #
- # source://yard//lib/yard/parser/ruby/legacy/statement.rb#12
- def comments_hash_flag; end
-
- # Sets the attribute comments_hash_flag
- #
- # @param value the value to set the attribute comments_hash_flag to.
- #
- # source://yard//lib/yard/parser/ruby/legacy/statement.rb#12
- def comments_hash_flag=(_arg0); end
-
- # Returns the value of attribute comments_range.
- #
- # source://yard//lib/yard/parser/ruby/legacy/statement.rb#6
- def comments_range; end
-
- # Sets the attribute comments_range
- #
- # @param value the value to set the attribute comments_range to.
- #
- # source://yard//lib/yard/parser/ruby/legacy/statement.rb#6
- def comments_range=(_arg0); end
-
- # source://yard//lib/yard/parser/ruby/legacy/statement.rb#21
- def first_line; end
-
- # @deprecated Groups are now defined by directives
- # @see Tags::GroupDirective
- #
- # source://yard//lib/yard/parser/ruby/legacy/statement.rb#10
- def group; end
-
- # @deprecated Groups are now defined by directives
- # @see Tags::GroupDirective
- #
- # source://yard//lib/yard/parser/ruby/legacy/statement.rb#10
- def group=(_arg0); end
-
- # source://yard//lib/yard/parser/ruby/legacy/statement.rb#34
- def inspect; end
-
- # @return [Fixnum] the first line of Ruby source
- #
- # source://yard//lib/yard/parser/ruby/legacy/statement.rb#46
- def line; end
-
- # @return [Range] the first to last lines of Ruby source
- # @since 0.5.4
- #
- # source://yard//lib/yard/parser/ruby/legacy/statement.rb#52
- def line_range; end
-
- # source://yard//lib/yard/parser/ruby/legacy/statement.rb#41
- def show; end
-
- # source://yard//lib/yard/parser/ruby/legacy/statement.rb#25
- def signature; end
-
- # source://yard//lib/yard/parser/ruby/legacy/statement.rb#32
- def source(include_block = T.unsafe(nil)); end
-
- # source://yard//lib/yard/parser/ruby/legacy/statement.rb#27
- def to_s(include_block = T.unsafe(nil)); end
-
- # Returns the value of attribute tokens.
- #
- # source://yard//lib/yard/parser/ruby/legacy/statement.rb#5
- def tokens; end
-
- private
-
- # source://yard//lib/yard/parser/ruby/legacy/statement.rb#58
- def clean_tokens(tokens); end
-end
-
-# source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#4
-class YARD::Parser::Ruby::Legacy::StatementList < ::Array
- include ::YARD::Parser::Ruby::Legacy::RubyToken
-
- # Creates a new statement list
- #
- # @param content [TokenList, String] the tokens to create the list from
- # @return [StatementList] a new instance of StatementList
- #
- # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#17
- def initialize(content); end
-
- # Returns the value of attribute encoding_line.
- #
- # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#7
- def encoding_line; end
-
- # Sets the attribute encoding_line
- #
- # @param value the value to set the attribute encoding_line to.
- #
- # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#7
- def encoding_line=(_arg0); end
-
- # Returns the value of attribute shebang_line.
- #
- # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#7
- def shebang_line; end
-
- # Sets the attribute shebang_line
- #
- # @param value the value to set the attribute shebang_line to.
- #
- # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#7
- def shebang_line=(_arg0); end
-
- private
-
- # Handles the balancing of parentheses and blocks
- #
- # @param tk [RubyToken::Token] the token to process
- # @return [Boolean] whether or not the current statement's parentheses and blocks
- # are balanced after +tk+
- #
- # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#362
- def balances?(tk); end
-
- # Returns the next statement in the token stream
- #
- # @return [Statement] the next statement
- #
- # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#45
- def next_statement; end
-
- # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#34
- def parse_statements; end
-
- # Returns the next token in the stream that's not a space
- #
- # @return [RubyToken::Token] the next non-space token
- #
- # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#388
- def peek_no_space; end
-
- # Processes a token in a block
- #
- # @param tk [RubyToken::Token] the token to process
- #
- # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#194
- def process_block_token(tk); end
-
- # Processes a complex block-opening token;
- # that is, a block opener such as +while+ or +for+
- # that is followed by an expression
- #
- # @param tk [RubyToken::Token] the token to process
- #
- # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#293
- def process_complex_block_opener(tk); end
-
- # Processes a comment token that comes before a statement
- #
- # @param tk [RubyToken::Token] the token to process
- # @return [Boolean] whether or not +tk+ was processed as an initial comment
- #
- # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#213
- def process_initial_comment(tk); end
-
- # Processes a simple block-opening token;
- # that is, a block opener such as +begin+ or +do+
- # that isn't followed by an expression
- #
- # @param tk [RubyToken::Token] the token to process
- #
- # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#268
- def process_simple_block_opener(tk); end
-
- # Processes a token that closes a statement
- #
- # @param tk [RubyToken::Token] the token to process
- #
- # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#305
- def process_statement_end(tk); end
-
- # Processes a single token
- #
- # @param tk [RubyToken::Token] the token to process
- #
- # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#130
- def process_token(tk); end
-
- # Adds a token to the current statement,
- # unless it's a newline, semicolon, or comment
- #
- # @param tk [RubyToken::Token] the token to process
- #
- # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#380
- def push_token(tk); end
-
- # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#111
- def sanitize_block; end
-
- # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#96
- def sanitize_statement_end; end
-end
-
-# The following list of tokens will require a block to be opened
-# if used at the beginning of a statement.
-#
-# source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#11
-YARD::Parser::Ruby::Legacy::StatementList::OPEN_BLOCK_TOKENS = T.let(T.unsafe(nil), Array)
-
-# source://yard//lib/yard/parser/ruby/legacy/token_list.rb#4
-class YARD::Parser::Ruby::Legacy::TokenList < ::Array
- include ::YARD::Parser::Ruby::Legacy::RubyToken
-
- # @return [TokenList] a new instance of TokenList
- #
- # source://yard//lib/yard/parser/ruby/legacy/token_list.rb#7
- def initialize(content = T.unsafe(nil)); end
-
- # @param tokens [TokenList, Token, String] A list of tokens. If the token is a string, it
- # is parsed with {RubyLex}.
- #
- # source://yard//lib/yard/parser/ruby/legacy/token_list.rb#35
- def <<(*tokens); end
-
- # @param tokens [TokenList, Token, String] A list of tokens. If the token is a string, it
- # is parsed with {RubyLex}.
- #
- # source://yard//lib/yard/parser/ruby/legacy/token_list.rb#21
- def push(*tokens); end
-
- # source://yard//lib/yard/parser/ruby/legacy/token_list.rb#37
- def squeeze(type = T.unsafe(nil)); end
-
- # source://yard//lib/yard/parser/ruby/legacy/token_list.rb#11
- def to_s(full_statement = T.unsafe(nil), show_block = T.unsafe(nil)); end
-
- private
-
- # source://yard//lib/yard/parser/ruby/legacy/token_list.rb#53
- def convert_token(lex, tk); end
-
- # source://yard//lib/yard/parser/ruby/legacy/token_list.rb#44
- def parse_content(content); end
-end
-
-# source://yard//lib/yard/parser/ruby/ast_node.rb#372
-class YARD::Parser::Ruby::LiteralNode < ::YARD::Parser::Ruby::AstNode
- # @return [Boolean]
- #
- # source://yard//lib/yard/parser/ruby/ast_node.rb#373
- def literal?; end
-end
-
-# source://yard//lib/yard/parser/ruby/ast_node.rb#542
-class YARD::Parser::Ruby::LoopNode < ::YARD::Parser::Ruby::KeywordNode
- # source://yard//lib/yard/parser/ruby/ast_node.rb#545
- def block; end
-
- # source://yard//lib/yard/parser/ruby/ast_node.rb#544
- def condition; end
-
- # @return [Boolean]
- #
- # source://yard//lib/yard/parser/ruby/ast_node.rb#543
- def loop?; end
-end
-
-# source://yard//lib/yard/parser/ruby/ast_node.rb#439
-class YARD::Parser::Ruby::MethodCallNode < ::YARD::Parser::Ruby::AstNode
- # source://yard//lib/yard/parser/ruby/ast_node.rb#465
- def block; end
-
- # source://yard//lib/yard/parser/ruby/ast_node.rb#463
- def block_param; end
-
- # @return [Boolean]
- #
- # source://yard//lib/yard/parser/ruby/ast_node.rb#440
- def call?; end
-
- # source://yard//lib/yard/parser/ruby/ast_node.rb#443
- def method_name(name_only = T.unsafe(nil)); end
-
- # source://yard//lib/yard/parser/ruby/ast_node.rb#441
- def namespace; end
-
- # source://yard//lib/yard/parser/ruby/ast_node.rb#454
- def parameters(include_block_param = T.unsafe(nil)); end
-
- private
-
- # @return [Boolean]
- #
- # source://yard//lib/yard/parser/ruby/ast_node.rb#475
- def call_has_paren?; end
-
- # source://yard//lib/yard/parser/ruby/ast_node.rb#471
- def index_adjust; end
-end
-
-# source://yard//lib/yard/parser/ruby/ast_node.rb#480
-class YARD::Parser::Ruby::MethodDefinitionNode < ::YARD::Parser::Ruby::AstNode
- # source://yard//lib/yard/parser/ruby/ast_node.rb#507
- def block(n = T.unsafe(nil)); end
-
- # @return [Boolean]
- #
- # source://yard//lib/yard/parser/ruby/ast_node.rb#482
- def def?; end
-
- # @return [Boolean]
- #
- # source://yard//lib/yard/parser/ruby/ast_node.rb#481
- def kw?; end
-
- # source://yard//lib/yard/parser/ruby/ast_node.rb#485
- def method_name(name_only = T.unsafe(nil)); end
-
- # source://yard//lib/yard/parser/ruby/ast_node.rb#483
- def namespace; end
-
- # source://yard//lib/yard/parser/ruby/ast_node.rb#490
- def parameters(include_block_param = T.unsafe(nil)); end
-
- # source://yard//lib/yard/parser/ruby/ast_node.rb#496
- def signature; end
-
- private
-
- # source://yard//lib/yard/parser/ruby/ast_node.rb#511
- def index_adjust; end
-end
-
-# source://yard//lib/yard/parser/ruby/ast_node.rb#537
-class YARD::Parser::Ruby::ModuleNode < ::YARD::Parser::Ruby::KeywordNode
- # source://yard//lib/yard/parser/ruby/ast_node.rb#539
- def block; end
-
- # source://yard//lib/yard/parser/ruby/ast_node.rb#538
- def module_name; end
-end
-
-# source://yard//lib/yard/parser/ruby/ast_node.rb#380
-class YARD::Parser::Ruby::ParameterNode < ::YARD::Parser::Ruby::AstNode
- # source://yard//lib/yard/parser/ruby/ast_node.rb#430
- def args_forward; end
-
- # source://yard//lib/yard/parser/ruby/ast_node.rb#426
- def block_param; end
-
- # source://yard//lib/yard/parser/ruby/ast_node.rb#414
- def double_splat_param; end
-
- # source://yard//lib/yard/parser/ruby/ast_node.rb#396
- def named_params; end
-
- # source://yard//lib/yard/parser/ruby/ast_node.rb#406
- def splat_param; end
-
- # source://yard//lib/yard/parser/ruby/ast_node.rb#410
- def unnamed_end_params; end
-
- # source://yard//lib/yard/parser/ruby/ast_node.rb#385
- def unnamed_optional_params; end
-
- # source://yard//lib/yard/parser/ruby/ast_node.rb#381
- def unnamed_required_params; end
-end
-
-# source://yard//lib/yard/parser/ruby/ast_node.rb#360
-class YARD::Parser::Ruby::ReferenceNode < ::YARD::Parser::Ruby::AstNode
- # source://yard//lib/yard/parser/ruby/ast_node.rb#367
- def namespace; end
-
- # source://yard//lib/yard/parser/ruby/ast_node.rb#363
- def path; end
-
- # @return [Boolean]
- #
- # source://yard//lib/yard/parser/ruby/ast_node.rb#361
- def ref?; end
-end
-
-# Internal parser class
-#
-# @since 0.5.6
-#
-# source://yard//lib/yard/parser/ruby/ruby_parser.rb#27
-class YARD::Parser::Ruby::RipperParser < ::Ripper
- # @return [RipperParser] a new instance of RipperParser
- # @since 0.5.6
- #
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#32
- def initialize(source, filename, *args); end
-
- # @since 0.5.6
- #
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#28
- def ast; end
-
- # @since 0.5.6
- #
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#28
- def charno; end
-
- # @since 0.5.6
- #
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#28
- def comments; end
-
- # @since 0.5.6
- #
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#29
- def encoding_line; end
-
- # @since 0.5.6
- #
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#64
- def enumerator; end
-
- # @since 0.5.6
- #
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#28
- def file; end
-
- # @since 0.5.6
- #
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#68
- def file_encoding; end
-
- # @since 0.5.6
- #
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#29
- def frozen_string_line; end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#168
- def on_BEGIN(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#186
- def on_CHAR(tok); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#168
- def on_END(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#186
- def on___end__(tok); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#168
- def on_alias(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#175
- def on_alias_error(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#175
- def on_arg_ambiguous(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#168
- def on_arg_paren(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#160
- def on_args_add(list, item); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#160
- def on_args_add_block(list, item); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#160
- def on_args_add_star(list, item); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#175
- def on_args_forward(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#154
- def on_args_new(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#175
- def on_aryptn(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#175
- def on_assign(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#175
- def on_assign_error(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#175
- def on_assoc_splat(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#186
- def on_backref(tok); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#186
- def on_backtick(tok); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#168
- def on_begin(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#175
- def on_binary(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#175
- def on_block_var(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#168
- def on_blockarg(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#168
- def on_brace_block(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#168
- def on_break(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#175
- def on_call(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#168
- def on_case(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#168
- def on_class(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#175
- def on_class_name_error(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#186
- def on_comma(tok); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#175
- def on_command(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#175
- def on_command_call(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#186
- def on_const(tok); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#175
- def on_const_path_field(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#175
- def on_const_ref(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#186
- def on_cvar(tok); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#168
- def on_def(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#168
- def on_defined(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#168
- def on_defs(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#168
- def on_do_block(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#175
- def on_dot2(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#175
- def on_dot3(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#168
- def on_else(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#168
- def on_elsif(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#186
- def on_embexpr_beg(tok); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#186
- def on_embexpr_end(tok); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#186
- def on_embvar(tok); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#168
- def on_ensure(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#175
- def on_excessed_comma(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#175
- def on_fcall(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#175
- def on_field(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#186
- def on_float(tok); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#175
- def on_fndptn(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#168
- def on_for(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#186
- def on_gvar(tok); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#186
- def on_heredoc_beg(tok); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#175
- def on_heredoc_dedent(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#186
- def on_heredoc_end(tok); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#175
- def on_hshptn(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#186
- def on_ident(tok); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#168
- def on_if(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#175
- def on_if_mod(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#175
- def on_ifop(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#186
- def on_ignored_nl(tok); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#186
- def on_ignored_sp(tok); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#186
- def on_imaginary(tok); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#175
- def on_in(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#186
- def on_int(tok); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#186
- def on_ivar(tok); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#186
- def on_kw(tok); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#175
- def on_kwrest_param(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#186
- def on_label_end(tok); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#186
- def on_lbrace(tok); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#186
- def on_lparen(tok); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#175
- def on_magic_comment(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#175
- def on_massign(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#160
- def on_method_add_arg(list, item); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#160
- def on_method_add_block(list, item); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#160
- def on_mlhs_add(list, item); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#160
- def on_mlhs_add_post(list, item); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#160
- def on_mlhs_add_star(list, item); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#154
- def on_mlhs_new(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#175
- def on_mlhs_paren(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#168
- def on_module(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#160
- def on_mrhs_add(list, item); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#160
- def on_mrhs_add_star(list, item); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#154
- def on_mrhs_new(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#175
- def on_mrhs_new_from_args(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#168
- def on_next(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#186
- def on_nl(tok); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#175
- def on_nokw_param(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#186
- def on_op(tok); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#175
- def on_opassign(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#175
- def on_operator_ambiguous(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#175
- def on_param_error(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#168
- def on_paren(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#186
- def on_period(tok); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#160
- def on_qsymbols_add(list, item); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#186
- def on_qsymbols_beg(tok); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#154
- def on_qsymbols_new(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#160
- def on_qwords_add(list, item); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#186
- def on_qwords_beg(tok); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#154
- def on_qwords_new(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#186
- def on_rational(tok); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#186
- def on_rbrace(tok); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#168
- def on_redo(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#160
- def on_regexp_add(list, item); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#186
- def on_regexp_beg(tok); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#186
- def on_regexp_end(tok); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#168
- def on_regexp_literal(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#154
- def on_regexp_new(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#175
- def on_rescue_mod(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#168
- def on_rest_param(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#168
- def on_retry(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#168
- def on_return(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#168
- def on_return0(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#186
- def on_rparen(tok); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#168
- def on_sclass(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#186
- def on_semicolon(tok); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#160
- def on_stmts_add(list, item); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#154
- def on_stmts_new(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#160
- def on_string_add(list, item); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#175
- def on_string_concat(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#175
- def on_string_dvar(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#168
- def on_string_embexpr(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#168
- def on_super(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#186
- def on_symbeg(tok); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#168
- def on_symbol(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#175
- def on_symbol_literal(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#160
- def on_symbols_add(list, item); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#186
- def on_symbols_beg(tok); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#154
- def on_symbols_new(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#186
- def on_tlambda(tok); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#186
- def on_tlambeg(tok); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#175
- def on_top_const_field(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#186
- def on_tstring_beg(tok); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#186
- def on_tstring_content(tok); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#186
- def on_tstring_end(tok); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#168
- def on_undef(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#168
- def on_unless(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#175
- def on_unless_mod(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#168
- def on_until(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#175
- def on_until_mod(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#175
- def on_var_alias(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#175
- def on_var_field(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#175
- def on_var_ref(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#175
- def on_vcall(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#168
- def on_when(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#168
- def on_while(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#175
- def on_while_mod(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#160
- def on_word_add(list, item); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#154
- def on_word_new(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#160
- def on_words_add(list, item); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#186
- def on_words_beg(tok); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#154
- def on_words_new(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#186
- def on_words_sep(tok); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#160
- def on_xstring_add(list, item); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#168
- def on_xstring_literal(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#154
- def on_xstring_new(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#168
- def on_yield(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#168
- def on_yield0(*args); end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#168
- def on_zsuper(*args); end
-
- # @since 0.5.6
- #
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#55
- def parse; end
-
- # @since 0.5.6
- #
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#30
- def root; end
-
- # @since 0.5.6
- #
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#29
- def shebang_line; end
-
- # @since 0.5.6
- #
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#28
- def tokens; end
-
- private
-
- # @since 0.5.6
- #
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#700
- def add_comment(line, node = T.unsafe(nil), before_node = T.unsafe(nil), into = T.unsafe(nil)); end
-
- # @since 0.5.6
- #
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#285
- def add_token(token, data); end
-
- # @return [Boolean]
- # @since 0.5.6
- #
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#625
- def comment_starts_line?(charno); end
-
- # @raise [ParserSyntaxError]
- # @since 0.5.6
- #
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#623
- def compile_error(msg); end
-
- # @since 0.5.6
- #
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#726
- def freeze_tree(node = T.unsafe(nil)); end
-
- # @since 0.5.6
- #
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#634
- def insert_comments; end
-
- # @since 0.5.6
- #
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#175
- def on_aref(*args); end
-
- # @since 0.5.6
- #
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#175
- def on_aref_field(*args); end
-
- # @since 0.5.6
- #
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#168
- def on_array(other); end
-
- # @since 0.5.6
- #
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#175
- def on_assoc_new(*args); end
-
- # @since 0.5.6
- #
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#175
- def on_assoclist_from_args(*args); end
-
- # @since 0.5.6
- #
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#175
- def on_bare_assoc_hash(*args); end
-
- # @since 0.5.6
- #
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#361
- def on_body_stmt(*args); end
-
- # @since 0.5.6
- #
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#175
- def on_bodystmt(*args); end
-
- # @since 0.5.6
- #
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#186
- def on_comment(comment); end
-
- # @since 0.5.6
- #
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#175
- def on_const_path_ref(*args); end
-
- # @since 0.5.6
- #
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#175
- def on_dyna_symbol(sym); end
-
- # @since 0.5.6
- #
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#186
- def on_embdoc(text); end
-
- # @since 0.5.6
- #
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#186
- def on_embdoc_beg(text); end
-
- # @since 0.5.6
- #
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#186
- def on_embdoc_end(text); end
-
- # @since 0.5.6
- #
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#168
- def on_hash(*args); end
-
- # @since 0.5.6
- #
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#186
- def on_label(data); end
-
- # @since 0.5.6
- #
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#168
- def on_lambda(*args); end
-
- # @since 0.5.6
- #
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#186
- def on_lbracket(tok); end
-
- # @since 0.5.6
- #
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#175
- def on_params(*args); end
-
- # @raise [ParserSyntaxError]
- # @since 0.5.6
- #
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#175
- def on_parse_error(msg); end
-
- # @since 0.5.6
- #
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#175
- def on_program(*args); end
-
- # @since 0.5.6
- #
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#186
- def on_rbracket(tok); end
-
- # @since 0.5.6
- #
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#168
- def on_rescue(exc, *args); end
-
- # @since 0.5.6
- #
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#186
- def on_sp(tok); end
-
- # @since 0.5.6
- #
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#175
- def on_string_content(*args); end
-
- # @since 0.5.6
- #
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#168
- def on_string_literal(*args); end
-
- # @since 0.5.6
- #
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#168
- def on_top_const_ref(*args); end
-
- # @since 0.5.6
- #
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#175
- def on_unary(op, val); end
-
- # @since 0.5.6
- #
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#175
- def on_void_stmt; end
-
- # @since 0.5.6
- #
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#237
- def visit_event(node); end
-
- # @since 0.5.6
- #
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#262
- def visit_event_arr(node); end
-
- # @since 0.5.6
- #
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#270
- def visit_ns_token(token, data, ast_token = T.unsafe(nil)); end
-end
-
-# @since 0.5.6
-#
-# source://yard//lib/yard/parser/ruby/ruby_parser.rb#133
-YARD::Parser::Ruby::RipperParser::AST_TOKENS = T.let(T.unsafe(nil), Array)
-
-# @since 0.5.6
-#
-# source://yard//lib/yard/parser/ruby/ruby_parser.rb#136
-YARD::Parser::Ruby::RipperParser::COMMENT_SKIP_NODE_TYPES = T.let(T.unsafe(nil), Array)
-
-# @since 0.5.6
-#
-# source://yard//lib/yard/parser/ruby/ruby_parser.rb#78
-YARD::Parser::Ruby::RipperParser::MAPPINGS = T.let(T.unsafe(nil), Hash)
-
-# @since 0.5.6
-#
-# source://yard//lib/yard/parser/ruby/ruby_parser.rb#131
-YARD::Parser::Ruby::RipperParser::REV_MAPPINGS = T.let(T.unsafe(nil), Hash)
-
-# Ruby 1.9 parser
-#
-# source://yard//lib/yard/parser/ruby/ruby_parser.rb#12
-class YARD::Parser::Ruby::RubyParser < ::YARD::Parser::Base
- # @return [RubyParser] a new instance of RubyParser
- #
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#13
- def initialize(source, filename); end
-
- # Ruby 1.9 parser
- #
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#21
- def encoding_line; end
-
- # Ruby 1.9 parser
- #
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#19
- def enumerator; end
-
- # Ruby 1.9 parser
- #
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#22
- def frozen_string_line; end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#17
- def parse; end
-
- # Ruby 1.9 parser
- #
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#20
- def shebang_line; end
-
- # source://yard//lib/yard/parser/ruby/ruby_parser.rb#18
- def tokenize; end
-end
-
-# Supports {#each} enumeration over a source's tokens, yielding
-# the token and a possible {CodeObjects::Base} associated with the
-# constant or identifier token.
-#
-# source://yard//lib/yard/parser/ruby/token_resolver.rb#8
-class YARD::Parser::Ruby::TokenResolver
- include ::Enumerable
- include ::YARD::CodeObjects::NamespaceMapper
-
- # Creates a token resolver for given source.
- #
- # @param namespace [CodeObjects::Base] the object/namespace to resolve from
- # @param source [String] the source code to tokenize
- # @raise [ParserSyntaxError]
- # @return [TokenResolver] a new instance of TokenResolver
- #
- # source://yard//lib/yard/parser/ruby/token_resolver.rb#16
- def initialize(source, namespace = T.unsafe(nil)); end
-
- # Iterates over each token, yielding the token and a possible code
- # object that is associated with the token.
- #
- # @example Yielding code objects
- # r = TokenResolver.new("A::B::C")
- # r.each do |tok, obj|
- # if obj
- # puts "#{tok[0]} -> #{obj.path.inspect}"
- # else
- # puts "No object: #{tok.inspect}"
- # end
- # end
- #
- # # Prints:
- # # :const -> "A"
- # # No object: [:op, "::"]
- # # :const -> "A::B"
- # # No object: [:op, "::"]
- # # :const -> "A::B::C"
- # @yieldparam object [CodeObjects::Base, nil] the fully qualified code
- # object associated with the current token, or nil if there is no object
- # for the yielded token.
- # @yieldparam token [Array(Symbol,String,Array(Integer,Integer))] the
- # current token object being iterated
- #
- # source://yard//lib/yard/parser/ruby/token_resolver.rb#46
- def each; end
-
- protected
-
- # source://yard//lib/yard/parser/ruby/token_resolver.rb#94
- def last_sep; end
-
- # source://yard//lib/yard/parser/ruby/token_resolver.rb#95
- def last_sep=(v); end
-
- # source://yard//lib/yard/parser/ruby/token_resolver.rb#94
- def next_object; end
-
- # source://yard//lib/yard/parser/ruby/token_resolver.rb#95
- def next_object=(v); end
-
- # source://yard//lib/yard/parser/ruby/token_resolver.rb#94
- def object; end
-
- # source://yard//lib/yard/parser/ruby/token_resolver.rb#95
- def object=(v); end
-
- # source://yard//lib/yard/parser/ruby/token_resolver.rb#94
- def skip_group; end
-
- # source://yard//lib/yard/parser/ruby/token_resolver.rb#95
- def skip_group=(v); end
-
- private
-
- # source://yard//lib/yard/parser/ruby/token_resolver.rb#112
- def lookup(toktype, name); end
-
- # source://yard//lib/yard/parser/ruby/token_resolver.rb#134
- def object_resolved_types(obj = T.unsafe(nil)); end
-
- # source://yard//lib/yard/parser/ruby/token_resolver.rb#106
- def pop_state; end
-
- # source://yard//lib/yard/parser/ruby/token_resolver.rb#102
- def push_state; end
-
- class << self
- # source://yard//lib/yard/parser/ruby/token_resolver.rb#92
- def state_attr(*attrs); end
- end
-end
-
-# Responsible for parsing a source file into the namespace. Parsing
-# also invokes handlers to process the parsed statements and generate
-# any code objects that may be recognized.
-#
-# == Custom Parsers
-# SourceParser allows custom parsers to be registered and called when
-# a certain filetype is recognized. To register a parser and hook it
-# up to a set of file extensions, call {register_parser_type}
-#
-# @see CodeObjects::Base
-# @see Handlers::Base
-# @see register_parser_type
-#
-# source://yard//lib/yard/parser/source_parser.rb#63
-class YARD::Parser::SourceParser
- # @overload initialize
- # @return [SourceParser] a new instance of SourceParser
- #
- # source://yard//lib/yard/parser/source_parser.rb#406
- def initialize(parser_type = T.unsafe(nil), globals1 = T.unsafe(nil), globals2 = T.unsafe(nil)); end
-
- # @return [String] the contents of the file to be parsed
- # @since 0.7.0
- #
- # source://yard//lib/yard/parser/source_parser.rb#399
- def contents; end
-
- # @return [String] the filename being parsed by the parser.
- #
- # source://yard//lib/yard/parser/source_parser.rb#386
- def file; end
-
- # @return [String] the filename being parsed by the parser.
- #
- # source://yard//lib/yard/parser/source_parser.rb#386
- def file=(_arg0); end
-
- # @return [OpenStruct] an open struct containing arbitrary global state
- # shared between files and handlers.
- # @since 0.7.0
- #
- # source://yard//lib/yard/parser/source_parser.rb#395
- def globals; end
-
- # The main parser method. This should not be called directly. Instead,
- # use the class methods {parse} and {parse_string}.
- #
- # @param content [String, #read, Object] the source file to parse
- # @return [Object, nil] the parser object used to parse the source
- #
- # source://yard//lib/yard/parser/source_parser.rb#418
- def parse(content = T.unsafe(nil)); end
-
- # @return [Symbol] the parser type associated with the parser instance.
- # This should be set by the {#initialize constructor}.
- #
- # source://yard//lib/yard/parser/source_parser.rb#390
- def parser_type; end
-
- # Tokenizes but does not parse the block of code using the current {#parser_type}
- #
- # @param content [String] the block of code to tokenize
- # @return [Array] a list of tokens
- #
- # source://yard//lib/yard/parser/source_parser.rb#462
- def tokenize(content); end
-
- private
-
- # Searches for encoding line and forces encoding
- #
- # @since 0.5.3
- #
- # source://yard//lib/yard/parser/source_parser.rb#471
- def convert_encoding(content); end
-
- # @since 0.5.6
- #
- # source://yard//lib/yard/parser/source_parser.rb#515
- def parser_class; end
-
- # source://yard//lib/yard/parser/source_parser.rb#500
- def parser_type=(value); end
-
- # Guesses the parser type to use depending on the file extension.
- #
- # @param filename [String] the filename to use to guess the parser type
- # @return [Symbol] a parser type that matches the filename
- #
- # source://yard//lib/yard/parser/source_parser.rb#508
- def parser_type_for_filename(filename); end
-
- # Runs a {Handlers::Processor} object to post process the parsed statements.
- #
- # @return [void]
- #
- # source://yard//lib/yard/parser/source_parser.rb#490
- def post_process; end
-
- class << self
- # Registers a callback to be called after an individual file is parsed.
- # The block passed to this method will be called on subsequent parse
- # calls.
- #
- # To register a callback that is called after the entire list of files
- # is processed, see {after_parse_list}.
- #
- # @example Printing the length of each file after it is parsed
- # SourceParser.after_parse_file do |parser|
- # puts "#{parser.file} is #{parser.contents.size} characters"
- # end
- # YARD.parse('lib/**/*.rb')
- # # prints:
- # "lib/foo.rb is 1240 characters"
- # "lib/foo_bar.rb is 248 characters"
- # @return [Proc] the yielded block
- # @see after_parse_list
- # @see before_parse_file
- # @since 0.7.0
- # @yield [parser] the yielded block is called once after each file
- # that is parsed. This might happen many times for a single codebase.
- # @yieldparam parser [SourceParser] the parser object that parsed
- # the file.
- # @yieldreturn [void] the return value for the block is ignored.
- #
- # source://yard//lib/yard/parser/source_parser.rb#324
- def after_parse_file(&block); end
-
- # @return [Array] the list of callbacks to be called after
- # parsing a file. Should only be used for testing.
- # @since 0.7.0
- #
- # source://yard//lib/yard/parser/source_parser.rb#352
- def after_parse_file_callbacks; end
-
- # Registers a callback to be called after a list of files is parsed
- # via {parse}. The block passed to this method will be called on
- # subsequent parse calls.
- #
- # @example Printing results after parsing occurs
- # SourceParser.after_parse_list do
- # puts "Finished parsing!"
- # end
- # YARD.parse
- # # Prints "Finished parsing!" after parsing files
- # @return [Proc] the yielded block
- # @see before_parse_file
- # @see before_parse_list
- # @since 0.7.0
- # @yield [files, globals] the yielded block is called once before
- # parsing all files
- # @yieldparam files [Array] the list of files that will be parsed.
- # @yieldparam globals [OpenStruct] a global structure to store arbitrary
- # state for post processing (see {Handlers::Processor#globals})
- # @yieldreturn [void] the return value for the block is ignored.
- #
- # source://yard//lib/yard/parser/source_parser.rb#258
- def after_parse_list(&block); end
-
- # @return [Array] the list of callbacks to be called after
- # parsing a list of files. Should only be used for testing.
- # @since 0.7.0
- #
- # source://yard//lib/yard/parser/source_parser.rb#338
- def after_parse_list_callbacks; end
-
- # Registers a callback to be called before an individual file is parsed.
- # The block passed to this method will be called on subsequent parse
- # calls.
- #
- # To register a callback that is called before the entire list of files
- # is processed, see {before_parse_list}.
- #
- # @example Cancel parsing of any test_*.rb files
- # SourceParser.before_parse_file do |parser|
- # return false if parser.file =~ /^test_.+\.rb$/
- # end
- # @example Installing a simple callback
- # SourceParser.before_parse_file do |parser|
- # puts "I'm parsing #{parser.file}"
- # end
- # YARD.parse('lib/**/*.rb')
- # # prints:
- # "I'm parsing lib/foo.rb"
- # "I'm parsing lib/foo_bar.rb"
- # "I'm parsing lib/last_file.rb"
- # @return [Proc] the yielded block
- # @see after_parse_file
- # @see before_parse_list
- # @since 0.7.0
- # @yield [parser] the yielded block is called once before each
- # file that is parsed. This might happen many times for a single
- # codebase.
- # @yieldparam parser [SourceParser] the parser object that will {#parse}
- # the file.
- # @yieldreturn [Boolean] if the block returns +false+, parsing for
- # the file is cancelled.
- #
- # source://yard//lib/yard/parser/source_parser.rb#295
- def before_parse_file(&block); end
-
- # @return [Array] the list of callbacks to be called before
- # parsing a file. Should only be used for testing.
- # @since 0.7.0
- #
- # source://yard//lib/yard/parser/source_parser.rb#345
- def before_parse_file_callbacks; end
-
- # Registers a callback to be called before a list of files is parsed
- # via {parse}. The block passed to this method will be called on
- # subsequent parse calls.
- #
- # @example Installing a simple callback
- # SourceParser.before_parse_list do |files, globals|
- # puts "Starting to parse..."
- # end
- # YARD.parse('lib/**/*.rb')
- # # prints "Starting to parse..."
- # @example Setting global state
- # SourceParser.before_parse_list do |files, globals|
- # globals.method_count = 0
- # end
- # SourceParser.after_parse_list do |files, globals|
- # puts "Found #{globals.method_count} methods"
- # end
- # class MyCountHandler < Handlers::Ruby::Base
- # handles :def, :defs
- # process { globals.method_count += 1 }
- # end
- # YARD.parse
- # # Prints: "Found 37 methods"
- # @example Using a global callback to cancel parsing
- # SourceParser.before_parse_list do |files, globals|
- # return false if files.include?('foo.rb')
- # end
- #
- # YARD.parse(['foo.rb', 'bar.rb']) # callback cancels this method
- # YARD.parse('bar.rb') # parses normally
- # @return [Proc] the yielded block
- # @see after_parse_list
- # @see before_parse_file
- # @since 0.7.0
- # @yield [files, globals] the yielded block is called once before
- # parsing all files
- # @yieldparam files [Array] the list of files that will be parsed.
- # @yieldparam globals [OpenStruct] a global structure to store arbitrary
- # state for post processing (see {Handlers::Processor#globals})
- # @yieldreturn [Boolean] if the block returns +false+, parsing is
- # cancelled.
- #
- # source://yard//lib/yard/parser/source_parser.rb#234
- def before_parse_list(&block); end
-
- # @return [Array] the list of callbacks to be called before
- # parsing a list of files. Should only be used for testing.
- # @since 0.7.0
- #
- # source://yard//lib/yard/parser/source_parser.rb#331
- def before_parse_list_callbacks; end
-
- # Parses a path or set of paths
- #
- # @param excluded [Array] a list of excluded path matchers
- # @param level [Fixnum] the logger level to use during parsing. See
- # {YARD::Logger}
- # @param paths [String, Array] a path, glob, or list of paths to
- # parse
- # @return [void]
- #
- # source://yard//lib/yard/parser/source_parser.rb#99
- def parse(paths = T.unsafe(nil), excluded = T.unsafe(nil), level = T.unsafe(nil)); end
-
- # Parses a string +content+
- #
- # @param content [String] the block of code to parse
- # @param ptype [Symbol] the parser type to use. See {parser_type}.
- # @return the parser object that was used to parse +content+
- #
- # source://yard//lib/yard/parser/source_parser.rb#123
- def parse_string(content, ptype = T.unsafe(nil)); end
-
- # @return [Symbol] the default parser type (defaults to :ruby)
- #
- # source://yard//lib/yard/parser/source_parser.rb#85
- def parser_type; end
-
- # source://yard//lib/yard/parser/source_parser.rb#87
- def parser_type=(value); end
-
- # @private
- # @return [Hash] a list of registered parser type extensions
- # @since 0.5.6
- #
- # source://yard//lib/yard/parser/source_parser.rb#163
- def parser_type_extensions; end
-
- # source://yard//lib/yard/parser/source_parser.rb#164
- def parser_type_extensions=(value); end
-
- # Finds a parser type that is registered for the extension. If no
- # type is found, the default Ruby type is returned.
- #
- # @return [Symbol] the parser type to be used for the extension
- # @since 0.5.6
- #
- # source://yard//lib/yard/parser/source_parser.rb#171
- def parser_type_for_extension(extension); end
-
- # @private
- # @return [Hash{Symbol=>Object}] a list of registered parser types
- # @since 0.5.6
- #
- # source://yard//lib/yard/parser/source_parser.rb#157
- def parser_types; end
-
- # source://yard//lib/yard/parser/source_parser.rb#158
- def parser_types=(value); end
-
- # Registers a new parser type.
- #
- # @example Registering a parser for "java" files
- # SourceParser.register_parser_type :java, JavaParser, 'java'
- # @param extensions [Array, String, Regexp] a list of extensions or a
- # regex to match against the file extension
- # @param parser_klass [Base] a class that implements parsing and tokenization
- # @param type [Symbol] a symbolic name for the parser type
- # @return [void]
- # @see Parser::Base
- #
- # source://yard//lib/yard/parser/source_parser.rb#146
- def register_parser_type(type, parser_klass, extensions = T.unsafe(nil)); end
-
- # Tokenizes but does not parse the block of code
- #
- # @param content [String] the block of code to tokenize
- # @param ptype [Symbol] the parser type to use. See {parser_type}.
- # @return [Array] a list of tokens
- #
- # source://yard//lib/yard/parser/source_parser.rb#132
- def tokenize(content, ptype = T.unsafe(nil)); end
-
- # Returns the validated parser type. Basically, enforces that :ruby
- # type is never set if the Ripper library is not available
- #
- # @param type [Symbol] the parser type to set
- # @private
- # @return [Symbol] the validated parser type
- #
- # source://yard//lib/yard/parser/source_parser.rb#184
- def validated_parser_type(type); end
-
- private
-
- # Parses a list of files in a queue.
- #
- # @param files [Array] a list of files to queue for parsing
- # @return [void]
- #
- # source://yard//lib/yard/parser/source_parser.rb#364
- def parse_in_order(*files); end
- end
-end
-
-# The default glob of files to be parsed.
-#
-# @since 0.9.0
-#
-# source://yard//lib/yard/parser/source_parser.rb#70
-YARD::Parser::SourceParser::DEFAULT_PATH_GLOB = T.let(T.unsafe(nil), Array)
-
-# Byte order marks for various encodings
-#
-# @since 0.7.0
-#
-# source://yard//lib/yard/parser/source_parser.rb#74
-YARD::Parser::SourceParser::ENCODING_BYTE_ORDER_MARKS = T.let(T.unsafe(nil), Hash)
-
-# source://yard//lib/yard/parser/source_parser.rb#65
-YARD::Parser::SourceParser::ENCODING_LINE = T.let(T.unsafe(nil), Regexp)
-
-# source://yard//lib/yard/parser/source_parser.rb#66
-YARD::Parser::SourceParser::FROZEN_STRING_LINE = T.let(T.unsafe(nil), Regexp)
-
-# source://yard//lib/yard/parser/source_parser.rb#64
-YARD::Parser::SourceParser::SHEBANG_LINE = T.let(T.unsafe(nil), Regexp)
-
-# Raised when an object is recognized but cannot be documented. This
-# generally occurs when the Ruby syntax used to declare an object is
-# too dynamic in nature.
-#
-# source://yard//lib/yard/parser/source_parser.rb#9
-class YARD::Parser::UndocumentableError < ::RuntimeError; end
-
-# The root path for YARD source libraries
-#
-# source://yard//lib/yard.rb#4
-YARD::ROOT = T.let(T.unsafe(nil), String)
-
-# Holds Rake tasks used by YARD
-#
-# source://yard//lib/yard/autoload.rb#192
-module YARD::Rake; end
-
-# The rake task to run {CLI::Yardoc} and generate documentation.
-#
-# source://yard//lib/yard/rake/yardoc_task.rb#8
-class YARD::Rake::YardocTask < ::Rake::TaskLib
- # Creates a new task with name +name+.
- #
- # @param name [String, Symbol] the name of the rake task
- # @return [YardocTask] a new instance of YardocTask
- # @yield a block to allow any options to be modified on the task
- # @yieldparam _self [YardocTask] the task object to allow any parameters
- # to be changed.
- #
- # source://yard//lib/yard/rake/yardoc_task.rb#50
- def initialize(name = T.unsafe(nil)); end
-
- # Runs a +Proc+ after the task
- #
- # @return [Proc] a proc to call after running the task
- #
- # source://yard//lib/yard/rake/yardoc_task.rb#36
- def after; end
-
- # Runs a +Proc+ after the task
- #
- # @return [Proc] a proc to call after running the task
- #
- # source://yard//lib/yard/rake/yardoc_task.rb#36
- def after=(_arg0); end
-
- # Runs a +Proc+ before the task
- #
- # @return [Proc] a proc to call before running the task
- #
- # source://yard//lib/yard/rake/yardoc_task.rb#32
- def before; end
-
- # Runs a +Proc+ before the task
- #
- # @return [Proc] a proc to call before running the task
- #
- # source://yard//lib/yard/rake/yardoc_task.rb#32
- def before=(_arg0); end
-
- # The Ruby source files (and any extra documentation files separated by '-')
- # to process.
- #
- # @example Task files assignment
- # YARD::Rake::YardocTask.new do |t|
- # t.files = ['app/**/*.rb', 'lib/**/*.rb', '-', 'doc/FAQ.md', 'doc/Changes.md']
- # end
- # @return [Array] a list of files
- #
- # source://yard//lib/yard/rake/yardoc_task.rb#28
- def files; end
-
- # The Ruby source files (and any extra documentation files separated by '-')
- # to process.
- #
- # @example Task files assignment
- # YARD::Rake::YardocTask.new do |t|
- # t.files = ['app/**/*.rb', 'lib/**/*.rb', '-', 'doc/FAQ.md', 'doc/Changes.md']
- # end
- # @return [Array] a list of files
- #
- # source://yard//lib/yard/rake/yardoc_task.rb#28
- def files=(_arg0); end
-
- # The name of the task
- #
- # @return [String] the task name
- #
- # source://yard//lib/yard/rake/yardoc_task.rb#11
- def name; end
-
- # The name of the task
- #
- # @return [String] the task name
- #
- # source://yard//lib/yard/rake/yardoc_task.rb#11
- def name=(_arg0); end
-
- # Options to pass to {CLI::Yardoc}
- #
- # @return [Array] the options passed to the commandline utility
- #
- # source://yard//lib/yard/rake/yardoc_task.rb#15
- def options; end
-
- # Options to pass to {CLI::Yardoc}
- #
- # @return [Array] the options passed to the commandline utility
- #
- # source://yard//lib/yard/rake/yardoc_task.rb#15
- def options=(_arg0); end
-
- # Options to pass to {CLI::Stats}
- #
- # @return [Array] the options passed to the stats utility
- #
- # source://yard//lib/yard/rake/yardoc_task.rb#19
- def stats_options; end
-
- # Options to pass to {CLI::Stats}
- #
- # @return [Array] the options passed to the stats utility
- #
- # source://yard//lib/yard/rake/yardoc_task.rb#19
- def stats_options=(_arg0); end
-
- # @return [Verifier, Proc] an optional {Verifier} to run against all objects
- # being generated. Any object that the verifier returns false for will be
- # excluded from documentation. This attribute can also be a lambda.
- # @see Verifier
- #
- # source://yard//lib/yard/rake/yardoc_task.rb#42
- def verifier; end
-
- # @return [Verifier, Proc] an optional {Verifier} to run against all objects
- # being generated. Any object that the verifier returns false for will be
- # excluded from documentation. This attribute can also be a lambda.
- # @see Verifier
- #
- # source://yard//lib/yard/rake/yardoc_task.rb#42
- def verifier=(_arg0); end
-
- protected
-
- # Defines the rake task
- #
- # @return [void]
- #
- # source://yard//lib/yard/rake/yardoc_task.rb#68
- def define; end
-end
-
-# The +Registry+ is the centralized data store for all {CodeObjects} created
-# during parsing. The storage is a key value store with the object's path
-# (see {CodeObjects::Base#path}) as the key and the object itself as the value.
-# Object paths must be unique to be stored in the Registry. All lookups for
-# objects are done on the singleton Registry instance using the {Registry.at}
-# or {Registry.resolve} methods.
-#
-# == Saving / Loading a Registry
-# The registry is saved to a "yardoc file" (actually a directory), which can
-# be loaded back to perform any lookups. See {Registry.load!} and
-# {Registry.save} for information on saving and loading of a yardoc file.
-#
-# == Threading Notes
-# The registry class is a singleton class that is accessed directly in many
-# places across YARD. To mitigate threading issues, YARD (0.6.5+) makes
-# the Registry thread local. This means all access to a registry for a specific
-# object set must occur in the originating thread.
-#
-# @example Getting an object by a specific path
-# Registry.at('YARD::CodeObjects::Base#docstring')
-# @example Loading the Registry
-# Registry.load!('/path/to/yardocfile') # loads all objects into memory
-# Registry.at('YARD::CodeObjects::Base').docstring
-# # => "+Base+ is the superclass of all code objects ..."
-# @example Performing a lookup on a method anywhere in the inheritance tree
-# Registry.resolve(P('YARD::CodeObjects::Base'), '#docstring', true)
-#
-# source://yard//lib/yard/registry.rb#32
-module YARD::Registry
- extend ::Enumerable
-
- class << self
- # Returns the object at a specific path.
- #
- # @param path [String, :root] the pathname to look for. If +path+ is +root+,
- # returns the {root} object.
- # @return [CodeObjects::Base] the object at path
- # @return [nil] if no object is found
- #
- # source://yard//lib/yard/registry.rb#262
- def [](path); end
-
- # Returns all objects in the registry that match one of the types provided
- # in the +types+ list (if +types+ is provided).
- #
- # @example Returns all classes and modules
- # Registry.all(:class, :module)
- # @example Returns all objects
- # Registry.all
- # @param types [Array] an optional list of types to narrow the
- # objects down by. Equivalent to performing a select:
- # +Registry.all.select {|o| types.include(o.type) }+
- # @return [Array] the list of objects found
- # @see CodeObjects::Base#type
- #
- # source://yard//lib/yard/registry.rb#237
- def all(*types); end
-
- # Returns the object at a specific path.
- #
- # @param path [String, :root] the pathname to look for. If +path+ is +root+,
- # returns the {root} object.
- # @return [CodeObjects::Base] the object at path
- # @return [nil] if no object is found
- #
- # source://yard//lib/yard/registry.rb#261
- def at(path); end
-
- # @param data [String] data to checksum
- # @return [String] the SHA1 checksum for data
- #
- # source://yard//lib/yard/registry.rb#318
- def checksum_for(data); end
-
- # @return [Hash{String => String}] a set of checksums for files
- #
- # source://yard//lib/yard/registry.rb#312
- def checksums; end
-
- # Clears the registry
- #
- # @return [void]
- #
- # source://yard//lib/yard/registry.rb#200
- def clear; end
-
- # Deletes an object from the registry
- #
- # @param object [CodeObjects::Base] the object to remove
- # @return [void]
- #
- # source://yard//lib/yard/registry.rb#194
- def delete(object); end
-
- # Deletes the yardoc file from disk
- #
- # @return [void]
- #
- # source://yard//lib/yard/registry.rb#176
- def delete_from_disk; end
-
- # Iterates over {all} with no arguments
- #
- # source://yard//lib/yard/registry.rb#221
- def each(&block); end
-
- # The registry singleton instance.
- #
- # @deprecated use Registry.methodname directly.
- # @return [Registry] returns the registry instance
- #
- # source://yard//lib/yard/registry.rb#363
- def instance; end
-
- # Loads the registry and/or parses a list of files
- #
- # @example Loads the yardoc file or parses files 'a', 'b' and 'c' (but not both)
- # Registry.load(['a', 'b', 'c'])
- # @example Reparses files 'a' and 'b' regardless of whether yardoc file exists
- # Registry.load(['a', 'b'], true)
- # @param files [String, Array] if +files+ is an Array, it should represent
- # a list of files that YARD should parse into the registry. If reload is
- # set to false and the yardoc file already exists, these files are skipped.
- # If files is a String, it should represent the yardoc file to load
- # into the registry.
- # @param reparse [Boolean] if reparse is false and a yardoc file already
- # exists, any files passed in will be ignored.
- # @raise [ArgumentError] if files is not a String or Array
- # @return [Registry] the registry object (for chaining)
- #
- # source://yard//lib/yard/registry.rb#109
- def load(files = T.unsafe(nil), reparse = T.unsafe(nil)); end
-
- # Loads a yardoc file and forces all objects cached on disk into
- # memory. Equivalent to calling {load_yardoc} followed by {load_all}
- #
- # @param file [String] the yardoc file to load
- # @return [Registry] the registry object (for chaining)
- # @see #load_all
- # @see #load_yardoc
- # @since 0.5.1
- #
- # source://yard//lib/yard/registry.rb#144
- def load!(file = T.unsafe(nil)); end
-
- # Forces all objects cached on disk into memory
- #
- # @example Loads all objects from disk
- # Registry.load
- # Registry.all.count #=> 0
- # Registry.load_all
- # Registry.all.count #=> 17
- # @return [Registry] the registry object (for chaining)
- # @since 0.5.1
- #
- # source://yard//lib/yard/registry.rb#159
- def load_all; end
-
- # Loads a yardoc file directly
- #
- # @param file [String] the yardoc file to load.
- # @return [Registry] the registry object (for chaining)
- #
- # source://yard//lib/yard/registry.rb#130
- def load_yardoc(file = T.unsafe(nil)); end
-
- # @param name [String] the locale name.
- # @return [I18n::Locale] the locale object for +name+.
- # @since 0.8.3
- #
- # source://yard//lib/yard/registry.rb#271
- def locale(name); end
-
- # Creates a pessmistic transactional lock on the database for writing.
- # Use with {YARD.parse} to ensure the database is not written multiple
- # times.
- #
- # @see locked_for_writing?
- #
- # source://yard//lib/yard/registry.rb#209
- def lock_for_writing(file = T.unsafe(nil), &block); end
-
- # @return [Boolean] whether the database is currently locked for writing
- #
- # source://yard//lib/yard/registry.rb#214
- def locked_for_writing?(file = T.unsafe(nil)); end
-
- # Returns the paths of all of the objects in the registry.
- #
- # @param reload [Boolean] whether to load entire database
- # @return [Array] all of the paths in the registry.
- #
- # source://yard//lib/yard/registry.rb#252
- def paths(reload = T.unsafe(nil)); end
-
- # Gets/sets the directory that has LANG.po files
- #
- # @return [String] the directory that has .po files
- #
- # source://yard//lib/yard/registry.rb#349
- def po_dir; end
-
- # Gets/sets the directory that has LANG.po files
- #
- # @return [String] the directory that has .po files
- #
- # source://yard//lib/yard/registry.rb#349
- def po_dir=(dir); end
-
- # The assumed types of a list of paths. This method is used by CodeObjects::Base
- #
- # @deprecated The registry no longer globally tracks proxy types.
- # @private
- # @return [{String => Symbol}] a set of unresolved paths and their assumed type
- #
- # source://yard//lib/yard/registry.rb#341
- def proxy_types; end
-
- # Registers a new object with the registry
- #
- # @param object [CodeObjects::Base] the object to register
- # @return [CodeObjects::Base] the registered object
- #
- # source://yard//lib/yard/registry.rb#186
- def register(object); end
-
- # Attempts to find an object by name starting at +namespace+, performing
- # a lookup similar to Ruby's method of resolving a constant in a namespace.
- #
- # @example Looks for a class method respecting the inheritance tree
- # Registry.resolve(myclass, 'mymethod', true)
- # @example Looks for a complex path from a namespace
- # Registry.resolve(P('A::B'), 'B::D') # => #
- # @example Looks for a constant but returns a proxy if not found
- # Registry.resolve(P('A::B::C'), 'D', false, true) # => #
- # @example Looks for a constant in the root namespace
- # Registry.resolve(nil, 'CONSTANT')
- # @example Looks for instance method #reverse starting from A::B::C
- # Registry.resolve(P("A::B::C"), "#reverse")
- # @param inheritance [Boolean] Follows inheritance chain (mixins, superclass)
- # when performing name resolution if set to +true+.
- # @param name [String, Symbol] the name (or complex path) to look for from
- # +namespace+.
- # @param namespace [CodeObjects::NamespaceObject, nil] the starting namespace
- # (module or class). If +nil+ or +:root+, starts from the {root} object.
- # @param proxy_fallback [Boolean] If +true+, returns a proxy representing
- # the unresolved path (namespace + name) if no object is found.
- # @param type [Symbol, nil] the {CodeObjects::Base#type} that the resolved
- # object must be equal to. No type checking if nil.
- # @return [CodeObjects::Base] the object if it is found
- # @return [CodeObjects::Proxy] a Proxy representing the object if
- # +proxy_fallback+ is +true+.
- # @return [nil] if +proxy_fallback+ is +false+ and no object was found.
- # @see P
- #
- # source://yard//lib/yard/registry.rb#303
- def resolve(namespace, name, inheritance = T.unsafe(nil), proxy_fallback = T.unsafe(nil), type = T.unsafe(nil)); end
-
- # The root namespace object.
- #
- # @return [CodeObjects::RootObject] the root object in the namespace
- #
- # source://yard//lib/yard/registry.rb#266
- def root; end
-
- # Saves the registry to +file+
- #
- # @param file [String] the yardoc file to save to
- # @return [Boolean] true if the file was saved
- #
- # source://yard//lib/yard/registry.rb#170
- def save(merge = T.unsafe(nil), file = T.unsafe(nil)); end
-
- # Whether or not the Registry storage should load everything into a
- # single object database (for disk efficiency), or spread them out
- # (for load time efficiency).
- #
- # @note Setting this attribute to nil will offload the decision to
- # the {RegistryStore storage adapter}.
- # @return [Boolean, nil] if this value is set to nil, the storage
- # adapter will decide how to store the data.
- #
- # source://yard//lib/yard/registry.rb#332
- def single_object_db; end
-
- # Whether or not the Registry storage should load everything into a
- # single object database (for disk efficiency), or spread them out
- # (for load time efficiency).
- #
- # @note Setting this attribute to nil will offload the decision to
- # the {RegistryStore storage adapter}.
- # @return [Boolean, nil] if this value is set to nil, the storage
- # adapter will decide how to store the data.
- #
- # source://yard//lib/yard/registry.rb#332
- def single_object_db=(v); end
-
- # Gets/sets the yardoc filename
- #
- # @return [String] the yardoc filename
- # @see DEFAULT_YARDOC_FILE
- #
- # source://yard//lib/yard/registry.rb#84
- def yardoc_file; end
-
- # Gets/sets the yardoc filename
- #
- # @return [String] the yardoc filename
- # @see DEFAULT_YARDOC_FILE
- #
- # source://yard//lib/yard/registry.rb#84
- def yardoc_file=(v); end
-
- # Returns the .yardoc file associated with a gem.
- #
- # @param for_writing [Boolean] whether or not the method should search
- # for writable locations
- # @param gem [String] the name of the gem to search for
- # @param ver_require [String] an optional Gem version requirement
- # @return [String] if +for_writing+ is set to +true+, returns the best
- # location suitable to write the .yardoc file. Otherwise, the first
- # existing location associated with the gem's .yardoc file.
- # @return [nil] if +for_writing+ is set to false and no yardoc file
- # is found, returns nil.
- #
- # source://yard//lib/yard/registry.rb#53
- def yardoc_file_for_gem(gem, ver_require = T.unsafe(nil), for_writing = T.unsafe(nil)); end
-
- private
-
- # source://yard//lib/yard/registry.rb#390
- def global_yardoc_file(spec, for_writing = T.unsafe(nil)); end
-
- # source://yard//lib/yard/registry.rb#410
- def local_yardoc_file(spec, for_writing = T.unsafe(nil)); end
-
- # source://yard//lib/yard/registry.rb#403
- def old_global_yardoc_file(spec, for_writing = T.unsafe(nil)); end
-
- # Attempts to resolve a name in a namespace
- #
- # @param name [String] the name to look for
- # @param namespace [CodeObjects::NamespaceObject] the starting namespace
- # @param type [Symbol, nil] the {CodeObjects::Base#type} that the resolved
- # object must be equal to
- #
- # source://yard//lib/yard/registry.rb#375
- def partial_resolve(namespace, name, type = T.unsafe(nil)); end
-
- # @since 0.9.1
- #
- # source://yard//lib/yard/registry.rb#434
- def thread_local_resolver; end
-
- # @since 0.6.5
- #
- # source://yard//lib/yard/registry.rb#424
- def thread_local_store; end
-
- # @since 0.6.5
- #
- # source://yard//lib/yard/registry.rb#429
- def thread_local_store=(value); end
- end
-end
-
-# source://yard//lib/yard/registry.rb#35
-YARD::Registry::DEFAULT_PO_DIR = T.let(T.unsafe(nil), String)
-
-# source://yard//lib/yard/registry.rb#33
-YARD::Registry::DEFAULT_YARDOC_FILE = T.let(T.unsafe(nil), String)
-
-# source://yard//lib/yard/registry.rb#34
-YARD::Registry::LOCAL_YARDOC_INDEX = T.let(T.unsafe(nil), String)
-
-# Handles all logic for complex lexical and inherited object resolution.
-# Used by {Registry.resolve}, so there is no need to use this class
-# directly.
-#
-# @see Registry.resolve
-# @since 0.9.1
-#
-# source://yard//lib/yard/registry_resolver.rb#9
-class YARD::RegistryResolver
- include ::YARD::CodeObjects::NamespaceMapper
-
- # Creates a new resolver object for a registry.
- #
- # @param registry [Registry] only set this if customizing the registry
- # object
- # @return [RegistryResolver] a new instance of RegistryResolver
- # @since 0.9.1
- #
- # source://yard//lib/yard/registry_resolver.rb#16
- def initialize(registry = T.unsafe(nil)); end
-
- # Performs a lookup on a given path in the registry. Resolution will occur
- # in a similar way to standard Ruby identifier resolution, doing lexical
- # lookup, as well as (optionally) through the inheritance chain. A proxy
- # object can be returned if the lookup fails for future resolution. The
- # proxy will be type hinted with the +type+ used in the original lookup.
- #
- # @example A lookup from root
- # resolver.lookup_by_path("A::B::C")
- # @example A lookup from the A::B namespace
- # resolver.lookup_by_path("C", namespace: P("A::B"))
- # @example A lookup on a method through the inheritance tree
- # resolver.lookup_by_math("A::B#foo", inheritance: true)
- # @option opts
- # @option opts
- # @option opts
- # @option opts
- # @param opts [Hash] a customizable set of options
- # @return [CodeObjects::Base, CodeObjects::Proxy, nil] the first object
- # that matches the path lookup. If proxy_fallback is provided, a proxy
- # object will be returned in the event of no match, otherwise nil will
- # be returned.
- # @since 0.9.1
- #
- # source://yard//lib/yard/registry_resolver.rb#50
- def lookup_by_path(path, opts = T.unsafe(nil)); end
-
- private
-
- # Collects and returns all inherited namespaces for a given object
- #
- # @since 0.9.1
- #
- # source://yard//lib/yard/registry_resolver.rb#181
- def collect_namespaces(object); end
-
- # Performs a lexical lookup from a namespace for a path and a type hint.
- #
- # @since 0.9.1
- #
- # source://yard//lib/yard/registry_resolver.rb#104
- def lookup_path_direct(namespace, path, type); end
-
- # Performs a lookup through the inheritance chain on a path with a type hint.
- #
- # @since 0.9.1
- #
- # source://yard//lib/yard/registry_resolver.rb#121
- def lookup_path_inherited(namespace, path, type); end
-
- # @return [Regexp] the regexp that can be used to split a string on all
- # occurrences of separator tokens
- # @since 0.9.1
- #
- # source://yard//lib/yard/registry_resolver.rb#206
- def split_on_separators_match; end
-
- # @return [Regexp] the regexp match of the default separator
- # @since 0.9.1
- #
- # source://yard//lib/yard/registry_resolver.rb#194
- def starts_with_default_separator_match; end
-
- # @return [Regexp] the regexp that matches strings starting with
- # a separator
- # @since 0.9.1
- #
- # source://yard//lib/yard/registry_resolver.rb#200
- def starts_with_separator_match; end
-
- # return [Boolean] if the obj's type matches the provided type.
- #
- # @since 0.9.1
- #
- # source://yard//lib/yard/registry_resolver.rb#99
- def validate(obj, type); end
-end
-
-# The data store for the {Registry}.
-#
-# @see Registry
-# @see Serializers::YardocSerializer
-#
-# source://yard//lib/yard/registry_store.rb#9
-class YARD::RegistryStore
- # @return [RegistryStore] a new instance of RegistryStore
- #
- # source://yard//lib/yard/registry_store.rb#14
- def initialize; end
-
- # Gets a {CodeObjects::Base} from the store
- #
- # @param key [String, Symbol] the path name of the object to look for.
- # If it is empty or :root, returns the {#root} object.
- # @return [CodeObjects::Base, nil] a code object or nil if none is found
- #
- # source://yard//lib/yard/registry_store.rb#69
- def [](key); end
-
- # Associates an object with a path
- #
- # @param key [String, Symbol] the path name (:root or '' for root object)
- # @param value [CodeObjects::Base] the object to store
- # @return [CodeObjects::Base] returns +value+
- #
- # source://yard//lib/yard/registry_store.rb#70
- def []=(key, value); end
-
- # Returns the value of attribute checksums.
- #
- # source://yard//lib/yard/registry_store.rb#12
- def checksums; end
-
- # Deletes an object at a given path
- #
- # @param key [#to_sym] the key to delete
- # @return [void]
- #
- # source://yard//lib/yard/registry_store.rb#75
- def delete(key); end
-
- # Deletes the .yardoc database on disk
- #
- # @param force [Boolean] if force is not set to true, the file/directory
- # will only be removed if it ends with .yardoc. This helps with
- # cases where the directory might have been named incorrectly.
- # @return [Boolean] true if the .yardoc database was deleted, false
- # otherwise.
- #
- # source://yard//lib/yard/registry_store.rb#218
- def destroy(force = T.unsafe(nil)); end
-
- # Returns the value of attribute file.
- #
- # source://yard//lib/yard/registry_store.rb#12
- def file; end
-
- # Gets a {CodeObjects::Base} from the store
- #
- # @param key [String, Symbol] the path name of the object to look for.
- # If it is empty or :root, returns the {#root} object.
- # @return [CodeObjects::Base, nil] a code object or nil if none is found
- #
- # source://yard//lib/yard/registry_store.rb#33
- def get(key); end
-
- # Gets all path names from the store. Loads the entire database
- # if +reload+ is +true+
- #
- # @param reload [Boolean] if false, does not load the entire database
- # before a lookup.
- # @return [Array] the path names of all the code objects
- #
- # source://yard//lib/yard/registry_store.rb#88
- def keys(reload = T.unsafe(nil)); end
-
- # @param file [String, nil] the name of the yardoc db to load
- # @return [Boolean] whether the database was loaded
- #
- # source://yard//lib/yard/registry_store.rb#128
- def load(file = T.unsafe(nil)); end
-
- # Loads the .yardoc file and loads all cached objects into memory
- # automatically.
- #
- # @param file [String, nil] the name of the yardoc db to load
- # @return [Boolean] whether the database was loaded
- # @see #load_all
- # @since 0.5.1
- #
- # source://yard//lib/yard/registry_store.rb#142
- def load!(file = T.unsafe(nil)); end
-
- # Loads all cached objects into memory
- #
- # @return [void]
- #
- # source://yard//lib/yard/registry_store.rb#153
- def load_all; end
-
- # @param name [String] the locale name.
- # @return [I18n::Locale] the locale object for +name+.
- # @since 0.8.3
- #
- # source://yard//lib/yard/registry_store.rb#122
- def locale(name); end
-
- # Creates a pessmistic transactional lock on the database for writing.
- # Use with {YARD.parse} to ensure the database is not written multiple
- # times.
- #
- # @param file [String] if supplied, the path to the database
- # @see #locked_for_writing?
- #
- # source://yard//lib/yard/registry_store.rb#201
- def lock_for_writing(file = T.unsafe(nil), &block); end
-
- # @param file [String] if supplied, the path to the database
- # @return [Boolean] whether the database is currently locked for writing
- #
- # source://yard//lib/yard/registry_store.rb#207
- def locked_for_writing?(file = T.unsafe(nil)); end
-
- # @param type [Symbol] the type to look for
- # @return [Array] a list of object paths with a given
- # {CodeObjects::Base#type}
- # @since 0.8.0
- #
- # source://yard//lib/yard/registry_store.rb#102
- def paths_for_type(type, reload = T.unsafe(nil)); end
-
- # @deprecated The registry no longer tracks proxy types
- #
- # source://yard//lib/yard/registry_store.rb#11
- def proxy_types; end
-
- # Associates an object with a path
- #
- # @param key [String, Symbol] the path name (:root or '' for root object)
- # @param value [CodeObjects::Base] the object to store
- # @return [CodeObjects::Base] returns +value+
- #
- # source://yard//lib/yard/registry_store.rb#55
- def put(key, value); end
-
- # @return [CodeObjects::RootObject] the root object
- #
- # source://yard//lib/yard/registry_store.rb#117
- def root; end
-
- # Saves the database to disk
- #
- # @param file [String, nil] if supplied, the name of the file to save to
- # @param merge [Boolean] if true, merges the data in memory with the
- # data on disk, otherwise the data on disk is deleted.
- # @return [Boolean] whether the database was saved
- #
- # source://yard//lib/yard/registry_store.rb#177
- def save(merge = T.unsafe(nil), file = T.unsafe(nil)); end
-
- # Gets all code objects from the store. Loads the entire database
- # if +reload+ is +true+
- #
- # @param reload [Boolean] if false, does not load the entire database
- # before a lookup.
- # @return [Array] all the code objects
- #
- # source://yard//lib/yard/registry_store.rb#96
- def values(reload = T.unsafe(nil)); end
-
- # @param type [Symbol] the type to look for
- # @return [Array] a list of objects with a given
- # {CodeObjects::Base#type}
- # @since 0.8.0
- #
- # source://yard//lib/yard/registry_store.rb#111
- def values_for_type(type, reload = T.unsafe(nil)); end
-
- protected
-
- # source://yard//lib/yard/registry_store.rb#243
- def checksums_path; end
-
- # source://yard//lib/yard/registry_store.rb#251
- def load_yardoc; end
-
- # source://yard//lib/yard/registry_store.rb#247
- def object_types_path; end
-
- # source://yard//lib/yard/registry_store.rb#234
- def objects_path; end
-
- # @deprecated The registry no longer tracks proxy types
- #
- # source://yard//lib/yard/registry_store.rb#239
- def proxy_types_path; end
-
- private
-
- # source://yard//lib/yard/registry_store.rb#319
- def all_disk_objects; end
-
- # source://yard//lib/yard/registry_store.rb#291
- def load_checksums; end
-
- # source://yard//lib/yard/registry_store.rb#313
- def load_locale(name); end
-
- # source://yard//lib/yard/registry_store.rb#281
- def load_object_types; end
-
- # @deprecated The registry no longer tracks proxy types
- #
- # source://yard//lib/yard/registry_store.rb#276
- def load_proxy_types; end
-
- # source://yard//lib/yard/registry_store.rb#299
- def load_root; end
-
- # source://yard//lib/yard/registry_store.rb#271
- def load_yardoc_old; end
-
- # source://yard//lib/yard/registry_store.rb#332
- def write_checksums; end
-
- # source://yard//lib/yard/registry_store.rb#338
- def write_complete_lock; end
-
- # source://yard//lib/yard/registry_store.rb#328
- def write_object_types; end
-
- # @deprecated The registry no longer tracks proxy types
- #
- # source://yard//lib/yard/registry_store.rb#324
- def write_proxy_types; end
-end
-
-# Namespace for components that serialize to various endpoints
-#
-# source://yard//lib/yard/autoload.rb#196
-module YARD::Serializers; end
-
-# The abstract base serializer. Serializers allow templates to be
-# rendered to various endpoints. For instance, a {FileSystemSerializer}
-# would allow template contents to be written to the filesystem
-#
-# To implement a custom serializer, override the following methods:
-# * {#serialize}
-# * {#serialized_path}
-#
-# Optionally, a serializer can implement before and after filters:
-# * {#before_serialize}
-# * {#after_serialize}
-#
-# @abstract Override this class to implement a custom serializer.
-#
-# source://yard//lib/yard/serializers/base.rb#17
-class YARD::Serializers::Base
- # Creates a new serializer with options
- #
- # @param opts [Hash] the options to assign to {#options}
- # @return [Base] a new instance of Base
- #
- # source://yard//lib/yard/serializers/base.rb#28
- def initialize(opts = T.unsafe(nil)); end
-
- # Called after serialization.
- #
- # @abstract Should run code after serialization.
- # @param data [String] the data that was serialized.
- # @return [void]
- #
- # source://yard//lib/yard/serializers/base.rb#80
- def after_serialize(data); end
-
- # Called before serialization.
- #
- # @abstract Should run code before serialization. Should return false
- # if serialization should not occur.
- # @return [Boolean] whether or not serialization should occur
- #
- # source://yard//lib/yard/serializers/base.rb#73
- def before_serialize; end
-
- # Returns whether an object has been serialized
- #
- # @abstract This method should return whether the endpoint already exists.
- # For instance, a file system serializer would check if the file exists
- # on disk. You will most likely use +#basepath+ and {#serialized_path} to
- # get the endpoint's location.
- # @param object [CodeObjects::Base] the object to check existence of
- # @return [Boolean] whether the endpoint exists.
- # @since 0.6.0
- #
- # source://yard//lib/yard/serializers/base.rb#62
- def exists?(object); end
-
- # All serializer options are saved so they can be passed to other serializers.
- #
- # @return [SymbolHash] the serializer options
- #
- # source://yard//lib/yard/serializers/base.rb#21
- def options; end
-
- # Serializes an object.
- #
- # @abstract This method should implement the logic that serializes
- # +data+ to the respective endpoint. This method should also call
- # the before and after callbacks {#before_serialize} and {#after_serialize}
- # @param data [String] the contents that should be serialized
- # @param object [CodeObjects::Base, String] the object to serialize the
- # data for. The object can also be a string (for non-object serialization)
- #
- # source://yard//lib/yard/serializers/base.rb#42
- def serialize(object, data); end
-
- # The serialized path of an object
- #
- # @abstract This method should return the path of the object on the
- # endpoint. For instance, for a file serializer, this should return
- # the filename that represents the object on disk.
- # @param object [CodeObjects::Base] the object to return a path for
- # @return [String] the serialized path of an object
- #
- # source://yard//lib/yard/serializers/base.rb#51
- def serialized_path(object); end
-end
-
-# Implements a serializer that reads from and writes to the filesystem.
-#
-# source://yard//lib/yard/serializers/file_system_serializer.rb#5
-class YARD::Serializers::FileSystemSerializer < ::YARD::Serializers::Base
- # Creates a new FileSystemSerializer with options
- #
- # @option opts
- # @option opts
- # @param opts [Hash] a customizable set of options
- # @return [FileSystemSerializer] a new instance of FileSystemSerializer
- #
- # source://yard//lib/yard/serializers/file_system_serializer.rb#28
- def initialize(opts = T.unsafe(nil)); end
-
- # The base path to write data to.
- #
- # @return [String] a base path
- #
- # source://yard//lib/yard/serializers/file_system_serializer.rb#8
- def basepath; end
-
- # source://yard//lib/yard/serializers/file_system_serializer.rb#10
- def basepath=(value); end
-
- # Checks the disk for an object and returns whether it was serialized.
- #
- # @param object [CodeObjects::Base] the object to check
- # @return [Boolean] whether an object has been serialized to disk
- #
- # source://yard//lib/yard/serializers/file_system_serializer.rb#71
- def exists?(object); end
-
- # The extension of the filename (defaults to +html+)
- #
- # @return [String] the extension of the file. Empty string for no extension.
- #
- # source://yard//lib/yard/serializers/file_system_serializer.rb#17
- def extension; end
-
- # source://yard//lib/yard/serializers/file_system_serializer.rb#19
- def extension=(value); end
-
- # Serializes object with data to its serialized path (prefixed by the +#basepath+).
- #
- # @return [String] the written data (for chaining)
- #
- # source://yard//lib/yard/serializers/file_system_serializer.rb#38
- def serialize(object, data); end
-
- # Implements the serialized path of a code object.
- #
- # @param object [CodeObjects::Base, CodeObjects::ExtraFileObject, String] the object to get a path for. The path of a string is the string itself.
- # @return [String] if object is a String, returns
- # object, otherwise the path on disk (without the basepath).
- #
- # source://yard//lib/yard/serializers/file_system_serializer.rb#50
- def serialized_path(object); end
-
- private
-
- # Builds a filename mapping from object paths to filesystem path names.
- # Needed to handle case sensitive YARD objects mapped into a case
- # insensitive filesystem. Uses with {#mapped_name} to determine the
- # mapping name for a given object.
- #
- # @note In order to use filesystem name mapping, you must initialize
- # the serializer object after preparing the {YARD::Registry}.
- #
- # source://yard//lib/yard/serializers/file_system_serializer.rb#84
- def build_filename_map; end
-
- # Remove special chars from filenames.
- # Windows disallows \ / : * ? " < > | but we will just remove any
- # non alphanumeric (plus period, underscore and dash).
- #
- # source://yard//lib/yard/serializers/file_system_serializer.rb#111
- def encode_path_components(*components); end
-
- # @return [String] the filesystem mapped name of a given object.
- #
- # source://yard//lib/yard/serializers/file_system_serializer.rb#102
- def mapped_name(object); end
-end
-
-# Serializes an object to a process (like less)
-#
-# @example Serializing to a pager (less)
-# serializer = ProcessSerializer.new('less')
-# serializer.serialize(object, "data!")
-#
-# source://yard//lib/yard/serializers/process_serializer.rb#9
-class YARD::Serializers::ProcessSerializer < ::YARD::Serializers::Base
- # Creates a new ProcessSerializer for the shell command +cmd+
- #
- # @param cmd [String] the command that will accept data on stdin
- # @return [ProcessSerializer] a new instance of ProcessSerializer
- #
- # source://yard//lib/yard/serializers/process_serializer.rb#13
- def initialize(cmd); end
-
- # Overrides serialize behaviour and writes data to standard input
- # of the associated command
- #
- # source://yard//lib/yard/serializers/process_serializer.rb#19
- def serialize(_object, data); end
-end
-
-# A serializer that writes data to standard output.
-#
-# source://yard//lib/yard/serializers/stdout_serializer.rb#5
-class YARD::Serializers::StdoutSerializer < ::YARD::Serializers::Base
- # Creates a serializer to print text to stdout
- #
- # @param wrap [Fixnum, nil] if wrap is a number, wraps text to +wrap+
- # columns, otherwise no wrapping is done.
- # @return [StdoutSerializer] a new instance of StdoutSerializer
- #
- # source://yard//lib/yard/serializers/stdout_serializer.rb#10
- def initialize(wrap = T.unsafe(nil)); end
-
- # Overrides serialize behaviour to write data to standard output
- #
- # source://yard//lib/yard/serializers/stdout_serializer.rb#15
- def serialize(_object, data); end
-
- private
-
- # Wraps text to a specific column length
- #
- # @param _length [Fixnum] the column length to wrap to
- # @param text [String] the text to wrap
- # @return [String] the wrapped text
- #
- # source://yard//lib/yard/serializers/stdout_serializer.rb#26
- def word_wrap(text, _length = T.unsafe(nil)); end
-end
-
-# source://yard//lib/yard/serializers/yardoc_serializer.rb#32
-class YARD::Serializers::YardocSerializer < ::YARD::Serializers::FileSystemSerializer
- # @return [YardocSerializer] a new instance of YardocSerializer
- #
- # source://yard//lib/yard/serializers/yardoc_serializer.rb#33
- def initialize(yfile); end
-
- # source://yard//lib/yard/serializers/yardoc_serializer.rb#40
- def checksums_path; end
-
- # @return [Boolean]
- #
- # source://yard//lib/yard/serializers/yardoc_serializer.rb#45
- def complete?; end
-
- # source://yard//lib/yard/serializers/yardoc_serializer.rb#42
- def complete_lock_path; end
-
- # source://yard//lib/yard/serializers/yardoc_serializer.rb#101
- def deserialize(path, is_path = T.unsafe(nil)); end
-
- # Creates a pessmistic transactional lock on the database for writing.
- # Use with {YARD.parse} to ensure the database is not written multiple
- # times.
- #
- # @see #locked_for_writing?
- #
- # source://yard//lib/yard/serializers/yardoc_serializer.rb#54
- def lock_for_writing; end
-
- # @return [Boolean] whether the database is currently locked for writing
- #
- # source://yard//lib/yard/serializers/yardoc_serializer.rb#62
- def locked_for_writing?; end
-
- # source://yard//lib/yard/serializers/yardoc_serializer.rb#41
- def object_types_path; end
-
- # source://yard//lib/yard/serializers/yardoc_serializer.rb#37
- def objects_path; end
-
- # source://yard//lib/yard/serializers/yardoc_serializer.rb#43
- def processing_path; end
-
- # @deprecated The registry no longer tracks proxy types
- #
- # source://yard//lib/yard/serializers/yardoc_serializer.rb#39
- def proxy_types_path; end
-
- # source://yard//lib/yard/serializers/yardoc_serializer.rb#93
- def serialize(object); end
-
- # source://yard//lib/yard/serializers/yardoc_serializer.rb#66
- def serialized_path(object); end
-
- private
-
- # source://yard//lib/yard/serializers/yardoc_serializer.rb#114
- def dump(object); end
-
- # source://yard//lib/yard/serializers/yardoc_serializer.rb#119
- def internal_dump(object, first_object = T.unsafe(nil)); end
-end
-
-# Namespace for classes and modules that handle serving documentation over HTTP
-#
-# == Implementing a Custom Server
-# To customize the YARD server, see the {Adapter} and {Router} classes.
-#
-# == Rack Middleware
-# If you want to use the YARD server as a Rack middleware, see the documentation
-# in {RackMiddleware}.
-#
-# @since 0.6.0
-#
-# source://yard//lib/yard/autoload.rb#214
-module YARD::Server
- class << self
- # Registers a static path to be used in static asset lookup.
- #
- # @param path [String] the pathname to register
- # @return [void]
- # @since 0.6.2
- #
- # source://yard//lib/yard/server.rb#8
- def register_static_path(path); end
- end
-end
-
-# This class implements the bridge between the {Router} and the server
-# backend for a specific server type. YARD implements concrete adapters
-# for WEBrick and Rack respectively, though other adapters can be made
-# for other server architectures.
-#
-# == Subclassing Notes
-# To create a concrete adapter class, implement the {#start} method to
-# initiate the server backend.
-#
-# @abstract
-# @since 0.6.0
-#
-# source://yard//lib/yard/server/adapter.rb#23
-class YARD::Server::Adapter
- # Creates a new adapter object
- #
- # @option opts
- # @option opts
- # @option opts
- # @param libs [Hash{String=>Array}] a list of libraries,
- # see {#libraries} for formulating this list.
- # @param opts [Hash] extra options to pass to the adapter
- # @return [Adapter] a new instance of Adapter
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/adapter.rb#71
- def initialize(libs, opts = T.unsafe(nil), server_opts = T.unsafe(nil)); end
-
- # Adds a library to the {#libraries} mapping for a given library object.
- #
- # @example Adding a new library to an adapter
- # adapter.add_library LibraryVersion.new('mylib', '1.0', '/path/to/.yardoc')
- # @param library [LibraryVersion] a library to add
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/adapter.rb#88
- def add_library(library); end
-
- # @return [String] the location where static files are located, if any.
- # To set this field on initialization, pass +:DocumentRoot+ to the
- # +server_opts+ argument in {#initialize}
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/adapter.rb#27
- def document_root; end
-
- # @return [String] the location where static files are located, if any.
- # To set this field on initialization, pass +:DocumentRoot+ to the
- # +server_opts+ argument in {#initialize}
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/adapter.rb#27
- def document_root=(_arg0); end
-
- # @return [Hash{String=>Array}] a map of libraries.
- # @see #add_library
- # @see LibraryVersion LibraryVersion for information on building a list of libraries
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/adapter.rb#32
- def libraries; end
-
- # @return [Hash{String=>Array}] a map of libraries.
- # @see #add_library
- # @see LibraryVersion LibraryVersion for information on building a list of libraries
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/adapter.rb#32
- def libraries=(_arg0); end
-
- # @return [Hash] options passed and processed by adapters. The actual
- # options mostly depend on the adapters themselves.
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/adapter.rb#36
- def options; end
-
- # @return [Hash] options passed and processed by adapters. The actual
- # options mostly depend on the adapters themselves.
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/adapter.rb#36
- def options=(_arg0); end
-
- # @return [Router] the router object used to route URLs to commands
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/adapter.rb#43
- def router; end
-
- # @return [Router] the router object used to route URLs to commands
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/adapter.rb#43
- def router=(_arg0); end
-
- # @return [Hash] a set of options to pass to the server backend. Note
- # that +:DocumentRoot+ also sets the {#document_root}.
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/adapter.rb#40
- def server_options; end
-
- # @return [Hash] a set of options to pass to the server backend. Note
- # that +:DocumentRoot+ also sets the {#document_root}.
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/adapter.rb#40
- def server_options=(_arg0); end
-
- # Implement this method to connect your adapter to your server.
- #
- # @abstract
- # @raise [NotImplementedError]
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/adapter.rb#95
- def start; end
-
- class << self
- # Performs any global initialization for the adapter.
- #
- # @note If you subclass this method, make sure to call +super+.
- # @return [void]
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/adapter.rb#48
- def setup; end
-
- # Performs any global shutdown procedures for the adapter.
- #
- # @note If you subclass this method, make sure to call +super+.
- # @return [void]
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/adapter.rb#56
- def shutdown; end
- end
-end
-
-# @since 0.6.0
-#
-# source://yard//lib/yard/server/http_utils.rb#16
-YARD::Server::CR = T.let(T.unsafe(nil), String)
-
-# @since 0.6.0
-#
-# source://yard//lib/yard/server/http_utils.rb#18
-YARD::Server::CRLF = T.let(T.unsafe(nil), String)
-
-# Commands implement specific kinds of server responses which are routed
-# to by the {Router} class. To implement a custom command, subclass {Commands::Base}.
-#
-# @since 0.6.0
-#
-# source://yard//lib/yard/autoload.rb#219
-module YARD::Server::Commands; end
-
-# This is the base command class used to implement custom commands for
-# a server. A command will be routed to by the {Router} class and return
-# a Rack-style response.
-#
-# == Attribute Initializers
-# All attributes can be initialized via options passed into the {#initialize}
-# method. When creating a custom command, the {Adapter#options} will
-# automatically be mapped to attributes by the same name on your class.
-#
-# class MyCommand < Base
-# attr_accessor :myattr
-# end
-#
-# Adapter.new(libs, {:myattr => 'foo'}).start
-#
-# # when a request comes in, cmd.myattr == 'foo'
-#
-# == Subclassing Notes
-# To implement a custom command, override the {#run} method, not {#call}.
-# In your implementation, you should set the body and status for requests.
-# See details in the +#run+ method documentation.
-#
-# Note that if your command deals directly with libraries, you should
-# consider subclassing the more specific {LibraryCommand} class instead.
-#
-# @abstract
-# @see #run
-# @since 0.6.0
-#
-# source://yard//lib/yard/server/commands/base.rb#34
-class YARD::Server::Commands::Base
- # Creates a new command object, setting attributes named by keys
- # in the options hash. After initialization, the options hash
- # is saved in {#command_options} for further inspection.
- #
- # @example Creating a Command
- # cmd = DisplayObjectCommand.new(:caching => true, :library => mylib)
- # cmd.library # => mylib
- # cmd.command_options # => {:caching => true, :library => mylib}
- # @param opts [Hash] the options hash, saved to {#command_options}
- # after initialization.
- # @return [Base] a new instance of Base
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/base.rb#75
- def initialize(opts = T.unsafe(nil)); end
-
- # @return [Adapter] the server adapter
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/base.rb#41
- def adapter; end
-
- # @return [Adapter] the server adapter
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/base.rb#41
- def adapter=(_arg0); end
-
- # @return [String] the response body. Defaults to empty string.
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/base.rb#61
- def body; end
-
- # @return [String] the response body. Defaults to empty string.
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/base.rb#61
- def body=(_arg0); end
-
- # @return [Boolean] whether to cache
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/base.rb#44
- def caching; end
-
- # @return [Boolean] whether to cache
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/base.rb#44
- def caching=(_arg0); end
-
- # The main method called by a router with a request object.
- #
- # @note This command should not be overridden by subclasses. Implement
- # the callback method {#run} instead.
- # @param request [Adapter Dependent] the request object
- # @return [Array(Numeric,Hash,Array)] a Rack-style response
- # of status, headers, and body wrapped in an array.
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/base.rb#89
- def call(request); end
-
- # @return [Hash] the options passed to the command's constructor
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/base.rb#38
- def command_options; end
-
- # @return [Hash] the options passed to the command's constructor
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/base.rb#38
- def command_options=(_arg0); end
-
- # @return [Hash{String => String}] response headers
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/base.rb#55
- def headers; end
-
- # @return [Hash{String => String}] response headers
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/base.rb#55
- def headers=(_arg0); end
-
- # @return [String] the path after the command base URI
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/base.rb#52
- def path; end
-
- # @return [String] the path after the command base URI
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/base.rb#52
- def path=(_arg0); end
-
- # @return [Rack::Request] request object
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/base.rb#49
- def request; end
-
- # @return [Rack::Request] request object
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/base.rb#49
- def request=(_arg0); end
-
- # Subclass this method to implement a custom command. This method
- # should set the {#status} and {#body}, and optionally modify the
- # {#headers}. Note that +#status+ defaults to 200.
- #
- # @abstract
- # @example A custom command
- # class ErrorCommand < Base
- # def run
- # self.body = 'ERROR! The System is down!'
- # self.status = 500
- # self.headers['Content-Type'] = 'text/plain'
- # end
- # end
- # @raise [NotImplementedError]
- # @return [void]
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/base.rb#128
- def run; end
-
- # @return [Numeric] status code. Defaults to 200 per request
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/base.rb#58
- def status; end
-
- # @return [Numeric] status code. Defaults to 200 per request
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/base.rb#58
- def status=(_arg0); end
-
- protected
-
- # Override this method to implement custom caching mechanisms for
- #
- # @example Caching to memory
- # $memory_cache = {}
- # def cache(data)
- # $memory_cache[path] = data
- # end
- # @param data [String] the data to cache
- # @return [String] the same cached data (for chaining)
- # @see StaticCaching
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/base.rb#165
- def cache(data); end
-
- # Sets the body and headers for a 404 response. Does not modify the
- # body if already set.
- #
- # @return [void]
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/base.rb#180
- def not_found; end
-
- # Sets the headers and status code for a redirection to a given URL
- #
- # @param url [String] the URL to redirect to
- # @raise [FinishRequest] causes the request to terminate.
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/base.rb#192
- def redirect(url); end
-
- # Renders a specific object if provided, or a regular template rendering
- # if object is not provided.
- #
- # @param object [CodeObjects::Base, nil] calls {CodeObjects::Base#format} if
- # an object is provided, or {Templates::Engine.render} if object is nil. Both
- # receive +#options+ as an argument.
- # @return [String] the resulting output to display
- # @since 0.6.0
- # @todo This method is dependent on +#options+, it should be in {LibraryCommand}.
- #
- # source://yard//lib/yard/server/commands/base.rb#144
- def render(object = T.unsafe(nil)); end
-
- private
-
- # Add a conservative cache control policy to reduce load on
- # requests served with "?1234567890" style timestamp query strings.
- #
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/base.rb#202
- def add_cache_control; end
-end
-
-# Displays a README or extra file.
-#
-# @since 0.6.0
-# @todo Implement better support for detecting binary (image) filetypes
-#
-# source://yard//lib/yard/server/commands/display_file_command.rb#8
-class YARD::Server::Commands::DisplayFileCommand < ::YARD::Server::Commands::LibraryCommand
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/display_file_command.rb#9
- def index; end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/display_file_command.rb#9
- def index=(_arg0); end
-
- # @raise [NotFoundError]
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/display_file_command.rb#11
- def run; end
-end
-
-# Displays documentation for a specific object identified by the path
-#
-# @since 0.6.0
-#
-# source://yard//lib/yard/server/commands/display_object_command.rb#6
-class YARD::Server::Commands::DisplayObjectCommand < ::YARD::Server::Commands::LibraryCommand
- include ::YARD::Server::DocServerHelper
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/display_object_command.rb#36
- def index; end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/display_object_command.rb#47
- def not_found; end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/display_object_command.rb#9
- def run; end
-
- private
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/display_object_command.rb#54
- def object_path; end
-end
-
-# Displays an object wrapped in frames
-#
-# @since 0.6.0
-#
-# source://yard//lib/yard/server/commands/frames_command.rb#6
-class YARD::Server::Commands::FramesCommand < ::YARD::Server::Commands::DisplayObjectCommand
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/frames_command.rb#7
- def run; end
-end
-
-# This is the base command for all commands that deal directly with libraries.
-# Some commands do not, but most (like {DisplayObjectCommand}) do. If your
-# command deals with libraries directly, subclass this class instead.
-# See {Base} for notes on how to subclass a command.
-#
-# @abstract
-# @since 0.6.0
-#
-# source://yard//lib/yard/server/commands/library_command.rb#32
-class YARD::Server::Commands::LibraryCommand < ::YARD::Server::Commands::Base
- # @return [LibraryCommand] a new instance of LibraryCommand
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/library_command.rb#63
- def initialize(opts = T.unsafe(nil)); end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/library_command.rb#68
- def call(request); end
-
- # @return [Boolean] whether to reparse data
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/library_command.rb#53
- def incremental; end
-
- # @return [Boolean] whether to reparse data
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/library_command.rb#53
- def incremental=(_arg0); end
-
- # @return [LibraryVersion] the object containing library information
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/library_command.rb#41
- def library; end
-
- # @return [LibraryVersion] the object containing library information
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/library_command.rb#41
- def library=(_arg0); end
-
- # @return [LibraryOptions] default options for the library
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/library_command.rb#44
- def options; end
-
- # @return [LibraryOptions] default options for the library
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/library_command.rb#44
- def options=(_arg0); end
-
- # @return [Serializers::Base] the serializer used to perform file linking
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/library_command.rb#47
- def serializer; end
-
- # @return [Serializers::Base] the serializer used to perform file linking
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/library_command.rb#47
- def serializer=(_arg0); end
-
- # @return [Boolean] whether router should route for multiple libraries
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/library_command.rb#50
- def single_library; end
-
- # @return [Boolean] whether router should route for multiple libraries
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/library_command.rb#50
- def single_library=(_arg0); end
-
- # @return [Boolean] whether or not this adapter calls +fork+ when serving
- # library requests. Defaults to false.
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/library_command.rb#57
- def use_fork; end
-
- # @return [Boolean] whether or not this adapter calls +fork+ when serving
- # library requests. Defaults to false.
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/library_command.rb#57
- def use_fork=(_arg0); end
-
- private
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/library_command.rb#96
- def call_with_fork(request, &block); end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/library_command.rb#83
- def call_without_fork(request); end
-
- # @return [Boolean]
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/library_command.rb#109
- def can_fork?; end
-
- # Hack to load a custom fulldoc template object that does
- # not do any rendering/generation. We need this to access the
- # generate_*_list methods.
- #
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/library_command.rb#171
- def fulldoc_template; end
-
- # @raise [LibraryNotPreparedError]
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/library_command.rb#147
- def load_yardoc; end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/library_command.rb#159
- def not_prepared; end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/library_command.rb#118
- def restore_template_info; end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/library_command.rb#113
- def save_default_template_info; end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/library_command.rb#123
- def setup_library; end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/library_command.rb#130
- def setup_yardopts; end
-end
-
-# source://yard//lib/yard/server/commands/library_command.rb#35
-YARD::Server::Commands::LibraryCommand::CAN_FORK = T.let(T.unsafe(nil), TrueClass)
-
-# Returns the index of libraries served by the server.
-#
-# @since 0.6.0
-#
-# source://yard//lib/yard/server/commands/library_index_command.rb#13
-class YARD::Server::Commands::LibraryIndexCommand < ::YARD::Server::Commands::Base
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/library_index_command.rb#14
- def options; end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/library_index_command.rb#14
- def options=(_arg0); end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/library_index_command.rb#16
- def run; end
-end
-
-# @since 0.6.0
-#
-# source://yard//lib/yard/server/commands/library_index_command.rb#5
-class YARD::Server::Commands::LibraryIndexOptions < ::YARD::CLI::YardocOptions
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/library_index_command.rb#6
- def adapter; end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/library_index_command.rb#6
- def adapter=(_arg0); end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/library_index_command.rb#6
- def libraries; end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/library_index_command.rb#6
- def libraries=(_arg0); end
-
- # source://yard//lib/yard/server/commands/library_index_command.rb#9
- def serialize; end
-
- # source://yard//lib/yard/server/commands/library_index_command.rb#9
- def serialize=(_arg0); end
-
- # source://yard//lib/yard/server/commands/library_index_command.rb#7
- def template; end
-
- # source://yard//lib/yard/server/commands/library_index_command.rb#7
- def template=(_arg0); end
-
- # source://yard//lib/yard/server/commands/library_index_command.rb#8
- def type; end
-
- # source://yard//lib/yard/server/commands/library_index_command.rb#8
- def type=(_arg0); end
-end
-
-# @since 0.6.0
-#
-# source://yard//lib/yard/server/commands/library_command.rb#7
-class YARD::Server::Commands::LibraryOptions < ::YARD::CLI::YardocOptions
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/library_command.rb#8
- def adapter; end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/library_command.rb#14
- def command; end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/library_command.rb#14
- def command=(_arg0); end
-
- # @since 0.6.0
- # @yield [:adapter, adapter]
- #
- # source://yard//lib/yard/server/commands/library_command.rb#17
- def each(&block); end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/library_command.rb#15
- def frames; end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/library_command.rb#15
- def frames=(_arg0); end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/library_command.rb#9
- def library; end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/library_command.rb#12
- def serialize; end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/library_command.rb#11
- def serializer; end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/library_command.rb#10
- def single_library; end
-end
-
-# Returns a list of objects of a specific type
-#
-# @since 0.6.0
-#
-# source://yard//lib/yard/server/commands/list_command.rb#6
-class YARD::Server::Commands::ListCommand < ::YARD::Server::Commands::LibraryCommand
- include ::YARD::Templates::Helpers::BaseHelper
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/list_command.rb#9
- def run; end
-end
-
-# Serves requests from the root of the server
-#
-# @since 0.6.0
-#
-# source://yard//lib/yard/server/commands/root_request_command.rb#6
-class YARD::Server::Commands::RootRequestCommand < ::YARD::Server::Commands::Base
- include ::YARD::Server::HTTPUtils
- include ::YARD::Server::Commands::StaticFileHelpers
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/root_request_command.rb#9
- def run; end
-end
-
-# Performs a search over the objects inside of a library and returns
-# the results as HTML or plaintext
-#
-# @since 0.6.0
-#
-# source://yard//lib/yard/server/commands/search_command.rb#7
-class YARD::Server::Commands::SearchCommand < ::YARD::Server::Commands::LibraryCommand
- include ::YARD::Templates::Helpers::BaseHelper
- include ::YARD::Templates::Helpers::ModuleHelper
- include ::YARD::Server::DocServerHelper
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/search_command.rb#12
- def query; end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/search_command.rb#12
- def query=(_arg0); end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/search_command.rb#12
- def results; end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/search_command.rb#12
- def results=(_arg0); end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/search_command.rb#14
- def run; end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/search_command.rb#26
- def visible_results; end
-
- private
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/search_command.rb#58
- def search_for_object; end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/search_command.rb#47
- def serve_normal; end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/search_command.rb#37
- def serve_xhr; end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/search_command.rb#32
- def url_for(object); end
-end
-
-# Serves static content when no other router matches a request
-#
-# @since 0.6.0
-#
-# source://yard//lib/yard/server/commands/static_file_command.rb#6
-class YARD::Server::Commands::StaticFileCommand < ::YARD::Server::Commands::LibraryCommand
- include ::YARD::Server::HTTPUtils
- include ::YARD::Server::Commands::StaticFileHelpers
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/static_file_command.rb#17
- def run; end
-end
-
-# Defines the paths used to search for static assets. To define an
-# extra path, use {YARD::Server.register_static_path} rather than
-# modifying this constant directly. Also note that files in the
-# document root will always take precedence over these paths.
-#
-# @since 0.6.0
-#
-# source://yard//lib/yard/server/commands/static_file_command.rb#15
-YARD::Server::Commands::StaticFileCommand::STATIC_PATHS = T.let(T.unsafe(nil), Array)
-
-# Include this module to get access to {#static_template_file?}
-# and {favicon?} helpers.
-#
-# @since 0.6.0
-#
-# source://yard//lib/yard/server/commands/static_file_helpers.rb#8
-module YARD::Server::Commands::StaticFileHelpers
- include ::YARD::Server::HTTPUtils
-
- # Serves an empty favicon.
- #
- # @raise [FinishRequest] finalizes an empty body if the path matches
- # /favicon.ico so browsers don't complain.
- # @return [Boolean]
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/static_file_helpers.rb#14
- def favicon?; end
-
- # Attempts to route a path to a static template file.
- #
- # @raise [FinishRequest] if a file was found and served
- # @return [void]
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/static_file_helpers.rb#26
- def static_template_file?; end
-
- private
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/static_file_helpers.rb#42
- def find_file(adapter, url); end
-
- class << self
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/commands/static_file_helpers.rb#42
- def find_file(adapter, url); end
- end
-end
-
-# A module that is mixed into {Templates::Template} in order to customize
-# certain template methods.
-#
-# @since 0.6.0
-#
-# source://yard//lib/yard/server/doc_server_helper.rb#6
-module YARD::Server::DocServerHelper
- # @param path_components [Array] components of a URL
- # @return [String] the absolute path from any mounted base URI.
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/doc_server_helper.rb#61
- def abs_url(*path_components); end
-
- # @example The base path for a library 'foo'
- # base_path('docs') # => 'docs/foo'
- # @param path [String] the path prefix for a base path URI
- # @return [String] the base URI for a library with an extra +path+ prefix
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/doc_server_helper.rb#69
- def base_path(path); end
-
- # @return [String] a timestamp for a given file
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/doc_server_helper.rb#78
- def mtime(file); end
-
- # @return [String] a URL for a file with a timestamp
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/doc_server_helper.rb#84
- def mtime_url(file); end
-
- # @return [Router] convenience method for accessing the router
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/doc_server_helper.rb#75
- def router; end
-
- # Modifies {Templates::Helpers::HtmlHelper#url_for} to return a URL instead
- # of a disk location.
- #
- # @param anchor [String] the anchor to link to
- # @param obj [String, CodeObjects::Base] the object (or object path) to link to
- # @param relative [Boolean] use a relative or absolute link
- # @return [String] the URL location of the object
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/doc_server_helper.rb#11
- def url_for(obj, anchor = T.unsafe(nil), relative = T.unsafe(nil)); end
-
- # Modifies {Templates::Helpers::HtmlHelper#url_for_file} to return a URL instead
- # of a disk location.
- #
- # @param anchor [String] optional anchor
- # @param filename [String, CodeObjects::ExtraFileObject] the filename to link to
- # @return [String] the URL pointing to the file
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/doc_server_helper.rb#24
- def url_for_file(filename, anchor = T.unsafe(nil)); end
-
- # Returns the frames URL for the page
- #
- # @return [String] the URL pointing to the frames page
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/doc_server_helper.rb#43
- def url_for_frameset; end
-
- # Returns the URL for the alphabetic index page
- #
- # @return [String] the URL pointing to the first main page the
- # user should see.
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/doc_server_helper.rb#55
- def url_for_index; end
-
- # Modifies {Templates::Helpers::HtmlHelper#url_for_list} to return a URL
- # based on the list prefix instead of a HTML filename.
- #
- # @param type [String, Symbol] the list type to generate a URL for
- # @return [String] the URL pointing to the list
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/doc_server_helper.rb#37
- def url_for_list(type); end
-
- # Returns the main URL, first checking a readme and then linking to the index
- #
- # @return [String] the URL pointing to the first main page the
- # user should see.
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/doc_server_helper.rb#49
- def url_for_main; end
-end
-
-# A custom {Serializers::Base serializer} which returns resource URLs instead of
-# static relative paths to files on disk.
-#
-# @since 0.6.0
-#
-# source://yard//lib/yard/server/doc_server_serializer.rb#6
-class YARD::Server::DocServerSerializer < ::YARD::Serializers::FileSystemSerializer
- # @return [DocServerSerializer] a new instance of DocServerSerializer
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/doc_server_serializer.rb#7
- def initialize(_command = T.unsafe(nil)); end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/doc_server_serializer.rb#11
- def serialized_path(object); end
-
- private
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/doc_server_serializer.rb#31
- def urlencode(name); end
-end
-
-# Short circuits a request by raising an error. This exception is caught
-# by {Commands::Base#call} to immediately end a request and return a response.
-#
-# @since 0.6.0
-#
-# source://yard//lib/yard/server/adapter.rb#6
-class YARD::Server::FinishRequest < ::RuntimeError; end
-
-# HTTPUtils provides utility methods for working with the HTTP protocol.
-#
-# This module is generally used internally by WEBrick
-#
-# @since 0.6.0
-#
-# source://yard//lib/yard/server/http_utils.rb#25
-module YARD::Server::HTTPUtils
- private
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/http_utils.rb#443
- def _escape(str, regex); end
-
- # :stopdoc:
- #
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/http_utils.rb#441
- def _make_regex(str); end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/http_utils.rb#442
- def _make_regex!(str); end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/http_utils.rb#449
- def _unescape(str, regex); end
-
- # Removes quotes and escapes from +str+
- #
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/http_utils.rb#223
- def dequote(str); end
-
- # Escapes HTTP reserved and unwise characters in +str+
- #
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/http_utils.rb#467
- def escape(str); end
-
- # Escapes 8 bit characters in +str+
- #
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/http_utils.rb#508
- def escape8bit(str); end
-
- # Escapes form reserved characters in +str+
- #
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/http_utils.rb#481
- def escape_form(str); end
-
- # Escapes path +str+
- #
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/http_utils.rb#497
- def escape_path(str); end
-
- # Loads Apache-compatible mime.types in +file+.
- #
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/http_utils.rb#112
- def load_mime_types(file); end
-
- # Returns the mime type of +filename+ from the list in +mime_tab+. If no
- # mime type was found application/octet-stream is returned.
- #
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/http_utils.rb#134
- def mime_type(filename, mime_tab); end
-
- # Normalizes a request path. Raises an exception if the path cannot be
- # normalized.
- #
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/http_utils.rb#31
- def normalize_path(path); end
-
- # Parses form data in +io+ with the given +boundary+
- #
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/http_utils.rb#395
- def parse_form_data(io, boundary); end
-
- # Parses an HTTP header +raw+ into a hash of header fields with an Array
- # of values.
- #
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/http_utils.rb#145
- def parse_header(raw); end
-
- # Parses the query component of a URI in +str+
- #
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/http_utils.rb#371
- def parse_query(str); end
-
- # Parses q values in +value+ as used in Accept headers.
- #
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/http_utils.rb#202
- def parse_qvalues(value); end
-
- # Parses a Range header value +ranges_specifier+
- #
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/http_utils.rb#184
- def parse_range_header(ranges_specifier); end
-
- # Quotes and escapes quotes in +str+
- #
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/http_utils.rb#233
- def quote(str); end
-
- # Splits a header value +str+ according to HTTP specification.
- #
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/http_utils.rb#175
- def split_header_value(str); end
-
- # Unescapes HTTP reserved and unwise characters in +str+
- #
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/http_utils.rb#474
- def unescape(str); end
-
- # Unescapes form reserved characters in +str+
- #
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/http_utils.rb#490
- def unescape_form(str); end
-
- class << self
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/http_utils.rb#443
- def _escape(str, regex); end
-
- # :stopdoc:
- #
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/http_utils.rb#441
- def _make_regex(str); end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/http_utils.rb#442
- def _make_regex!(str); end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/http_utils.rb#449
- def _unescape(str, regex); end
-
- # Removes quotes and escapes from +str+
- #
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/http_utils.rb#228
- def dequote(str); end
-
- # Escapes HTTP reserved and unwise characters in +str+
- #
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/http_utils.rb#467
- def escape(str); end
-
- # Escapes 8 bit characters in +str+
- #
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/http_utils.rb#508
- def escape8bit(str); end
-
- # Escapes form reserved characters in +str+
- #
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/http_utils.rb#481
- def escape_form(str); end
-
- # Escapes path +str+
- #
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/http_utils.rb#497
- def escape_path(str); end
-
- # Loads Apache-compatible mime.types in +file+.
- #
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/http_utils.rb#128
- def load_mime_types(file); end
-
- # Returns the mime type of +filename+ from the list in +mime_tab+. If no
- # mime type was found application/octet-stream is returned.
- #
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/http_utils.rb#139
- def mime_type(filename, mime_tab); end
-
- # Normalizes a request path. Raises an exception if the path cannot be
- # normalized.
- #
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/http_utils.rb#42
- def normalize_path(path); end
-
- # Parses form data in +io+ with the given +boundary+
- #
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/http_utils.rb#421
- def parse_form_data(io, boundary); end
-
- # Parses an HTTP header +raw+ into a hash of header fields with an Array
- # of values.
- #
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/http_utils.rb#170
- def parse_header(raw); end
-
- # Parses the query component of a URI in +str+
- #
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/http_utils.rb#390
- def parse_query(str); end
-
- # Parses q values in +value+ as used in Accept headers.
- #
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/http_utils.rb#218
- def parse_qvalues(value); end
-
- # Parses a Range header value +ranges_specifier+
- #
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/http_utils.rb#197
- def parse_range_header(ranges_specifier); end
-
- # Quotes and escapes quotes in +str+
- #
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/http_utils.rb#236
- def quote(str); end
-
- # Splits a header value +str+ according to HTTP specification.
- #
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/http_utils.rb#179
- def split_header_value(str); end
-
- # Unescapes HTTP reserved and unwise characters in +str+
- #
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/http_utils.rb#474
- def unescape(str); end
-
- # Unescapes form reserved characters in +str+
- #
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/http_utils.rb#490
- def unescape_form(str); end
- end
-end
-
-# Default mime types
-#
-# @since 0.6.0
-#
-# source://yard//lib/yard/server/http_utils.rb#47
-YARD::Server::HTTPUtils::DefaultMimeTypes = T.let(T.unsafe(nil), Hash)
-
-# @since 0.6.0
-#
-# source://yard//lib/yard/server/http_utils.rb#459
-YARD::Server::HTTPUtils::ESCAPED = T.let(T.unsafe(nil), Regexp)
-
-# Stores multipart form data. FormData objects are created when
-# WEBrick::HTTPUtils.parse_form_data is called.
-#
-# @since 0.6.0
-#
-# source://yard//lib/yard/server/http_utils.rb#242
-class YARD::Server::HTTPUtils::FormData < ::String
- # Creates a new FormData object.
- #
- # +args+ is an Array of form data entries. One FormData will be created
- # for each entry.
- #
- # This is called by WEBrick::HTTPUtils.parse_form_data for you
- #
- # @return [FormData] a new instance of FormData
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/http_utils.rb#267
- def initialize(*args); end
-
- # Adds +str+ to this FormData which may be the body, a header or a
- # header entry.
- #
- # This is called by WEBrick::HTTPUtils.parse_form_data for you
- #
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/http_utils.rb#300
- def <<(str); end
-
- # Retrieves the header at the first entry in +key+
- #
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/http_utils.rb#286
- def [](*key); end
-
- # Adds +data+ at the end of the chain of entries
- #
- # This is called by WEBrick::HTTPUtils.parse_form_data for you.
- #
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/http_utils.rb#320
- def append_data(data); end
-
- # Yields each entry in this FormData
- #
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/http_utils.rb#335
- def each_data; end
-
- # The filename of the form data part
- #
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/http_utils.rb#254
- def filename; end
-
- # The filename of the form data part
- #
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/http_utils.rb#254
- def filename=(_arg0); end
-
- # Returns all the FormData as an Array
- #
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/http_utils.rb#347
- def list; end
-
- # The name of the form data part
- #
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/http_utils.rb#249
- def name; end
-
- # The name of the form data part
- #
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/http_utils.rb#249
- def name=(_arg0); end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/http_utils.rb#256
- def next_data=(_arg0); end
-
- # Returns all the FormData as an Array
- # A FormData will behave like an Array
- #
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/http_utils.rb#358
- def to_ary; end
-
- # This FormData's body
- #
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/http_utils.rb#363
- def to_s; end
-
- protected
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/http_utils.rb#256
- def next_data; end
-end
-
-# @since 0.6.0
-#
-# source://yard//lib/yard/server/http_utils.rb#244
-YARD::Server::HTTPUtils::FormData::EmptyHeader = T.let(T.unsafe(nil), Hash)
-
-# @since 0.6.0
-#
-# source://yard//lib/yard/server/http_utils.rb#243
-YARD::Server::HTTPUtils::FormData::EmptyRawHeader = T.let(T.unsafe(nil), Array)
-
-# @since 0.6.0
-#
-# source://yard//lib/yard/server/http_utils.rb#458
-YARD::Server::HTTPUtils::NONASCII = T.let(T.unsafe(nil), Regexp)
-
-# @since 0.6.0
-#
-# source://yard//lib/yard/server/http_utils.rb#456
-YARD::Server::HTTPUtils::UNESCAPED = T.let(T.unsafe(nil), Regexp)
-
-# @since 0.6.0
-#
-# source://yard//lib/yard/server/http_utils.rb#457
-YARD::Server::HTTPUtils::UNESCAPED_FORM = T.let(T.unsafe(nil), Regexp)
-
-# @since 0.6.0
-#
-# source://yard//lib/yard/server/http_utils.rb#460
-YARD::Server::HTTPUtils::UNESCAPED_PCHAR = T.let(T.unsafe(nil), Regexp)
-
-# @since 0.6.0
-#
-# source://yard//lib/yard/server/http_utils.rb#17
-YARD::Server::LF = T.let(T.unsafe(nil), String)
-
-# This exception is raised when {LibraryVersion#prepare!} fails, or discovers
-# that the library is not "prepared" to be served by
-#
-# @since 0.6.0
-#
-# source://yard//lib/yard/server/library_version.rb#9
-class YARD::Server::LibraryNotPreparedError < ::RuntimeError; end
-
-# A library version encapsulates a library's documentation at a specific version.
-# Although the version is optional, this allows for creating multiple documentation
-# points for a specific library, each representing a unique version. The term
-# "library" used in other parts of the YARD::Server documentation refers to
-# objects of this class unless otherwise noted.
-#
-# A library points to a location where a {#yardoc_file} is located so that
-# its documentation may be loaded and served. Optionally, a {#source_path} is
-# given to point to a location where any extra files (and {YARD::CLI::Yardoc .yardopts})
-# should be loaded from. Both of these methods may not be known immediately,
-# since the yardoc file may not be built until later. Resolving the yardoc
-# file and source path are dependent on the specific library "source type" used.
-# Source types (known as "library source") are discussed in detail below.
-#
-# == Using with Adapters
-# A list of libraries need to be passed into adapters upon creation. In
-# most cases, you will never do this manually, but if you use a {RackMiddleware},
-# you will need to pass in this list yourself. To build this list of libraries,
-# you should create a hash of library names mapped to an *Array* of LibraryVersion
-# objects. For example:
-#
-# {'mylib' => [LibraryVersion.new('mylib', '1.0', ...),
-# LibraryVersion.new('mylib', '2.0', ...)]}
-#
-# Note that you can also use {Adapter#add_library} for convenience.
-#
-# The "array" part is required, even for just one library version.
-#
-# == Library Sources
-# The {#source} method represents the library source type, ie. where the
-# library "comes from". It might come from "disk", or it might come from a
-# "gem" (technically the disk, but a separate type nonetheless). In these
-# two cases, the yardoc file sits somewhere on your filesystem, though
-# it may also be built dynamically if it does not yet exist. This behaviour
-# is controlled through the {#prepare!} method, which prepares the yardoc file
-# given a specific library source. We will see how this works in detail in
-# the following section.
-#
-# == Implementing a Custom Library Source
-# YARD can be extended to support custom library sources in order to
-# build or retrieve a yardoc file at runtime from many different locations.
-#
-# To implement this behaviour, 3 methods can be added to the +LibraryVersion+
-# class, +#load_yardoc_from_SOURCE+, +#yardoc_file_for_SOURCE+, and
-# +#source_path_for_SOURCE+. In all cases, "SOURCE" represents the source
-# type used in {#source} when creating the library object. The
-# +#yardoc_file_for_SOURCE+ and +#source_path_for_SOURCE+ methods are called upon
-# creation and should return the location where the source code for the library
-# lives. The load method is called from {#prepare!} if there is no yardoc file
-# and should set {#yardoc_file}. Below is a full example for
-# implementing a custom library source, +:http+, which reads packaged .yardoc
-# databases from zipped archives off of an HTTP server.
-#
-# Note that only +#load_yardoc_from_SOURCE+ is required. The other two
-# methods are optional and can be set manually (via {#source_path=} and
-# {#yardoc_file=}) on the object at any time.
-#
-# @example Implementing a Custom Library Source
-# # Adds the source type "http" for .yardoc files zipped on HTTP servers
-# class LibraryVersion
-# def load_yardoc_from_http
-# Thread.new do
-# # zip/unzip method implementations are not shown
-# download_zip_file("http://mysite.com/yardocs/#{self}.zip")
-# unzip_file_to("/path/to/yardocs/#{self}")
-# end
-#
-# # tell the server it's not ready yet (but it might be next time)
-# raise LibraryNotPreparedError
-# end
-#
-# def yardoc_file_for_http
-# "/path/to/yardocs/#{self}/.yardoc"
-# end
-#
-# def source_path_for_http
-# File.dirname(yardoc_file)
-# end
-# end
-#
-# # Creating a library of this source type:
-# LibraryVersion.new('name', '1.0', nil, :http)
-# @since 0.6.0
-#
-# source://yard//lib/yard/server/library_version.rb#94
-class YARD::Server::LibraryVersion
- # @param name [String] the name of the library
- # @param source [Symbol] the location of the files used to build the yardoc.
- # Builtin source types are +:disk+ or +:gem+.
- # @param version [String] the specific (usually, but not always, numeric) library
- # version
- # @param yardoc [String] the location of the yardoc file, or nil if it is
- # generated later
- # @return [LibraryVersion] a new instance of LibraryVersion
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/library_version.rb#134
- def initialize(name, version = T.unsafe(nil), yardoc = T.unsafe(nil), source = T.unsafe(nil)); end
-
- # @return [Boolean] whether another LibraryVersion is equal to this one
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/library_version.rb#157
- def ==(other); end
-
- # @return [Boolean] whether another LibraryVersion is equal to this one
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/library_version.rb#153
- def eql?(other); end
-
- # @return [Boolean] whether another LibraryVersion is equal to this one
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/library_version.rb#158
- def equal?(other); end
-
- # @return [Gem::Specification] a gemspec object for a given library. Used
- # for :gem source types.
- # @return [nil] if there is no installed gem for the library
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/library_version.rb#191
- def gemspec; end
-
- # @return [Fixnum] used for Hash mapping.
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/library_version.rb#150
- def hash; end
-
- # @return [String] the name of the library
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/library_version.rb#96
- def name; end
-
- # @return [String] the name of the library
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/library_version.rb#96
- def name=(_arg0); end
-
- # Prepares a library to be displayed by the server. This callback is
- # performed before each request on a library to ensure that it is loaded
- # and ready to be viewed. If any steps need to be performed prior to loading,
- # they are performed through this method (though they should be implemented
- # through the +load_yardoc_from_SOURCE+ method).
- #
- # @note You should not directly override this method. Instead, implement
- # +load_yardoc_from_SOURCENAME+ when implementing loading for a specific
- # source type. See the {LibraryVersion} documentation for "Implementing
- # a Custom Library Source"
- # @raise [LibraryNotPreparedError] if the library is not ready to be
- # displayed. Usually when raising this error, you would simultaneously
- # begin preparing the library for subsequent requests, although this
- # is not necessary.
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/library_version.rb#182
- def prepare!; end
-
- # @return [Boolean] whether the library has been completely processed
- # and is ready to be served
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/library_version.rb#162
- def ready?; end
-
- # @return [Symbol] the source type representing where the yardoc should be
- # loaded from. Defaults are +:disk+ and +:gem+, though custom sources
- # may be implemented. This value is used to inform {#prepare!} about how
- # to load the necessary data in order to display documentation for an object.
- # @see LibraryVersion LibraryVersion documentation for "Implementing a Custom Library Source"
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/library_version.rb#116
- def source; end
-
- # @return [Symbol] the source type representing where the yardoc should be
- # loaded from. Defaults are +:disk+ and +:gem+, though custom sources
- # may be implemented. This value is used to inform {#prepare!} about how
- # to load the necessary data in order to display documentation for an object.
- # @see LibraryVersion LibraryVersion documentation for "Implementing a Custom Library Source"
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/library_version.rb#116
- def source=(_arg0); end
-
- # @return [String] the location of the source code for a library. This
- # value is filled by calling +#source_path_for_SOURCE+ on this class.
- # @return [nil] if there is no source code
- # @see LibraryVersion LibraryVersion documentation for "Implementing a Custom Library Source"
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/library_version.rb#122
- def source_path; end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/library_version.rb#125
- def source_path=(_arg0); end
-
- # @param url_format [Boolean] if true, returns the string in a URI-compatible
- # format (for appending to a URL). Otherwise, it is given in a more human
- # readable format.
- # @return [String] the string representation of the library.
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/library_version.rb#145
- def to_s(url_format = T.unsafe(nil)); end
-
- # @return [String] the version of the specific library
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/library_version.rb#99
- def version; end
-
- # @return [String] the version of the specific library
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/library_version.rb#99
- def version=(_arg0); end
-
- # @note To implement a custom yardoc file getter, implement
- # @return [String] the location of the yardoc file used to load the object
- # information from.
- # @return [nil] if no yardoc file exists yet. In this case, {#prepare!} will
- # be called on this library to build the yardoc file.
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/library_version.rb#106
- def yardoc_file; end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/library_version.rb#109
- def yardoc_file=(_arg0); end
-
- protected
-
- # Called when a library of source type "disk" is to be prepared. In this
- # case, the {#yardoc_file} should already be set, but the library may not
- # be prepared. Run preparation if not done.
- #
- # @raise [LibraryNotPreparedError] if the yardoc file has not been
- # prepared.
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/library_version.rb#206
- def load_yardoc_from_disk; end
-
- # Called when a library of source type "gem" is to be prepared. In this
- # case, the {#yardoc_file} needs to point to the correct location for
- # the installed gem. The yardoc file is built if it has not been done.
- #
- # @raise [LibraryNotPreparedError] if the gem does not have an existing
- # yardoc file.
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/library_version.rb#226
- def load_yardoc_from_gem; end
-
- # @return [String] the source path for a disk source
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/library_version.rb#243
- def source_path_for_disk; end
-
- # @return [String] the source path for a gem source
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/library_version.rb#248
- def source_path_for_gem; end
-
- # @return [String] the yardoc file for a gem source
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/library_version.rb#253
- def yardoc_file_for_gem; end
-
- private
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/library_version.rb#261
- def load_source_path; end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/library_version.rb#266
- def load_yardoc_file; end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/library_version.rb#271
- def serializer; end
-end
-
-# Raises an error if a resource is not found. This exception is caught by
-# {Commands::Base#call} to immediately end a request and return a 404 response
-# code. If a message is provided, the body is set to the exception message.
-#
-# @since 0.6.0
-#
-# source://yard//lib/yard/server/adapter.rb#11
-class YARD::Server::NotFoundError < ::RuntimeError; end
-
-# A router class implements the logic used to recognize a request for a specific
-# URL and run specific {Commands::Base commands}.
-#
-# == Subclassing Notes
-# To create a custom router, subclass this class and pass it into the adapter
-# options through {Adapter#initialize} or by directly modifying {Adapter#router}.
-#
-# The most general customization is to change the URL prefixes recognized by
-# routing, which can be done by overriding {#docs_prefix}, {#list_prefix},
-# {#static_prefix}, and {#search_prefix}.
-#
-# == Implementing Custom Caching
-# By default, the Router class performs static disk-based caching on all
-# requests through the +#check_static_cache+. To override this behaviour,
-# or create your own caching mechanism, mixin your own custom module with
-# this method implemented as per {StaticCaching#check_static_cache}.
-#
-# @example Creating a subclassed router
-# # Adds 'my' to all routing prefixes
-# class MyRouter < YARD::Server::Router
-# def docs_prefix; 'mydocs' end
-# def list_prefix; 'mylist' end
-# def static_prefix; 'mystatic' end
-# def search_prefix; 'mysearch' end
-# end
-#
-# # Using it:
-# WebrickAdapter.new(libraries, :router => MyRouter).start
-# @since 0.6.0
-#
-# source://yard//lib/yard/server/router.rb#32
-class YARD::Server::Router
- include ::YARD::Server::StaticCaching
- include ::YARD::Server::Commands
-
- # Creates a new router for a specific adapter
- #
- # @param adapter [Adapter] the adapter to route requests to
- # @return [Router] a new instance of Router
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/router.rb#45
- def initialize(adapter); end
-
- # @return [Adapter] the adapter used by the router
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/router.rb#40
- def adapter; end
-
- # @return [Adapter] the adapter used by the router
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/router.rb#40
- def adapter=(_arg0); end
-
- # Perform routing on a specific request, serving the request as a static
- # file through {Commands::RootRequestCommand} if no route is found.
- #
- # @param request [Adapter Dependent] the request object
- # @return [Array(Numeric,Hash,Array)] the Rack-style server response data
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/router.rb#54
- def call(request); end
-
- # @return [String] the URI prefix for all object documentation requests
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/router.rb#63
- def docs_prefix; end
-
- # @return [String] the URI prefix for all class/method/file list requests
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/router.rb#66
- def list_prefix; end
-
- # @return [Array(LibraryVersion, Array)] the library followed
- # by the rest of the path components in the request path. LibraryVersion
- # will be nil if no matching library was found.
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/router.rb#79
- def parse_library_from_path(paths); end
-
- # @return [Adapter Dependent] the request data coming in with the routing
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/router.rb#37
- def request; end
-
- # @return [Adapter Dependent] the request data coming in with the routing
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/router.rb#37
- def request=(_arg0); end
-
- # @return [String] the URI prefix for all search requests
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/router.rb#69
- def search_prefix; end
-
- # @return [String] the URI prefix for all static assets (templates)
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/router.rb#72
- def static_prefix; end
-
- protected
-
- # Adds extra :library/:path option keys to the adapter options.
- # Use this method when passing options to a command.
- #
- # @param library [LibraryVersion] the library to route for
- # @param paths [Array] path components (split by '/')
- # @return [Hash] finalized options
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/router.rb#181
- def final_options(library, paths); end
-
- # Performs routing algorithm to find which prefix is called, first
- # parsing out library name/version information.
- #
- # @return [Array(Numeric,Hash,Array)] the Rack-style response
- # @return [nil] if no route is matched
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/router.rb#105
- def route(path = T.unsafe(nil)); end
-
- # Routes requests from {#docs_prefix} and calls the appropriate command
- #
- # @param library [LibraryVersion] the library to route for
- # @param paths [Array] path components (split by '/')
- # @return [Array(Numeric,Hash,Array)] the Rack-style response
- # @return [nil] if no route is matched
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/router.rb#128
- def route_docs(library, paths); end
-
- # Routes for the index of a library / multiple libraries
- #
- # @return [Array(Numeric,Hash,Array)] the Rack-style response
- # @return [nil] if no route is matched
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/router.rb#146
- def route_index; end
-
- # Routes requests from {#list_prefix} and calls the appropriate command
- #
- # @param library [LibraryVersion] the library to route for
- # @param paths [Array] path components (split by '/')
- # @return [Array(Numeric,Hash,Array)] the Rack-style response
- # @return [nil] if no route is matched
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/router.rb#157
- def route_list(library, paths); end
-
- # Routes requests from {#search_prefix} and calls the appropriate command
- #
- # @param library [LibraryVersion] the library to route for
- # @param paths [Array] path components (split by '/')
- # @return [Array(Numeric,Hash,Array)] the Rack-style response
- # @return [nil] if no route is matched
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/router.rb#165
- def route_search(library, paths); end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/router.rb#170
- def route_static(library, paths); end
-end
-
-# Implements static caching for requests.
-#
-# @see Router Router documentation for "Caching"
-# @since 0.6.0
-#
-# source://yard//lib/yard/server/static_caching.rb#7
-module YARD::Server::StaticCaching
- # Called by a router to return the cached object. By default, this
- # method performs disk-based caching. To perform other forms of caching,
- # implement your own +#check_static_cache+ method and mix the module into
- # the Router class.
- #
- # Note that caching does not occur here. This method simply checks for
- # the existence of cached data. To actually cache a response, see
- # {Commands::Base#cache}.
- #
- # @example Implementing In-Memory Cache Checking
- # module MemoryCaching
- # def check_static_cache
- # # $memory_cache is filled by {Commands::Base#cache}
- # cached_data = $memory_cache[request.path]
- # if cached_data
- # [200, {'Content-Type' => 'text/html'}, [cached_data]]
- # else
- # nil
- # end
- # end
- # end
- #
- # class YARD::Server::Router; include MemoryCaching; end
- # @return [Array(Numeric,Hash,Array)] the Rack-style response
- # @return [nil] if no cache is available and routing should continue
- # @see Commands::Base#cache
- # @since 0.6.0
- #
- # source://yard//lib/yard/server/static_caching.rb#34
- def check_static_cache; end
-end
-
-# Stubs marshal dumps and acts a delegate class for an object by path
-#
-# @private
-#
-# source://yard//lib/yard/serializers/yardoc_serializer.rb#6
-class YARD::StubProxy
- # @return [StubProxy] a new instance of StubProxy
- #
- # source://yard//lib/yard/serializers/yardoc_serializer.rb#13
- def initialize(path, transient = T.unsafe(nil)); end
-
- # source://yard//lib/yard/serializers/yardoc_serializer.rb#9
- def _dump(_depth); end
-
- # source://yard//lib/yard/serializers/yardoc_serializer.rb#11
- def hash; end
-
- # source://yard//lib/yard/serializers/yardoc_serializer.rb#18
- def method_missing(meth, *args, &block); end
-
- class << self
- # source://yard//lib/yard/serializers/yardoc_serializer.rb#10
- def _load(str); end
- end
-end
-
-# source://yard//lib/yard/serializers/yardoc_serializer.rb#28
-YARD::StubProxy::FILELEN = T.let(T.unsafe(nil), Integer)
-
-# The root path for YARD builtin templates
-#
-# source://yard//lib/yard.rb#10
-YARD::TEMPLATE_ROOT = T.let(T.unsafe(nil), String)
-
-# Namespace for Tag components
-#
-# source://yard//lib/yard/autoload.rb#248
-module YARD::Tags; end
-
-# Defines an attribute with a given name, using indented block data as the
-# attribute's docstring. If the type specifier is supplied with "r", "w", or
-# "rw", the attribute is made readonly, writeonly or readwrite respectively.
-# A readwrite attribute is the default, if no type is specified. The comment
-# containing this directive does not need to be attached to any source, but
-# if it is, that source code will be used as the method's source.
-#
-# To define a regular method, see {tag:!method}
-#
-# @example Defining a simple readonly attribute
-# # @!attribute [r] count
-# # @return [Fixnum] the size of the list
-# @example Defining a simple readwrite attribute
-# # @!attribute name
-# # @return [String] the name of the user
-# @note This directive should only be used if there is no explicit +attr_*+
-# declaration for the attribute in any source files (i.e., the attribute
-# is declared dynamically via meta-programming). In all other cases, add
-# documentation to the attribute declaration itself.
-# @note For backwards compatibility support, you do not need to indent
-# the attribute's docstring text. If an +@!attribute+ directive is seen with
-# no indented block, the entire docstring is used as the new attribute's
-# docstring text.
-# @see tag:!method
-# @since 0.7.0
-#
-# source://yard//lib/yard/tags/directives.rb#460
-class YARD::Tags::AttributeDirective < ::YARD::Tags::MethodDirective
- # @since 0.7.0
- #
- # source://yard//lib/yard/tags/directives.rb#461
- def after_parse; end
-
- protected
-
- # @since 0.7.0
- #
- # source://yard//lib/yard/tags/directives.rb#469
- def method_name; end
-
- # @since 0.7.0
- #
- # source://yard//lib/yard/tags/directives.rb#475
- def method_signature; end
-
- private
-
- # @since 0.7.0
- #
- # source://yard//lib/yard/tags/directives.rb#485
- def create_attribute_data(object); end
-
- # @return [Boolean]
- # @since 0.7.0
- #
- # source://yard//lib/yard/tags/directives.rb#515
- def readable?; end
-
- # @return [Boolean]
- # @since 0.7.0
- #
- # source://yard//lib/yard/tags/directives.rb#511
- def writable?; end
-end
-
-# source://yard//lib/yard/tags/default_factory.rb#4
-class YARD::Tags::DefaultFactory
- # Parses tag text and creates a new tag with descriptive text
- #
- # @param tag_name the name of the tag to parse
- # @param text [String] the raw tag text
- # @return [Tag] a tag object with the tag_name and text values filled
- #
- # source://yard//lib/yard/tags/default_factory.rb#13
- def parse_tag(tag_name, text); end
-
- # Parses tag text and creates a new tag with a key name and descriptive text
- #
- # @param tag_name the name of the tag to parse
- # @param text [String] the raw tag text
- # @return [Tag] a tag object with the tag_name, name and text values filled
- #
- # source://yard//lib/yard/tags/default_factory.rb#22
- def parse_tag_with_name(tag_name, text); end
-
- # source://yard//lib/yard/tags/default_factory.rb#89
- def parse_tag_with_options(tag_name, text); end
-
- # source://yard//lib/yard/tags/default_factory.rb#70
- def parse_tag_with_title_and_text(tag_name, text); end
-
- # Parses tag text and creates a new tag with formally declared types and
- # descriptive text
- #
- # @param tag_name the name of the tag to parse
- # @param text [String] the raw tag text
- # @raise [TagFormatError]
- # @return [Tag] a tag object with the tag_name, types and text values filled
- #
- # source://yard//lib/yard/tags/default_factory.rb#33
- def parse_tag_with_types(tag_name, text); end
-
- # Parses tag text and creates a new tag with formally declared types, a key
- # name and descriptive text
- #
- # @param tag_name the name of the tag to parse
- # @param text [String] the raw tag text
- # @return [Tag] a tag object with the tag_name, name, types and text values filled
- #
- # source://yard//lib/yard/tags/default_factory.rb#45
- def parse_tag_with_types_and_name(tag_name, text); end
-
- # Parses tag text and creates a new tag with formally declared types, a title
- # on the first line and descriptive text
- #
- # @param tag_name the name of the tag to parse
- # @param text [String] the raw tag text
- # @return [Tag] a tag object with the tag_name, name, types and text values filled
- #
- # source://yard//lib/yard/tags/default_factory.rb#57
- def parse_tag_with_types_and_title(tag_name, text); end
-
- # source://yard//lib/yard/tags/default_factory.rb#75
- def parse_tag_with_types_name_and_default(tag_name, text); end
-
- private
-
- # Extracts the name from raw tag text returning the name and remaining value
- #
- # @param text [String] the raw tag text
- # @return [Array] an array holding the name as the first element and the
- # value as the second element
- #
- # source://yard//lib/yard/tags/default_factory.rb#101
- def extract_name_from_text(text); end
-
- # @raise [TagFormatError]
- #
- # source://yard//lib/yard/tags/default_factory.rb#105
- def extract_title_and_desc_from_text(text); end
-
- # Parses a [], <>, {} or () block at the beginning of a line of text
- # into a list of comma delimited values.
- #
- # @example
- # obj.parse_types('[String, Array, nil]') # => [nil, ['String', 'Array', 'nil'], ""]
- # obj.parse_types('b A string') # => ['b', ['String'], 'A string']
- # @return [Array(String, Array, String)] the text before the type
- # list (or nil), followed by the type list parsed into an array of
- # strings, followed by the text following the type list.
- #
- # source://yard//lib/yard/tags/default_factory.rb#129
- def extract_types_and_name_from_text(text, opening_types = T.unsafe(nil), closing_types = T.unsafe(nil)); end
-
- # source://yard//lib/yard/tags/default_factory.rb#138
- def extract_types_and_name_from_text_unstripped(text, opening_types = T.unsafe(nil), closing_types = T.unsafe(nil)); end
-end
-
-# source://yard//lib/yard/tags/default_factory.rb#6
-YARD::Tags::DefaultFactory::TYPELIST_CLOSING_CHARS = T.let(T.unsafe(nil), String)
-
-# source://yard//lib/yard/tags/default_factory.rb#5
-YARD::Tags::DefaultFactory::TYPELIST_OPENING_CHARS = T.let(T.unsafe(nil), String)
-
-# source://yard//lib/yard/tags/default_tag.rb#4
-class YARD::Tags::DefaultTag < ::YARD::Tags::Tag
- # @return [DefaultTag] a new instance of DefaultTag
- #
- # source://yard//lib/yard/tags/default_tag.rb#7
- def initialize(tag_name, text, types = T.unsafe(nil), name = T.unsafe(nil), defaults = T.unsafe(nil)); end
-
- # Returns the value of attribute defaults.
- #
- # source://yard//lib/yard/tags/default_tag.rb#5
- def defaults; end
-end
-
-# The base directive class. Subclass this class to create a custom
-# directive, registering it with {Library.define_directive}. Directive
-# classes are executed via the {#call} method, which perform all directive
-# processing on the object.
-#
-# If processing occurs within a handler, the {#handler} attribute is
-# available to access more information about parsing context and state.
-# Handlers are only available when parsing from {Parser::SourceParser},
-# not when parsing directly from {DocstringParser}. If the docstring is
-# attached to an object declaration, {#object} will be set and available
-# to modify the generated code object directly. Note that both of these
-# attributes may be nil, and directives should test their existence
-# before attempting to use them.
-#
-# @abstract Subclasses should implement {#call}.
-# @see Library.define_directive
-# @since 0.8.0
-#
-# source://yard//lib/yard/tags/directives.rb#22
-class YARD::Tags::Directive
- # @param parser [DocstringParser] the docstring parser object
- # @param tag [Tag] the meta-data tag containing all input to the docstring
- # @return [Directive] a new instance of Directive
- # @since 0.8.0
- #
- # source://yard//lib/yard/tags/directives.rb#54
- def initialize(tag, parser); end
-
- # Called after parsing all directives and tags in the docstring. Used
- # to perform any cleanup after all directives perform their main task.
- #
- # @return [void]
- # @since 0.8.0
- #
- # source://yard//lib/yard/tags/directives.rb#73
- def after_parse; end
-
- # Called when processing the directive. Subclasses should implement
- # this method to perform all functionality of the directive.
- #
- # @abstract implement this method to perform all data processing for
- # the directive.
- # @raise [NotImplementedError]
- # @return [void]
- # @since 0.8.0
- #
- # source://yard//lib/yard/tags/directives.rb#68
- def call; end
-
- # Set this field to replace the directive definition inside of a docstring
- # with arbitrary text. For instance, the {MacroDirective} uses this field
- # to expand its macro data in place of the call to a +@!macro+.
- #
- # @return [String] the text to expand in the original docstring in place
- # of this directive definition.
- # @return [nil] if no expansion should take place for this directive
- # @since 0.8.0
- #
- # source://yard//lib/yard/tags/directives.rb#33
- def expanded_text; end
-
- # Set this field to replace the directive definition inside of a docstring
- # with arbitrary text. For instance, the {MacroDirective} uses this field
- # to expand its macro data in place of the call to a +@!macro+.
- #
- # @return [String] the text to expand in the original docstring in place
- # of this directive definition.
- # @return [nil] if no expansion should take place for this directive
- # @since 0.8.0
- #
- # source://yard//lib/yard/tags/directives.rb#33
- def expanded_text=(_arg0); end
-
- # @return [Handlers::Base, nil] the handler object the docstring parser
- # might be attached to. May be nil. Only available when parsing
- # through {Parser::SourceParser}.
- # @since 0.8.0
- #
- # source://yard//lib/yard/tags/directives.rb#48
- def handler; end
-
- # @return [CodeObjects::Base, nil] the object the parent docstring is
- # attached to. May be nil.
- # @since 0.8.0
- #
- # source://yard//lib/yard/tags/directives.rb#42
- def object; end
-
- # @return [DocstringParser] the parser that is parsing all tag
- # information out of the docstring
- # @since 0.8.0
- #
- # source://yard//lib/yard/tags/directives.rb#37
- def parser=(_arg0); end
-
- # @return [Tag] the meta-data tag containing data input to the directive
- # @since 0.8.0
- #
- # source://yard//lib/yard/tags/directives.rb#24
- def tag; end
-
- # @return [Tag] the meta-data tag containing data input to the directive
- # @since 0.8.0
- #
- # source://yard//lib/yard/tags/directives.rb#24
- def tag=(_arg0); end
-
- protected
-
- # @return [Boolean]
- # @since 0.8.0
- #
- # source://yard//lib/yard/tags/directives.rb#79
- def inside_directive?; end
-
- # @return [DocstringParser] the parser that is parsing all tag
- # information out of the docstring
- # @since 0.8.0
- #
- # source://yard//lib/yard/tags/directives.rb#37
- def parser; end
-end
-
-# Ends a group listing definition. Group definition automatically end
-# when class or module blocks are closed, and defining a new group overrides
-# the last group definition, but occasionally you need to end the current
-# group to return to the default listing. Use {tag:!group} to begin a
-# group listing.
-#
-# @example
-# class Controller
-# # @!group Callbacks
-#
-# def before_filter; end
-# def after_filter; end
-#
-# # @!endgroup
-#
-# def index; end
-# end
-# @see tag:!group
-# @since 0.6.0
-#
-# source://yard//lib/yard/tags/directives.rb#104
-class YARD::Tags::EndGroupDirective < ::YARD::Tags::Directive
- # @since 0.6.0
- #
- # source://yard//lib/yard/tags/directives.rb#105
- def call; end
-end
-
-# Defines a group listing. All methods (and attributes) seen after this
-# directive are placed into a group with the given description as the
-# group name. The group listing is used by templates to organize methods
-# and attributes into respective logical groups. To end a group listing
-# use {tag:!endgroup}.
-#
-# @example
-# # @!group Callbacks
-#
-# def before_filter; end
-# def after_filter; end
-# @note A group definition only applies to the scope it is defined in.
-# If a new class or module is opened after the directive, this directive
-# will not apply to methods in that class or module.
-# @see tag:!endgroup
-# @since 0.6.0
-#
-# source://yard//lib/yard/tags/directives.rb#127
-class YARD::Tags::GroupDirective < ::YARD::Tags::Directive
- # @since 0.6.0
- #
- # source://yard//lib/yard/tags/directives.rb#128
- def call; end
-end
-
-# Keeps track of all the registered meta-data tags and directives.
-# Also allows for defining of custom tags and customizing the tag parsing
-# syntax.
-#
-# == Defining Custom Meta-Data Tags
-#
-# To define a custom tag, use {define_tag}. You should pass the tag
-# name and the factory method to use when creating the tag. If you do not
-# provide a factory method to use, it will default to {DefaultFactory#parse_tag}
-#
-# You can also define tag objects manually by simply implementing a "tagname_tag"
-# method that returns a {Tag} object, but they will not take advantage of tag factory
-# parsing:
-#
-# def mytag_tag(text)
-# Tag.new(:mytag, text)
-# end
-#
-# == Defining Custom Directives
-#
-# Directives can be defined by calling the {define_directive} method, taking
-# the directive name, an optional tag factory parser method (to parse the
-# data in the directive into a temporary {Tag} object) and a {Directive} subclass
-# that performs the directive processing. For more information on creating a
-# Directive subclass, see the {Directive} class documentation.
-#
-# Similar to tags, Directives can also be defined manually, in this case using
-# the method name "mydirective_directive" and returning a new {Directive} object:
-#
-# def mydirective_directive(tag, parser)
-# MyDirective.new(tag, parser)
-# end
-#
-# == Namespaced Tags
-#
-# In YARD 0.8.0+, tags can be namespaced using the '.' character. It is recommended
-# to namespace project specific tags, like +@yard.tag_name+, so that tags do not
-# collide with other plugins or new built-in tags.
-#
-# == Adding/Changing the Tag Syntax
-#
-# If you have specialized tag parsing needs you can substitute the {#factory}
-# object with your own by setting {Library.default_factory= Library.default_factory}
-# to a new class with its own parsing methods before running YARD. This is useful
-# if you want to change the syntax of existing tags (@see, @since, etc.)
-#
-# @example Defining a custom directive
-# define_directive :method, :with_title_and_text, MethodDirective
-# @example Defining a custom tag
-# define_tag "Parameter", :param, :with_types_and_name
-# define_tag "Author", :author
-# @see DefaultFactory
-# @see Directive
-# @see define_directive
-# @see define_tag
-#
-# source://yard//lib/yard/tags/library.rb#59
-class YARD::Tags::Library
- # @return [Library] a new instance of Library
- #
- # source://yard//lib/yard/tags/library.rb#260
- def initialize(factory = T.unsafe(nil)); end
-
- # Marks a class/module/method as abstract with optional
- # implementor information.
- #
- # @example
- # # @abstract Subclass and override {#run} to implement
- # # a custom Threadable class.
- # class Runnable
- # def run; raise NotImplementedError end
- # end
- #
- # source://yard//lib/yard/tags/library.rb#166
- def abstract_tag(text); end
-
- # Declares the API that the object belongs to. Does not display in
- # output, but useful for performing queries (+yardoc --query+). Any text is
- # allowable in this tag, and there are no predefined values.
- #
- # @example
- # class Post
- # # @api private
- # def reset_table!; table.flush end
- # end
- # @note This tag is *transitive*. If it is applied on a
- # namespace (module or class), it will immediately be
- # applied to all children objects of that namespace unless
- # it is redefined on the child object.
- # @note The special name +@api private+ does display a notice in
- # documentation if it is listed, letting users know that the
- # method is not to be used by external components.
- #
- # source://yard//lib/yard/tags/library.rb#166
- def api_tag(text); end
-
- # Declares a readonly attribute on a Struct or class.
- #
- # @deprecated Use the more powerful {tag:!attribute} directive instead.
- # @example
- # # @attr_reader [String] name the name of the structure
- # # @attr_reader [Fixnum] size the size of the structure
- # class MyStruct < Struct; end
- # @note This attribute is only applicable on class docstrings
- #
- # source://yard//lib/yard/tags/library.rb#166
- def attr_reader_tag(text); end
-
- # Declares a readwrite attribute on a Struct or class.
- #
- # @deprecated Use the more powerful {tag:!attribute} directive instead.
- # @example
- # # @attr [String] name the name of the structure
- # # @attr [Fixnum] size the size of the structure
- # class MyStruct < Struct; end
- # @note This attribute is only applicable on class docstrings
- #
- # source://yard//lib/yard/tags/library.rb#166
- def attr_tag(text); end
-
- # Declares a writeonly attribute on a Struct or class.
- #
- # @deprecated Use the more powerful {tag:!attribute} directive instead.
- # @example
- # # @attr_reader [String] name the name of the structure
- # # @attr_reader [Fixnum] size the size of the structure
- # class MyStruct < Struct; end
- # @note This attribute is only applicable on class docstrings
- #
- # source://yard//lib/yard/tags/library.rb#166
- def attr_writer_tag(text); end
-
- # source://yard//lib/yard/tags/library.rb#202
- def attribute_directive(tag, parser); end
-
- # List the author or authors of a class, module, or method.
- #
- # @example
- # # @author Foo Bar
- # class MyClass; end
- #
- # source://yard//lib/yard/tags/library.rb#166
- def author_tag(text); end
-
- # Marks a method/class as deprecated with an optional description.
- # The description should be used to inform users of the recommended
- # migration path, and/or any useful information about why the object
- # was marked as deprecated.
- #
- # @example Deprecate a method with a replacement API
- # # @deprecated Use {#bar} instead.
- # def foo; end
- # @example Deprecate a method with no replacement
- # class Thread
- # # @deprecated Exiting a thread in this way is not reliable and
- # # can cause a program crash.
- # def kill; end
- # end
- #
- # source://yard//lib/yard/tags/library.rb#166
- def deprecated_tag(text); end
-
- # Creates a new directive with tag information and a docstring parser
- # object.
- #
- # @param parser [DocstringParser] the parser object parsing the docstring
- # @param tag_buf [String] the tag data
- # @param tag_name [String] the name of the tag
- # @return [Directive] the newly created directive
- #
- # source://yard//lib/yard/tags/library.rb#290
- def directive_create(tag_name, tag_buf, parser); end
-
- # source://yard//lib/yard/tags/library.rb#202
- def endgroup_directive(tag, parser); end
-
- # Show an example snippet of code for an object. The first line
- # is an optional title.
- #
- # @example
- # # @example Reverse a String
- # # "mystring".reverse #=> "gnirtsym"
- # def reverse; end
- #
- # source://yard//lib/yard/tags/library.rb#166
- def example_tag(text); end
-
- # A factory class to handle parsing of tags, defaults to {default_factory}
- #
- # source://yard//lib/yard/tags/library.rb#258
- def factory; end
-
- # A factory class to handle parsing of tags, defaults to {default_factory}
- #
- # source://yard//lib/yard/tags/library.rb#258
- def factory=(_arg0); end
-
- # source://yard//lib/yard/tags/library.rb#202
- def group_directive(tag, parser); end
-
- # @param tag_name [#to_s] the name of the tag to look for
- # @return [Boolean] whether a directive by the given name is registered in
- # the library.
- #
- # source://yard//lib/yard/tags/library.rb#280
- def has_directive?(tag_name); end
-
- # @param tag_name [#to_s] the name of the tag to look for
- # @return [Boolean] whether a tag by the given name is registered in
- # the library.
- #
- # source://yard//lib/yard/tags/library.rb#267
- def has_tag?(tag_name); end
-
- # source://yard//lib/yard/tags/library.rb#202
- def macro_directive(tag, parser); end
-
- # source://yard//lib/yard/tags/library.rb#202
- def method_directive(tag, parser); end
-
- # Adds an emphasized note at the top of the docstring for the object
- #
- # @example
- # # @note This method should only be used in outer space.
- # def eject; end
- # @see tag:todo
- #
- # source://yard//lib/yard/tags/library.rb#166
- def note_tag(text); end
-
- # Describe an options hash in a method. The tag takes the
- # name of the options parameter first, followed by optional types,
- # the option key name, a default value for the key and a
- # description of the option. The default value should be placed within
- # parentheses and is optional (can be omitted).
- #
- # Note that a +@param+ tag need not be defined for the options
- # hash itself, though it is useful to do so for completeness.
- #
- # @example
- # # @param [Hash] opts the options to create a message with.
- # # @option opts [String] :subject The subject
- # # @option opts [String] :from ('nobody') From address
- # # @option opts [String] :to Recipient email
- # # @option opts [String] :body ('') The email's body
- # def send_email(opts = {}) end
- # @note For keyword parameters, use +@param+, not +@option+.
- #
- # source://yard//lib/yard/tags/library.rb#166
- def option_tag(text); end
-
- # Describe that your method can be used in various
- # contexts with various parameters or return types. The first
- # line should declare the new method signature, and the following
- # indented tag data will be a new documentation string with its
- # own tags adding metadata for such an overload.
- #
- # @example
- # # @overload set(key, value)
- # # Sets a value on key
- # # @param key [Symbol] describe key param
- # # @param value [Object] describe value param
- # # @overload set(value)
- # # Sets a value on the default key +:foo+
- # # @param value [Object] describe value param
- # def set(*args) end
- #
- # source://yard//lib/yard/tags/library.rb#160
- def overload_tag(text); end
-
- # Documents a single method parameter (either regular or keyword) with a given name, type
- # and optional description.
- #
- # @example
- # # @param url [String] the URL of the page to download
- # # @param directory [String] the name of the directory to save to
- # def load_page(url, directory: 'pages') end
- #
- # source://yard//lib/yard/tags/library.rb#166
- def param_tag(text); end
-
- # source://yard//lib/yard/tags/library.rb#202
- def parse_directive(tag, parser); end
-
- # Declares that the _logical_ visibility of an object is private.
- # In other words, it specifies that this method should be marked
- # private but cannot due to Ruby's visibility restrictions. This
- # exists for classes, modules and constants that do not obey Ruby's
- # visibility rules. For instance, an inner class might be considered
- # "private", though Ruby would make no such distinction.
- #
- # This tag is meant to be used in conjunction with the +--no-private+
- # command-line option, and is required to actually remove these objects
- # from documentation output. See {file:README.md} for more information on
- # switches.
- #
- # If you simply want to set the API visibility of a method, you should
- # look at the {tag:api} tag instead.
- #
- # @example
- # # @private
- # class InteralImplementation; end
- # @note This method is not recommended for hiding undocumented or
- # "unimportant" methods. This tag should only be used to mark objects
- # private when Ruby visibility rules cannot do so. In Ruby 1.9.3, you
- # can use +private_constant+ to declare constants (like classes or
- # modules) as private, and should be used instead of +@private+.
- # @note This tag is *transitive*. If it is applied on a
- # namespace (module or class), it will immediately be
- # applied to all children objects of that namespace unless
- # it is redefined on the child object.
- # @see tag:api
- #
- # source://yard//lib/yard/tags/library.rb#166
- def private_tag(text); end
-
- # Describes that a method may raise a given exception, with
- # an optional description of what it may mean.
- #
- # @example
- # # @raise [AccountBalanceError] if the account does not have
- # # sufficient funds to perform the transaction
- # def withdraw(amount) end
- #
- # source://yard//lib/yard/tags/library.rb#166
- def raise_tag(text); end
-
- # Describes the return value (and type or types) of a method.
- # You can list multiple return tags for a method in the case
- # where a method has distinct return cases. In this case, each
- # case should begin with "if ...".
- #
- # @example A method returns an Array or a single object
- # # @return [String] if a single object was returned
- # # from the database.
- # # @return [Array] if multiple objects were
- # # returned.
- # def find(query) end
- # @example A regular return value
- # # @return [Fixnum] the size of the file
- # def size; @file.size end
- #
- # source://yard//lib/yard/tags/library.rb#166
- def return_tag(text); end
-
- # Sets the scope of a DSL method. Only applicable to DSL method
- # calls. Acceptable values are 'class' or 'instance'
- #
- # source://yard//lib/yard/tags/library.rb#202
- def scope_directive(tag, parser); end
-
- # "See Also" references for an object. Accepts URLs or
- # other code objects with an optional description at the end.
- # Note that the URL or object will be automatically linked by
- # YARD and does not need to be formatted with markup.
- #
- # @example
- # # Synchronizes system time using NTP.
- # # @see http://ntp.org/documentation.html NTP Documentation
- # # @see NTPHelperMethods
- # class NTPUpdater; end
- #
- # source://yard//lib/yard/tags/library.rb#166
- def see_tag(text); end
-
- # Lists the version that the object was first added.
- #
- # @example
- # # @since 1.2.4
- # def clear_routes; end
- # @note This tag is *transitive*. If it is applied on a
- # namespace (module or class), it will immediately be
- # applied to all children objects of that namespace unless
- # it is redefined on the child object.
- #
- # source://yard//lib/yard/tags/library.rb#166
- def since_tag(text); end
-
- # Creates a new {Tag} object with a given tag name and data
- #
- # @return [Tag] the newly created tag object
- #
- # source://yard//lib/yard/tags/library.rb#273
- def tag_create(tag_name, tag_buf); end
-
- # Marks a TODO note in the object being documented.
- # For reference, objects with TODO items can be enumerated
- # from the command line with a simple command:
- #
- # !!!sh
- # mocker$ yard list --query '@todo'
- # lib/mocker/mocker.rb:15: Mocker
- # lib/mocker/report/html.rb:5: Mocker::Report::Html
- #
- # YARD can also be used to enumerate the TODO items from
- # a short script:
- #
- # !!!ruby
- # require 'yard'
- # YARD::Registry.load!.all.each do |o|
- # puts o.tag(:todo).text if o.tag(:todo)
- # end
- #
- # @example
- # # @todo Add support for Jabberwocky service.
- # # There is an open source Jabberwocky library available
- # # at http://jbrwcky.org that can be easily integrated.
- # class Wonderlander; end
- # @see tag:note
- #
- # source://yard//lib/yard/tags/library.rb#166
- def todo_tag(text); end
-
- # Lists the version of a class, module or method. This is
- # similar to a library version, but at finer granularity.
- # In some cases, version of specific modules, classes, methods
- # or generalized components might change independently between
- # releases. A version tag is used to infer the API compatibility
- # of a specific object.
- #
- # @example
- # # The public REST API for http://jbrwcky.org
- # # @version 2.0
- # class JabberwockyAPI; end
- #
- # source://yard//lib/yard/tags/library.rb#166
- def version_tag(text); end
-
- # Sets the visibility of a DSL method. Only applicable to
- # DSL method calls. Acceptable values are public, protected, or private.
- #
- # source://yard//lib/yard/tags/library.rb#202
- def visibility_directive(tag, parser); end
-
- # Describes what a method might yield to a given block.
- # The types specifier list should not list types, but names
- # of the parameters yielded to the block. If you define
- # parameters with +@yieldparam+, you do not need to define
- # the parameters in the type specification of +@yield+ as
- # well.
- #
- # @example
- # # For a block {|a,b,c| ... }
- # # @yield [a, b, c] Gives 3 random numbers to the block
- # def provide3values(&block) yield(42, 42, 42) end
- # @see tag:yieldparam
- # @see tag:yieldreturn
- #
- # source://yard//lib/yard/tags/library.rb#166
- def yield_tag(text); end
-
- # Defines a parameter yielded by a block. If you define the
- # parameters with +@yieldparam+, you do not need to define
- # them via +@yield+ as well.
- #
- # @example
- # # @yieldparam [String] name the name that is yielded
- # def with_name(name) yield(name) end
- #
- # source://yard//lib/yard/tags/library.rb#166
- def yieldparam_tag(text); end
-
- # Documents the value and type that the block is expected
- # to return to the method.
- #
- # @example
- # # @yieldreturn [Fixnum] the number to add 5 to.
- # def add5_block(&block) 5 + yield end
- # @see tag:return
- #
- # source://yard//lib/yard/tags/library.rb#166
- def yieldreturn_tag(text); end
-
- private
-
- # @return [Directive]
- #
- # source://yard//lib/yard/tags/library.rb#244
- def directive_call(tag, parser); end
-
- # source://yard//lib/yard/tags/library.rb#233
- def send_to_factory(tag_name, meth, text); end
-
- class << self
- # Replace the factory object responsible for parsing tags by setting
- # this to an object (or class) that responds to +parse_TAGNAME+ methods
- # where +TAGNAME+ is the name of the tag.
- #
- # You should set this value before performing any source parsing with
- # YARD, otherwise your factory class will not be used.
- #
- # @example
- # YARD::Tags::Library.default_factory = MyFactory
- # @see DefaultFactory
- #
- # source://yard//lib/yard/tags/library.rb#83
- def default_factory; end
-
- # Replace the factory object responsible for parsing tags by setting
- # this to an object (or class) that responds to +parse_TAGNAME+ methods
- # where +TAGNAME+ is the name of the tag.
- #
- # You should set this value before performing any source parsing with
- # YARD, otherwise your factory class will not be used.
- #
- # @example
- # YARD::Tags::Library.default_factory = MyFactory
- # @see DefaultFactory
- #
- # source://yard//lib/yard/tags/library.rb#87
- def default_factory=(factory); end
-
- # @overload define_directive
- #
- # source://yard//lib/yard/tags/library.rb#196
- def define_directive(tag, tag_meth = T.unsafe(nil), directive_class = T.unsafe(nil)); end
-
- # Convenience method to define a new tag using one of {Tag}'s factory methods, or the
- # regular {DefaultFactory#parse_tag} factory method if none is supplied.
- #
- # @param label [#to_s] the label used when displaying the tag in templates
- # @param meth [#to_s, Class] the {Tag} factory method to call when
- # creating the tag or the name of the class to directly create a tag for
- # @param tag [#to_s] the tag name to create
- #
- # source://yard//lib/yard/tags/library.rb#157
- def define_tag(label, tag, meth = T.unsafe(nil)); end
-
- # source://yard//lib/yard/tags/library.rb#220
- def directive_method_name(tag_name); end
-
- # Returns the factory method used to parse the tag text for a specific tag
- #
- # @param tag [Symbol] the tag name
- # @return [Symbol] the factory method name for the tag
- # @return [Class, Symbol] the Tag class to use to parse the tag
- # or the method to call on the factory class
- # @return [nil] if the tag is freeform text
- # @since 0.6.0
- #
- # source://yard//lib/yard/tags/library.rb#99
- def factory_method_for(tag); end
-
- # Returns the factory method used to parse the tag text for a specific
- # directive
- #
- # @param directive [Symbol] the directive name
- # @return [Symbol] the factory method name for the tag
- # @return [Class, Symbol] the Tag class to use to parse the tag or
- # the methods to call on the factory class
- # @return [nil] if the tag is freeform text
- # @since 0.8.0
- #
- # source://yard//lib/yard/tags/library.rb#112
- def factory_method_for_directive(directive); end
-
- # @return [Library] the main Library instance object.
- #
- # source://yard//lib/yard/tags/library.rb#67
- def instance; end
-
- # @return [SymbolHash{Symbol=>String}] the map of tag names and their
- # respective display labels.
- #
- # source://yard//lib/yard/tags/library.rb#63
- def labels; end
-
- # Sorts the labels lexically by their label name, often used when displaying
- # the tags.
- #
- # @return [Array, String] the sorted labels as an array of the tag name and label
- #
- # source://yard//lib/yard/tags/library.rb#142
- def sorted_labels; end
-
- # source://yard//lib/yard/tags/library.rb#216
- def tag_method_name(tag_name); end
-
- # Sets the list of tags that should apply to any children inside the
- # namespace they are defined in. For instance, a "@since" tag should
- # apply to all methods inside a module it is defined in. Transitive
- # tags can be overridden by directly defining a tag on the child object.
- #
- # @return [Array] a list of transitive tags
- # @since 0.6.0
- #
- # source://yard//lib/yard/tags/library.rb#136
- def transitive_tags; end
-
- # Sets the list of tags that should apply to any children inside the
- # namespace they are defined in. For instance, a "@since" tag should
- # apply to all methods inside a module it is defined in. Transitive
- # tags can be overridden by directly defining a tag on the child object.
- #
- # @return [Array] a list of transitive tags
- # @since 0.6.0
- #
- # source://yard//lib/yard/tags/library.rb#136
- def transitive_tags=(_arg0); end
-
- # Sets the list of tags to display when rendering templates. The order of
- # tags in the list is also significant, as it represents the order that
- # tags are displayed in templates.
- #
- # You can use the {Array#place} to insert new tags to be displayed in
- # the templates at specific positions:
- #
- # Library.visible_tags.place(:mytag).before(:return)
- #
- # @return [Array] a list of ordered tags
- # @since 0.6.0
- #
- # source://yard//lib/yard/tags/library.rb#127
- def visible_tags; end
-
- # Sets the list of tags to display when rendering templates. The order of
- # tags in the list is also significant, as it represents the order that
- # tags are displayed in templates.
- #
- # You can use the {Array#place} to insert new tags to be displayed in
- # the templates at specific positions:
- #
- # Library.visible_tags.place(:mytag).before(:return)
- #
- # @return [Array] a list of ordered tags
- # @since 0.6.0
- #
- # source://yard//lib/yard/tags/library.rb#127
- def visible_tags=(_arg0); end
-
- private
-
- # source://yard//lib/yard/tags/library.rb#226
- def tag_or_directive_method_name(tag_name, type = T.unsafe(nil)); end
- end
-end
-
-# Defines a block of text to be expanded whenever the macro is called by name
-# in subsequent docstrings. The macro data can be any arbitrary text data, be
-# it regular documentation, meta-data tags or directives.
-#
-# == Defining a Macro
-#
-# A macro must first be defined in order to be used. Note that a macro is also
-# expanded upon definition if it defined on an object (the docstring of a
-# method, class, module or constant object as opposed to a free standing
-# comment). To define a macro, use the "new" or "attach" identifier in the
-# types specifier list. A macro will also automatically be created if an
-# indented macro data block is given, so the keywords are not strictly needed.
-#
-# === Anonymous Macros
-#
-# In addition to standard named macros, macros can be defined anonymously if
-# no name is given. In this case, they can not be re-used in future docstrings,
-# but they will expand in the first definition. This is useful when needing
-# to take advantage of the macro expansion variables (described below).
-#
-# == Using a Macro
-#
-# To re-use a macro in another docstring after it is defined, simply use
-# @!macro the_name with no indented block of macro data. The resulting
-# data will be expanded in place.
-#
-# == Attaching a Macro to a DSL Method
-#
-# Macros can be defined to auto-expand on DSL-style class method calls. To
-# define a macro to be auto expanded in this way, use the "attach" keyword
-# in the type specifier list ("new" is implied).
-#
-# Attached macros can also be attached directly on the class method declaration
-# that provides the DSL method to its subclasses. The syntax in either case
-# is the same.
-#
-# == Macro Expansion Variables
-#
-# In the case of using macros on DSL-style method calls, a number of expansion
-# variables can be used for interpolation inside of the macro data. The variables,
-# similar in syntax to Ruby's global variables, are as follows:
-#
-# * $0 - the method name being called
-# * $1, $2, $3, ... - the Nth argument in the method call
-# * $& - the full source line
-#
-# The following example shows what the expansion variables might hold for a given
-# DSL method call:
-#
-# property :foo, :a, :b, :c, String
-# # $0 => "property"
-# # $1 => "foo"
-# # $2 => "a"
-# # $& => "property :foo, :a, :b, :c, String"
-#
-# === Ranges
-#
-# Ranges are also acceptable with the syntax ${N-M}. Negative values
-# on either N or M are valid, and refer to indexes from the end of the list.
-# Consider a DSL method that creates a method using the first argument with
-# argument names following, ending with the return type of the method. This
-# could be documented as:
-#
-# # @!macro dsl_method
-# # @!method $1(${2--2})
-# # @return [${-1}] the return value of $0
-# create_method_with_args :foo, :a, :b, :c, String
-#
-# As described, the method is using the signature foo(a, b, c) and the return
-# type from the last argument, +String+. When using ranges, tokens are joined
-# with commas. Note that this includes using $0:
-#
-# !!!plain
-# $0-1 # => Interpolates to "create_method_with_args, foo"
-#
-# If you want to separate them with spaces, use $1 $2 $3 $4 .... Note that
-# if the token cannot be expanded, it will return the empty string (not an error),
-# so it would be safe to list $1 $2 ... $10, for example.
-#
-# === Escaping Interpolation
-#
-# Interpolation can be escaped by prefixing the +$+ with +\\\+, like so:
-#
-# # @!macro foo
-# # I have \$2.00 USD.
-#
-# @example Attaching a macro directly to a DSL method
-# class Post < Resource
-# # @!macro [attach] property
-# # @return [$2] the $1 property
-# property :title, String
-#
-# # Macro will expand on this definition too
-# property :view_count, Integer
-# end
-# @example Attaching a macro to a class method (for DSL usage)
-# class Resource
-# # Defines a new property
-# # @param [String] name the property name
-# # @param [Class] type the property's type
-# # @!macro [attach] property
-# # @return [$2] the $1 property
-# def self.property(name, type) end
-# end
-#
-# class Post < Resource
-# property :title, String
-# property :view_count, Integer
-# end
-# @example Defining a simple macro
-# # @!macro [new] returnself
-# # @return [self] returns itself
-# @example Using a simple macro in multiple docstrings
-# # Documentation for map
-# # ...
-# # @macro returnself
-# def map; end
-#
-# # Documentation for filter
-# # ...
-# # @macro returnself
-# def filter; end
-# @since 0.7.0
-#
-# source://yard//lib/yard/tags/directives.rb#257
-class YARD::Tags::MacroDirective < ::YARD::Tags::Directive
- # @raise [TagFormatError]
- # @since 0.7.0
- #
- # source://yard//lib/yard/tags/directives.rb#258
- def call; end
-
- private
-
- # @return [Boolean]
- # @since 0.7.0
- #
- # source://yard//lib/yard/tags/directives.rb#287
- def anonymous?; end
-
- # @return [Boolean]
- # @since 0.7.0
- #
- # source://yard//lib/yard/tags/directives.rb#276
- def attach?; end
-
- # @return [Boolean]
- # @since 0.7.0
- #
- # source://yard//lib/yard/tags/directives.rb#282
- def class_method?; end
-
- # @since 0.7.0
- #
- # source://yard//lib/yard/tags/directives.rb#291
- def expand(macro_data); end
-
- # @since 0.7.0
- #
- # source://yard//lib/yard/tags/directives.rb#307
- def find_or_create; end
-
- # @return [Boolean]
- # @since 0.7.0
- #
- # source://yard//lib/yard/tags/directives.rb#271
- def new?; end
-
- # @since 0.7.0
- #
- # source://yard//lib/yard/tags/directives.rb#331
- def warn; end
-end
-
-# Defines a method object with a given method signature, using indented
-# block data as the method's docstring. The signature is similar to the
-# {tag:overload} tag. The comment containing this directive does not need
-# to be attached to any source, but if it is, that source code will be
-# used as the method's source.
-#
-# To define an attribute method, see {tag:!attribute}
-#
-# @example Attaching multiple methods to the same source
-# # @!method method1
-# # @!method method2
-# create_methods :method1, :method2
-# @example Defining a simple method
-# # @!method quit(username, message = "Quit")
-# # Sends a quit message to the server for a +username+.
-# # @param [String] username the username to quit
-# # @param [String] message the quit message
-# quit_message_method
-# @note This directive should only be used if there is no explicit
-# declaration for the method in any source files (i.e., the method
-# is declared dynamically via meta-programming). In all other cases, add
-# documentation to the method definition itself.
-# @note For backwards compatibility support, you do not need to indent
-# the method's docstring text. If a +@!method+ directive is seen with
-# no indented block, the entire docstring is used as the new method's
-# docstring text.
-# @see tag:!attribute
-# @since 0.7.0
-#
-# source://yard//lib/yard/tags/directives.rb#367
-class YARD::Tags::MethodDirective < ::YARD::Tags::Directive
- # @since 0.7.0
- #
- # source://yard//lib/yard/tags/directives.rb#372
- def after_parse; end
-
- # @since 0.7.0
- #
- # source://yard//lib/yard/tags/directives.rb#370
- def call; end
-
- protected
-
- # @since 0.7.0
- #
- # source://yard//lib/yard/tags/directives.rb#412
- def create_object; end
-
- # @since 0.7.0
- #
- # source://yard//lib/yard/tags/directives.rb#380
- def method_name; end
-
- # @since 0.7.0
- #
- # source://yard//lib/yard/tags/directives.rb#389
- def method_signature; end
-
- # @since 0.7.0
- #
- # source://yard//lib/yard/tags/directives.rb#393
- def sanitized_tag_signature; end
-
- # @since 0.7.0
- #
- # source://yard//lib/yard/tags/directives.rb#402
- def use_indented_text; end
-end
-
-# @since 0.7.0
-#
-# source://yard//lib/yard/tags/directives.rb#368
-YARD::Tags::MethodDirective::SCOPE_MATCH = T.let(T.unsafe(nil), Regexp)
-
-# source://yard//lib/yard/tags/option_tag.rb#4
-class YARD::Tags::OptionTag < ::YARD::Tags::Tag
- # @return [OptionTag] a new instance of OptionTag
- #
- # source://yard//lib/yard/tags/option_tag.rb#7
- def initialize(tag_name, name, pair); end
-
- # Returns the value of attribute pair.
- #
- # source://yard//lib/yard/tags/option_tag.rb#5
- def pair; end
-
- # Sets the attribute pair
- #
- # @param value the value to set the attribute pair to.
- #
- # source://yard//lib/yard/tags/option_tag.rb#5
- def pair=(_arg0); end
-end
-
-# source://yard//lib/yard/tags/overload_tag.rb#4
-class YARD::Tags::OverloadTag < ::YARD::Tags::Tag
- # @return [OverloadTag] a new instance of OverloadTag
- #
- # source://yard//lib/yard/tags/overload_tag.rb#7
- def initialize(tag_name, text); end
-
- # Returns the value of attribute docstring.
- #
- # source://yard//lib/yard/tags/overload_tag.rb#5
- def docstring; end
-
- # @return [Boolean]
- #
- # source://yard//lib/yard/tags/overload_tag.rb#15
- def has_tag?(name); end
-
- # @return [Boolean]
- #
- # source://yard//lib/yard/tags/overload_tag.rb#36
- def is_a?(other); end
-
- # @return [Boolean]
- #
- # source://yard//lib/yard/tags/overload_tag.rb#39
- def kind_of?(other); end
-
- # source://yard//lib/yard/tags/overload_tag.rb#28
- def method_missing(*args, &block); end
-
- # source://yard//lib/yard/tags/overload_tag.rb#23
- def name(prefix = T.unsafe(nil)); end
-
- # source://yard//lib/yard/tags/overload_tag.rb#17
- def object=(value); end
-
- # Returns the value of attribute parameters.
- #
- # source://yard//lib/yard/tags/overload_tag.rb#5
- def parameters; end
-
- # Returns the value of attribute signature.
- #
- # source://yard//lib/yard/tags/overload_tag.rb#5
- def signature; end
-
- # source://yard//lib/yard/tags/overload_tag.rb#13
- def tag(name); end
-
- # source://yard//lib/yard/tags/overload_tag.rb#14
- def tags(name = T.unsafe(nil)); end
-
- # source://yard//lib/yard/tags/overload_tag.rb#32
- def type; end
-
- private
-
- # source://yard//lib/yard/tags/overload_tag.rb#53
- def parse_signature; end
-
- # source://yard//lib/yard/tags/overload_tag.rb#43
- def parse_tag(text); end
-end
-
-# Parses a block of code as if it were present in the source file at that
-# location. This directive is useful if a class has dynamic meta-programmed
-# behaviour that cannot be recognized by YARD.
-#
-# You can specify the language of the code block using the types
-# specification list. By default, the code language is "ruby".
-#
-# @example Declaring a method as an attribute
-# # This should really be an attribute
-# # @!parse attr_reader :foo
-# def object; @parent.object end
-# @example Documenting dynamic module inclusion
-# class User
-# # includes "UserMixin" and extends "UserMixin::ClassMethods"
-# # using the UserMixin.included callback.
-# # @!parse include UserMixin
-# # @!parse extend UserMixin::ClassMethods
-# end
-# @example Parsing C code
-# # @!parse [c]
-# # void Init_Foo() {
-# # rb_define_method(rb_cFoo, "method", method, 0);
-# # }
-# @since 0.8.0
-#
-# source://yard//lib/yard/tags/directives.rb#544
-class YARD::Tags::ParseDirective < ::YARD::Tags::Directive
- # @since 0.8.0
- #
- # source://yard//lib/yard/tags/directives.rb#545
- def call; end
-end
-
-# source://yard//lib/yard/tags/ref_tag.rb#4
-module YARD::Tags::RefTag
- # Returns the value of attribute owner.
- #
- # source://yard//lib/yard/tags/ref_tag.rb#5
- def owner; end
-
- # Sets the attribute owner
- #
- # @param value the value to set the attribute owner to.
- #
- # source://yard//lib/yard/tags/ref_tag.rb#5
- def owner=(_arg0); end
-end
-
-# source://yard//lib/yard/tags/ref_tag_list.rb#4
-class YARD::Tags::RefTagList
- # @return [RefTagList] a new instance of RefTagList
- #
- # source://yard//lib/yard/tags/ref_tag_list.rb#7
- def initialize(tag_name, owner, name = T.unsafe(nil)); end
-
- # Returns the value of attribute name.
- #
- # source://yard//lib/yard/tags/ref_tag_list.rb#5
- def name; end
-
- # Sets the attribute name
- #
- # @param value the value to set the attribute name to.
- #
- # source://yard//lib/yard/tags/ref_tag_list.rb#5
- def name=(_arg0); end
-
- # Returns the value of attribute owner.
- #
- # source://yard//lib/yard/tags/ref_tag_list.rb#5
- def owner; end
-
- # Sets the attribute owner
- #
- # @param value the value to set the attribute owner to.
- #
- # source://yard//lib/yard/tags/ref_tag_list.rb#5
- def owner=(_arg0); end
-
- # Returns the value of attribute tag_name.
- #
- # source://yard//lib/yard/tags/ref_tag_list.rb#5
- def tag_name; end
-
- # Sets the attribute tag_name
- #
- # @param value the value to set the attribute tag_name to.
- #
- # source://yard//lib/yard/tags/ref_tag_list.rb#5
- def tag_name=(_arg0); end
-
- # source://yard//lib/yard/tags/ref_tag_list.rb#13
- def tags; end
-end
-
-# Modifies the current parsing scope (class or instance). If this
-# directive is defined on a docstring attached to an object definition,
-# it is applied only to that object. Otherwise, it applies the scope
-# to all future objects in the namespace.
-#
-# @example Modifying the scope of a DSL method
-# # @!scope class
-# cattr_accessor :subclasses
-# @example Modifying the scope of a set of methods
-# # @!scope class
-#
-# # Documentation for method1
-# def method1; end
-#
-# # Documentation for method2
-# def method2; end
-# @since 0.7.0
-#
-# source://yard//lib/yard/tags/directives.rb#578
-class YARD::Tags::ScopeDirective < ::YARD::Tags::Directive
- # @since 0.7.0
- #
- # source://yard//lib/yard/tags/directives.rb#579
- def call; end
-end
-
-# Represents a metadata tag value (+@tag+). Tags can have any combination of
-# {#types}, {#name} and {#text}, or none of the above.
-#
-# @example Programmatic tag creation
-# # The following docstring syntax:
-# # @param [String, nil] arg an argument
-# #
-# # is equivalent to:
-# Tag.new(:param, 'an argument', ['String', 'nil'], 'arg')
-#
-# source://yard//lib/yard/tags/tag.rb#13
-class YARD::Tags::Tag
- # Creates a new tag object with a tag name and text. Optionally, formally declared types
- # and a key name can be specified.
- #
- # Types are mainly for meta tags that rely on type information, such as +param+, +return+, etc.
- #
- # Key names are for tags that declare meta data for a specific key or name, such as +param+,
- # +raise+, etc.
- #
- # @param name [String] optional key name which the tag refers to
- # @param tag_name [#to_s] the tag name to create the tag for
- # @param text [String, nil] the descriptive text for this tag, or nil if none provided
- # @param types [Array] optional type list of formally declared types
- # for the tag
- # @return [Tag] a new instance of Tag
- #
- # source://yard//lib/yard/tags/tag.rb#45
- def initialize(tag_name, text, types = T.unsafe(nil), name = T.unsafe(nil)); end
-
- # Provides a plain English summary of the type specification, or nil
- # if no types are provided or parsable.
- #
- # @return [String] a plain English description of the associated types
- # @return [nil] if no types are provided or not parsable
- #
- # source://yard//lib/yard/tags/tag.rb#66
- def explain_types; end
-
- # @return [String] a name associated with the tag
- # @return [nil] if no tag name is supplied
- #
- # source://yard//lib/yard/tags/tag.rb#27
- def name; end
-
- # @return [String] a name associated with the tag
- # @return [nil] if no tag name is supplied
- #
- # source://yard//lib/yard/tags/tag.rb#27
- def name=(_arg0); end
-
- # @return [CodeObjects::Base] the associated object
- #
- # source://yard//lib/yard/tags/tag.rb#30
- def object; end
-
- # @return [CodeObjects::Base] the associated object
- #
- # source://yard//lib/yard/tags/tag.rb#30
- def object=(_arg0); end
-
- # @return [String] the name of the tag
- #
- # source://yard//lib/yard/tags/tag.rb#15
- def tag_name; end
-
- # @return [String] the name of the tag
- #
- # source://yard//lib/yard/tags/tag.rb#15
- def tag_name=(_arg0); end
-
- # @return [String] the tag text associated with the tag
- # @return [nil] if no tag text is supplied
- #
- # source://yard//lib/yard/tags/tag.rb#19
- def text; end
-
- # @return [String] the tag text associated with the tag
- # @return [nil] if no tag text is supplied
- #
- # source://yard//lib/yard/tags/tag.rb#19
- def text=(_arg0); end
-
- # Convenience method to access the first type specified. This should mainly
- # be used for tags that only specify one type.
- #
- # @return [String] the first of the list of specified types
- # @see #types
- #
- # source://yard//lib/yard/tags/tag.rb#57
- def type; end
-
- # @return [Array] a list of types associated with the tag
- # @return [nil] if no types are associated with the tag
- #
- # source://yard//lib/yard/tags/tag.rb#23
- def types; end
-
- # @return [Array] a list of types associated with the tag
- # @return [nil] if no types are associated with the tag
- #
- # source://yard//lib/yard/tags/tag.rb#23
- def types=(_arg0); end
-end
-
-# source://yard//lib/yard/tags/tag_format_error.rb#4
-class YARD::Tags::TagFormatError < ::RuntimeError; end
-
-# source://yard//lib/yard/tags/types_explainer.rb#6
-class YARD::Tags::TypesExplainer
- class << self
- # Provides a plain English summary of the type specification, or nil
- # if no types are provided or parsable.
- #
- # @param types [Array] a list of types to parse and summarize
- # @return [String] a plain English description of the associated types
- # @return [nil] if no types are provided or not parsable
- #
- # source://yard//lib/yard/tags/types_explainer.rb#9
- def explain(*types); end
-
- # Provides a plain English summary of the type specification, or nil
- # if no types are provided or parsable.
- #
- # @param types [Array] a list of types to parse and summarize
- # @raise [SyntaxError] if the types are not parsable
- # @return [String] a plain English description of the associated types
- # @return [nil] if no types are provided or not parsable
- #
- # source://yard//lib/yard/tags/types_explainer.rb#17
- def explain!(*types); end
-
- private
-
- # source://yard//lib/yard/tags/types_explainer.rb#22
- def new(*_arg0); end
- end
-end
-
-# @private
-#
-# source://yard//lib/yard/tags/types_explainer.rb#58
-class YARD::Tags::TypesExplainer::CollectionType < ::YARD::Tags::TypesExplainer::Type
- # @return [CollectionType] a new instance of CollectionType
- #
- # source://yard//lib/yard/tags/types_explainer.rb#61
- def initialize(name, types); end
-
- # source://yard//lib/yard/tags/types_explainer.rb#66
- def to_s(_singular = T.unsafe(nil)); end
-
- # Returns the value of attribute types.
- #
- # source://yard//lib/yard/tags/types_explainer.rb#59
- def types; end
-
- # Sets the attribute types
- #
- # @param value the value to set the attribute types to.
- #
- # source://yard//lib/yard/tags/types_explainer.rb#59
- def types=(_arg0); end
-end
-
-# @private
-#
-# source://yard//lib/yard/tags/types_explainer.rb#72
-class YARD::Tags::TypesExplainer::FixedCollectionType < ::YARD::Tags::TypesExplainer::CollectionType
- # source://yard//lib/yard/tags/types_explainer.rb#73
- def to_s(_singular = T.unsafe(nil)); end
-end
-
-# @private
-#
-# source://yard//lib/yard/tags/types_explainer.rb#79
-class YARD::Tags::TypesExplainer::HashCollectionType < ::YARD::Tags::TypesExplainer::Type
- # @return [HashCollectionType] a new instance of HashCollectionType
- #
- # source://yard//lib/yard/tags/types_explainer.rb#82
- def initialize(name, key_types, value_types); end
-
- # Returns the value of attribute key_types.
- #
- # source://yard//lib/yard/tags/types_explainer.rb#80
- def key_types; end
-
- # Sets the attribute key_types
- #
- # @param value the value to set the attribute key_types to.
- #
- # source://yard//lib/yard/tags/types_explainer.rb#80
- def key_types=(_arg0); end
-
- # source://yard//lib/yard/tags/types_explainer.rb#88
- def to_s(_singular = T.unsafe(nil)); end
-
- # Returns the value of attribute value_types.
- #
- # source://yard//lib/yard/tags/types_explainer.rb#80
- def value_types; end
-
- # Sets the attribute value_types
- #
- # @param value the value to set the attribute value_types to.
- #
- # source://yard//lib/yard/tags/types_explainer.rb#80
- def value_types=(_arg0); end
-end
-
-# @private
-#
-# source://yard//lib/yard/tags/types_explainer.rb#96
-class YARD::Tags::TypesExplainer::Parser
- include ::YARD::CodeObjects
-
- # @return [Parser] a new instance of Parser
- #
- # source://yard//lib/yard/tags/types_explainer.rb#117
- def initialize(string); end
-
- # source://yard//lib/yard/tags/types_explainer.rb#121
- def parse; end
-
- class << self
- # source://yard//lib/yard/tags/types_explainer.rb#113
- def parse(string); end
- end
-end
-
-# source://yard//lib/yard/tags/types_explainer.rb#99
-YARD::Tags::TypesExplainer::Parser::TOKENS = T.let(T.unsafe(nil), Hash)
-
-# @private
-#
-# source://yard//lib/yard/tags/types_explainer.rb#26
-class YARD::Tags::TypesExplainer::Type
- # @return [Type] a new instance of Type
- #
- # source://yard//lib/yard/tags/types_explainer.rb#29
- def initialize(name); end
-
- # Returns the value of attribute name.
- #
- # source://yard//lib/yard/tags/types_explainer.rb#27
- def name; end
-
- # Sets the attribute name
- #
- # @param value the value to set the attribute name to.
- #
- # source://yard//lib/yard/tags/types_explainer.rb#27
- def name=(_arg0); end
-
- # source://yard//lib/yard/tags/types_explainer.rb#33
- def to_s(singular = T.unsafe(nil)); end
-
- private
-
- # source://yard//lib/yard/tags/types_explainer.rb#45
- def list_join(list, with: T.unsafe(nil)); end
-end
-
-# Modifies the current parsing visibility (public, protected, or private).
-# If this directive is defined on a docstring attached to an object
-# definition, it is applied only to that object. Otherwise, it applies
-# the visibility to all future objects in the namespace.
-#
-# @example Modifying the visibility of a DSL method
-# # @!visibility private
-# cattr_accessor :subclasses
-# @example Modifying the visibility of a set of methods
-# # Note that Ruby's "protected" is recommended over this directive
-# # @!visibility protected
-#
-# # Documentation for method1
-# def method1; end
-#
-# # Documentation for method2
-# def method2; end
-# @since 0.7.0
-#
-# source://yard//lib/yard/tags/directives.rb#610
-class YARD::Tags::VisibilityDirective < ::YARD::Tags::Directive
- # @since 0.7.0
- #
- # source://yard//lib/yard/tags/directives.rb#611
- def call; end
-end
-
-# Namespace for templating system
-#
-# source://yard//lib/yard/autoload.rb#271
-module YARD::Templates; end
-
-# This module manages all creation, handling and rendering of {Template}
-# objects.
-#
-# * To create a template object at a path, use {template}.
-# * To render a template, call {render}.
-# * To register a template path in the lookup paths, call {register_template_path}.
-#
-# source://yard//lib/yard/templates/engine.rb#11
-module YARD::Templates::Engine
- class << self
- # Passes a set of objects to the +:fulldoc+ template for full documentation generation.
- # This is called by {CLI::Yardoc} to most commonly perform HTML
- # documentation generation.
- #
- # @param objects [Array] a list of {CodeObjects::Base}
- # objects to pass to the template
- # @param options [Hash] (see {render})
- # @return [void]
- #
- # source://yard//lib/yard/templates/engine.rb#100
- def generate(objects, options = T.unsafe(nil)); end
-
- # Registers a new template path in {template_paths}
- #
- # @param path [String] a new template path
- # @return [void]
- #
- # source://yard//lib/yard/templates/engine.rb#20
- def register_template_path(path); end
-
- # Renders a template on a {CodeObjects::Base code object} using
- # a set of default (overridable) options. Either the +:object+
- # or +:type+ keys must be provided.
- #
- # If a +:serializer+ key is provided and +:serialize+ is not set to
- # false, the rendered contents will be serialized through the {Serializers::Base}
- # object. See {with_serializer}.
- #
- # @example Renders an object with html formatting
- # Engine.render(:format => :html, :object => obj)
- # @example Renders without an object
- # Engine.render(:type => :fulldoc, :otheropts => somevalue)
- # @option options
- # @option options
- # @option options
- # @param options [Hash] the options hash
- # @return [String] the rendered template
- #
- # source://yard//lib/yard/templates/engine.rb#81
- def render(options = T.unsafe(nil)); end
-
- # Creates a template module representing the path. Searches on disk
- # for the first directory named +path+ (joined by '/') within the
- # template paths and builds a template module for. All other matching
- # directories in other template paths will be included in the
- # generated module as mixins (for overriding).
- #
- # @param path [Array] a list of path components
- # @raise [ArgumentError] if the path does not exist within one of the
- # {template_paths} on disk.
- # @return [Template] the module representing the template
- #
- # source://yard//lib/yard/templates/engine.rb#34
- def template(*path); end
-
- # Forces creation of a template at +path+ within a +full_path+.
- #
- # @param full_paths [Array] the full path on disk of the template
- # @param path [String] the path name of the template
- # @return [Template] the template module representing the +path+
- #
- # source://yard//lib/yard/templates/engine.rb#52
- def template!(path, full_paths = T.unsafe(nil)); end
-
- # @return [Array] the list of registered template paths
- #
- # source://yard//lib/yard/templates/engine.rb#14
- def template_paths; end
-
- # @return [Array] the list of registered template paths
- #
- # source://yard//lib/yard/templates/engine.rb#14
- def template_paths=(_arg0); end
-
- # Serializes the results of a block with a +serializer+ object.
- #
- # @param object [CodeObjects::Base] the code object to serialize
- # @param serializer [Serializers::Base] the serializer object
- # @see Serializers::Base
- # @yield a block whose result will be serialize
- # @yieldreturn [String] the contents to serialize
- #
- # source://yard//lib/yard/templates/engine.rb#114
- def with_serializer(object, serializer); end
-
- private
-
- # Searches through the registered {template_paths} and returns
- # all full directories that have the +path+ within them on disk.
- #
- # @param from_template [Template] if provided, allows a relative
- # path to be specified from this template's full path.
- # @param path [String] the path component to search for in the
- # {template_paths}
- # @return [Array] a list of full paths that are existing
- # candidates for a template module
- #
- # source://yard//lib/yard/templates/engine.rb#160
- def find_template_paths(from_template, path); end
-
- # Sets default options on the options hash
- #
- # @option options
- # @option options
- # @option options
- # @param options [Hash] the options hash
- # @return [void]
- #
- # source://yard//lib/yard/templates/engine.rb#140
- def set_default_options(options = T.unsafe(nil)); end
-
- # The name of the module that represents a +path+
- #
- # @param path [String] the path to generate a module name for
- # @return [String] the module name
- #
- # source://yard//lib/yard/templates/engine.rb#175
- def template_module_name(path); end
- end
-end
-
-# @since 0.5.4
-#
-# source://yard//lib/yard/templates/erb_cache.rb#5
-module YARD::Templates::ErbCache
- class << self
- # @since 0.5.4
- #
- # source://yard//lib/yard/templates/erb_cache.rb#17
- def clear!; end
-
- # @since 0.5.4
- #
- # source://yard//lib/yard/templates/erb_cache.rb#6
- def method_for(filename); end
- end
-end
-
-# Namespace for template helpers
-#
-# source://yard//lib/yard/autoload.rb#272
-module YARD::Templates::Helpers; end
-
-# The base helper module included in all templates.
-#
-# source://yard//lib/yard/templates/helpers/base_helper.rb#4
-module YARD::Templates::Helpers::BaseHelper
- # @example
- # s = format_object_title ModuleObject.new(:root, :MyModuleName)
- # s # => "Module: MyModuleName"
- # @param object [CodeObjects::Base] the object to retrieve a title for
- # @return [String] the page title name for a given object
- #
- # source://yard//lib/yard/templates/helpers/base_helper.rb#196
- def format_object_title(object); end
-
- # @example Formatted type of a method
- # o = MethodObject.new(:root, :to_s)
- # format_object_type(o) # => "Method"
- # @example Formatted type of an exception class
- # o = ClassObject.new(:root, :MyError)
- # o.superclass = P('RuntimeError')
- # format_object_type(o) # => "Exception"
- # @param object [CodeObjects::Base] the object to retrieve the type for
- # @return [String] the human-readable formatted {CodeObjects::Base#type #type}
- # for the object
- #
- # source://yard//lib/yard/templates/helpers/base_helper.rb#182
- def format_object_type(object); end
-
- # Indents and formats source code
- #
- # @param value [String] the input source code
- # @return [String] formatted source code
- #
- # source://yard//lib/yard/templates/helpers/base_helper.rb#209
- def format_source(value); end
-
- # Formats a list of return types for output and links each type.
- #
- # @example Formatting types
- # format_types(['String', 'Array']) #=> "(String, Array)"
- # @example Formatting types without surrounding brackets
- # format_types(['String', 'Array'], false) #=> "String, Array"
- # @param brackets [Boolean] whether to surround the types in brackets
- # @param list [Array] a list of types
- # @return [String] the formatted list of Ruby types
- #
- # source://yard//lib/yard/templates/helpers/base_helper.rb#168
- def format_types(list, brackets = T.unsafe(nil)); end
-
- # An object that keeps track of global state throughout the entire template
- # rendering process (including any sub-templates).
- #
- # @return [OpenStruct] a struct object that stores state
- # @since 0.6.0
- #
- # source://yard//lib/yard/templates/helpers/base_helper.rb#20
- def globals; end
-
- # Escapes text. This is used a lot by the HtmlHelper and there should
- # be some helper to "clean up" text for whatever, this is it.
- #
- # source://yard//lib/yard/templates/helpers/base_helper.rb#38
- def h(text); end
-
- # Links to an extra file
- #
- # @param anchor [String] optional anchor
- # @param filename [String] the filename to link to
- # @param title [String] the title of the link
- # @return [String] the link to the file
- # @since 0.5.5
- #
- # source://yard//lib/yard/templates/helpers/base_helper.rb#152
- def link_file(filename, title = T.unsafe(nil), anchor = T.unsafe(nil)); end
-
- # Include a file as a docstring in output
- #
- # @param file [String] the filename to include
- # @return [String] the file's contents
- # @since 0.7.0
- #
- # source://yard//lib/yard/templates/helpers/base_helper.rb#113
- def link_include_file(file); end
-
- # Includes an object's docstring into output.
- #
- # @param obj [CodeObjects::Base] the object to include
- # @return [String] the object's docstring (no tags)
- # @since 0.6.0
- #
- # source://yard//lib/yard/templates/helpers/base_helper.rb#105
- def link_include_object(obj); end
-
- # Links to an object with an optional title
- #
- # @param obj [CodeObjects::Base] the object to link to
- # @param title [String] the title to use for the link
- # @return [String] the linked object
- #
- # source://yard//lib/yard/templates/helpers/base_helper.rb#122
- def link_object(obj, title = T.unsafe(nil)); end
-
- # Links to a URL
- #
- # @param params [Hash] optional parameters for the link
- # @param title [String] the optional title to display the link as
- # @param url [String] the URL to link to
- # @return [String] the linked URL
- #
- # source://yard//lib/yard/templates/helpers/base_helper.rb#141
- def link_url(url, title = T.unsafe(nil), params = T.unsafe(nil)); end
-
- # Links objects or URLs. This method will delegate to the correct +link_+
- # method depending on the arguments passed in.
- #
- # @example Including docstring contents of an object
- # linkify('include:YARD::Docstring')
- # @example Linking a URL
- # linkify('http://example.com')
- # @example Linking an object by path
- # linkify('YARD::Docstring')
- # @example Linking to an extra file
- # linkify('file:README')
- #
- # source://yard//lib/yard/templates/helpers/base_helper.rb#55
- def linkify(*args); end
-
- # Returns the value of attribute object.
- #
- # source://yard//lib/yard/templates/helpers/base_helper.rb#5
- def object; end
-
- # Sets the attribute object
- #
- # @param value the value to set the attribute object to.
- #
- # source://yard//lib/yard/templates/helpers/base_helper.rb#5
- def object=(_arg0); end
-
- # @return [CodeObjects::Base] the object representing the current generated
- # page. Might not be the current {#object} when inside sub-templates.
- #
- # source://yard//lib/yard/templates/helpers/base_helper.rb#9
- def owner; end
-
- # Runs a list of objects against the {Verifier} object passed into the
- # template and returns the subset of verified objects.
- #
- # @param list [Array] a list of code objects
- # @return [Array] a list of code objects that match
- # the verifier. If no verifier is supplied, all objects are returned.
- #
- # source://yard//lib/yard/templates/helpers/base_helper.rb#30
- def run_verifier(list); end
-
- # Returns the value of attribute serializer.
- #
- # source://yard//lib/yard/templates/helpers/base_helper.rb#5
- def serializer; end
-
- # Sets the attribute serializer
- #
- # @param value the value to set the attribute serializer to.
- #
- # source://yard//lib/yard/templates/helpers/base_helper.rb#5
- def serializer=(_arg0); end
-end
-
-# Helpers for various object types
-#
-# source://yard//lib/yard/templates/helpers/filter_helper.rb#5
-module YARD::Templates::Helpers::FilterHelper
- # @return [Boolean] whether an object is a class
- #
- # source://yard//lib/yard/templates/helpers/filter_helper.rb#17
- def is_class?(object); end
-
- # @return [Boolean] whether an object is a method
- #
- # source://yard//lib/yard/templates/helpers/filter_helper.rb#7
- def is_method?(object); end
-
- # @return [Boolean] whether an object is a module
- #
- # source://yard//lib/yard/templates/helpers/filter_helper.rb#22
- def is_module?(object); end
-
- # @return [Boolean] whether an object is a namespace
- #
- # source://yard//lib/yard/templates/helpers/filter_helper.rb#12
- def is_namespace?(object); end
-end
-
-# The helper module for HTML templates.
-#
-# source://yard//lib/yard/templates/helpers/html_helper.rb#11
-module YARD::Templates::Helpers::HtmlHelper
- include ::YARD::Templates::Helpers::MarkupHelper
- include ::YARD::Templates::Helpers::ModuleHelper
- include ::YARD::Templates::Helpers::HtmlSyntaxHighlightHelper
-
- # @param object [CodeObjects::Base] the object to get an anchor for
- # @return [String] the anchor for a specific object
- #
- # source://yard//lib/yard/templates/helpers/html_helper.rb#351
- def anchor_for(object); end
-
- # Returns the current character set. The default value can be overridden
- # by setting the +LANG+ environment variable or by overriding this
- # method. In Ruby 1.9 you can also modify this value by setting
- # +Encoding.default_external+.
- #
- # @return [String] the current character set
- # @since 0.5.4
- #
- # source://yard//lib/yard/templates/helpers/html_helper.rb#578
- def charset; end
-
- # Formats a list of objects and links them
- #
- # @return [String] a formatted list of objects
- #
- # source://yard//lib/yard/templates/helpers/html_helper.rb#462
- def format_object_name_list(objects); end
-
- # Formats a list of types from a tag.
- #
- # @param brackets [Boolean] omits the surrounding
- # brackets if +brackets+ is set to +false+.
- # @param typelist [Array, FalseClass] the list of types to be formatted.
- # @return [String] the list of types formatted
- # as [Type1, Type2, ...] with the types linked
- # to their respective descriptions.
- #
- # source://yard//lib/yard/templates/helpers/html_helper.rb#480
- def format_types(typelist, brackets = T.unsafe(nil)); end
-
- # Escapes HTML entities
- #
- # @param text [String] the text to escape
- # @return [String] the HTML with escaped entities
- #
- # source://yard//lib/yard/templates/helpers/html_helper.rb#27
- def h(text); end
-
- # Converts Asciidoc to HTML
- #
- # @param text [String] input Asciidoc text
- # @return [String] output HTML
- #
- # source://yard//lib/yard/templates/helpers/html_helper.rb#113
- def html_markup_asciidoc(text); end
-
- # Converts HTML to HTML
- #
- # @param text [String] input html
- # @return [String] output HTML
- # @since 0.6.0
- #
- # source://yard//lib/yard/templates/helpers/html_helper.rb#172
- def html_markup_html(text); end
-
- # Converts Markdown to HTML
- #
- # @param text [String] input Markdown text
- # @return [String] output HTML
- # @since 0.6.0
- #
- # source://yard//lib/yard/templates/helpers/html_helper.rb#82
- def html_markup_markdown(text); end
-
- # @return [String] the same text with no markup
- # @since 0.6.6
- #
- # source://yard//lib/yard/templates/helpers/html_helper.rb#164
- def html_markup_none(text); end
-
- # Converts org-mode to HTML
- #
- # @param text [String] input org-mode text
- # @return [String] output HTML
- #
- # source://yard//lib/yard/templates/helpers/html_helper.rb#106
- def html_markup_org(text); end
-
- # Converts plaintext to pre-formatted HTML
- #
- # @param text [String] the input text
- # @return [String] the output HTML
- # @since 0.6.0
- #
- # source://yard//lib/yard/templates/helpers/html_helper.rb#150
- def html_markup_pre(text); end
-
- # Converts RDoc formatting (SimpleMarkup) to HTML
- #
- # @param text [String] the input RDoc formatted text
- # @return [String] output HTML
- # @since 0.6.0
- #
- # source://yard//lib/yard/templates/helpers/html_helper.rb#140
- def html_markup_rdoc(text); end
-
- # Highlights Ruby source. Similar to {#html_syntax_highlight}, but
- # this method is meant to be called from {#htmlify} when markup is
- # set to "ruby".
- #
- # @param source [String] the Ruby source
- # @return [String] the highlighted HTML
- # @since 0.7.0
- #
- # source://yard//lib/yard/templates/helpers/html_helper.rb#183
- def html_markup_ruby(source); end
-
- # Converts plaintext to regular HTML
- #
- # @param text [String] the input text
- # @return [String] the output HTML
- # @since 0.6.0
- #
- # source://yard//lib/yard/templates/helpers/html_helper.rb#158
- def html_markup_text(text); end
-
- # Converts Textile to HTML
- #
- # @param text [String] the input Textile text
- # @return [String] output HTML
- # @since 0.6.0
- #
- # source://yard//lib/yard/templates/helpers/html_helper.rb#122
- def html_markup_textile(text); end
-
- # Converts plaintext to strict Textile (hard breaks)
- #
- # @param text [String] the input textile data
- # @return [String] the output HTML
- # @since 0.6.0
- #
- # source://yard//lib/yard/templates/helpers/html_helper.rb#132
- def html_markup_textile_strict(text); end
-
- # Syntax highlights +source+ in language +type+.
- #
- # @note To support a specific language +type+, implement the method
- # +html_syntax_highlight_TYPE+ in this class.
- # @param source [String] the source code to highlight
- # @param type [Symbol, String] the language type (:ruby, :plain, etc). Use
- # :plain for no syntax highlighting.
- # @return [String] the highlighted source
- #
- # source://yard//lib/yard/templates/helpers/html_helper.rb#203
- def html_syntax_highlight(source, type = T.unsafe(nil)); end
-
- # @return [String] unhighlighted source
- #
- # source://yard//lib/yard/templates/helpers/html_helper.rb#214
- def html_syntax_highlight_plain(source); end
-
- # Turns text into HTML using +markup+ style formatting.
- #
- # @param markup [Symbol] examples are +:markdown+, +:textile+, +:rdoc+.
- # To add a custom markup type, see {MarkupHelper}
- # @param text [String] the text to format
- # @return [String] the HTML
- #
- # source://yard//lib/yard/templates/helpers/html_helper.rb#61
- def htmlify(text, markup = T.unsafe(nil)); end
-
- # @return [String] HTMLified text as a single line (paragraphs removed)
- #
- # source://yard//lib/yard/templates/helpers/html_helper.rb#188
- def htmlify_line(*args); end
-
- # Inserts an include link while respecting inlining
- #
- # source://yard//lib/yard/templates/helpers/html_helper.rb#300
- def insert_include(text, markup = T.unsafe(nil)); end
-
- # Links to an extra file
- #
- # @param anchor [String] optional anchor
- # @param filename [String] the filename to link to
- # @param title [String] the title of the link
- # @return [String] the link to the file
- # @since 0.5.5
- #
- # source://yard//lib/yard/templates/helpers/html_helper.rb#274
- def link_file(filename, title = T.unsafe(nil), anchor = T.unsafe(nil)); end
-
- # Include a file as a docstring in output
- #
- # @param file [String] the filename to include
- # @return [String] the file's contents
- # @since 0.7.0
- #
- # source://yard//lib/yard/templates/helpers/html_helper.rb#286
- def link_include_file(file); end
-
- # Includes an object's docstring into output.
- #
- # @param obj [CodeObjects::Base] the object to include
- # @return [String] the object's docstring (no tags)
- # @since 0.6.0
- #
- # source://yard//lib/yard/templates/helpers/html_helper.rb#295
- def link_include_object(obj); end
-
- # Links to an object with an optional title
- #
- # @param obj [CodeObjects::Base] the object to link to
- # @param title [String] the title to use for the link
- # @return [String] the linked object
- #
- # source://yard//lib/yard/templates/helpers/html_helper.rb#305
- def link_object(obj, title = T.unsafe(nil), anchor = T.unsafe(nil), relative = T.unsafe(nil)); end
-
- # Links to a URL
- #
- # @param params [Hash] optional parameters for the link
- # @param title [String] the optional title to display the link as
- # @param url [String] the URL to link to
- # @return [String] the linked URL
- #
- # source://yard//lib/yard/templates/helpers/html_helper.rb#336
- def link_url(url, title = T.unsafe(nil), params = T.unsafe(nil)); end
-
- # source://yard//lib/yard/templates/helpers/html_helper.rb#404
- def mtime(_file); end
-
- # Returns the URL for an object.
- #
- # @param anchor [String] the anchor to link to
- # @param obj [String, CodeObjects::Base] the object (or object path) to link to
- # @param relative [Boolean] use a relative or absolute link
- # @return [String] the URL location of the object
- #
- # source://yard//lib/yard/templates/helpers/html_helper.rb#403
- def mtime_url(obj, anchor = T.unsafe(nil), relative = T.unsafe(nil)); end
-
- # Resolves any text in the form of +{Name}+ to the object specified by
- # Name. Also supports link titles in the form +{Name title}+.
- #
- # @example Linking to a class with a title
- # resolve_links("{A::B::C the C class}") # => "the c class"
- # @example Linking to an instance method
- # resolve_links("{MyClass#method}") # => "MyClass#method"
- # @param text [String] the text to resolve links in
- # @return [String] HTML with linkified references
- #
- # source://yard//lib/yard/templates/helpers/html_helper.rb#229
- def resolve_links(text); end
-
- # Formats the signature of method +meth+.
- #
- # @param full_attr_name [Boolean] whether to show the full attribute name
- # ("name=" instead of "name")
- # @param link [Boolean] whether to link the method signature to the details view
- # @param meth [CodeObjects::MethodObject] the method object to list
- # the signature of
- # @param show_extras [Boolean] whether to show extra meta-data (visibility, attribute info)
- # @return [String] the formatted method signature
- #
- # source://yard//lib/yard/templates/helpers/html_helper.rb#533
- def signature(meth, link = T.unsafe(nil), show_extras = T.unsafe(nil), full_attr_name = T.unsafe(nil)); end
-
- # Get the return types for a method signature.
- #
- # @param link [Boolean] whether to link the types
- # @param meth [CodeObjects::MethodObject] the method object
- # @return [String] the signature types
- # @since 0.5.3
- #
- # source://yard//lib/yard/templates/helpers/html_helper.rb#496
- def signature_types(meth, link = T.unsafe(nil)); end
-
- # Returns the URL for an object.
- #
- # @param anchor [String] the anchor to link to
- # @param obj [String, CodeObjects::Base] the object (or object path) to link to
- # @param relative [Boolean] use a relative or absolute link
- # @return [String] the URL location of the object
- #
- # source://yard//lib/yard/templates/helpers/html_helper.rb#372
- def url_for(obj, anchor = T.unsafe(nil), relative = T.unsafe(nil)); end
-
- # Returns the URL for a specific file
- #
- # @param anchor [String] optional anchor
- # @param filename [String, CodeObjects::ExtraFileObject] the filename to link to
- # @return [String] the URL pointing to the file
- #
- # source://yard//lib/yard/templates/helpers/html_helper.rb#411
- def url_for_file(filename, anchor = T.unsafe(nil)); end
-
- # Returns the URL for the frameset page
- #
- # @return [String] the URL pointing to the frames page
- # @since 0.8.0
- #
- # source://yard//lib/yard/templates/helpers/html_helper.rb#438
- def url_for_frameset; end
-
- # Returns the URL for the alphabetic index page
- #
- # @return [String] the URL pointing to the first main page the
- # user should see.
- #
- # source://yard//lib/yard/templates/helpers/html_helper.rb#454
- def url_for_index; end
-
- # Returns the URL for a list type
- #
- # @param type [String, Symbol] the list type to generate a URL for
- # @return [String] the URL pointing to the list
- # @since 0.8.0
- #
- # source://yard//lib/yard/templates/helpers/html_helper.rb#430
- def url_for_list(type); end
-
- # Returns the URL for the main page (README or alphabetic index)
- #
- # @return [String] the URL pointing to the first main page the
- # user should see.
- #
- # source://yard//lib/yard/templates/helpers/html_helper.rb#446
- def url_for_main; end
-
- private
-
- # Converts a {CodeObjects::MethodObject} into an overload object
- #
- # @since 0.5.3
- #
- # source://yard//lib/yard/templates/helpers/html_helper.rb#613
- def convert_method_to_overload(meth); end
-
- # Parses code block's HTML attributes in order to detect the programming
- # language of what's enclosed in that code block.
- #
- # @param code_html_attrs [String, nil] HTML attribute list of +code+
- # element
- # @param pre_html_attrs [String, nil] HTML attribute list of +pre+ element
- # @return [String, nil] detected programming language
- #
- # source://yard//lib/yard/templates/helpers/html_helper.rb#668
- def detect_lang_in_codeblock_attributes(pre_html_attrs, code_html_attrs); end
-
- # Parses code blocks out of html and performs syntax highlighting
- # on code inside of the blocks.
- #
- # @param html [String] the html to search for code in
- # @return [String] highlighted html
- # @see #html_syntax_highlight
- #
- # source://yard//lib/yard/templates/helpers/html_helper.rb#644
- def parse_codeblocks(html); end
-
- # Parses !!!lang out of codeblock, returning the codeblock language
- # followed by the source code.
- #
- # @param source [String] the source code whose language to determine
- # @return [Array(String, String)] the language, if any, and the
- # remaining source
- # @since 0.7.5
- #
- # source://yard//lib/yard/templates/helpers/html_helper.rb#628
- def parse_lang_for_codeblock(source); end
-
- # Converts a set of hash options into HTML attributes for a tag
- #
- # @param opts [Hash{String => String}] the tag options
- # @return [String] the tag attributes of an HTML tag
- #
- # source://yard//lib/yard/templates/helpers/html_helper.rb#607
- def tag_attrs(opts = T.unsafe(nil)); end
-
- # Escapes a URL
- #
- # @param text [String] the URL
- # @return [String] the escaped URL
- #
- # source://yard//lib/yard/templates/helpers/html_helper.rb#35
- def urlencode(text); end
-
- class << self
- # Escapes a URL
- #
- # @param text [String] the URL
- # @return [String] the escaped URL
- #
- # source://yard//lib/yard/templates/helpers/html_helper.rb#51
- def urlencode(text); end
- end
-end
-
-# @private
-#
-# source://yard//lib/yard/templates/helpers/html_helper.rb#19
-YARD::Templates::Helpers::HtmlHelper::ASCIIDOC_ATTRIBUTES = T.let(T.unsafe(nil), Hash)
-
-# @private
-#
-# source://yard//lib/yard/templates/helpers/html_helper.rb#16
-YARD::Templates::Helpers::HtmlHelper::URLMATCH = T.let(T.unsafe(nil), Regexp)
-
-# Helper methods for syntax highlighting.
-#
-# source://yard//lib/yard/templates/helpers/html_syntax_highlight_helper.rb#6
-module YARD::Templates::Helpers::HtmlSyntaxHighlightHelper
- include ::YARD::Templates::Helpers::ModuleHelper
-
- # Highlights Ruby source
- #
- # @param source [String] the Ruby source code
- # @return [String] the highlighted Ruby source
- #
- # source://yard//lib/yard/templates/helpers/html_syntax_highlight_helper.rb#12
- def html_syntax_highlight_ruby(source); end
-
- private
-
- # source://yard//lib/yard/templates/helpers/html_syntax_highlight_helper.rb#63
- def clean_token_object(token_obj); end
-
- # source://yard//lib/yard/templates/helpers/html_syntax_highlight_helper.rb#45
- def html_syntax_highlight_ruby_legacy(source); end
-
- # source://yard//lib/yard/templates/helpers/html_syntax_highlight_helper.rb#22
- def html_syntax_highlight_ruby_ripper(source); end
-end
-
-# Namespace for markup providers
-#
-# source://yard//lib/yard/autoload.rb#273
-module YARD::Templates::Helpers::Markup; end
-
-# source://yard//lib/yard/templates/helpers/markup/rdoc_markdown.rb#13
-class YARD::Templates::Helpers::Markup::RDocMarkdown < ::YARD::Templates::Helpers::Markup::RDocMarkup
- # @return [RDocMarkdown] a new instance of RDocMarkdown
- #
- # source://yard//lib/yard/templates/helpers/markup/rdoc_markdown.rb#14
- def initialize(text); end
-
- # source://yard//lib/yard/templates/helpers/markup/rdoc_markdown.rb#18
- def fix_typewriter(html); end
-end
-
-# source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#12
-class YARD::Templates::Helpers::Markup::RDocMarkup
- # @param text [String]
- # @return [RDocMarkup] a new instance of RDocMarkup
- #
- # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#42
- def initialize(text); end
-
- # Returns the value of attribute from_path.
- #
- # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#35
- def from_path; end
-
- # Sets the attribute from_path
- #
- # @param value the value to set the attribute from_path to.
- #
- # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#35
- def from_path=(_arg0); end
-
- # @return [String]
- #
- # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#52
- def to_html; end
-
- private
-
- # Don't allow -- to turn into — element. The chances of this being
- # some --option is far more likely than the typographical meaning.
- #
- # @todo Refactor into own SimpleMarkup subclass
- #
- # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#89
- def fix_dash_dash(text); end
-
- # Fixes RDoc behaviour with ++ only supporting alphanumeric text.
- #
- # @todo Refactor into own SimpleMarkup subclass
- #
- # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#68
- def fix_typewriter(text); end
-end
-
-# source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#12
-YARD::Templates::Helpers::Markup::RDocMarkup::MARKUP = RDoc::Markup
-
-# source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#13
-class YARD::Templates::Helpers::Markup::RDocMarkupToHtml < ::RDoc::Markup::ToHtml
- # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#16
- def initialize; end
-
- # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#102
- def accept_paragraph(*args); end
-
- # Returns the value of attribute from_path.
- #
- # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#95
- def from_path; end
-
- # Sets the attribute from_path
- #
- # @param value the value to set the attribute from_path to.
- #
- # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#95
- def from_path=(_arg0); end
-
- # Disable auto-link of URLs
- #
- # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#98
- def handle_special_HYPERLINK(special); end
-end
-
-# Helper methods for loading and managing markup types.
-#
-# source://yard//lib/yard/templates/helpers/markup_helper.rb#7
-module YARD::Templates::Helpers::MarkupHelper
- # Attempts to load the first valid markup provider in {MARKUP_PROVIDERS}.
- # If a provider is specified, immediately try to load it.
- #
- # On success this sets `@markup_provider` and `@markup_class` to
- # the provider name and library constant class/module respectively for
- # the loaded provider.
- #
- # On failure this method will inform the user that no provider could be
- # found and exit the program.
- #
- # @return [Boolean] whether the markup provider was successfully loaded.
- #
- # source://yard//lib/yard/templates/helpers/markup_helper.rb#87
- def load_markup_provider(type = T.unsafe(nil)); end
-
- # Gets the markup provider class/module constant for a markup type
- # Call {#load_markup_provider} before using this method.
- #
- # @param type [Symbol] the markup type (:rdoc, :markdown, etc.)
- # @return [Class] the markup class
- #
- # source://yard//lib/yard/templates/helpers/markup_helper.rb#158
- def markup_class(type = T.unsafe(nil)); end
-
- # Strips any shebang lines on the file contents that pertain to
- # markup or preprocessing data.
- #
- # @deprecated Use {CodeObjects::ExtraFileObject#contents} instead
- # @return [String] the file contents minus any preprocessing tags
- # @since 0.6.0
- #
- # source://yard//lib/yard/templates/helpers/markup_helper.rb#149
- def markup_file_contents(contents); end
-
- # Checks for a shebang or looks at the file extension to determine
- # the markup type for the file contents. File extensions are registered
- # for a markup type in {MARKUP_EXTENSIONS}.
- #
- # A shebang should be on the first line of a file and be in the form:
- #
- # #!markup_type
- #
- # Standard markup types are text, html, rdoc, markdown, textile
- #
- # @param contents [String] Unused. Was necessary prior to 0.7.0.
- # Newer versions of YARD use {CodeObjects::ExtraFileObject#contents}
- # @return [Symbol] the markup type recognized for the file
- # @see MARKUP_EXTENSIONS
- # @since 0.6.0
- #
- # source://yard//lib/yard/templates/helpers/markup_helper.rb#133
- def markup_for_file(contents, filename); end
-
- # Gets the markup provider name for a markup type
- # Call {#load_markup_provider} before using this method.
- #
- # @param type [Symbol] the markup type (:rdoc, :markdown, etc.)
- # @return [Symbol] the markup provider name (usually the gem name of the library)
- #
- # source://yard//lib/yard/templates/helpers/markup_helper.rb#168
- def markup_provider(type = T.unsafe(nil)); end
-
- class << self
- # Clears the markup provider cache information. Mainly used for testing.
- #
- # @return [void]
- #
- # source://yard//lib/yard/templates/helpers/markup_helper.rb#11
- def clear_markup_cache; end
-
- # @private
- # @return [Hash{Symbol=>{(:provider,:class)=>Object}}] the cached markup providers
- # @since 0.6.4
- #
- # source://yard//lib/yard/templates/helpers/markup_helper.rb#18
- def markup_cache; end
-
- # @private
- # @return [Hash{Symbol=>{(:provider,:class)=>Object}}] the cached markup providers
- # @since 0.6.4
- #
- # source://yard//lib/yard/templates/helpers/markup_helper.rb#18
- def markup_cache=(_arg0); end
- end
-end
-
-# Returns a list of extensions for various markup types. To register
-# extensions for a type, add them to the array of extensions for the
-# type.
-#
-# @since 0.6.0
-#
-# source://yard//lib/yard/templates/helpers/markup_helper.rb#61
-YARD::Templates::Helpers::MarkupHelper::MARKUP_EXTENSIONS = T.let(T.unsafe(nil), Hash)
-
-# Contains the Regexp object that matches the shebang line of extra
-# files to detect the markup type.
-#
-# source://yard//lib/yard/templates/helpers/markup_helper.rb#74
-YARD::Templates::Helpers::MarkupHelper::MARKUP_FILE_SHEBANG = T.let(T.unsafe(nil), Regexp)
-
-# The default list of markup providers for each markup type
-#
-# source://yard//lib/yard/templates/helpers/markup_helper.rb#24
-YARD::Templates::Helpers::MarkupHelper::MARKUP_PROVIDERS = T.let(T.unsafe(nil), Hash)
-
-# Helper methods for method objects.
-#
-# source://yard//lib/yard/templates/helpers/method_helper.rb#5
-module YARD::Templates::Helpers::MethodHelper
- # @return [String] formatted arguments for a method
- #
- # source://yard//lib/yard/templates/helpers/method_helper.rb#7
- def format_args(object); end
-
- # @return [String] formatted block if one exists
- #
- # source://yard//lib/yard/templates/helpers/method_helper.rb#35
- def format_block(object); end
-
- # @return [String] formats source of an object
- #
- # source://yard//lib/yard/templates/helpers/method_helper.rb#57
- def format_code(object, _show_lines = T.unsafe(nil)); end
-
- # @return [String] formats source code of a constant value
- #
- # source://yard//lib/yard/templates/helpers/method_helper.rb#68
- def format_constant(value); end
-
- # @return [String] formats line numbers for source code of an object
- #
- # source://yard//lib/yard/templates/helpers/method_helper.rb#50
- def format_lines(object); end
-
- # @return [String] formatted and linked return types for a method
- #
- # source://yard//lib/yard/templates/helpers/method_helper.rb#28
- def format_return_types(object); end
-end
-
-# Helper methods for managing module objects.
-#
-# source://yard//lib/yard/templates/helpers/module_helper.rb#6
-module YARD::Templates::Helpers::ModuleHelper
- # Prunes the method listing by running the verifier and removing attributes/aliases
- #
- # @param hide_attributes [Boolean] whether to prune attribute methods from the list
- # @param list [Array] a list of methods
- # @return [Array] a pruned list of methods
- #
- # source://yard//lib/yard/templates/helpers/module_helper.rb#11
- def prune_method_listing(list, hide_attributes = T.unsafe(nil)); end
-end
-
-# Helper methods for text template formats.
-#
-# source://yard//lib/yard/templates/helpers/text_helper.rb#6
-module YARD::Templates::Helpers::TextHelper
- # @return [String] aligns text to the right
- #
- # source://yard//lib/yard/templates/helpers/text_helper.rb#39
- def align_right(text, spacer = T.unsafe(nil), col = T.unsafe(nil)); end
-
- # @return [String] escapes text
- #
- # source://yard//lib/yard/templates/helpers/text_helper.rb#8
- def h(text); end
-
- # @return [String] returns a horizontal rule for output
- #
- # source://yard//lib/yard/templates/helpers/text_helper.rb#45
- def hr(col = T.unsafe(nil), sep = T.unsafe(nil)); end
-
- # @return [String] indents +text+ by +len+ characters.
- #
- # source://yard//lib/yard/templates/helpers/text_helper.rb#29
- def indent(text, len = T.unsafe(nil)); end
-
- # @return [String] the formatted signature for a method
- #
- # source://yard//lib/yard/templates/helpers/text_helper.rb#50
- def signature(meth); end
-
- # @return [String] aligns a title to the right
- #
- # source://yard//lib/yard/templates/helpers/text_helper.rb#34
- def title_align_right(text, col = T.unsafe(nil)); end
-
- # @return [String] wraps text at +col+ columns.
- #
- # source://yard//lib/yard/templates/helpers/text_helper.rb#24
- def wrap(text, col = T.unsafe(nil)); end
-
- private
-
- # source://yard//lib/yard/templates/helpers/text_helper.rb#98
- def resolve_links(text); end
-end
-
-# Helpers for UML template format
-#
-# source://yard//lib/yard/templates/helpers/uml_helper.rb#5
-module YARD::Templates::Helpers::UMLHelper
- # Formats the path of an object for Graphviz syntax
- #
- # @param object [CodeObjects::Base] an object to format the path of
- # @return [String] the encoded path
- #
- # source://yard//lib/yard/templates/helpers/uml_helper.rb#20
- def format_path(object); end
-
- # Encodes text in escaped Graphviz syntax
- #
- # @param text [String] text to encode
- # @return [String] the encoded text
- #
- # source://yard//lib/yard/templates/helpers/uml_helper.rb#27
- def h(text); end
-
- # Tidies data by formatting and indenting text
- #
- # @param data [String] pre-formatted text
- # @return [String] tidied text.
- #
- # source://yard//lib/yard/templates/helpers/uml_helper.rb#34
- def tidy(data); end
-
- # Official UML visibility prefix syntax for an object given its visibility
- #
- # @param object [CodeObjects::Base] the object to retrieve visibility for
- # @return [String] the UML visibility prefix
- #
- # source://yard//lib/yard/templates/helpers/uml_helper.rb#9
- def uml_visibility(object); end
-end
-
-# Abstracts the structure for a section and its subsections into an ordered
-# list of sections and subsections.
-#
-# @since 0.6.0
-#
-# source://yard//lib/yard/templates/section.rb#7
-class YARD::Templates::Section < ::Array
- # @return [Section] a new instance of Section
- # @since 0.6.0
- #
- # source://yard//lib/yard/templates/section.rb#10
- def initialize(name, *args); end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/templates/section.rb#48
- def <<(*args); end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/templates/section.rb#34
- def ==(other); end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/templates/section.rb#21
- def [](*args); end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/templates/section.rb#74
- def any(item); end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/templates/section.rb#15
- def dup; end
-
- # @return [Boolean]
- # @since 0.6.0
- #
- # source://yard//lib/yard/templates/section.rb#30
- def eql?(other); end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/templates/section.rb#54
- def inspect; end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/templates/section.rb#8
- def name; end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/templates/section.rb#8
- def name=(_arg0); end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/templates/section.rb#60
- def place(*args); end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/templates/section.rb#45
- def push(*args); end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/templates/section.rb#64
- def to_a; end
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/templates/section.rb#50
- def unshift(*args); end
-
- private
-
- # @since 0.6.0
- #
- # source://yard//lib/yard/templates/section.rb#84
- def parse_sections(args); end
-end
-
-# source://yard//lib/yard/templates/template.rb#6
-module YARD::Templates::Template
- include ::YARD::Templates::ErbCache
- include ::YARD::Templates::Helpers::BaseHelper
- include ::YARD::Templates::Helpers::MethodHelper
-
- mixes_in_class_methods ::YARD::Templates::Template::ClassMethods
-
- # source://yard//lib/yard/templates/template.rb#186
- def initialize(opts = T.unsafe(nil)); end
-
- # Loads a template specified by path. If +:template+ or +:format+ is
- # specified in the {#options} hash, they are prepended and appended
- # to the path respectively.
- #
- # @param path [Array] the path of the template
- # @return [Template] the loaded template module
- #
- # source://yard//lib/yard/templates/template.rb#204
- def T(*path); end
-
- # Returns the value of attribute class.
- #
- # source://yard//lib/yard/templates/template.rb#7
- def class; end
-
- # Sets the attribute class
- #
- # @param value the value to set the attribute class to.
- #
- # source://yard//lib/yard/templates/template.rb#7
- def class=(_arg0); end
-
- # @param section [String, Symbol] the section name
- # @return [String] the contents of the ERB rendered section
- # @yield calls subsections to be rendered
- #
- # source://yard//lib/yard/templates/template.rb#285
- def erb(section, &block); end
-
- # Returns the contents of a file. If +allow_inherited+ is set to +true+,
- # use +{{{__super__}}}+ inside the file contents to insert the contents
- # of the file from an inherited template. For instance, if +templates/b+
- # inherits from +templates/a+ and file "test.css" exists in both directories,
- # both file contents can be retrieved by having +templates/b/test.css+ look
- # like:
- #
- # {{{__super__}}}
- # ...
- # body { css styles here }
- # p.class { other styles }
- #
- # @param allow_inherited [Boolean] whether inherited templates can
- # be inserted with +{{{__super__}}}+
- # @param basename [String] the name of the file
- # @raise [ArgumentError]
- # @return [String] the contents of a file identified by +basename+. All
- # template paths (including any mixed in templates) are searched for
- # the file
- # @see ClassMethods#find_file
- # @see ClassMethods#find_nth_file
- #
- # source://yard//lib/yard/templates/template.rb#312
- def file(basename, allow_inherited = T.unsafe(nil)); end
-
- # Initialization called on the template. Override this in a 'setup.rb'
- # file in the template's path to implement a template
- #
- # @example A default set of sections
- # def init
- # sections :section1, :section2, [:subsection1, :etc]
- # end
- # @see #sections
- #
- # source://yard//lib/yard/templates/template.rb#239
- def init; end
-
- # source://yard//lib/yard/templates/template.rb#342
- def inspect; end
-
- # Returns the value of attribute options.
- #
- # source://yard//lib/yard/templates/template.rb#8
- def options; end
-
- # source://yard//lib/yard/templates/template.rb#337
- def options=(value); end
-
- # Runs a template on +sects+ using extra options. This method should
- # not be called directly. Instead, call the class method {ClassMethods#run}
- #
- # @param break_first [Boolean] if true, renders only the first section
- # @param opts [Hash, nil] any extra options to apply to sections
- # @param sects [Section, Array] a section list of sections to render
- # @param start_at [Fixnum] the index in the section list to start from
- # @return [String] the rendered sections joined together
- # @yield [opts] calls for the subsections to be rendered
- # @yieldparam opts [Hash] any extra options to yield
- #
- # source://yard//lib/yard/templates/template.rb#252
- def run(opts = T.unsafe(nil), sects = T.unsafe(nil), start_at = T.unsafe(nil), break_first = T.unsafe(nil), &block); end
-
- # Returns the value of attribute section.
- #
- # source://yard//lib/yard/templates/template.rb#7
- def section; end
-
- # Sets the attribute section
- #
- # @param value the value to set the attribute section to.
- #
- # source://yard//lib/yard/templates/template.rb#7
- def section=(_arg0); end
-
- # Sets the sections (and subsections) to be rendered for the template
- #
- # @example Sections with subsections
- # sections :header, [:name, :children]
- # # the above will call header.erb and only renders the subsections
- # # if they are yielded by the template (see #yieldall)
- # @example Sets a set of erb sections
- # sections :a, :b, :c # searches for a.erb, b.erb, c.erb
- # @example Sets a set of method and erb sections
- # sections :a, :b, :c # a is a method, the rest are erb files
- # @param args [Array] the sections
- # to use to render the template. For symbols and strings, the
- # section will be executed as a method (if one exists), or rendered
- # from the file "name.erb" where name is the section name. For
- # templates, they will have {Template::ClassMethods#run} called on them.
- # Any subsections can be yielded to using yield or {#yieldall}
- #
- # source://yard//lib/yard/templates/template.rb#226
- def sections(*args); end
-
- # Calls the ERB file from the last inherited template with {#section}.erb
- #
- # @param sect [Symbol, String] if provided, uses a specific section name
- # @return [String] the rendered ERB file in any of the inherited template
- # paths.
- #
- # source://yard//lib/yard/templates/template.rb#330
- def superb(sect = T.unsafe(nil), &block); end
-
- # Yields all subsections with any extra options
- #
- # @param opts [Hash] extra options to be applied to subsections
- #
- # source://yard//lib/yard/templates/template.rb#278
- def yieldall(opts = T.unsafe(nil), &block); end
-
- protected
-
- # source://yard//lib/yard/templates/template.rb#348
- def erb_file_for(section); end
-
- # source://yard//lib/yard/templates/template.rb#352
- def erb_with(content, filename = T.unsafe(nil)); end
-
- private
-
- # source://yard//lib/yard/templates/template.rb#399
- def add_options(opts = T.unsafe(nil)); end
-
- # @raise [ArgumentError]
- #
- # source://yard//lib/yard/templates/template.rb#378
- def cache(section); end
-
- # source://yard//lib/yard/templates/template.rb#388
- def cache_filename(section); end
-
- # source://yard//lib/yard/templates/template.rb#364
- def render_section(section, &block); end
-
- # source://yard//lib/yard/templates/template.rb#393
- def set_ivars; end
-
- # source://yard//lib/yard/templates/template.rb#412
- def with_section; end
-
- class << self
- # Extra includes are mixins that are included after a template is created. These
- # mixins can be registered by plugins to operate on templates and override behaviour.
- #
- # Note that this array can be filled with modules or proc objects. If a proc object
- # is given, the proc will be called with the {Template#options} hash containing
- # relevant template information like the object, format, and more. The proc should
- # return a module or nil if there is none.
- #
- # @example Adding in extra mixins to include on a template
- # Template.extra_includes << MyHelper
- # @example Conditionally including a mixin if the format is html
- # Template.extra_includes << proc {|opts| MyHelper if opts.format == :html }
- # @return [Array] a list of modules to be automatically included
- # into any new template module
- #
- # source://yard//lib/yard/templates/template.rb#25
- def extra_includes; end
-
- # Extra includes are mixins that are included after a template is created. These
- # mixins can be registered by plugins to operate on templates and override behaviour.
- #
- # Note that this array can be filled with modules or proc objects. If a proc object
- # is given, the proc will be called with the {Template#options} hash containing
- # relevant template information like the object, format, and more. The proc should
- # return a module or nil if there is none.
- #
- # @example Adding in extra mixins to include on a template
- # Template.extra_includes << MyHelper
- # @example Conditionally including a mixin if the format is html
- # Template.extra_includes << proc {|opts| MyHelper if opts.format == :html }
- # @return [Array] a list of modules to be automatically included
- # into any new template module
- #
- # source://yard//lib/yard/templates/template.rb#25
- def extra_includes=(_arg0); end
-
- # Includes the {extra_includes} modules into the template object.
- #
- # @param options [SymbolHash] the options hash containing all template information
- # @param template [Template] the template object to mixin the extra includes.
- # @return [void]
- #
- # source://yard//lib/yard/templates/template.rb#38
- def include_extra(template, options); end
-
- # @private
- # @private
- #
- # source://yard//lib/yard/templates/template.rb#29
- def included(klass); end
- end
-end
-
-# source://yard//lib/yard/templates/template.rb#59
-module YARD::Templates::Template::ClassMethods
- # source://yard//lib/yard/templates/template.rb#81
- def initialize(path, full_paths); end
-
- # Alias for creating a {Section} with arguments
- #
- # @see Section#initialize
- # @since 0.6.0
- #
- # source://yard//lib/yard/templates/template.rb#149
- def S(*args); end
-
- # Alias for creating {Engine.template}.
- #
- # source://yard//lib/yard/templates/template.rb#142
- def T(*path); end
-
- # Searches for a file identified by +basename+ in the template's
- # path as well as any mixed in template paths. Equivalent to calling
- # {ClassMethods#find_nth_file} with index of 1.
- #
- # @param basename [String] the filename to search for
- # @return [String] the full path of a file on disk with filename
- # +basename+ in one of the template's paths.
- # @see find_nth_file
- #
- # source://yard//lib/yard/templates/template.rb#98
- def find_file(basename); end
-
- # Searches for the nth file (where n = +index+) identified
- # by basename in the template's path and any mixed in template paths.
- #
- # @param basename [String] the filename to search for
- # @param index [Fixnum] the nth existing file to return
- # @return [String] the full path of the nth file on disk with
- # filename +basename+ in one of the template paths
- #
- # source://yard//lib/yard/templates/template.rb#109
- def find_nth_file(basename, index = T.unsafe(nil)); end
-
- # Returns the value of attribute full_path.
- #
- # source://yard//lib/yard/templates/template.rb#60
- def full_path; end
-
- # Sets the attribute full_path
- #
- # @param value the value to set the attribute full_path to.
- #
- # source://yard//lib/yard/templates/template.rb#60
- def full_path=(_arg0); end
-
- # @note This method caches path results. Paths should not be modified
- # after this method is called; call {#reset_full_paths} to reset cache.
- # @return [Array] a list of full paths
- #
- # source://yard//lib/yard/templates/template.rb#65
- def full_paths; end
-
- # @return [Boolean]
- #
- # source://yard//lib/yard/templates/template.rb#122
- def is_a?(klass); end
-
- # Creates a new template object to be rendered with {Template#run}
- #
- # source://yard//lib/yard/templates/template.rb#128
- def new(*args); end
-
- # Returns the value of attribute path.
- #
- # source://yard//lib/yard/templates/template.rb#60
- def path; end
-
- # Sets the attribute path
- #
- # @param value the value to set the attribute path to.
- #
- # source://yard//lib/yard/templates/template.rb#60
- def path=(_arg0); end
-
- # Resets cache for {#full_paths}
- #
- # source://yard//lib/yard/templates/template.rb#77
- def reset_full_paths; end
-
- # source://yard//lib/yard/templates/template.rb#135
- def run(*args); end
-
- private
-
- # source://yard//lib/yard/templates/template.rb#170
- def include_inherited(full_paths); end
-
- # source://yard//lib/yard/templates/template.rb#157
- def include_parent; end
-
- # source://yard//lib/yard/templates/template.rb#176
- def load_setup_rb; end
-end
-
-# An Options class containing default options for base template rendering. For
-# options specific to generation of HTML output, see {CLI::YardocOptions}.
-#
-# @see CLI::YardocOptions
-#
-# source://yard//lib/yard/templates/template_options.rb#9
-class YARD::Templates::TemplateOptions < ::YARD::Options
- # @return [OpenStruct] an open struct containing any global state across all
- # generated objects in a template.
- #
- # source://yard//lib/yard/templates/template_options.rb#34
- def __globals; end
-
- # @return [String] the default return type for a method with no return tags
- #
- # source://yard//lib/yard/templates/template_options.rb#20
- def default_return; end
-
- # @return [String] the default return type for a method with no return tags
- #
- # source://yard//lib/yard/templates/template_options.rb#20
- def default_return=(_arg0); end
-
- # @example A list of mixin path names (including wildcards)
- # opts.embed_mixins #=> ['ClassMethods', '*Helper', 'YARD::*']
- # @return [Array] an array of module name wildcards to embed into
- # class documentation as if their methods were defined directly in the class.
- # Useful for modules like ClassMethods. If the name contains '::', the module
- # is matched against the full mixin path, otherwise only the module name is used.
- #
- # source://yard//lib/yard/templates/template_options.rb#71
- def embed_mixins; end
-
- # @example A list of mixin path names (including wildcards)
- # opts.embed_mixins #=> ['ClassMethods', '*Helper', 'YARD::*']
- # @return [Array] an array of module name wildcards to embed into
- # class documentation as if their methods were defined directly in the class.
- # Useful for modules like ClassMethods. If the name contains '::', the module
- # is matched against the full mixin path, otherwise only the module name is used.
- #
- # source://yard//lib/yard/templates/template_options.rb#71
- def embed_mixins=(_arg0); end
-
- # @param mixin [CodeObjects::Base] accepts any code object, but returns
- # nil unless the object is a module.
- # @return [Boolean] whether a mixin matches the embed_mixins list
- # @return [nil] if the mixin is not a module object
- #
- # source://yard//lib/yard/templates/template_options.rb#77
- def embed_mixins_match?(mixin); end
-
- # @return [Symbol] the template output format
- #
- # source://yard//lib/yard/templates/template_options.rb#11
- def format; end
-
- # @return [Symbol] the template output format
- #
- # source://yard//lib/yard/templates/template_options.rb#11
- def format=(_arg0); end
-
- # @return [OpenStruct] an open struct containing any global state across all
- # generated objects in a template.
- #
- # source://yard//lib/yard/templates/template_options.rb#33
- def globals; end
-
- # @return [OpenStruct] an open struct containing any global state across all
- # generated objects in a template.
- #
- # source://yard//lib/yard/templates/template_options.rb#33
- def globals=(_arg0); end
-
- # @return [Boolean] whether void methods should show "void" in their signature
- #
- # source://yard//lib/yard/templates/template_options.rb#23
- def hide_void_return; end
-
- # @return [Boolean] whether void methods should show "void" in their signature
- #
- # source://yard//lib/yard/templates/template_options.rb#23
- def hide_void_return=(_arg0); end
-
- # @return [Boolean] whether code blocks should be syntax highlighted
- #
- # source://yard//lib/yard/templates/template_options.rb#26
- def highlight; end
-
- # @return [Boolean] whether code blocks should be syntax highlighted
- #
- # source://yard//lib/yard/templates/template_options.rb#26
- def highlight=(_arg0); end
-
- # @return [Boolean] whether the page is the "index"
- #
- # source://yard//lib/yard/templates/template_options.rb#63
- def index; end
-
- # @return [Boolean] whether the page is the "index"
- #
- # source://yard//lib/yard/templates/template_options.rb#63
- def index=(_arg0); end
-
- # @return [Symbol] the markup format to use when parsing docstrings
- #
- # source://yard//lib/yard/templates/template_options.rb#17
- def markup; end
-
- # @return [Symbol] the markup format to use when parsing docstrings
- #
- # source://yard//lib/yard/templates/template_options.rb#17
- def markup=(_arg0); end
-
- # @return [Class] the markup provider class for the markup format
- #
- # source://yard//lib/yard/templates/template_options.rb#29
- def markup_provider; end
-
- # @return [Class] the markup provider class for the markup format
- #
- # source://yard//lib/yard/templates/template_options.rb#29
- def markup_provider=(_arg0); end
-
- # @deprecated use {#highlight} instead.
- # @return [Boolean] whether highlighting should be ignored
- #
- # source://yard//lib/yard/templates/template_options.rb#54
- def no_highlight; end
-
- # source://yard//lib/yard/templates/template_options.rb#57
- def no_highlight=(value); end
-
- # @return [CodeObjects::Base] the main object being generated in the template
- #
- # source://yard//lib/yard/templates/template_options.rb#37
- def object; end
-
- # @return [CodeObjects::Base] the main object being generated in the template
- #
- # source://yard//lib/yard/templates/template_options.rb#37
- def object=(_arg0); end
-
- # @return [CodeObjects::Base] the owner of the generated object
- #
- # source://yard//lib/yard/templates/template_options.rb#40
- def owner; end
-
- # @return [CodeObjects::Base] the owner of the generated object
- #
- # source://yard//lib/yard/templates/template_options.rb#40
- def owner=(_arg0); end
-
- # @return [String] the title of a given page
- #
- # source://yard//lib/yard/templates/template_options.rb#60
- def page_title; end
-
- # @return [String] the title of a given page
- #
- # source://yard//lib/yard/templates/template_options.rb#60
- def page_title=(_arg0); end
-
- # @return [Boolean] whether serialization should be performed
- #
- # source://yard//lib/yard/templates/template_options.rb#46
- def serialize; end
-
- # @return [Boolean] whether serialization should be performed
- #
- # source://yard//lib/yard/templates/template_options.rb#46
- def serialize=(_arg0); end
-
- # @return [Serializers::Base] the serializer used to generate links and serialize
- # output. Serialization output only occurs if {#serialize} is +true+.
- #
- # source://yard//lib/yard/templates/template_options.rb#50
- def serializer; end
-
- # @return [Serializers::Base] the serializer used to generate links and serialize
- # output. Serialization output only occurs if {#serialize} is +true+.
- #
- # source://yard//lib/yard/templates/template_options.rb#50
- def serializer=(_arg0); end
-
- # @return [Symbol] the template name used to render output
- #
- # source://yard//lib/yard/templates/template_options.rb#14
- def template; end
-
- # @return [Symbol] the template name used to render output
- #
- # source://yard//lib/yard/templates/template_options.rb#14
- def template=(_arg0); end
-
- # @return [Symbol] the template type used to generate output
- #
- # source://yard//lib/yard/templates/template_options.rb#43
- def type; end
-
- # @return [Symbol] the template type used to generate output
- #
- # source://yard//lib/yard/templates/template_options.rb#43
- def type=(_arg0); end
-
- # @return [Verifier] the verifier object
- #
- # source://yard//lib/yard/templates/template_options.rb#88
- def verifier; end
-
- # @return [Verifier] the verifier object
- #
- # source://yard//lib/yard/templates/template_options.rb#88
- def verifier=(_arg0); end
-end
-
-# source://yard//lib/yard/version.rb#5
-YARD::VERSION = T.let(T.unsafe(nil), String)
-
-# Similar to a Proc, but runs a set of Ruby expressions using a small
-# DSL to make tag lookups easier.
-#
-# The syntax is as follows:
-# * All syntax is Ruby compatible
-# * +object+ (+o+ for short) exist to access the object being verified
-# * +@TAGNAME+ is translated into +object.tag('TAGNAME')+
-# * +@@TAGNAME+ is translated into +object.tags('TAGNAME')+
-# * +object+ can be omitted as target for method calls (it is implied)
-#
-# @example Check if there are any @param tags
-# Verifier.new('@@param.empty?')
-# # Equivalent to:
-# Verifier.new('object.tags(:param).empty?')
-# @example Create a verifier to check for objects that don't have @private tags
-# verifier = Verifier.new('!@private')
-# verifier.call(object) # => true (no @private tag)
-# @example Create a verifier to find any return tag with an empty description
-# Verifier.new('@return.text.empty?')
-# # Equivalent to:
-# Verifier.new('object.tag(:return).text.empty?')
-# @example Specifying multiple expressions
-# Verifier.new('@return', '@param', '@yield')
-# # Equivalent to:
-# Verifier.new('@return && @param && @yield')
-# @example Using +object+ or +o+ to look up object attributes directly
-# Verifier.new('object.docstring == "hello world"')
-# # Equivalent to:
-# Verifier.new('o.docstring == "hello world"')
-# @example Without using +object+ or +o+
-# Verifier.new('tag(:return).size == 1 || has_tag?(:author)')
-#
-# source://yard//lib/yard/verifier.rb#34
-class YARD::Verifier
- # Creates a verifier from a set of expressions
- #
- # @param expressions [Array] a list of Ruby expressions to
- # parse.
- # @return [Verifier] a new instance of Verifier
- #
- # source://yard//lib/yard/verifier.rb#48
- def initialize(*expressions); end
-
- # Adds a set of expressions and recompiles the verifier
- #
- # @param expressions [Array] a list of expressions
- # @return [void]
- # @since 0.5.6
- #
- # source://yard//lib/yard/verifier.rb#58
- def add_expressions(*expressions); end
-
- # Tests the expressions on the object.
- #
- # @note If the object is a {CodeObjects::Proxy} the result will always be true.
- # @param object [CodeObjects::Base] the object to verify
- # @return [Boolean] the result of the expressions
- #
- # source://yard//lib/yard/verifier.rb#76
- def call(object); end
-
- # @return [Array] a list of all expressions the verifier checks for
- # @since 0.5.6
- #
- # source://yard//lib/yard/verifier.rb#37
- def expressions; end
-
- # source://yard//lib/yard/verifier.rb#39
- def expressions=(value); end
-
- # Passes any method calls to the object from the {#call}
- #
- # source://yard//lib/yard/verifier.rb#63
- def method_missing(sym, *args, &block); end
-
- # Runs a list of objects against the verifier and returns the subset
- # of verified objects.
- #
- # @param list [Array] a list of code objects
- # @return [Array] a list of code objects that match
- # the verifier.
- #
- # source://yard//lib/yard/verifier.rb#91
- def run(list); end
-
- protected
-
- # @return [CodeObjects::Base] the current object being tested
- #
- # source://yard//lib/yard/verifier.rb#99
- def o; end
-
- # @return [CodeObjects::Base] the current object being tested
- #
- # source://yard//lib/yard/verifier.rb#98
- def object; end
-
- private
-
- # Creates the +__execute+ method by evaluating the expressions
- # as Ruby code
- #
- # @return [void]
- #
- # source://yard//lib/yard/verifier.rb#130
- def create_method_from_expressions; end
-
- # Modifies nil to not throw NoMethodErrors. This allows
- # syntax like object.tag(:return).text to work if the #tag
- # call returns nil, which means users don't need to perform
- # stringent nil checking
- #
- # @return [void]
- #
- # source://yard//lib/yard/verifier.rb#112
- def modify_nilclass; end
-
- # Parses a single expression, handling some of the DSL syntax.
- #
- # The syntax "@tag" should be turned into object.tag(:tag),
- # and "@@tag" should be turned into object.tags(:tag)
- #
- # @return [String] the parsed expression
- #
- # source://yard//lib/yard/verifier.rb#145
- def parse_expression(expr); end
-
- # Returns the state of NilClass back to normal
- #
- # @return [void]
- #
- # source://yard//lib/yard/verifier.rb#120
- def unmodify_nilclass; end
-end
-
-# @private
-#
-# source://yard//lib/yard/verifier.rb#104
-YARD::Verifier::NILCLASS_METHODS = T.let(T.unsafe(nil), Array)
diff --git a/spoom.gemspec b/spoom.gemspec
index efed0907..15701c24 100644
--- a/spoom.gemspec
+++ b/spoom.gemspec
@@ -39,5 +39,5 @@ Gem::Specification.new do |spec|
spec.add_dependency("sorbet-static-and-runtime", ">= 0.5.10187")
spec.add_dependency("thor", ">= 0.19.2")
- spec.required_ruby_version = ">= 3.2"
+ spec.required_ruby_version = ">= 3.3"
end
diff --git a/test/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs_test.rb b/test/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs_test.rb
index e4f7ff4e..6a1a0cfb 100644
--- a/test/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs_test.rb
+++ b/test/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs_test.rb
@@ -12,6 +12,7 @@ def test_translate_to_rbi_empty
assert_rewrites_rbs(
from: contents,
to_pretty_format_for_humans: contents,
+ to_line_matched_format_for_machines: contents,
)
end
@@ -25,6 +26,7 @@ def foo; end
assert_rewrites_rbs(
from: contents,
to_pretty_format_for_humans: contents,
+ to_line_matched_format_for_machines: contents,
)
end
@@ -47,6 +49,8 @@ def foo(a, b)
a + b
end
RUBY
+
+ to_line_matched_format_for_machines: :same_as_pretty_output,
)
end
@@ -79,6 +83,8 @@ def a
end
end
RUBY
+
+ to_line_matched_format_for_machines: :same_as_pretty_output,
)
end
@@ -97,6 +103,13 @@ def foo; end
sig(:final) { overridable.void }
def foo; end
RUBY
+
+ to_line_matched_format_for_machines: <<~RUBY,
+ # RBS_REWRITTEN_ANNOTATION: @final
+ # RBS_REWRITTEN_ANNOTATION: @overridable
+ sig(:final) { overridable.void }
+ def foo; end
+ RUBY
)
end
@@ -121,6 +134,16 @@ def foo; end
sig { override(allow_incompatible: :visibility).void }
def bar; end
RUBY
+
+ to_line_matched_format_for_machines: <<~RUBY,
+ # RBS_REWRITTEN_ANNOTATION: @override(allow_incompatible: true)
+ sig { override(allow_incompatible: true).void }
+ def foo; end
+
+ # RBS_REWRITTEN_ANNOTATION: @override(allow_incompatible: :visibility)
+ sig { override(allow_incompatible: :visibility).void }
+ def bar; end
+ RUBY
)
end
@@ -134,7 +157,13 @@ def foo; end
to_pretty_format_for_humans: <<~RUBY,
# @without_runtime
- T::Sig::WithoutRuntime.sig { void }
+ ::T::Sig::WithoutRuntime.sig { void }
+ def foo; end
+ RUBY
+
+ to_line_matched_format_for_machines: <<~RUBY,
+ # RBS_REWRITTEN_ANNOTATION: @without_runtime
+ ::T::Sig::WithoutRuntime.sig { void }
def foo; end
RUBY
)
@@ -160,11 +189,25 @@ def singleton_method_added(m); end
class A
class << self
# @override
- T::Sig::WithoutRuntime.sig { override.params(m: Symbol).void }
+ ::T::Sig::WithoutRuntime.sig { override.params(m: Symbol).void }
def method_added(m); end
# @override
- T::Sig::WithoutRuntime.sig { override.params(m: Symbol).void }
+ ::T::Sig::WithoutRuntime.sig { override.params(m: Symbol).void }
+ def singleton_method_added(m); end
+ end
+ end
+ RUBY
+
+ to_line_matched_format_for_machines: <<~RUBY,
+ class A
+ class << self
+ # RBS_REWRITTEN_ANNOTATION: @override
+ ::T::Sig::WithoutRuntime.sig { override.params(m: Symbol).void }
+ def method_added(m); end
+
+ # RBS_REWRITTEN_ANNOTATION: @override
+ ::T::Sig::WithoutRuntime.sig { override.params(m: Symbol).void }
def singleton_method_added(m); end
end
end
@@ -191,6 +234,8 @@ def self.foo
end
end
RUBY
+
+ to_line_matched_format_for_machines: :same_as_pretty_output,
)
end
@@ -221,6 +266,8 @@ class A
attr_writer :e
end
RUBY
+
+ to_line_matched_format_for_machines: :same_as_pretty_output,
)
end
@@ -252,6 +299,14 @@ def test_translate_to_rbi_attr_sigs_with_annotations
sig(:final) { override(allow_incompatible: true).overridable.returns(Integer) }
attr_accessor :foo
RUBY
+
+ to_line_matched_format_for_machines: <<~RUBY,
+ # RBS_REWRITTEN_ANNOTATION: @final
+ # RBS_REWRITTEN_ANNOTATION: @override(allow_incompatible: true)
+ # RBS_REWRITTEN_ANNOTATION: @overridable
+ sig(:final) { override(allow_incompatible: true).overridable.returns(Integer) }
+ attr_accessor :foo
+ RUBY
)
end
@@ -265,7 +320,13 @@ def test_translate_to_rbi_attr_sigs_without_runtime
to_pretty_format_for_humans: <<~RUBY,
# @without_runtime
- T::Sig::WithoutRuntime.sig { returns(Integer) }
+ ::T::Sig::WithoutRuntime.sig { returns(Integer) }
+ attr_accessor :foo
+ RUBY
+
+ to_line_matched_format_for_machines: <<~RUBY,
+ # RBS_REWRITTEN_ANNOTATION: @without_runtime
+ ::T::Sig::WithoutRuntime.sig { returns(Integer) }
attr_accessor :foo
RUBY
)
@@ -282,6 +343,7 @@ def foo; end
assert_rewrites_rbs(
from: contents,
to_pretty_format_for_humans: contents,
+ to_line_matched_format_for_machines: contents,
)
end
@@ -299,6 +361,7 @@ def bar; end
assert_rewrites_rbs(
from: contents,
to_pretty_format_for_humans: contents,
+ to_line_matched_format_for_machines: contents,
)
end
@@ -324,6 +387,19 @@ def foo(a, b); end
sig { params(a: Integer, b: Integer).returns(Integer) }
def foo(a, b); end
RUBY
+
+ to_line_matched_format_for_machines: <<~RUBY,
+ sig do returns(::T::Array[
+ Integer
+ ]) end
+ attr_accessor :foo
+
+ sig do params(
+ a: Integer,
+ b: Integer
+ ).returns(Integer) end
+ def foo(a, b); end
+ RUBY
)
end
@@ -366,6 +442,20 @@ class << self
end
end
RUBY
+
+ to_line_matched_format_for_machines: <<~RUBY,
+ # RBS_REWRITTEN_ANNOTATION: @abstract
+ # RBS_REWRITTEN_ANNOTATION: @requires_ancestor: singleton(Foo::Bar)
+ class A; extend T::Helpers; abstract!; requires_ancestor { ::T.class_of(Foo::Bar) }
+ # RBS_REWRITTEN_ANNOTATION: @interface
+ # RBS_REWRITTEN_ANNOTATION: @sealed
+ module B; extend T::Helpers; interface!; sealed!
+ # RBS_REWRITTEN_ANNOTATION: @final
+ class << self; extend T::Helpers; final!
+ end
+ end
+ end
+ RUBY
)
end
@@ -379,6 +469,7 @@ class Foo
assert_rewrites_rbs(
from: contents,
to_pretty_format_for_humans: contents,
+ to_line_matched_format_for_machines: contents,
)
end
@@ -406,6 +497,16 @@ module Baz
def foo; end
end
RUBY
+
+ to_line_matched_format_for_machines: <<~RUBY,
+ # RBS_IGNORED_UNKNOWN_ANNOTATION: @foo
+ # RBS_IGNORED_UNKNOWN_ANNOTATION: @bar
+ # RBS_REWRITTEN_ANNOTATION: @requires_ancestor: Kernel
+ module Baz; extend T::Helpers; requires_ancestor { Kernel }
+ sig { void }
+ def foo; end
+ end
+ RUBY
)
end
@@ -446,6 +547,18 @@ class << self
end
end
RUBY
+
+ to_line_matched_format_for_machines: <<~RUBY,
+ # RBS_WRITTEN_ANNOTATION: [in A, out B]
+ class A; extend T::Generic; A = type_member(:in); B = type_member(:out)
+ # RBS_WRITTEN_ANNOTATION: [A, B < C]
+ module B; extend T::Generic; A = type_member; B = type_member {{ upper: C }}
+ # RBS_WRITTEN_ANNOTATION: [A = singleton(Numeric)]
+ class << self; extend T::Generic; A = type_member {{ fixed: ::T.class_of(Numeric) }}
+ end
+ end
+ end
+ RUBY
)
end
@@ -468,6 +581,8 @@ def foo
end
end
RUBY
+
+ to_line_matched_format_for_machines: :same_as_pretty_output,
)
end
@@ -490,6 +605,14 @@ def foo(param1:, param2:); end
end
def foo(param1:, param2:); end
RUBY
+
+ to_line_matched_format_for_machines: <<~RUBY,
+ sig do params(
+ param1: AVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongType,
+ param2: AVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongType
+ ).void end
+ def foo(param1:, param2:); end
+ RUBY
max_line_length: 120,
)
end
@@ -523,6 +646,8 @@ def test_translate_to_rbi_defs_within_send
sig { void }
abstract def qux; end
RUBY
+
+ to_line_matched_format_for_machines: :same_as_pretty_output,
)
end
@@ -546,6 +671,7 @@ def bar; end
assert_rewrites_rbs(
from: contents,
to_pretty_format_for_humans: contents,
+ to_line_matched_format_for_machines: contents,
)
end
@@ -576,6 +702,20 @@ def bar(a)
42
end
RUBY
+
+ to_line_matched_format_for_machines: <<~RUBY,
+ module Aliases
+ Foo = T.type_alias { ::T.any(Integer, String) }
+ MultiLine = T.type_alias do ::T.any(
+ Integer,
+ String) end
+ end
+
+ sig { params(a: Aliases::Foo).returns(Aliases::MultiLine) }
+ def bar(a)
+ 42
+ end
+ RUBY
)
end
@@ -600,6 +740,8 @@ def process_user(data)
data[:id]
end
RUBY
+
+ to_line_matched_format_for_machines: :same_as_pretty_output,
)
end
@@ -626,6 +768,8 @@ def get_status
end
end
RUBY
+
+ to_line_matched_format_for_machines: :same_as_pretty_output,
)
end
@@ -648,6 +792,8 @@ def double_items(items)
items.map { |x| x * 2 }
end
RUBY
+
+ to_line_matched_format_for_machines: :same_as_pretty_output,
)
end
@@ -670,6 +816,8 @@ def ensure_string(text)
text || ""
end
RUBY
+
+ to_line_matched_format_for_machines: :same_as_pretty_output,
)
end
@@ -686,6 +834,8 @@ def foo
def foo
end
RUBY
+
+ to_line_matched_format_for_machines: :same_as_pretty_output,
)
end
@@ -714,6 +864,19 @@ def foo
""
end
RUBY
+
+ to_line_matched_format_for_machines: <<~RUBY,
+ MultiLine = T.type_alias do ::T.any(
+ String,
+ Integer) end
+ # foo bar baz
+ #| | Symbol
+
+ sig { returns(MultiLine) }
+ def foo
+ ""
+ end
+ RUBY
)
end
@@ -727,6 +890,7 @@ class Foo
assert_rewrites_rbs(
from: contents,
to_pretty_format_for_humans: contents,
+ to_line_matched_format_for_machines: contents,
)
end
@@ -747,6 +911,8 @@ class Range
end
end
RUBY
+
+ to_line_matched_format_for_machines: :same_as_pretty_output,
)
end
@@ -767,6 +933,8 @@ class Foo
def each(&block); end
end
RUBY
+
+ to_line_matched_format_for_machines: :same_as_pretty_output,
)
end
@@ -786,6 +954,14 @@ class Foo
def each(&block); end
end
RUBY
+
+ to_line_matched_format_for_machines: <<~RUBY,
+ class Foo
+ # RBS deleted overload: () { (Integer) -> void } -> void
+ sig { returns(::T::Enumerator[Integer, void]) }
+ def each(&block); end
+ end
+ RUBY
overloads_strategy: :translate_last,
)
end
@@ -820,6 +996,8 @@ class Foo
def foo; end
end
RUBY
+
+ to_line_matched_format_for_machines: :same_as_pretty_output,
overloads_strategy: :translate_last,
)
end
@@ -974,17 +1152,20 @@ def rbs_comments_to_sorbet_sigs(ruby_contents, max_line_length: nil, overloads_s
#: (
#| from: String,
#| to_pretty_format_for_humans: String,
+ #| to_line_matched_format_for_machines: String | Symbol,
#| ?max_line_length: Integer?,
#| ?overloads_strategy: Symbol
#| ) -> void
def assert_rewrites_rbs(
from:,
to_pretty_format_for_humans:,
+ to_line_matched_format_for_machines:,
max_line_length: nil,
overloads_strategy: :translate_all
)
source_with_rbs = from
expected_pretty_format = to_pretty_format_for_humans
+ expected_line_matched_format = to_line_matched_format_for_machines
begin # Validate the human-readable rewrite
rewritten_output = rbs_comments_to_sorbet_sigs(
@@ -995,6 +1176,38 @@ def assert_rewrites_rbs(
assert_equal(expected_pretty_format, rewritten_output)
end
+
+ begin # Validate the line-matched format
+ case expected_line_matched_format
+ when :same_as_pretty_output
+ expected_line_matched_format = expected_pretty_format
+ when Symbol
+ raise ArgumentError, "Invalid symbol for expected_line_matched_format: #{expected_line_matched_format}"
+ end
+
+ unless (validation_result = Validator.validate(source_with_rbs, expected_line_matched_format)).valid?
+ flunk(<<~MSG)
+ The rewritten code does not match the expected line-matched format.
+
+ Validation errors:
+ #{validation_result.errors.map { |e| "- #{e}" }.join("\n")}
+
+ Expected line-matched format:
+ #{expected_line_matched_format}
+
+ Actual rewritten output:
+ #{rewritten_output}
+ MSG
+ end
+
+ rewritten_output = rbs_comments_to_sorbet_sigs(
+ source_with_rbs,
+ max_line_length:,
+ overloads_strategy:,
+ )
+
+ assert_equal(expected_line_matched_format, rewritten_output)
+ end
end
end
end
diff --git a/test/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments_test.rb b/test/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments_test.rb
index 29ededbe..453b902d 100644
--- a/test/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments_test.rb
+++ b/test/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments_test.rb
@@ -198,7 +198,7 @@ def bar; end
def test_translate_to_rbs_method_sigs_without_runtime
contents = <<~RB
- T::Sig::WithoutRuntime.sig { void }
+ ::T::Sig::WithoutRuntime.sig { void }
def foo; end
RB
@@ -274,7 +274,7 @@ def test_translate_to_rbs_attr_sigs_with_annotations
def test_translate_to_rbs_attr_sigs_without_runtime
contents = <<~RB
- T::Sig::WithoutRuntime.sig { returns(Integer) }
+ ::T::Sig::WithoutRuntime.sig { returns(Integer) }
attr_accessor :foo
RB
diff --git a/test/spoom/sorbet/translate/validator_test.rb b/test/spoom/sorbet/translate/validator_test.rb
new file mode 100644
index 00000000..73c66583
--- /dev/null
+++ b/test/spoom/sorbet/translate/validator_test.rb
@@ -0,0 +1,139 @@
+# typed: true
+# frozen_string_literal: true
+
+require "test_helper"
+
+module Spoom
+ module Sorbet
+ module Translate
+ class ValidatorTest < Minitest::Test
+ def test_validate_returns_true_if_landmarks_did_not_move
+ assert_valid_translation(
+ original: <<~RUBY,
+ # original comment 1
+ class C; end
+ # original comment 2
+ module M; end
+ # original comment 3
+ def m; end
+ # original comment 4
+ __LINE__
+ RUBY
+ rewritten: <<~RUBY,
+ # different comment 1
+ class C; end
+ # different comment 2
+ module M; end
+ # different comment 3
+ def m; end
+ # different comment 4
+ __LINE__
+ RUBY
+ )
+ end
+
+ def test_validate_returns_false_if_landmarks_moved
+ # Each snippet is pushed down a line in the rewrite, so its landmark is
+ # expected on line 1 but actually lands on line 2.
+ assert_translation_diff(
+ original: <<~RUBY,
+ class C; end
+ module M; end
+ def m; end
+ __LINE__
+ RUBY
+ rewritten: <<~RUBY,
+ # This new comment pushes everything down a line!
+ class C; end
+ module M; end
+ def m; end
+ __LINE__
+ RUBY
+ on_wrong_line: [
+ { landmark_id: "class C", expected: [1], actual: [2] },
+ { landmark_id: "module M", expected: [2], actual: [3] },
+ { landmark_id: "def m", expected: [3], actual: [4] },
+ { landmark_id: "__LINE__", expected: [4], actual: [5] },
+ { landmark_id: "EOF", expected: [4], actual: [5] },
+ ],
+ )
+ end
+
+ def test_validate_returns_false_if_landmarks_disappeared
+ assert_translation_diff(
+ original: <<~RUBY,
+ class C; end
+ module M; end
+ def m; end
+ __LINE__
+ RUBY
+ rewritten: <<~RUBY,
+ # They're all gone!
+ RUBY
+ is_missing: [
+ { landmark_id: "class C", line: 1 },
+ { landmark_id: "module M", line: 2 },
+ { landmark_id: "def m", line: 3 },
+ { landmark_id: "__LINE__", line: 4 },
+ ],
+ on_wrong_line: [{ landmark_id: "EOF", expected: [4], actual: [1] }],
+ )
+ end
+
+ def test_validate_returns_false_if_landmarks_appeared
+ assert_translation_diff(
+ original: <<~RUBY,
+ # Nothing was here before.
+ RUBY
+ rewritten: <<~RUBY,
+ class NewClass; end
+ module NewModule; end
+ def new_method; end
+ __LINE__
+ RUBY
+ has_excess: [
+ { landmark_id: "class NewClass", line: 1 },
+ { landmark_id: "module NewModule", line: 2 },
+ { landmark_id: "def new_method", line: 3 },
+ { landmark_id: "__LINE__", line: 4 },
+ ],
+ on_wrong_line: [{ landmark_id: "EOF", expected: [1], actual: [4] }],
+ )
+ end
+
+ private
+
+ def assert_valid_translation(original:, rewritten:)
+ # A translation is valid when there's nothing missing, excess, or on the wrong line.
+ assert_translation_diff(original:, rewritten:, is_missing: [], has_excess: [], on_wrong_line: [])
+ end
+
+ def assert_translation_diff(original:, rewritten:, is_missing: [], has_excess: [], on_wrong_line: [])
+ missing = is_missing
+ excess = has_excess
+
+ result = Validator.validate(original, rewritten)
+
+ assert_equal(missing, result.missing_from_rewritten_output, <<~MSG)
+ Unexpected `missing_from_rewritten_output`.\n#{result.pretty_inspect}
+ MSG
+
+ assert_equal(excess, result.excess_in_rewritten_output, <<~MSG)
+ Unexpected `excess_in_rewritten_output`.\n#{result.pretty_inspect}
+ MSG
+
+ assert_equal(on_wrong_line, result.on_wrong_line, <<~MSG)
+ Unexpected `on_wrong_line`.\n#{result.pretty_inspect}
+ MSG
+
+ # Sanity check the `#valid?` predicate
+ if missing.empty? && excess.empty? && on_wrong_line.empty?
+ assert_predicate(result, :valid?)
+ else
+ refute_predicate(result, :valid?)
+ end
+ end
+ end
+ end
+ end
+end