diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 13ff60265..6f59f0b63 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -53,6 +53,12 @@ jobs: with: submodules: "recursive" + # Spoom (and Tapioca) don't support Ruby 3.1 and won't be installed on it + # so we need to remove the Gemfile.lock to avoid errors + - name: Remove Gemfile.lock + if: matrix.ruby == '3.1' + run: rm Gemfile.lock + - name: Set up Ruby uses: ruby/setup-ruby@cb0fda56a307b8c78d38320cd40d9eb22a3bf04e # v1.242.0 with: diff --git a/Gemfile b/Gemfile index 6b33774a1..fec50b59c 100644 --- a/Gemfile +++ b/Gemfile @@ -24,6 +24,6 @@ group :development do platforms :ruby do # C Ruby (MRI), Rubinius or TruffleRuby, but NOT Windows # sorbet-static is not available on Windows. We also skip Tapioca since it depends on sorbet-static-and-runtime gem "sorbet-static-and-runtime" - gem "tapioca", "~> 0.16", require: false + gem "tapioca", "~> 0.16", require: false if RUBY_VERSION >= "3.2" end end diff --git a/Gemfile.lock b/Gemfile.lock index b61075c42..4f3d2c49b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -30,7 +30,7 @@ GEM mocha (2.7.1) ruby2_keywords (>= 0.0.5) netrc (0.11.0) - parallel (1.26.3) + parallel (1.27.0) parser (3.3.7.1) ast (~> 2.4.1) racc @@ -46,7 +46,7 @@ GEM racc (1.8.1) rainbow (3.1.1) rake (13.2.1) - rbi (0.3.1) + rbi (0.3.3) prism (~> 1.0) rbs (>= 3.4.4) sorbet-runtime (>= 0.5.9204) @@ -58,6 +58,8 @@ GEM regexp_parser (2.10.0) reline (0.6.0) io-console (~> 0.5) + require-hooks (0.2.2) + rexml (3.4.1) rubocop (1.72.0) json (~> 2.3) language_server-protocol (~> 3.17.0.2) @@ -84,31 +86,35 @@ GEM rubocop (>= 1) ruby-progressbar (1.13.0) ruby2_keywords (0.0.5) - sorbet (0.5.12119) - sorbet-static (= 0.5.12119) - sorbet-runtime (0.5.12119) - sorbet-static (0.5.12119-universal-darwin) - sorbet-static (0.5.12119-x86_64-linux) - sorbet-static-and-runtime (0.5.12119) - sorbet (= 0.5.12119) - sorbet-runtime (= 0.5.12119) - spoom (1.6.1) + sorbet (0.5.12123) + sorbet-static (= 0.5.12123) + sorbet-runtime (0.5.12123) + sorbet-static (0.5.12123-aarch64-linux) + sorbet-static (0.5.12123-universal-darwin) + sorbet-static (0.5.12123-x86_64-linux) + sorbet-static-and-runtime (0.5.12123) + sorbet (= 0.5.12123) + sorbet-runtime (= 0.5.12123) + spoom (1.7.0) erubi (>= 1.10.0) prism (>= 0.28.0) - rbi (>= 0.2.3) + rbi (>= 0.3.3) + rbs (>= 4.0.0.dev.4) + rexml (>= 3.2.6) sorbet-static-and-runtime (>= 0.5.10187) thor (>= 0.19.2) stringio (3.1.6) syntax_tree (6.2.0) prettier_print (>= 1.2.0) - tapioca (0.16.11) + tapioca (0.17.0) benchmark bundler (>= 2.2.25) netrc (>= 0.11.0) parallel (>= 1.21.0) - rbi (~> 0.2) + rbi (>= 0.3.1) + require-hooks (>= 0.2.2) sorbet-static-and-runtime (>= 0.5.11087) - spoom (>= 1.2.0) + spoom (>= 1.7.0) thor (>= 1.2.0) yard-sorbet test-unit (3.6.7) @@ -123,7 +129,9 @@ GEM yard PLATFORMS + aarch64-linux arm64-darwin + universal-darwin x64-mingw-ucrt x64-mingw32 x86_64-darwin diff --git a/sorbet/rbi/gems/parallel@1.26.3.rbi b/sorbet/rbi/gems/parallel@1.27.0.rbi similarity index 100% rename from sorbet/rbi/gems/parallel@1.26.3.rbi rename to sorbet/rbi/gems/parallel@1.27.0.rbi diff --git a/sorbet/rbi/gems/rbi@0.3.1.rbi b/sorbet/rbi/gems/rbi@0.3.3.rbi similarity index 88% rename from sorbet/rbi/gems/rbi@0.3.1.rbi rename to sorbet/rbi/gems/rbi@0.3.3.rbi index f5acce9a2..7b98a00cc 100644 --- a/sorbet/rbi/gems/rbi@0.3.1.rbi +++ b/sorbet/rbi/gems/rbi@0.3.3.rbi @@ -14,31 +14,31 @@ # source://rbi//lib/rbi.rb#8 module RBI; end -# source://rbi//lib/rbi/model.rb#802 +# source://rbi//lib/rbi/model.rb#804 class RBI::Arg < ::RBI::Node # : (String value, ?loc: Loc?) -> void # # @return [Arg] a new instance of Arg # - # source://rbi//lib/rbi/model.rb#807 + # source://rbi//lib/rbi/model.rb#809 sig { params(value: ::String, loc: T.nilable(::RBI::Loc)).void } def initialize(value, loc: T.unsafe(nil)); end # : (Object? other) -> bool # - # source://rbi//lib/rbi/model.rb#813 + # source://rbi//lib/rbi/model.rb#815 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end # : -> String # - # source://rbi//lib/rbi/model.rb#818 + # source://rbi//lib/rbi/model.rb#820 sig { returns(::String) } def to_s; end # : String # - # source://rbi//lib/rbi/model.rb#804 + # source://rbi//lib/rbi/model.rb#806 sig { returns(::String) } def value; end end @@ -47,7 +47,7 @@ end # # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. # -# source://rbi//lib/rbi/model.rb#298 +# source://rbi//lib/rbi/model.rb#300 class RBI::Attr < ::RBI::NodeWithComments include ::RBI::Indexable @@ -57,7 +57,7 @@ class RBI::Attr < ::RBI::NodeWithComments # # @return [Attr] a new instance of Attr # - # source://rbi//lib/rbi/model.rb#314 + # source://rbi//lib/rbi/model.rb#316 sig do params( name: ::Symbol, @@ -86,7 +86,7 @@ class RBI::Attr < ::RBI::NodeWithComments # @abstract # - # source://rbi//lib/rbi/model.rb#322 + # source://rbi//lib/rbi/model.rb#324 sig { abstract.returns(T::Array[::String]) } def fully_qualified_names; end @@ -104,25 +104,25 @@ class RBI::Attr < ::RBI::NodeWithComments # : Array[Symbol] # - # source://rbi//lib/rbi/model.rb#305 + # source://rbi//lib/rbi/model.rb#307 sig { returns(T::Array[::Symbol]) } def names; end # : Array[Sig] # - # source://rbi//lib/rbi/model.rb#311 + # source://rbi//lib/rbi/model.rb#313 sig { returns(T::Array[::RBI::Sig]) } def sigs; end # : Visibility # - # source://rbi//lib/rbi/model.rb#308 + # source://rbi//lib/rbi/model.rb#310 sig { returns(::RBI::Visibility) } def visibility; end # : Visibility # - # source://rbi//lib/rbi/model.rb#308 + # source://rbi//lib/rbi/model.rb#310 # @return [Visibility] def visibility=(_arg0); end @@ -166,13 +166,13 @@ class RBI::Attr < ::RBI::NodeWithComments def parse_sig; end end -# source://rbi//lib/rbi/model.rb#325 +# source://rbi//lib/rbi/model.rb#327 class RBI::AttrAccessor < ::RBI::Attr # : (Symbol name, *Symbol names, ?visibility: Visibility, ?sigs: Array[Sig], ?loc: Loc?, ?comments: Array[Comment]) ?{ (AttrAccessor node) -> void } -> void # # @return [AttrAccessor] a new instance of AttrAccessor # - # source://rbi//lib/rbi/model.rb#327 + # source://rbi//lib/rbi/model.rb#329 sig do params( name: ::Symbol, @@ -202,24 +202,24 @@ class RBI::AttrAccessor < ::RBI::Attr # : -> Array[String] # - # source://rbi//lib/rbi/model.rb#334 + # source://rbi//lib/rbi/model.rb#336 sig { override.returns(T::Array[::String]) } def fully_qualified_names; end # : -> String # - # source://rbi//lib/rbi/model.rb#341 + # source://rbi//lib/rbi/model.rb#343 sig { override.returns(::String) } def to_s; end end -# source://rbi//lib/rbi/model.rb#347 +# source://rbi//lib/rbi/model.rb#349 class RBI::AttrReader < ::RBI::Attr # : (Symbol name, *Symbol names, ?visibility: Visibility, ?sigs: Array[Sig], ?loc: Loc?, ?comments: Array[Comment]) ?{ (AttrReader node) -> void } -> void # # @return [AttrReader] a new instance of AttrReader # - # source://rbi//lib/rbi/model.rb#349 + # source://rbi//lib/rbi/model.rb#351 sig do params( name: ::Symbol, @@ -249,24 +249,24 @@ class RBI::AttrReader < ::RBI::Attr # : -> Array[String] # - # source://rbi//lib/rbi/model.rb#356 + # source://rbi//lib/rbi/model.rb#358 sig { override.returns(T::Array[::String]) } def fully_qualified_names; end # : -> String # - # source://rbi//lib/rbi/model.rb#363 + # source://rbi//lib/rbi/model.rb#365 sig { override.returns(::String) } def to_s; end end -# source://rbi//lib/rbi/model.rb#369 +# source://rbi//lib/rbi/model.rb#371 class RBI::AttrWriter < ::RBI::Attr # : (Symbol name, *Symbol names, ?visibility: Visibility, ?sigs: Array[Sig], ?loc: Loc?, ?comments: Array[Comment]) ?{ (AttrWriter node) -> void } -> void # # @return [AttrWriter] a new instance of AttrWriter # - # source://rbi//lib/rbi/model.rb#371 + # source://rbi//lib/rbi/model.rb#373 sig do params( name: ::Symbol, @@ -296,13 +296,13 @@ class RBI::AttrWriter < ::RBI::Attr # : -> Array[String] # - # source://rbi//lib/rbi/model.rb#378 + # source://rbi//lib/rbi/model.rb#380 sig { override.returns(T::Array[::String]) } def fully_qualified_names; end # : -> String # - # source://rbi//lib/rbi/model.rb#385 + # source://rbi//lib/rbi/model.rb#387 sig { override.returns(::String) } def to_s; end end @@ -320,13 +320,13 @@ class RBI::BlankLine < ::RBI::Comment def initialize(loc: T.unsafe(nil)); end end -# source://rbi//lib/rbi/model.rb#642 +# source://rbi//lib/rbi/model.rb#644 class RBI::BlockParam < ::RBI::Param # : (String name, ?loc: Loc?, ?comments: Array[Comment]) ?{ (BlockParam node) -> void } -> void # # @return [BlockParam] a new instance of BlockParam # - # source://rbi//lib/rbi/model.rb#644 + # source://rbi//lib/rbi/model.rb#646 sig do params( name: ::String, @@ -339,24 +339,24 @@ class RBI::BlockParam < ::RBI::Param # : (Object? other) -> bool # - # source://rbi//lib/rbi/model.rb#656 + # source://rbi//lib/rbi/model.rb#658 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end # : -> String # - # source://rbi//lib/rbi/model.rb#651 + # source://rbi//lib/rbi/model.rb#653 sig { override.returns(::String) } def to_s; end end -# source://rbi//lib/rbi/model.rb#202 +# source://rbi//lib/rbi/model.rb#204 class RBI::Class < ::RBI::Scope # : (String name, ?superclass_name: String?, ?loc: Loc?, ?comments: Array[Comment]) ?{ (Class node) -> void } -> void # # @return [Class] a new instance of Class # - # source://rbi//lib/rbi/model.rb#210 + # source://rbi//lib/rbi/model.rb#212 sig do params( name: ::String, @@ -378,31 +378,31 @@ class RBI::Class < ::RBI::Scope # : -> String # - # source://rbi//lib/rbi/model.rb#219 + # source://rbi//lib/rbi/model.rb#221 sig { override.returns(::String) } def fully_qualified_name; end # : String # - # source://rbi//lib/rbi/model.rb#204 + # source://rbi//lib/rbi/model.rb#206 sig { returns(::String) } def name; end # : String # - # source://rbi//lib/rbi/model.rb#204 + # source://rbi//lib/rbi/model.rb#206 # @return [String] def name=(_arg0); end # : String? # - # source://rbi//lib/rbi/model.rb#207 + # source://rbi//lib/rbi/model.rb#209 sig { returns(T.nilable(::String)) } def superclass_name; end # : String? # - # source://rbi//lib/rbi/model.rb#207 + # source://rbi//lib/rbi/model.rb#209 # @return [String, nil] def superclass_name=(_arg0); end end @@ -500,7 +500,7 @@ end # Consts # -# source://rbi//lib/rbi/model.rb#270 +# source://rbi//lib/rbi/model.rb#272 class RBI::Const < ::RBI::NodeWithComments include ::RBI::Indexable @@ -508,7 +508,7 @@ class RBI::Const < ::RBI::NodeWithComments # # @return [Const] a new instance of Const # - # source://rbi//lib/rbi/model.rb#275 + # source://rbi//lib/rbi/model.rb#277 sig do params( name: ::String, @@ -530,7 +530,7 @@ class RBI::Const < ::RBI::NodeWithComments # : -> String # - # source://rbi//lib/rbi/model.rb#283 + # source://rbi//lib/rbi/model.rb#285 sig { returns(::String) } def fully_qualified_name; end @@ -542,19 +542,19 @@ class RBI::Const < ::RBI::NodeWithComments # : String # - # source://rbi//lib/rbi/model.rb#272 + # source://rbi//lib/rbi/model.rb#274 sig { returns(::String) } def name; end # : -> String # - # source://rbi//lib/rbi/model.rb#291 + # source://rbi//lib/rbi/model.rb#293 sig { override.returns(::String) } def to_s; end # : String # - # source://rbi//lib/rbi/model.rb#272 + # source://rbi//lib/rbi/model.rb#274 # @return [String] def value; end end @@ -565,7 +565,7 @@ class RBI::DuplicateNodeError < ::RBI::Error; end # source://rbi//lib/rbi.rb#9 class RBI::Error < ::StandardError; end -# source://rbi//lib/rbi/model.rb#692 +# source://rbi//lib/rbi/model.rb#694 class RBI::Extend < ::RBI::Mixin include ::RBI::Indexable @@ -573,7 +573,7 @@ class RBI::Extend < ::RBI::Mixin # # @return [Extend] a new instance of Extend # - # source://rbi//lib/rbi/model.rb#694 + # source://rbi//lib/rbi/model.rb#696 sig do params( name: ::String, @@ -601,18 +601,18 @@ class RBI::Extend < ::RBI::Mixin # : -> String # - # source://rbi//lib/rbi/model.rb#701 + # source://rbi//lib/rbi/model.rb#703 sig { override.returns(::String) } def to_s; end end -# source://rbi//lib/rbi/model.rb#135 +# source://rbi//lib/rbi/model.rb#137 class RBI::File # : (?strictness: String?, ?comments: Array[Comment]) ?{ (File file) -> void } -> void # # @return [File] a new instance of File # - # source://rbi//lib/rbi/model.rb#146 + # source://rbi//lib/rbi/model.rb#148 sig do params( strictness: T.nilable(::String), @@ -624,19 +624,19 @@ class RBI::File # : (Node node) -> void # - # source://rbi//lib/rbi/model.rb#154 + # source://rbi//lib/rbi/model.rb#156 sig { params(node: ::RBI::Node).void } def <<(node); end # : Array[Comment] # - # source://rbi//lib/rbi/model.rb#143 + # source://rbi//lib/rbi/model.rb#145 sig { returns(T::Array[::RBI::Comment]) } def comments; end # : Array[Comment] # - # source://rbi//lib/rbi/model.rb#143 + # source://rbi//lib/rbi/model.rb#145 # @return [Array] def comments=(_arg0); end @@ -644,13 +644,13 @@ class RBI::File # # @return [Boolean] # - # source://rbi//lib/rbi/model.rb#159 + # source://rbi//lib/rbi/model.rb#161 sig { returns(T::Boolean) } def empty?; end # : (?out: (IO | StringIO), ?indent: Integer, ?print_locs: bool, ?max_line_length: Integer?) -> void # - # source://rbi//lib/rbi/printer.rb#794 + # source://rbi//lib/rbi/printer.rb#817 sig do params( out: T.any(::IO, ::StringIO), @@ -663,50 +663,50 @@ class RBI::File # : (?out: (IO | StringIO), ?indent: Integer, ?print_locs: bool) -> void # - # source://rbi//lib/rbi/rbs_printer.rb#1106 + # source://rbi//lib/rbi/rbs_printer.rb#1116 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 # : (?indent: Integer, ?print_locs: bool) -> String # - # source://rbi//lib/rbi/rbs_printer.rb#1112 + # source://rbi//lib/rbi/rbs_printer.rb#1122 sig { params(indent: ::Integer, print_locs: T::Boolean).returns(::String) } def rbs_string(indent: T.unsafe(nil), print_locs: T.unsafe(nil)); end # : Tree # - # source://rbi//lib/rbi/model.rb#137 + # source://rbi//lib/rbi/model.rb#139 sig { returns(::RBI::Tree) } def root; end # : Tree # - # source://rbi//lib/rbi/model.rb#137 + # source://rbi//lib/rbi/model.rb#139 # @return [Tree] def root=(_arg0); end # : String? # - # source://rbi//lib/rbi/model.rb#140 + # source://rbi//lib/rbi/model.rb#142 sig { returns(T.nilable(::String)) } def strictness; end # : String? # - # source://rbi//lib/rbi/model.rb#140 + # source://rbi//lib/rbi/model.rb#142 # @return [String, nil] def strictness=(_arg0); end # : (?indent: Integer, ?print_locs: bool, ?max_line_length: Integer?) -> String # - # source://rbi//lib/rbi/printer.rb#800 + # source://rbi//lib/rbi/printer.rb#823 sig { params(indent: ::Integer, print_locs: T::Boolean, max_line_length: T.nilable(::Integer)).returns(::String) } def string(indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end end # source://rbi//lib/rbi/formatter.rb#5 class RBI::Formatter - # : (?add_sig_templates: bool, ?group_nodes: bool, ?max_line_length: Integer?, ?nest_singleton_methods: bool, ?nest_non_public_members: bool, ?sort_nodes: bool) -> void + # : (?add_sig_templates: bool, ?group_nodes: bool, ?max_line_length: Integer?, ?nest_singleton_methods: bool, ?nest_non_public_members: bool, ?sort_nodes: bool, ?replace_attributes_with_methods: bool) -> void # # @return [Formatter] a new instance of Formatter # @@ -718,20 +718,21 @@ class RBI::Formatter max_line_length: T.nilable(::Integer), nest_singleton_methods: T::Boolean, nest_non_public_members: T::Boolean, - sort_nodes: T::Boolean + sort_nodes: T::Boolean, + replace_attributes_with_methods: T::Boolean ).void end - def initialize(add_sig_templates: T.unsafe(nil), group_nodes: T.unsafe(nil), max_line_length: T.unsafe(nil), nest_singleton_methods: T.unsafe(nil), nest_non_public_members: T.unsafe(nil), sort_nodes: T.unsafe(nil)); 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 # : (RBI::File file) -> void # - # source://rbi//lib/rbi/formatter.rb#33 + # source://rbi//lib/rbi/formatter.rb#35 sig { params(file: ::RBI::File).void } def format_file(file); end # : (RBI::Tree tree) -> void # - # source://rbi//lib/rbi/formatter.rb#38 + # source://rbi//lib/rbi/formatter.rb#40 sig { params(tree: ::RBI::Tree).void } def format_tree(tree); end @@ -749,7 +750,7 @@ class RBI::Formatter # : (RBI::File file) -> String # - # source://rbi//lib/rbi/formatter.rb#27 + # source://rbi//lib/rbi/formatter.rb#29 sig { params(file: ::RBI::File).returns(::String) } def print_file(file); end end @@ -795,7 +796,7 @@ class RBI::GroupNodesError < ::RBI::Error; end # Sorbet's misc. # -# source://rbi//lib/rbi/model.rb#1042 +# source://rbi//lib/rbi/model.rb#1069 class RBI::Helper < ::RBI::NodeWithComments include ::RBI::Indexable @@ -803,7 +804,7 @@ class RBI::Helper < ::RBI::NodeWithComments # # @return [Helper] a new instance of Helper # - # source://rbi//lib/rbi/model.rb#1047 + # source://rbi//lib/rbi/model.rb#1074 sig do params( name: ::String, @@ -830,18 +831,18 @@ class RBI::Helper < ::RBI::NodeWithComments # : String # - # source://rbi//lib/rbi/model.rb#1044 + # source://rbi//lib/rbi/model.rb#1071 sig { returns(::String) } def name; end # : -> String # - # source://rbi//lib/rbi/model.rb#1055 + # source://rbi//lib/rbi/model.rb#1082 sig { override.returns(::String) } def to_s; end end -# source://rbi//lib/rbi/model.rb#678 +# source://rbi//lib/rbi/model.rb#680 class RBI::Include < ::RBI::Mixin include ::RBI::Indexable @@ -849,7 +850,7 @@ class RBI::Include < ::RBI::Mixin # # @return [Include] a new instance of Include # - # source://rbi//lib/rbi/model.rb#680 + # source://rbi//lib/rbi/model.rb#682 sig do params( name: ::String, @@ -877,7 +878,7 @@ class RBI::Include < ::RBI::Mixin # : -> String # - # source://rbi//lib/rbi/model.rb#687 + # source://rbi//lib/rbi/model.rb#689 sig { override.returns(::String) } def to_s; end end @@ -955,42 +956,42 @@ module RBI::Indexable def index_ids; end end -# source://rbi//lib/rbi/model.rb#823 +# source://rbi//lib/rbi/model.rb#825 class RBI::KwArg < ::RBI::Arg # : (String keyword, String value, ?loc: Loc?) -> void # # @return [KwArg] a new instance of KwArg # - # source://rbi//lib/rbi/model.rb#828 + # source://rbi//lib/rbi/model.rb#830 sig { params(keyword: ::String, value: ::String, loc: T.nilable(::RBI::Loc)).void } def initialize(keyword, value, loc: T.unsafe(nil)); end # : (Object? other) -> bool # - # source://rbi//lib/rbi/model.rb#834 + # source://rbi//lib/rbi/model.rb#836 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end # : String # - # source://rbi//lib/rbi/model.rb#825 + # source://rbi//lib/rbi/model.rb#827 sig { returns(::String) } def keyword; end # : -> String # - # source://rbi//lib/rbi/model.rb#839 + # source://rbi//lib/rbi/model.rb#841 sig { returns(::String) } def to_s; end end -# source://rbi//lib/rbi/model.rb#600 +# source://rbi//lib/rbi/model.rb#602 class RBI::KwOptParam < ::RBI::Param # : (String name, String value, ?loc: Loc?, ?comments: Array[Comment]) ?{ (KwOptParam node) -> void } -> void # # @return [KwOptParam] a new instance of KwOptParam # - # source://rbi//lib/rbi/model.rb#605 + # source://rbi//lib/rbi/model.rb#607 sig do params( name: ::String, @@ -1004,30 +1005,30 @@ class RBI::KwOptParam < ::RBI::Param # : (Object? other) -> bool # - # source://rbi//lib/rbi/model.rb#618 + # source://rbi//lib/rbi/model.rb#620 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end # : -> String # - # source://rbi//lib/rbi/model.rb#613 + # source://rbi//lib/rbi/model.rb#615 sig { override.returns(::String) } def to_s; end # : String # - # source://rbi//lib/rbi/model.rb#602 + # source://rbi//lib/rbi/model.rb#604 sig { returns(::String) } def value; end end -# source://rbi//lib/rbi/model.rb#581 +# source://rbi//lib/rbi/model.rb#583 class RBI::KwParam < ::RBI::Param # : (String name, ?loc: Loc?, ?comments: Array[Comment]) ?{ (KwParam node) -> void } -> void # # @return [KwParam] a new instance of KwParam # - # source://rbi//lib/rbi/model.rb#583 + # source://rbi//lib/rbi/model.rb#585 sig do params( name: ::String, @@ -1040,24 +1041,24 @@ class RBI::KwParam < ::RBI::Param # : (Object? other) -> bool # - # source://rbi//lib/rbi/model.rb#595 + # source://rbi//lib/rbi/model.rb#597 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end # : -> String # - # source://rbi//lib/rbi/model.rb#590 + # source://rbi//lib/rbi/model.rb#592 sig { override.returns(::String) } def to_s; end end -# source://rbi//lib/rbi/model.rb#623 +# source://rbi//lib/rbi/model.rb#625 class RBI::KwRestParam < ::RBI::Param # : (String name, ?loc: Loc?, ?comments: Array[Comment]) ?{ (KwRestParam node) -> void } -> void # # @return [KwRestParam] a new instance of KwRestParam # - # source://rbi//lib/rbi/model.rb#625 + # source://rbi//lib/rbi/model.rb#627 sig do params( name: ::String, @@ -1070,13 +1071,13 @@ class RBI::KwRestParam < ::RBI::Param # : (Object? other) -> bool # - # source://rbi//lib/rbi/model.rb#637 + # source://rbi//lib/rbi/model.rb#639 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end # : -> String # - # source://rbi//lib/rbi/model.rb#632 + # source://rbi//lib/rbi/model.rb#634 sig { override.returns(::String) } def to_s; end end @@ -1178,7 +1179,7 @@ end # Methods and args # -# source://rbi//lib/rbi/model.rb#393 +# source://rbi//lib/rbi/model.rb#395 class RBI::Method < ::RBI::NodeWithComments include ::RBI::Indexable @@ -1186,7 +1187,7 @@ class RBI::Method < ::RBI::NodeWithComments # # @return [Method] a new instance of Method # - # source://rbi//lib/rbi/model.rb#410 + # source://rbi//lib/rbi/model.rb#412 sig do params( name: ::String, @@ -1203,55 +1204,55 @@ class RBI::Method < ::RBI::NodeWithComments # : (Param param) -> void # - # source://rbi//lib/rbi/model.rb#430 + # source://rbi//lib/rbi/model.rb#432 sig { params(param: ::RBI::Param).void } def <<(param); end # : (String name) -> void # - # source://rbi//lib/rbi/model.rb#465 + # source://rbi//lib/rbi/model.rb#467 sig { params(name: ::String).void } def add_block_param(name); end # : (String name, String default_value) -> void # - # source://rbi//lib/rbi/model.rb#455 + # source://rbi//lib/rbi/model.rb#457 sig { params(name: ::String, default_value: ::String).void } def add_kw_opt_param(name, default_value); end # : (String name) -> void # - # source://rbi//lib/rbi/model.rb#450 + # source://rbi//lib/rbi/model.rb#452 sig { params(name: ::String).void } def add_kw_param(name); end # : (String name) -> void # - # source://rbi//lib/rbi/model.rb#460 + # source://rbi//lib/rbi/model.rb#462 sig { params(name: ::String).void } def add_kw_rest_param(name); end # : (String name, String default_value) -> void # - # source://rbi//lib/rbi/model.rb#440 + # source://rbi//lib/rbi/model.rb#442 sig { params(name: ::String, default_value: ::String).void } def add_opt_param(name, default_value); end # : (String name) -> void # - # source://rbi//lib/rbi/model.rb#435 + # source://rbi//lib/rbi/model.rb#437 sig { params(name: ::String).void } def add_param(name); end # : (String name) -> void # - # source://rbi//lib/rbi/model.rb#445 + # source://rbi//lib/rbi/model.rb#447 sig { params(name: ::String).void } def add_rest_param(name); end # : (?params: Array[SigParam], ?return_type: (String | Type), ?is_abstract: bool, ?is_override: bool, ?is_overridable: bool, ?is_final: bool, ?type_params: Array[String], ?checked: Symbol?) ?{ (Sig node) -> void } -> void # - # source://rbi//lib/rbi/model.rb#470 + # source://rbi//lib/rbi/model.rb#472 sig do params( params: T::Array[::RBI::SigParam], @@ -1277,7 +1278,7 @@ class RBI::Method < ::RBI::NodeWithComments # : -> String # - # source://rbi//lib/rbi/model.rb#496 + # source://rbi//lib/rbi/model.rb#498 sig { returns(::String) } def fully_qualified_name; end @@ -1289,13 +1290,13 @@ class RBI::Method < ::RBI::NodeWithComments # : bool # - # source://rbi//lib/rbi/model.rb#401 + # source://rbi//lib/rbi/model.rb#403 sig { returns(T::Boolean) } def is_singleton; end # : bool # - # source://rbi//lib/rbi/model.rb#401 + # source://rbi//lib/rbi/model.rb#403 # @return [Boolean] def is_singleton=(_arg0); end @@ -1307,54 +1308,54 @@ class RBI::Method < ::RBI::NodeWithComments # : String # - # source://rbi//lib/rbi/model.rb#395 + # source://rbi//lib/rbi/model.rb#397 sig { returns(::String) } def name; end # : String # - # source://rbi//lib/rbi/model.rb#395 + # source://rbi//lib/rbi/model.rb#397 # @return [String] def name=(_arg0); end # : Array[Param] # - # source://rbi//lib/rbi/model.rb#398 + # source://rbi//lib/rbi/model.rb#400 sig { returns(T::Array[::RBI::Param]) } def params; end # : Array[Sig] # - # source://rbi//lib/rbi/model.rb#407 + # source://rbi//lib/rbi/model.rb#409 sig { returns(T::Array[::RBI::Sig]) } def sigs; end # : Array[Sig] # - # source://rbi//lib/rbi/model.rb#407 + # source://rbi//lib/rbi/model.rb#409 # @return [Array] def sigs=(_arg0); end # : -> String # - # source://rbi//lib/rbi/model.rb#506 + # source://rbi//lib/rbi/model.rb#508 sig { override.returns(::String) } def to_s; end # : Visibility # - # source://rbi//lib/rbi/model.rb#404 + # source://rbi//lib/rbi/model.rb#406 sig { returns(::RBI::Visibility) } def visibility; end # : Visibility # - # source://rbi//lib/rbi/model.rb#404 + # source://rbi//lib/rbi/model.rb#406 # @return [Visibility] def visibility=(_arg0); end end -# source://rbi//lib/rbi/model.rb#1086 +# source://rbi//lib/rbi/model.rb#1113 class RBI::MixesInClassMethods < ::RBI::Mixin include ::RBI::Indexable @@ -1362,7 +1363,7 @@ class RBI::MixesInClassMethods < ::RBI::Mixin # # @return [MixesInClassMethods] a new instance of MixesInClassMethods # - # source://rbi//lib/rbi/model.rb#1088 + # source://rbi//lib/rbi/model.rb#1115 sig do params( name: ::String, @@ -1390,7 +1391,7 @@ class RBI::MixesInClassMethods < ::RBI::Mixin # : -> String # - # source://rbi//lib/rbi/model.rb#1095 + # source://rbi//lib/rbi/model.rb#1122 sig { override.returns(::String) } def to_s; end end @@ -1399,7 +1400,7 @@ end # # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. # -# source://rbi//lib/rbi/model.rb#663 +# source://rbi//lib/rbi/model.rb#665 class RBI::Mixin < ::RBI::NodeWithComments abstract! @@ -1407,7 +1408,7 @@ class RBI::Mixin < ::RBI::NodeWithComments # # @return [Mixin] a new instance of Mixin # - # source://rbi//lib/rbi/model.rb#672 + # source://rbi//lib/rbi/model.rb#674 sig do params( name: ::String, @@ -1428,18 +1429,18 @@ class RBI::Mixin < ::RBI::NodeWithComments # : Array[String] # - # source://rbi//lib/rbi/model.rb#669 + # source://rbi//lib/rbi/model.rb#671 sig { returns(T::Array[::String]) } def names; end end -# source://rbi//lib/rbi/model.rb#182 +# source://rbi//lib/rbi/model.rb#184 class RBI::Module < ::RBI::Scope # : (String name, ?loc: Loc?, ?comments: Array[Comment]) ?{ (Module node) -> void } -> void # # @return [Module] a new instance of Module # - # source://rbi//lib/rbi/model.rb#187 + # source://rbi//lib/rbi/model.rb#189 sig do params( name: ::String, @@ -1460,19 +1461,19 @@ class RBI::Module < ::RBI::Scope # : -> String # - # source://rbi//lib/rbi/model.rb#195 + # source://rbi//lib/rbi/model.rb#197 sig { override.returns(::String) } def fully_qualified_name; end # : String # - # source://rbi//lib/rbi/model.rb#184 + # source://rbi//lib/rbi/model.rb#186 sig { returns(::String) } def name; end # : String # - # source://rbi//lib/rbi/model.rb#184 + # source://rbi//lib/rbi/model.rb#186 # @return [String] def name=(_arg0); end end @@ -1553,7 +1554,7 @@ class RBI::Node # : (?out: (IO | StringIO), ?indent: Integer, ?print_locs: bool, ?max_line_length: Integer?) -> void # - # source://rbi//lib/rbi/printer.rb#809 + # source://rbi//lib/rbi/printer.rb#832 sig do params( out: T.any(::IO, ::StringIO), @@ -1566,7 +1567,7 @@ class RBI::Node # : (?out: (IO | StringIO), ?indent: Integer, ?print_locs: bool, ?positional_names: bool) -> void # - # source://rbi//lib/rbi/rbs_printer.rb#1121 + # source://rbi//lib/rbi/rbs_printer.rb#1131 sig do params( out: T.any(::IO, ::StringIO), @@ -1579,7 +1580,7 @@ class RBI::Node # : (?indent: Integer, ?print_locs: bool, ?positional_names: bool) -> String # - # source://rbi//lib/rbi/rbs_printer.rb#1127 + # source://rbi//lib/rbi/rbs_printer.rb#1137 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 @@ -1601,7 +1602,7 @@ class RBI::Node # : (?indent: Integer, ?print_locs: bool, ?max_line_length: Integer?) -> String # - # source://rbi//lib/rbi/printer.rb#815 + # source://rbi//lib/rbi/printer.rb#838 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 @@ -1651,13 +1652,13 @@ class RBI::NodeWithComments < ::RBI::Node def version_requirements; end end -# source://rbi//lib/rbi/model.rb#545 +# source://rbi//lib/rbi/model.rb#547 class RBI::OptParam < ::RBI::Param # : (String name, String value, ?loc: Loc?, ?comments: Array[Comment]) ?{ (OptParam node) -> void } -> void # # @return [OptParam] a new instance of OptParam # - # source://rbi//lib/rbi/model.rb#550 + # source://rbi//lib/rbi/model.rb#552 sig do params( name: ::String, @@ -1671,20 +1672,20 @@ class RBI::OptParam < ::RBI::Param # : (Object? other) -> bool # - # source://rbi//lib/rbi/model.rb#557 + # source://rbi//lib/rbi/model.rb#559 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end # : String # - # source://rbi//lib/rbi/model.rb#547 + # source://rbi//lib/rbi/model.rb#549 sig { returns(::String) } def value; end end # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. # -# source://rbi//lib/rbi/model.rb#511 +# source://rbi//lib/rbi/model.rb#513 class RBI::Param < ::RBI::NodeWithComments abstract! @@ -1692,19 +1693,19 @@ class RBI::Param < ::RBI::NodeWithComments # # @return [Param] a new instance of Param # - # source://rbi//lib/rbi/model.rb#520 + # source://rbi//lib/rbi/model.rb#522 sig { params(name: ::String, loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void } def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil)); end # : String # - # source://rbi//lib/rbi/model.rb#517 + # source://rbi//lib/rbi/model.rb#519 sig { returns(::String) } def name; end # : -> String # - # source://rbi//lib/rbi/model.rb#527 + # source://rbi//lib/rbi/model.rb#529 sig { override.returns(::String) } def to_s; end end @@ -1775,108 +1776,145 @@ class RBI::Parser end end -# source://rbi//lib/rbi/parser.rb#824 +# source://rbi//lib/rbi/parser.rb#970 +class RBI::Parser::HeredocLocationVisitor < ::Prism::Visitor + # : (Prism::Source source, Integer begin_offset, Integer end_offset) -> void + # + # @return [HeredocLocationVisitor] a new instance of HeredocLocationVisitor + # + # source://rbi//lib/rbi/parser.rb#972 + sig { params(source: ::Prism::Source, begin_offset: ::Integer, end_offset: ::Integer).void } + def initialize(source, begin_offset, end_offset); end + + # : -> Prism::Location + # + # source://rbi//lib/rbi/parser.rb#1003 + sig { returns(::Prism::Location) } + def location; end + + # : (Prism::InterpolatedStringNode node) -> void + # + # source://rbi//lib/rbi/parser.rb#993 + sig { override.params(node: ::Prism::InterpolatedStringNode).void } + def visit_interpolated_string_node(node); end + + # : (Prism::StringNode node) -> void + # + # source://rbi//lib/rbi/parser.rb#982 + sig { override.params(node: ::Prism::StringNode).void } + def visit_string_node(node); end + + private + + # : (Prism::StringNode | Prism::InterpolatedStringNode node) -> void + # + # source://rbi//lib/rbi/parser.rb#1014 + sig { params(node: T.any(::Prism::InterpolatedStringNode, ::Prism::StringNode)).void } + def handle_string_node(node); end +end + +# source://rbi//lib/rbi/parser.rb#885 class RBI::Parser::SigBuilder < ::RBI::Parser::Visitor # : (String content, file: String) -> void # # @return [SigBuilder] a new instance of SigBuilder # - # source://rbi//lib/rbi/parser.rb#829 + # source://rbi//lib/rbi/parser.rb#890 sig { params(content: ::String, file: ::String).void } def initialize(content, file:); end # : Sig # - # source://rbi//lib/rbi/parser.rb#826 + # source://rbi//lib/rbi/parser.rb#887 sig { returns(::RBI::Sig) } def current; end # : (Prism::AssocNode node) -> void # - # source://rbi//lib/rbi/parser.rb#899 + # source://rbi//lib/rbi/parser.rb#962 sig { override.params(node: ::Prism::AssocNode).void } def visit_assoc_node(node); end # : (Prism::CallNode node) -> void # - # source://rbi//lib/rbi/parser.rb#837 + # source://rbi//lib/rbi/parser.rb#898 sig { override.params(node: ::Prism::CallNode).void } def visit_call_node(node); end end -# source://rbi//lib/rbi/parser.rb#143 +# source://rbi//lib/rbi/parser.rb#164 class RBI::Parser::TreeBuilder < ::RBI::Parser::Visitor # : (String source, comments: Array[Prism::Comment], file: String) -> void # # @return [TreeBuilder] a new instance of TreeBuilder # - # source://rbi//lib/rbi/parser.rb#151 + # source://rbi//lib/rbi/parser.rb#172 sig { params(source: ::String, comments: T::Array[::Prism::Comment], file: ::String).void } def initialize(source, comments:, file:); end # : Prism::Node? # - # source://rbi//lib/rbi/parser.rb#148 + # source://rbi//lib/rbi/parser.rb#169 sig { returns(T.nilable(::Prism::Node)) } def last_node; end # : Tree # - # source://rbi//lib/rbi/parser.rb#145 + # source://rbi//lib/rbi/parser.rb#166 sig { returns(::RBI::Tree) } def tree; end # : (Prism::CallNode node) -> void # - # source://rbi//lib/rbi/parser.rb#319 + # source://rbi//lib/rbi/parser.rb#361 sig { params(node: ::Prism::CallNode).void } def visit_call_node(node); end # : (Prism::ClassNode node) -> void # - # source://rbi//lib/rbi/parser.rb#164 + # source://rbi//lib/rbi/parser.rb#185 sig { override.params(node: ::Prism::ClassNode).void } def visit_class_node(node); end # : ((Prism::ConstantWriteNode | Prism::ConstantPathWriteNode) node) -> void # - # source://rbi//lib/rbi/parser.rb#215 + # source://rbi//lib/rbi/parser.rb#236 sig { params(node: T.any(::Prism::ConstantPathWriteNode, ::Prism::ConstantWriteNode)).void } def visit_constant_assign(node); end # : (Prism::ConstantPathWriteNode node) -> void # - # source://rbi//lib/rbi/parser.rb#208 + # source://rbi//lib/rbi/parser.rb#229 sig { override.params(node: ::Prism::ConstantPathWriteNode).void } def visit_constant_path_write_node(node); end # : (Prism::ConstantWriteNode node) -> void # - # source://rbi//lib/rbi/parser.rb#200 + # source://rbi//lib/rbi/parser.rb#221 sig { override.params(node: ::Prism::ConstantWriteNode).void } def visit_constant_write_node(node); end # : (Prism::DefNode node) -> void # - # source://rbi//lib/rbi/parser.rb#249 + # source://rbi//lib/rbi/parser.rb#291 sig { override.params(node: ::Prism::DefNode).void } def visit_def_node(node); end # : (Prism::ModuleNode node) -> void # - # source://rbi//lib/rbi/parser.rb#271 + # source://rbi//lib/rbi/parser.rb#313 sig { override.params(node: ::Prism::ModuleNode).void } def visit_module_node(node); end # : (Prism::ProgramNode node) -> void # - # source://rbi//lib/rbi/parser.rb#290 + # source://rbi//lib/rbi/parser.rb#332 sig { override.params(node: ::Prism::ProgramNode).void } def visit_program_node(node); end # : (Prism::SingletonClassNode node) -> void # - # source://rbi//lib/rbi/parser.rb#302 + # source://rbi//lib/rbi/parser.rb#344 sig { override.params(node: ::Prism::SingletonClassNode).void } def visit_singleton_class_node(node); end @@ -1885,7 +1923,7 @@ class RBI::Parser::TreeBuilder < ::RBI::Parser::Visitor # Collect all the remaining comments within a node # : (Prism::Node node) -> void # - # source://rbi//lib/rbi/parser.rb#493 + # source://rbi//lib/rbi/parser.rb#539 # Collect all the remaining comments within a node sig { params(node: ::Prism::Node).void } def collect_dangling_comments(node); end @@ -1893,62 +1931,62 @@ class RBI::Parser::TreeBuilder < ::RBI::Parser::Visitor # Collect all the remaining comments after visiting the tree # : -> void # - # source://rbi//lib/rbi/parser.rb#511 + # source://rbi//lib/rbi/parser.rb#557 # Collect all the remaining comments after visiting the tree sig { void } def collect_orphan_comments; end # : -> Tree # - # source://rbi//lib/rbi/parser.rb#534 + # source://rbi//lib/rbi/parser.rb#580 sig { returns(::RBI::Tree) } def current_scope; end # : -> Array[Sig] # - # source://rbi//lib/rbi/parser.rb#539 + # source://rbi//lib/rbi/parser.rb#585 sig { returns(T::Array[::RBI::Sig]) } def current_sigs; end # : (Array[Sig] sigs) -> Array[Comment] # - # source://rbi//lib/rbi/parser.rb#546 + # source://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 # : (Prism::Node node) -> Array[Comment] # - # source://rbi//lib/rbi/parser.rb#558 + # source://rbi//lib/rbi/parser.rb#604 sig { params(node: ::Prism::Node).returns(T::Array[::RBI::Comment]) } def node_comments(node); end # : (Prism::Comment node) -> Comment # - # source://rbi//lib/rbi/parser.rb#576 + # source://rbi//lib/rbi/parser.rb#622 sig { params(node: ::Prism::Comment).returns(::RBI::Comment) } def parse_comment(node); end # : (Prism::Node? node) -> Array[Param] # - # source://rbi//lib/rbi/parser.rb#613 + # source://rbi//lib/rbi/parser.rb#661 sig { params(node: T.nilable(::Prism::Node)).returns(T::Array[::RBI::Param]) } def parse_params(node); end # : (Prism::Node? node) -> Array[Arg] # - # source://rbi//lib/rbi/parser.rb#589 + # source://rbi//lib/rbi/parser.rb#635 sig { params(node: T.nilable(::Prism::Node)).returns(T::Array[::RBI::Arg]) } def parse_send_args(node); end # : (Prism::CallNode node) -> Sig # - # source://rbi//lib/rbi/parser.rb#687 + # source://rbi//lib/rbi/parser.rb#735 sig { params(node: ::Prism::CallNode).returns(::RBI::Sig) } def parse_sig(node); end # : ((Prism::ConstantWriteNode | Prism::ConstantPathWriteNode) node) -> Struct? # - # source://rbi//lib/rbi/parser.rb#696 + # source://rbi//lib/rbi/parser.rb#744 sig do params( node: T.any(::Prism::ConstantPathWriteNode, ::Prism::ConstantWriteNode) @@ -1958,25 +1996,25 @@ class RBI::Parser::TreeBuilder < ::RBI::Parser::Visitor # : (Prism::CallNode send) -> void # - # source://rbi//lib/rbi/parser.rb#744 + # source://rbi//lib/rbi/parser.rb#792 sig { params(send: ::Prism::CallNode).void } def parse_tstruct_field(send); end # : (String name, Prism::Node node) -> Visibility # - # source://rbi//lib/rbi/parser.rb#781 + # source://rbi//lib/rbi/parser.rb#829 sig { params(name: ::String, node: ::Prism::Node).returns(::RBI::Visibility) } def parse_visibility(name, node); end # : -> void # - # source://rbi//lib/rbi/parser.rb#795 + # source://rbi//lib/rbi/parser.rb#843 sig { void } def separate_header_comments; end # : -> void # - # source://rbi//lib/rbi/parser.rb#805 + # source://rbi//lib/rbi/parser.rb#853 sig { void } def set_root_tree_loc; end @@ -1984,7 +2022,15 @@ class RBI::Parser::TreeBuilder < ::RBI::Parser::Visitor # # @return [Boolean] # - # source://rbi//lib/rbi/parser.rb#819 + # source://rbi//lib/rbi/parser.rb#872 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } + def t_enum_value?(node); end + + # : (Prism::Node? node) -> bool + # + # @return [Boolean] + # + # source://rbi//lib/rbi/parser.rb#867 sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } def type_variable_definition?(node); end end @@ -2001,6 +2047,12 @@ class RBI::Parser::Visitor < ::Prism::Visitor private + # : (Prism::Node node) -> Prism::Location + # + # source://rbi//lib/rbi/parser.rb#143 + sig { params(node: ::Prism::Node).returns(::Prism::Location) } + def adjust_prism_location_for_heredoc(node); end + # : (Prism::Node node) -> Loc # # source://rbi//lib/rbi/parser.rb#126 @@ -2018,6 +2070,22 @@ class RBI::Parser::Visitor < ::Prism::Visitor # source://rbi//lib/rbi/parser.rb#138 sig { params(node: ::Prism::Node).returns(::String) } def node_string!(node); end + + # : (Prism::Node? node) -> bool + # + # @return [Boolean] + # + # source://rbi//lib/rbi/parser.rb#154 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } + def self?(node); end + + # : (Prism::Node? node) -> bool + # + # @return [Boolean] + # + # source://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 @@ -2142,49 +2210,49 @@ class RBI::Printer < ::RBI::Visitor # # @return [Boolean] # - # source://rbi//lib/rbi/printer.rb#670 + # source://rbi//lib/rbi/printer.rb#680 sig { params(node: ::RBI::Node).returns(T::Boolean) } def oneline?(node); end # : (Node node) -> void # - # source://rbi//lib/rbi/printer.rb#628 + # source://rbi//lib/rbi/printer.rb#638 sig { params(node: ::RBI::Node).void } def print_blank_line_before(node); end # : (Node node) -> void # - # source://rbi//lib/rbi/printer.rb#638 + # source://rbi//lib/rbi/printer.rb#648 sig { params(node: ::RBI::Node).void } def print_loc(node); end # : (Param node, last: bool) -> void # - # source://rbi//lib/rbi/printer.rb#644 + # source://rbi//lib/rbi/printer.rb#654 sig { params(node: ::RBI::Param, last: T::Boolean).void } def print_param_comment_leading_space(node, last:); end # : (Sig node) -> void # - # source://rbi//lib/rbi/printer.rb#717 + # source://rbi//lib/rbi/printer.rb#736 sig { params(node: ::RBI::Sig).void } def print_sig_as_block(node); end # : (Sig node) -> void # - # source://rbi//lib/rbi/printer.rb#692 + # source://rbi//lib/rbi/printer.rb#709 sig { params(node: ::RBI::Sig).void } def print_sig_as_line(node); end # : (SigParam node, last: bool) -> void # - # source://rbi//lib/rbi/printer.rb#662 + # source://rbi//lib/rbi/printer.rb#672 sig { params(node: ::RBI::SigParam, last: T::Boolean).void } def print_sig_param_comment_leading_space(node, last:); end # : (Sig node) -> Array[String] # - # source://rbi//lib/rbi/printer.rb#773 + # source://rbi//lib/rbi/printer.rb#796 sig { params(node: ::RBI::Sig).returns(T::Array[::String]) } def sig_modifiers(node); end @@ -2244,7 +2312,7 @@ class RBI::Printer < ::RBI::Visitor # : (ConflictTree node) -> void # - # source://rbi//lib/rbi/printer.rb#604 + # source://rbi//lib/rbi/printer.rb#614 sig { override.params(node: ::RBI::ConflictTree).void } def visit_conflict_tree(node); end @@ -2262,13 +2330,13 @@ class RBI::Printer < ::RBI::Visitor # : (Group node) -> void # - # source://rbi//lib/rbi/printer.rb#573 + # source://rbi//lib/rbi/printer.rb#583 sig { override.params(node: ::RBI::Group).void } def visit_group(node); end # : (Helper node) -> void # - # source://rbi//lib/rbi/printer.rb#557 + # source://rbi//lib/rbi/printer.rb#567 sig { override.params(node: ::RBI::Helper).void } def visit_helper(node); end @@ -2310,7 +2378,7 @@ class RBI::Printer < ::RBI::Visitor # : (MixesInClassMethods node) -> void # - # source://rbi//lib/rbi/printer.rb#567 + # source://rbi//lib/rbi/printer.rb#577 sig { override.params(node: ::RBI::MixesInClassMethods).void } def visit_mixes_in_class_methods(node); end @@ -2364,7 +2432,7 @@ class RBI::Printer < ::RBI::Visitor # : (RequiresAncestor node) -> void # - # source://rbi//lib/rbi/printer.rb#594 + # source://rbi//lib/rbi/printer.rb#604 sig { override.params(node: ::RBI::RequiresAncestor).void } def visit_requires_ancestor(node); end @@ -2388,7 +2456,7 @@ class RBI::Printer < ::RBI::Visitor # : (ScopeConflict node) -> void # - # source://rbi//lib/rbi/printer.rb#614 + # source://rbi//lib/rbi/printer.rb#624 sig { override.params(node: ::RBI::ScopeConflict).void } def visit_scope_conflict(node); end @@ -2446,6 +2514,12 @@ class RBI::Printer < ::RBI::Visitor sig { override.params(node: ::RBI::TEnumBlock).void } def visit_tenum_block(node); end + # : (TEnumValue node) -> void + # + # source://rbi//lib/rbi/printer.rb#547 + sig { override.params(node: ::RBI::TEnumValue).void } + def visit_tenum_value(node); end + # : (Tree node) -> void # # source://rbi//lib/rbi/printer.rb#144 @@ -2472,7 +2546,7 @@ class RBI::Printer < ::RBI::Visitor # : (TypeMember node) -> void # - # source://rbi//lib/rbi/printer.rb#547 + # source://rbi//lib/rbi/printer.rb#557 sig { override.params(node: ::RBI::TypeMember).void } def visit_type_member(node); end @@ -2484,7 +2558,7 @@ class RBI::Printer < ::RBI::Visitor # : (VisibilityGroup node) -> void # - # source://rbi//lib/rbi/printer.rb#580 + # source://rbi//lib/rbi/printer.rb#590 sig { override.params(node: ::RBI::VisibilityGroup).void } def visit_visibility_group(node); end end @@ -2492,13 +2566,13 @@ end # source://rbi//lib/rbi/printer.rb#5 class RBI::PrinterError < ::RBI::Error; end -# source://rbi//lib/rbi/model.rb#761 +# source://rbi//lib/rbi/model.rb#763 class RBI::Private < ::RBI::Visibility # : (?loc: Loc?, ?comments: Array[Comment]) ?{ (Private node) -> void } -> void # # @return [Private] a new instance of Private # - # source://rbi//lib/rbi/model.rb#763 + # source://rbi//lib/rbi/model.rb#765 sig do params( loc: T.nilable(::RBI::Loc), @@ -2509,13 +2583,13 @@ class RBI::Private < ::RBI::Visibility def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end end -# source://rbi//lib/rbi/model.rb#753 +# source://rbi//lib/rbi/model.rb#755 class RBI::Protected < ::RBI::Visibility # : (?loc: Loc?, ?comments: Array[Comment]) ?{ (Protected node) -> void } -> void # # @return [Protected] a new instance of Protected # - # source://rbi//lib/rbi/model.rb#755 + # source://rbi//lib/rbi/model.rb#757 sig do params( loc: T.nilable(::RBI::Loc), @@ -2526,13 +2600,13 @@ class RBI::Protected < ::RBI::Visibility def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end end -# source://rbi//lib/rbi/model.rb#745 +# source://rbi//lib/rbi/model.rb#747 class RBI::Public < ::RBI::Visibility # : (?loc: Loc?, ?comments: Array[Comment]) ?{ (Public node) -> void } -> void # # @return [Public] a new instance of Public # - # source://rbi//lib/rbi/model.rb#747 + # source://rbi//lib/rbi/model.rb#749 sig do params( loc: T.nilable(::RBI::Loc), @@ -2748,7 +2822,7 @@ class RBI::RBSPrinter < ::RBI::Visitor # : (RBI::Method node, Sig sig) -> void # - # source://rbi//lib/rbi/rbs_printer.rb#381 + # source://rbi//lib/rbi/rbs_printer.rb#388 sig { params(node: ::RBI::Method, sig: ::RBI::Sig).void } def print_method_sig(node, sig); end @@ -2784,7 +2858,7 @@ class RBI::RBSPrinter < ::RBI::Visitor # : (Arg node) -> void # - # source://rbi//lib/rbi/rbs_printer.rb#578 + # source://rbi//lib/rbi/rbs_printer.rb#585 sig { override.params(node: ::RBI::Arg).void } def visit_arg(node); end @@ -2820,7 +2894,7 @@ class RBI::RBSPrinter < ::RBI::Visitor # : (BlockParam node) -> void # - # source://rbi//lib/rbi/rbs_printer.rb#510 + # source://rbi//lib/rbi/rbs_printer.rb#517 sig { override.params(node: ::RBI::BlockParam).void } def visit_block_param(node); end @@ -2838,7 +2912,7 @@ class RBI::RBSPrinter < ::RBI::Visitor # : (ConflictTree node) -> void # - # source://rbi//lib/rbi/rbs_printer.rb#711 + # source://rbi//lib/rbi/rbs_printer.rb#721 sig { override.params(node: ::RBI::ConflictTree).void } def visit_conflict_tree(node); end @@ -2850,7 +2924,7 @@ class RBI::RBSPrinter < ::RBI::Visitor # : (Extend node) -> void # - # source://rbi//lib/rbi/rbs_printer.rb#522 + # source://rbi//lib/rbi/rbs_printer.rb#529 sig { override.params(node: ::RBI::Extend).void } def visit_extend(node); end @@ -2862,43 +2936,43 @@ class RBI::RBSPrinter < ::RBI::Visitor # : (Group node) -> void # - # source://rbi//lib/rbi/rbs_printer.rb#684 + # source://rbi//lib/rbi/rbs_printer.rb#694 sig { override.params(node: ::RBI::Group).void } def visit_group(node); end # : (Helper node) -> void # - # source://rbi//lib/rbi/rbs_printer.rb#672 + # source://rbi//lib/rbi/rbs_printer.rb#682 sig { override.params(node: ::RBI::Helper).void } def visit_helper(node); end # : (Include node) -> void # - # source://rbi//lib/rbi/rbs_printer.rb#516 + # source://rbi//lib/rbi/rbs_printer.rb#523 sig { override.params(node: ::RBI::Include).void } def visit_include(node); end # : (KwArg node) -> void # - # source://rbi//lib/rbi/rbs_printer.rb#584 + # source://rbi//lib/rbi/rbs_printer.rb#591 sig { override.params(node: ::RBI::KwArg).void } def visit_kw_arg(node); end # : (KwOptParam node) -> void # - # source://rbi//lib/rbi/rbs_printer.rb#498 + # source://rbi//lib/rbi/rbs_printer.rb#505 sig { override.params(node: ::RBI::KwOptParam).void } def visit_kw_opt_param(node); end # : (KwParam node) -> void # - # source://rbi//lib/rbi/rbs_printer.rb#492 + # source://rbi//lib/rbi/rbs_printer.rb#499 sig { override.params(node: ::RBI::KwParam).void } def visit_kw_param(node); end # : (KwRestParam node) -> void # - # source://rbi//lib/rbi/rbs_printer.rb#504 + # source://rbi//lib/rbi/rbs_printer.rb#511 sig { override.params(node: ::RBI::KwRestParam).void } def visit_kw_rest_param(node); end @@ -2910,13 +2984,13 @@ class RBI::RBSPrinter < ::RBI::Visitor # : (MixesInClassMethods node) -> void # - # source://rbi//lib/rbi/rbs_printer.rb#678 + # source://rbi//lib/rbi/rbs_printer.rb#688 sig { override.params(node: ::RBI::MixesInClassMethods).void } def visit_mixes_in_class_methods(node); end # : (Mixin node) -> void # - # source://rbi//lib/rbi/rbs_printer.rb#527 + # source://rbi//lib/rbi/rbs_printer.rb#534 sig { params(node: ::RBI::Mixin).void } def visit_mixin(node); end @@ -2928,43 +3002,43 @@ class RBI::RBSPrinter < ::RBI::Visitor # : (OptParam node) -> void # - # source://rbi//lib/rbi/rbs_printer.rb#472 + # source://rbi//lib/rbi/rbs_printer.rb#479 sig { override.params(node: ::RBI::OptParam).void } def visit_opt_param(node); end # : (Private node) -> void # - # source://rbi//lib/rbi/rbs_printer.rb#557 + # source://rbi//lib/rbi/rbs_printer.rb#564 sig { override.params(node: ::RBI::Private).void } def visit_private(node); end # : (Protected node) -> void # - # source://rbi//lib/rbi/rbs_printer.rb#551 + # source://rbi//lib/rbi/rbs_printer.rb#558 sig { override.params(node: ::RBI::Protected).void } def visit_protected(node); end # : (Public node) -> void # - # source://rbi//lib/rbi/rbs_printer.rb#545 + # source://rbi//lib/rbi/rbs_printer.rb#552 sig { override.params(node: ::RBI::Public).void } def visit_public(node); end # : (ReqParam node) -> void # - # source://rbi//lib/rbi/rbs_printer.rb#462 + # source://rbi//lib/rbi/rbs_printer.rb#469 sig { override.params(node: ::RBI::ReqParam).void } def visit_req_param(node); end # : (RequiresAncestor node) -> void # - # source://rbi//lib/rbi/rbs_printer.rb#705 + # source://rbi//lib/rbi/rbs_printer.rb#715 sig { override.params(node: ::RBI::RequiresAncestor).void } def visit_requires_ancestor(node); end # : (RestParam node) -> void # - # source://rbi//lib/rbi/rbs_printer.rb#482 + # source://rbi//lib/rbi/rbs_printer.rb#489 sig { override.params(node: ::RBI::RestParam).void } def visit_rest_param(node); end @@ -2982,7 +3056,7 @@ class RBI::RBSPrinter < ::RBI::Visitor # : (ScopeConflict node) -> void # - # source://rbi//lib/rbi/rbs_printer.rb#721 + # source://rbi//lib/rbi/rbs_printer.rb#731 sig { override.params(node: ::RBI::ScopeConflict).void } def visit_scope_conflict(node); end @@ -2994,19 +3068,19 @@ class RBI::RBSPrinter < ::RBI::Visitor # : (Send node) -> void # - # source://rbi//lib/rbi/rbs_printer.rb#572 + # source://rbi//lib/rbi/rbs_printer.rb#579 sig { override.params(node: ::RBI::Send).void } def visit_send(node); end # : (Sig node) -> void # - # source://rbi//lib/rbi/rbs_printer.rb#443 + # source://rbi//lib/rbi/rbs_printer.rb#450 sig { params(node: ::RBI::Sig).void } def visit_sig(node); end # : (SigParam node) -> void # - # source://rbi//lib/rbi/rbs_printer.rb#456 + # source://rbi//lib/rbi/rbs_printer.rb#463 sig { params(node: ::RBI::SigParam).void } def visit_sig_param(node); end @@ -3024,16 +3098,22 @@ class RBI::RBSPrinter < ::RBI::Visitor # : (TEnum node) -> void # - # source://rbi//lib/rbi/rbs_printer.rb#641 + # source://rbi//lib/rbi/rbs_printer.rb#648 sig { override.params(node: ::RBI::TEnum).void } def visit_tenum(node); end # : (TEnumBlock node) -> void # - # source://rbi//lib/rbi/rbs_printer.rb#647 + # source://rbi//lib/rbi/rbs_printer.rb#654 sig { override.params(node: ::RBI::TEnumBlock).void } def visit_tenum_block(node); end + # : (TEnumValue node) -> void + # + # source://rbi//lib/rbi/rbs_printer.rb#660 + sig { override.params(node: ::RBI::TEnumValue).void } + def visit_tenum_value(node); end + # : (Tree node) -> void # # source://rbi//lib/rbi/rbs_printer.rb#120 @@ -3042,37 +3122,37 @@ class RBI::RBSPrinter < ::RBI::Visitor # : (TStruct node) -> void # - # source://rbi//lib/rbi/rbs_printer.rb#590 + # source://rbi//lib/rbi/rbs_printer.rb#597 sig { override.params(node: ::RBI::TStruct).void } def visit_tstruct(node); end # : (TStructConst node) -> void # - # source://rbi//lib/rbi/rbs_printer.rb#625 + # source://rbi//lib/rbi/rbs_printer.rb#632 sig { override.params(node: ::RBI::TStructConst).void } def visit_tstruct_const(node); end # : (TStructProp node) -> void # - # source://rbi//lib/rbi/rbs_printer.rb#633 + # source://rbi//lib/rbi/rbs_printer.rb#640 sig { override.params(node: ::RBI::TStructProp).void } def visit_tstruct_prop(node); end # : (TypeMember node) -> void # - # source://rbi//lib/rbi/rbs_printer.rb#666 + # source://rbi//lib/rbi/rbs_printer.rb#676 sig { override.params(node: ::RBI::TypeMember).void } def visit_type_member(node); end # : (Visibility node) -> void # - # source://rbi//lib/rbi/rbs_printer.rb#562 + # source://rbi//lib/rbi/rbs_printer.rb#569 sig { params(node: ::RBI::Visibility).void } def visit_visibility(node); end # : (VisibilityGroup node) -> void # - # source://rbi//lib/rbi/rbs_printer.rb#691 + # source://rbi//lib/rbi/rbs_printer.rb#701 sig { override.params(node: ::RBI::VisibilityGroup).void } def visit_visibility_group(node); end @@ -3082,7 +3162,7 @@ class RBI::RBSPrinter < ::RBI::Visitor # # @return [Boolean] # - # source://rbi//lib/rbi/rbs_printer.rb#824 + # source://rbi//lib/rbi/rbs_printer.rb#834 sig { params(node: ::RBI::Node).returns(T::Boolean) } def oneline?(node); end @@ -3091,7 +3171,7 @@ class RBI::RBSPrinter < ::RBI::Visitor # Returns `nil` is the string is not a `T.let`. # : (String? code) -> String? # - # source://rbi//lib/rbi/rbs_printer.rb#858 + # source://rbi//lib/rbi/rbs_printer.rb#868 # Parse a string containing a `T.let(x, X)` and extract the type # Returns `nil` is the string is not a `T.let`. sig { params(code: T.nilable(::String)).returns(T.nilable(::String)) } @@ -3099,37 +3179,37 @@ class RBI::RBSPrinter < ::RBI::Visitor # : ((Type | String) type) -> Type # - # source://rbi//lib/rbi/rbs_printer.rb#846 + # source://rbi//lib/rbi/rbs_printer.rb#856 sig { params(type: T.any(::RBI::Type, ::String)).returns(::RBI::Type) } def parse_type(type); end # : (Node node) -> void # - # source://rbi//lib/rbi/rbs_printer.rb#737 + # source://rbi//lib/rbi/rbs_printer.rb#747 sig { params(node: ::RBI::Node).void } def print_blank_line_before(node); end # : (Node node) -> void # - # source://rbi//lib/rbi/rbs_printer.rb#756 + # source://rbi//lib/rbi/rbs_printer.rb#766 sig { params(node: ::RBI::Node).void } def print_loc(node); end # : (Param node, last: bool) -> void # - # source://rbi//lib/rbi/rbs_printer.rb#798 + # source://rbi//lib/rbi/rbs_printer.rb#808 sig { params(node: ::RBI::Param, last: T::Boolean).void } def print_param_comment_leading_space(node, last:); end # : (Method node, SigParam param) -> void # - # source://rbi//lib/rbi/rbs_printer.rb#762 + # source://rbi//lib/rbi/rbs_printer.rb#772 sig { params(node: ::RBI::Method, param: ::RBI::SigParam).void } def print_sig_param(node, param); end # : (SigParam node, last: bool) -> void # - # source://rbi//lib/rbi/rbs_printer.rb#816 + # source://rbi//lib/rbi/rbs_printer.rb#826 sig { params(node: ::RBI::SigParam, last: T::Boolean).void } def print_sig_param_comment_leading_space(node, last:); end end @@ -3140,13 +3220,13 @@ class RBI::RBSPrinter::Error < ::RBI::Error; end # source://rbi//lib/rbi/model.rb#5 class RBI::ReplaceNodeError < ::RBI::Error; end -# source://rbi//lib/rbi/model.rb#532 +# source://rbi//lib/rbi/model.rb#534 class RBI::ReqParam < ::RBI::Param # : (String name, ?loc: Loc?, ?comments: Array[Comment]) ?{ (ReqParam node) -> void } -> void # # @return [ReqParam] a new instance of ReqParam # - # source://rbi//lib/rbi/model.rb#534 + # source://rbi//lib/rbi/model.rb#536 sig do params( name: ::String, @@ -3159,12 +3239,12 @@ class RBI::ReqParam < ::RBI::Param # : (Object? other) -> bool # - # source://rbi//lib/rbi/model.rb#540 + # source://rbi//lib/rbi/model.rb#542 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end end -# source://rbi//lib/rbi/model.rb#1100 +# source://rbi//lib/rbi/model.rb#1127 class RBI::RequiresAncestor < ::RBI::NodeWithComments include ::RBI::Indexable @@ -3172,7 +3252,7 @@ class RBI::RequiresAncestor < ::RBI::NodeWithComments # # @return [RequiresAncestor] a new instance of RequiresAncestor # - # source://rbi//lib/rbi/model.rb#1105 + # source://rbi//lib/rbi/model.rb#1132 sig { params(name: ::String, loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void } def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil)); end @@ -3184,24 +3264,24 @@ class RBI::RequiresAncestor < ::RBI::NodeWithComments # : String # - # source://rbi//lib/rbi/model.rb#1102 + # source://rbi//lib/rbi/model.rb#1129 sig { returns(::String) } def name; end # : -> String # - # source://rbi//lib/rbi/model.rb#1112 + # source://rbi//lib/rbi/model.rb#1139 sig { override.returns(::String) } def to_s; end end -# source://rbi//lib/rbi/model.rb#562 +# source://rbi//lib/rbi/model.rb#564 class RBI::RestParam < ::RBI::Param # : (String name, ?loc: Loc?, ?comments: Array[Comment]) ?{ (RestParam node) -> void } -> void # # @return [RestParam] a new instance of RestParam # - # source://rbi//lib/rbi/model.rb#564 + # source://rbi//lib/rbi/model.rb#566 sig do params( name: ::String, @@ -3214,13 +3294,13 @@ class RBI::RestParam < ::RBI::Param # : (Object? other) -> bool # - # source://rbi//lib/rbi/model.rb#576 + # source://rbi//lib/rbi/model.rb#578 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end # : -> String # - # source://rbi//lib/rbi/model.rb#571 + # source://rbi//lib/rbi/model.rb#573 sig { override.returns(::String) } def to_s; end end @@ -3677,7 +3757,7 @@ class RBI::Rewriters::Merge::Conflict < ::T::Struct def to_s; end class << self - # source://sorbet-runtime/0.5.11965/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.12123/lib/types/struct.rb#13 def inherited(s); end end end @@ -4022,7 +4102,7 @@ class RBI::Rewriters::RemoveKnownDefinitions::Operation < ::T::Struct def to_s; end class << self - # source://sorbet-runtime/0.5.11965/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.12123/lib/types/struct.rb#13 def inherited(s); end end end @@ -4039,25 +4119,25 @@ class RBI::Rewriters::SortNodes < ::RBI::Visitor # : (Group::Kind kind) -> Integer # - # source://rbi//lib/rbi/rewriters/sort_nodes.rb#72 + # source://rbi//lib/rbi/rewriters/sort_nodes.rb#74 sig { params(kind: ::RBI::Group::Kind).returns(::Integer) } def group_rank(kind); end # : (Node node) -> String? # - # source://rbi//lib/rbi/rewriters/sort_nodes.rb#93 + # source://rbi//lib/rbi/rewriters/sort_nodes.rb#95 sig { params(node: ::RBI::Node).returns(T.nilable(::String)) } def node_name(node); end # : (Node node) -> Integer # - # source://rbi//lib/rbi/rewriters/sort_nodes.rb#44 + # source://rbi//lib/rbi/rewriters/sort_nodes.rb#46 sig { params(node: ::RBI::Node).returns(::Integer) } def node_rank(node); end # : (Node node) -> void # - # source://rbi//lib/rbi/rewriters/sort_nodes.rb#105 + # source://rbi//lib/rbi/rewriters/sort_nodes.rb#107 sig { params(node: ::RBI::Node).void } def sort_node_names!(node); end end @@ -4100,7 +4180,7 @@ class RBI::Rewriters::TranslateRBSSigs::Error < ::RBI::Error; end # # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. # -# source://rbi//lib/rbi/model.rb#166 +# source://rbi//lib/rbi/model.rb#168 class RBI::Scope < ::RBI::Tree include ::RBI::Indexable @@ -4116,7 +4196,7 @@ class RBI::Scope < ::RBI::Tree # @abstract # - # source://rbi//lib/rbi/model.rb#173 + # source://rbi//lib/rbi/model.rb#175 sig { abstract.returns(::String) } def fully_qualified_name; end @@ -4128,7 +4208,7 @@ class RBI::Scope < ::RBI::Tree # : -> String # - # source://rbi//lib/rbi/model.rb#177 + # source://rbi//lib/rbi/model.rb#179 sig { override.returns(::String) } def to_s; end end @@ -4193,7 +4273,7 @@ end # Sends # -# source://rbi//lib/rbi/model.rb#771 +# source://rbi//lib/rbi/model.rb#773 class RBI::Send < ::RBI::NodeWithComments include ::RBI::Indexable @@ -4201,7 +4281,7 @@ class RBI::Send < ::RBI::NodeWithComments # # @return [Send] a new instance of Send # - # source://rbi//lib/rbi/model.rb#779 + # source://rbi//lib/rbi/model.rb#781 sig do params( method: ::String, @@ -4215,19 +4295,19 @@ class RBI::Send < ::RBI::NodeWithComments # : (Arg arg) -> void # - # source://rbi//lib/rbi/model.rb#787 + # source://rbi//lib/rbi/model.rb#789 sig { params(arg: ::RBI::Arg).void } def <<(arg); end # : (Object? other) -> bool # - # source://rbi//lib/rbi/model.rb#792 + # source://rbi//lib/rbi/model.rb#794 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end # : Array[Arg] # - # source://rbi//lib/rbi/model.rb#776 + # source://rbi//lib/rbi/model.rb#778 sig { returns(T::Array[::RBI::Arg]) } def args; end @@ -4247,26 +4327,26 @@ class RBI::Send < ::RBI::NodeWithComments # : String # - # source://rbi//lib/rbi/model.rb#773 + # source://rbi//lib/rbi/model.rb#775 sig { returns(::String) } def method; end # : -> String # - # source://rbi//lib/rbi/model.rb#797 + # source://rbi//lib/rbi/model.rb#799 sig { returns(::String) } def to_s; end end # Sorbet's sigs # -# source://rbi//lib/rbi/model.rb#846 +# source://rbi//lib/rbi/model.rb#848 class RBI::Sig < ::RBI::NodeWithComments - # : (?params: Array[SigParam], ?return_type: (Type | String), ?is_abstract: bool, ?is_override: bool, ?is_overridable: bool, ?is_final: bool, ?allow_incompatible_override: bool, ?type_params: Array[String], ?checked: Symbol?, ?loc: Loc?, ?comments: Array[Comment]) ?{ (Sig node) -> void } -> void + # : (?params: Array[SigParam], ?return_type: (Type | String), ?is_abstract: bool, ?is_override: bool, ?is_overridable: bool, ?is_final: bool, ?allow_incompatible_override: bool, ?without_runtime: bool, ?type_params: Array[String], ?checked: Symbol?, ?loc: Loc?, ?comments: Array[Comment]) ?{ (Sig node) -> void } -> void # # @return [Sig] a new instance of Sig # - # source://rbi//lib/rbi/model.rb#863 + # source://rbi//lib/rbi/model.rb#865 sig do params( params: T::Array[::RBI::SigParam], @@ -4276,6 +4356,7 @@ class RBI::Sig < ::RBI::NodeWithComments is_overridable: T::Boolean, is_final: T::Boolean, allow_incompatible_override: T::Boolean, + without_runtime: T::Boolean, type_params: T::Array[::String], checked: T.nilable(::Symbol), loc: T.nilable(::RBI::Loc), @@ -4283,130 +4364,142 @@ class RBI::Sig < ::RBI::NodeWithComments 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), type_params: T.unsafe(nil), checked: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); 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), without_runtime: T.unsafe(nil), type_params: T.unsafe(nil), checked: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end # : (SigParam param) -> void # - # source://rbi//lib/rbi/model.rb#891 + # source://rbi//lib/rbi/model.rb#895 sig { params(param: ::RBI::SigParam).void } def <<(param); end # : (Object other) -> bool # - # source://rbi//lib/rbi/model.rb#901 + # source://rbi//lib/rbi/model.rb#905 sig { params(other: ::Object).returns(T::Boolean) } def ==(other); end # : (String name, (Type | String) type) -> void # - # source://rbi//lib/rbi/model.rb#896 + # source://rbi//lib/rbi/model.rb#900 sig { params(name: ::String, type: T.any(::RBI::Type, ::String)).void } def add_param(name, type); end # : bool # - # source://rbi//lib/rbi/model.rb#854 + # source://rbi//lib/rbi/model.rb#856 # @return [Boolean] def allow_incompatible_override; end # : bool # - # source://rbi//lib/rbi/model.rb#854 + # source://rbi//lib/rbi/model.rb#856 # @return [Boolean] def allow_incompatible_override=(_arg0); end # : Symbol? # - # source://rbi//lib/rbi/model.rb#860 + # source://rbi//lib/rbi/model.rb#862 sig { returns(T.nilable(::Symbol)) } def checked; end # : Symbol? # - # source://rbi//lib/rbi/model.rb#860 + # source://rbi//lib/rbi/model.rb#862 # @return [Symbol, nil] def checked=(_arg0); end # : bool # - # source://rbi//lib/rbi/model.rb#854 + # source://rbi//lib/rbi/model.rb#856 sig { returns(T::Boolean) } def is_abstract; end # : bool # - # source://rbi//lib/rbi/model.rb#854 + # source://rbi//lib/rbi/model.rb#856 # @return [Boolean] def is_abstract=(_arg0); end # : bool # - # source://rbi//lib/rbi/model.rb#854 + # source://rbi//lib/rbi/model.rb#856 # @return [Boolean] def is_final; end # : bool # - # source://rbi//lib/rbi/model.rb#854 + # source://rbi//lib/rbi/model.rb#856 # @return [Boolean] def is_final=(_arg0); end # : bool # - # source://rbi//lib/rbi/model.rb#854 + # source://rbi//lib/rbi/model.rb#856 # @return [Boolean] def is_overridable; end # : bool # - # source://rbi//lib/rbi/model.rb#854 + # source://rbi//lib/rbi/model.rb#856 # @return [Boolean] def is_overridable=(_arg0); end # : bool # - # source://rbi//lib/rbi/model.rb#854 + # source://rbi//lib/rbi/model.rb#856 # @return [Boolean] def is_override; end # : bool # - # source://rbi//lib/rbi/model.rb#854 + # source://rbi//lib/rbi/model.rb#856 # @return [Boolean] def is_override=(_arg0); end # : Array[SigParam] # - # source://rbi//lib/rbi/model.rb#848 + # source://rbi//lib/rbi/model.rb#850 sig { returns(T::Array[::RBI::SigParam]) } def params; end # : (Type | String) # - # source://rbi//lib/rbi/model.rb#851 + # source://rbi//lib/rbi/model.rb#853 sig { returns(T.any(::RBI::Type, ::String)) } def return_type; end # : (Type | String) # - # source://rbi//lib/rbi/model.rb#851 + # source://rbi//lib/rbi/model.rb#853 # @return [Type, String] def return_type=(_arg0); end # : Array[String] # - # source://rbi//lib/rbi/model.rb#857 + # source://rbi//lib/rbi/model.rb#859 sig { returns(T::Array[::String]) } def type_params; end + + # : bool + # + # source://rbi//lib/rbi/model.rb#856 + # @return [Boolean] + def without_runtime; end + + # : bool + # + # source://rbi//lib/rbi/model.rb#856 + # @return [Boolean] + def without_runtime=(_arg0); end end -# source://rbi//lib/rbi/model.rb#910 +# source://rbi//lib/rbi/model.rb#914 class RBI::SigParam < ::RBI::NodeWithComments # : (String name, (Type | String) type, ?loc: Loc?, ?comments: Array[Comment]) ?{ (SigParam node) -> void } -> void # # @return [SigParam] a new instance of SigParam # - # source://rbi//lib/rbi/model.rb#918 + # source://rbi//lib/rbi/model.rb#922 sig do params( name: ::String, @@ -4420,30 +4513,30 @@ class RBI::SigParam < ::RBI::NodeWithComments # : (Object other) -> bool # - # source://rbi//lib/rbi/model.rb#926 + # source://rbi//lib/rbi/model.rb#930 sig { params(other: ::Object).returns(T::Boolean) } def ==(other); end # : String # - # source://rbi//lib/rbi/model.rb#912 + # source://rbi//lib/rbi/model.rb#916 sig { returns(::String) } def name; end # : (Type | String) # - # source://rbi//lib/rbi/model.rb#915 + # source://rbi//lib/rbi/model.rb#919 sig { returns(T.any(::RBI::Type, ::String)) } def type; end end -# source://rbi//lib/rbi/model.rb#226 +# source://rbi//lib/rbi/model.rb#228 class RBI::SingletonClass < ::RBI::Scope # : (?loc: Loc?, ?comments: Array[Comment]) ?{ (SingletonClass node) -> void } -> void # # @return [SingletonClass] a new instance of SingletonClass # - # source://rbi//lib/rbi/model.rb#228 + # source://rbi//lib/rbi/model.rb#230 sig do params( loc: T.nilable(::RBI::Loc), @@ -4455,18 +4548,18 @@ class RBI::SingletonClass < ::RBI::Scope # : -> String # - # source://rbi//lib/rbi/model.rb#235 + # source://rbi//lib/rbi/model.rb#237 sig { override.returns(::String) } def fully_qualified_name; end end -# source://rbi//lib/rbi/model.rb#240 +# source://rbi//lib/rbi/model.rb#242 class RBI::Struct < ::RBI::Scope # : (String name, ?members: Array[Symbol], ?keyword_init: bool, ?loc: Loc?, ?comments: Array[Comment]) ?{ (Struct struct) -> void } -> void # # @return [Struct] a new instance of Struct # - # source://rbi//lib/rbi/model.rb#251 + # source://rbi//lib/rbi/model.rb#253 sig do params( name: ::String, @@ -4489,56 +4582,56 @@ class RBI::Struct < ::RBI::Scope # : -> String # - # source://rbi//lib/rbi/model.rb#261 + # source://rbi//lib/rbi/model.rb#263 sig { override.returns(::String) } def fully_qualified_name; end # : bool # - # source://rbi//lib/rbi/model.rb#248 + # source://rbi//lib/rbi/model.rb#250 sig { returns(T::Boolean) } def keyword_init; end # : bool # - # source://rbi//lib/rbi/model.rb#248 + # source://rbi//lib/rbi/model.rb#250 # @return [Boolean] def keyword_init=(_arg0); end # : Array[Symbol] # - # source://rbi//lib/rbi/model.rb#245 + # source://rbi//lib/rbi/model.rb#247 sig { returns(T::Array[::Symbol]) } def members; end # : Array[Symbol] # - # source://rbi//lib/rbi/model.rb#245 + # source://rbi//lib/rbi/model.rb#247 # @return [Array] def members=(_arg0); end # : String # - # source://rbi//lib/rbi/model.rb#242 + # source://rbi//lib/rbi/model.rb#244 sig { returns(::String) } def name; end # : String # - # source://rbi//lib/rbi/model.rb#242 + # source://rbi//lib/rbi/model.rb#244 # @return [String] def name=(_arg0); end end # Sorbet's T::Enum # -# source://rbi//lib/rbi/model.rb#1012 +# source://rbi//lib/rbi/model.rb#1016 class RBI::TEnum < ::RBI::Class # : (String name, ?loc: Loc?, ?comments: Array[Comment]) ?{ (TEnum klass) -> void } -> void # # @return [TEnum] a new instance of TEnum # - # source://rbi//lib/rbi/model.rb#1014 + # source://rbi//lib/rbi/model.rb#1018 sig do params( name: ::String, @@ -4550,13 +4643,13 @@ class RBI::TEnum < ::RBI::Class def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end end -# source://rbi//lib/rbi/model.rb#1020 +# source://rbi//lib/rbi/model.rb#1024 class RBI::TEnumBlock < ::RBI::Scope # : (?loc: Loc?, ?comments: Array[Comment]) ?{ (TEnumBlock node) -> void } -> void # # @return [TEnumBlock] a new instance of TEnumBlock # - # source://rbi//lib/rbi/model.rb#1022 + # source://rbi//lib/rbi/model.rb#1026 sig do params( loc: T.nilable(::RBI::Loc), @@ -4568,7 +4661,7 @@ class RBI::TEnumBlock < ::RBI::Scope # : -> String # - # source://rbi//lib/rbi/model.rb#1029 + # source://rbi//lib/rbi/model.rb#1033 sig { override.returns(::String) } def fully_qualified_name; end @@ -4580,20 +4673,64 @@ class RBI::TEnumBlock < ::RBI::Scope # : -> String # - # source://rbi//lib/rbi/model.rb#1035 + # source://rbi//lib/rbi/model.rb#1039 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/model.rb#1044 +class RBI::TEnumValue < ::RBI::NodeWithComments + include ::RBI::Indexable + + # : (String name, ?loc: Loc?, ?comments: Array[Comment]) ?{ (TEnumValue node) -> void } -> void + # + # @return [TEnumValue] a new instance of TEnumValue + # + # source://rbi//lib/rbi/model.rb#1049 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: 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 + + # : -> String + # + # source://rbi//lib/rbi/model.rb#1056 + sig { returns(::String) } + def fully_qualified_name; end + + # : -> Array[String] + # + # source://rbi//lib/rbi/index.rb#229 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # : String + # + # source://rbi//lib/rbi/model.rb#1046 + sig { returns(::String) } + def name; end + + # : -> String + # + # source://rbi//lib/rbi/model.rb#1062 sig { override.returns(::String) } def to_s; end end # Sorbet's T::Struct # -# source://rbi//lib/rbi/model.rb#933 +# source://rbi//lib/rbi/model.rb#937 class RBI::TStruct < ::RBI::Class # : (String name, ?loc: Loc?, ?comments: Array[Comment]) ?{ (TStruct klass) -> void } -> void # # @return [TStruct] a new instance of TStruct # - # source://rbi//lib/rbi/model.rb#935 + # source://rbi//lib/rbi/model.rb#939 sig do params( name: ::String, @@ -4605,7 +4742,7 @@ class RBI::TStruct < ::RBI::Class def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end end -# source://rbi//lib/rbi/model.rb#968 +# source://rbi//lib/rbi/model.rb#972 class RBI::TStructConst < ::RBI::TStructField include ::RBI::Indexable @@ -4613,7 +4750,7 @@ class RBI::TStructConst < ::RBI::TStructField # # @return [TStructConst] a new instance of TStructConst # - # source://rbi//lib/rbi/model.rb#970 + # source://rbi//lib/rbi/model.rb#974 sig do params( name: ::String, @@ -4636,7 +4773,7 @@ class RBI::TStructConst < ::RBI::TStructField # : -> Array[String] # - # source://rbi//lib/rbi/model.rb#977 + # source://rbi//lib/rbi/model.rb#981 sig { override.returns(T::Array[::String]) } def fully_qualified_names; end @@ -4648,14 +4785,14 @@ class RBI::TStructConst < ::RBI::TStructField # : -> String # - # source://rbi//lib/rbi/model.rb#984 + # source://rbi//lib/rbi/model.rb#988 sig { override.returns(::String) } def to_s; end end # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. # -# source://rbi//lib/rbi/model.rb#941 +# source://rbi//lib/rbi/model.rb#945 class RBI::TStructField < ::RBI::NodeWithComments abstract! @@ -4663,7 +4800,7 @@ class RBI::TStructField < ::RBI::NodeWithComments # # @return [TStructField] a new instance of TStructField # - # source://rbi//lib/rbi/model.rb#957 + # source://rbi//lib/rbi/model.rb#961 sig do params( name: ::String, @@ -4685,48 +4822,48 @@ class RBI::TStructField < ::RBI::NodeWithComments # : String? # - # source://rbi//lib/rbi/model.rb#954 + # source://rbi//lib/rbi/model.rb#958 sig { returns(T.nilable(::String)) } def default; end # : String? # - # source://rbi//lib/rbi/model.rb#954 + # source://rbi//lib/rbi/model.rb#958 # @return [String, nil] def default=(_arg0); end # @abstract # - # source://rbi//lib/rbi/model.rb#965 + # source://rbi//lib/rbi/model.rb#969 sig { abstract.returns(T::Array[::String]) } def fully_qualified_names; end # : String # - # source://rbi//lib/rbi/model.rb#948 + # source://rbi//lib/rbi/model.rb#952 sig { returns(::String) } def name; end # : String # - # source://rbi//lib/rbi/model.rb#948 + # source://rbi//lib/rbi/model.rb#952 # @return [String] def name=(_arg0); end # : (Type | String) # - # source://rbi//lib/rbi/model.rb#951 + # source://rbi//lib/rbi/model.rb#955 sig { returns(T.any(::RBI::Type, ::String)) } def type; end # : (Type | String) # - # source://rbi//lib/rbi/model.rb#951 + # source://rbi//lib/rbi/model.rb#955 # @return [Type, String] def type=(_arg0); end end -# source://rbi//lib/rbi/model.rb#989 +# source://rbi//lib/rbi/model.rb#993 class RBI::TStructProp < ::RBI::TStructField include ::RBI::Indexable @@ -4734,7 +4871,7 @@ class RBI::TStructProp < ::RBI::TStructField # # @return [TStructProp] a new instance of TStructProp # - # source://rbi//lib/rbi/model.rb#991 + # source://rbi//lib/rbi/model.rb#995 sig do params( name: ::String, @@ -4757,7 +4894,7 @@ class RBI::TStructProp < ::RBI::TStructField # : -> Array[String] # - # source://rbi//lib/rbi/model.rb#998 + # source://rbi//lib/rbi/model.rb#1002 sig { override.returns(T::Array[::String]) } def fully_qualified_names; end @@ -4769,18 +4906,18 @@ class RBI::TStructProp < ::RBI::TStructField # : -> String # - # source://rbi//lib/rbi/model.rb#1005 + # source://rbi//lib/rbi/model.rb#1009 sig { override.returns(::String) } def to_s; end end -# source://rbi//lib/rbi/model.rb#112 +# source://rbi//lib/rbi/model.rb#114 class RBI::Tree < ::RBI::NodeWithComments # : (?loc: Loc?, ?comments: Array[Comment]) ?{ (Tree node) -> void } -> void # # @return [Tree] a new instance of Tree # - # source://rbi//lib/rbi/model.rb#117 + # source://rbi//lib/rbi/model.rb#119 sig do params( loc: T.nilable(::RBI::Loc), @@ -4792,7 +4929,7 @@ class RBI::Tree < ::RBI::NodeWithComments # : (Node node) -> void # - # source://rbi//lib/rbi/model.rb#124 + # source://rbi//lib/rbi/model.rb#126 sig { params(node: ::RBI::Node).void } def <<(node); end @@ -4808,7 +4945,7 @@ class RBI::Tree < ::RBI::NodeWithComments sig { params(annotation: ::String, annotate_scopes: T::Boolean, annotate_properties: T::Boolean).void } def annotate!(annotation, annotate_scopes: T.unsafe(nil), annotate_properties: T.unsafe(nil)); end - # source://tapioca/0.16.11/lib/tapioca/rbi_ext/model.rb#38 + # source://tapioca/0.17.0/lib/tapioca/rbi_ext/model.rb#32 sig do params( name: ::String, @@ -4818,19 +4955,19 @@ class RBI::Tree < ::RBI::NodeWithComments end def create_class(name, superclass_name: T.unsafe(nil), &block); end - # source://tapioca/0.16.11/lib/tapioca/rbi_ext/model.rb#45 + # source://tapioca/0.17.0/lib/tapioca/rbi_ext/model.rb#39 sig { params(name: ::String, value: ::String).void } def create_constant(name, value:); end - # source://tapioca/0.16.11/lib/tapioca/rbi_ext/model.rb#55 + # source://tapioca/0.17.0/lib/tapioca/rbi_ext/model.rb#49 sig { params(name: ::String).void } def create_extend(name); end - # source://tapioca/0.16.11/lib/tapioca/rbi_ext/model.rb#50 + # source://tapioca/0.17.0/lib/tapioca/rbi_ext/model.rb#44 sig { params(name: ::String).void } def create_include(name); end - # source://tapioca/0.16.11/lib/tapioca/rbi_ext/model.rb#90 + # source://tapioca/0.17.0/lib/tapioca/rbi_ext/model.rb#65 sig do params( name: ::String, @@ -4844,19 +4981,19 @@ class RBI::Tree < ::RBI::NodeWithComments 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 - # source://tapioca/0.16.11/lib/tapioca/rbi_ext/model.rb#60 + # source://tapioca/0.17.0/lib/tapioca/rbi_ext/model.rb#54 sig { params(name: ::String).void } def create_mixes_in_class_methods(name); end - # source://tapioca/0.16.11/lib/tapioca/rbi_ext/model.rb#25 + # source://tapioca/0.17.0/lib/tapioca/rbi_ext/model.rb#25 sig { params(name: ::String, block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)).returns(::RBI::Scope) } def create_module(name, &block); end - # source://tapioca/0.16.11/lib/tapioca/rbi_ext/model.rb#9 + # source://tapioca/0.17.0/lib/tapioca/rbi_ext/model.rb#9 sig { params(constant: ::Module, block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)).returns(::RBI::Scope) } def create_path(constant, &block); end - # source://tapioca/0.16.11/lib/tapioca/rbi_ext/model.rb#74 + # source://tapioca/0.17.0/lib/tapioca/rbi_ext/model.rb#59 sig do params( name: ::String, @@ -4879,7 +5016,7 @@ class RBI::Tree < ::RBI::NodeWithComments # # @return [Boolean] # - # source://rbi//lib/rbi/model.rb#130 + # source://rbi//lib/rbi/model.rb#132 sig { returns(T::Boolean) } def empty?; end @@ -4891,7 +5028,7 @@ class RBI::Tree < ::RBI::NodeWithComments # : -> void # - # source://rbi//lib/rbi/rewriters/flatten_singleton_methods.rb#57 + # source://rbi//lib/rbi/rewriters/flatten_singleton_methods.rb#58 sig { void } def flatten_singleton_methods!; end @@ -4946,7 +5083,7 @@ class RBI::Tree < ::RBI::NodeWithComments # : Array[Node] # - # source://rbi//lib/rbi/model.rb#114 + # source://rbi//lib/rbi/model.rb#116 sig { returns(T::Array[::RBI::Node]) } def nodes; end @@ -4958,7 +5095,7 @@ class RBI::Tree < ::RBI::NodeWithComments # : -> void # - # source://rbi//lib/rbi/rewriters/sort_nodes.rb#116 + # source://rbi//lib/rbi/rewriters/sort_nodes.rb#118 sig { void } def sort_nodes!; end @@ -4970,11 +5107,11 @@ class RBI::Tree < ::RBI::NodeWithComments private - # source://tapioca/0.16.11/lib/tapioca/rbi_ext/model.rb#123 + # source://tapioca/0.17.0/lib/tapioca/rbi_ext/model.rb#98 sig { params(node: ::RBI::Node).returns(::RBI::Node) } def create_node(node); end - # source://tapioca/0.16.11/lib/tapioca/rbi_ext/model.rb#118 + # source://tapioca/0.17.0/lib/tapioca/rbi_ext/model.rb#93 sig { returns(T::Hash[::String, ::RBI::Node]) } def nodes_cache; end end @@ -5075,7 +5212,7 @@ class RBI::Type # : -> String # - # source://rbi//lib/rbi/rbs_printer.rb#1136 + # source://rbi//lib/rbi/rbs_printer.rb#1146 sig { returns(::String) } def rbs_string; end @@ -5274,19 +5411,19 @@ class RBI::Type # : (Prism::CallNode node) -> Array[Prism::Node] # - # source://rbi//lib/rbi/type_parser.rb#263 + # source://rbi//lib/rbi/type_parser.rb#287 sig { params(node: ::Prism::CallNode).returns(T::Array[::Prism::Node]) } def call_chain(node); end # : (Prism::CallNode node, Integer count) -> Array[Prism::Node] # - # source://rbi//lib/rbi/type_parser.rb#250 + # source://rbi//lib/rbi/type_parser.rb#274 sig { params(node: ::Prism::CallNode, count: ::Integer).returns(T::Array[::Prism::Node]) } def check_arguments_at_least!(node, count); end # : (Prism::CallNode node, Integer count) -> Array[Prism::Node] # - # source://rbi//lib/rbi/type_parser.rb#235 + # source://rbi//lib/rbi/type_parser.rb#259 sig { params(node: ::Prism::CallNode, count: ::Integer).returns(T::Array[::Prism::Node]) } def check_arguments_exactly!(node, count); end @@ -5294,13 +5431,13 @@ class RBI::Type # # @raise [Error] # - # source://rbi//lib/rbi/type_parser.rb#69 + # source://rbi//lib/rbi/type_parser.rb#71 sig { params(node: ::Prism::CallNode).returns(::RBI::Type) } def parse_call(node); end # : ((Prism::ConstantReadNode | Prism::ConstantPathNode) node) -> Type # - # source://rbi//lib/rbi/type_parser.rb#52 + # source://rbi//lib/rbi/type_parser.rb#54 sig { params(node: T.any(::Prism::ConstantPathNode, ::Prism::ConstantReadNode)).returns(::RBI::Type) } def parse_constant(node); end @@ -5308,19 +5445,19 @@ class RBI::Type # # @raise [Error] # - # source://rbi//lib/rbi/type_parser.rb#195 + # source://rbi//lib/rbi/type_parser.rb#211 sig { params(node: ::Prism::CallNode).returns(::RBI::Type) } def parse_proc(node); end # : ((Prism::HashNode | Prism::KeywordHashNode) node) -> Type # - # source://rbi//lib/rbi/type_parser.rb#176 + # source://rbi//lib/rbi/type_parser.rb#190 sig { params(node: T.any(::Prism::HashNode, ::Prism::KeywordHashNode)).returns(::RBI::Type) } def parse_shape(node); end # : (Prism::ArrayNode node) -> Type # - # source://rbi//lib/rbi/type_parser.rb#171 + # source://rbi//lib/rbi/type_parser.rb#185 sig { params(node: ::Prism::ArrayNode).returns(::RBI::Type) } def parse_tuple(node); end @@ -5328,7 +5465,7 @@ class RBI::Type # # @return [Boolean] # - # source://rbi//lib/rbi/type_parser.rb#276 + # source://rbi//lib/rbi/type_parser.rb#300 sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } def t?(node); end @@ -5336,7 +5473,7 @@ class RBI::Type # # @return [Boolean] # - # source://rbi//lib/rbi/type_parser.rb#288 + # source://rbi//lib/rbi/type_parser.rb#312 sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } def t_boolean?(node); end @@ -5344,7 +5481,7 @@ class RBI::Type # # @return [Boolean] # - # source://rbi//lib/rbi/type_parser.rb#295 + # source://rbi//lib/rbi/type_parser.rb#319 sig { params(node: ::Prism::ConstantPathNode).returns(T::Boolean) } def t_class?(node); end @@ -5352,7 +5489,7 @@ class RBI::Type # # @return [Boolean] # - # source://rbi//lib/rbi/type_parser.rb#300 + # source://rbi//lib/rbi/type_parser.rb#324 sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } def t_class_of?(node); end @@ -5360,7 +5497,7 @@ class RBI::Type # # @return [Boolean] # - # source://rbi//lib/rbi/type_parser.rb#307 + # source://rbi//lib/rbi/type_parser.rb#331 sig { params(node: ::Prism::CallNode).returns(T::Boolean) } def t_proc?(node); end @@ -6007,7 +6144,7 @@ class RBI::Type::Void < ::RBI::Type def to_rbi; end end -# source://rbi//lib/rbi/model.rb#1060 +# source://rbi//lib/rbi/model.rb#1087 class RBI::TypeMember < ::RBI::NodeWithComments include ::RBI::Indexable @@ -6015,7 +6152,7 @@ class RBI::TypeMember < ::RBI::NodeWithComments # # @return [TypeMember] a new instance of TypeMember # - # source://rbi//lib/rbi/model.rb#1065 + # source://rbi//lib/rbi/model.rb#1092 sig do params( name: ::String, @@ -6029,7 +6166,7 @@ class RBI::TypeMember < ::RBI::NodeWithComments # : -> String # - # source://rbi//lib/rbi/model.rb#1073 + # source://rbi//lib/rbi/model.rb#1100 sig { returns(::String) } def fully_qualified_name; end @@ -6041,150 +6178,150 @@ class RBI::TypeMember < ::RBI::NodeWithComments # : String # - # source://rbi//lib/rbi/model.rb#1062 + # source://rbi//lib/rbi/model.rb#1089 sig { returns(::String) } def name; end # : -> String # - # source://rbi//lib/rbi/model.rb#1081 + # source://rbi//lib/rbi/model.rb#1108 sig { override.returns(::String) } def to_s; end # : String # - # source://rbi//lib/rbi/model.rb#1062 + # source://rbi//lib/rbi/model.rb#1089 # @return [String] def value; end end -# source://rbi//lib/rbi/rbs_printer.rb#879 +# source://rbi//lib/rbi/rbs_printer.rb#889 class RBI::TypePrinter # : -> void # # @return [TypePrinter] a new instance of TypePrinter # - # source://rbi//lib/rbi/rbs_printer.rb#884 + # source://rbi//lib/rbi/rbs_printer.rb#894 sig { void } def initialize; end # : String # - # source://rbi//lib/rbi/rbs_printer.rb#881 + # source://rbi//lib/rbi/rbs_printer.rb#891 sig { returns(::String) } def string; end # : (Type node) -> void # - # source://rbi//lib/rbi/rbs_printer.rb#889 + # source://rbi//lib/rbi/rbs_printer.rb#899 sig { params(node: ::RBI::Type).void } def visit(node); end # : (Type::All type) -> void # - # source://rbi//lib/rbi/rbs_printer.rb#1004 + # source://rbi//lib/rbi/rbs_printer.rb#1014 sig { params(type: ::RBI::Type::All).void } def visit_all(type); end # : (Type::Any type) -> void # - # source://rbi//lib/rbi/rbs_printer.rb#1014 + # source://rbi//lib/rbi/rbs_printer.rb#1024 sig { params(type: ::RBI::Type::Any).void } def visit_any(type); end # : (Type::Anything type) -> void # - # source://rbi//lib/rbi/rbs_printer.rb#954 + # source://rbi//lib/rbi/rbs_printer.rb#964 sig { params(type: ::RBI::Type::Anything).void } def visit_anything(type); end # : (Type::AttachedClass type) -> void # - # source://rbi//lib/rbi/rbs_printer.rb#979 + # source://rbi//lib/rbi/rbs_printer.rb#989 sig { params(type: ::RBI::Type::AttachedClass).void } def visit_attached_class(type); end # : (Type::Boolean type) -> void # - # source://rbi//lib/rbi/rbs_printer.rb#938 + # source://rbi//lib/rbi/rbs_printer.rb#948 sig { params(type: ::RBI::Type::Boolean).void } def visit_boolean(type); end # : (Type::Class type) -> void # - # source://rbi//lib/rbi/rbs_printer.rb#1081 + # source://rbi//lib/rbi/rbs_printer.rb#1091 sig { params(type: ::RBI::Type::Class).void } def visit_class(type); end # : (Type::ClassOf type) -> void # - # source://rbi//lib/rbi/rbs_printer.rb#997 + # source://rbi//lib/rbi/rbs_printer.rb#1007 sig { params(type: ::RBI::Type::ClassOf).void } def visit_class_of(type); end # : (Type::Generic type) -> void # - # source://rbi//lib/rbi/rbs_printer.rb#943 + # source://rbi//lib/rbi/rbs_printer.rb#953 sig { params(type: ::RBI::Type::Generic).void } def visit_generic(type); end # : (Type::Nilable type) -> void # - # source://rbi//lib/rbi/rbs_printer.rb#984 + # source://rbi//lib/rbi/rbs_printer.rb#994 sig { params(type: ::RBI::Type::Nilable).void } def visit_nilable(type); end # : (Type::NoReturn type) -> void # - # source://rbi//lib/rbi/rbs_printer.rb#964 + # source://rbi//lib/rbi/rbs_printer.rb#974 sig { params(type: ::RBI::Type::NoReturn).void } def visit_no_return(type); end # : (Type::Proc type) -> void # - # source://rbi//lib/rbi/rbs_printer.rb#1054 + # source://rbi//lib/rbi/rbs_printer.rb#1064 sig { params(type: ::RBI::Type::Proc).void } def visit_proc(type); end # : (Type::SelfType type) -> void # - # source://rbi//lib/rbi/rbs_printer.rb#974 + # source://rbi//lib/rbi/rbs_printer.rb#984 sig { params(type: ::RBI::Type::SelfType).void } def visit_self_type(type); end # : (Type::Shape type) -> void # - # source://rbi//lib/rbi/rbs_printer.rb#1034 + # source://rbi//lib/rbi/rbs_printer.rb#1044 sig { params(type: ::RBI::Type::Shape).void } def visit_shape(type); end # : (Type::Simple type) -> void # - # source://rbi//lib/rbi/rbs_printer.rb#933 + # source://rbi//lib/rbi/rbs_printer.rb#943 sig { params(type: ::RBI::Type::Simple).void } def visit_simple(type); end # : (Type::Tuple type) -> void # - # source://rbi//lib/rbi/rbs_printer.rb#1024 + # source://rbi//lib/rbi/rbs_printer.rb#1034 sig { params(type: ::RBI::Type::Tuple).void } def visit_tuple(type); end # : (Type::TypeParameter type) -> void # - # source://rbi//lib/rbi/rbs_printer.rb#1076 + # source://rbi//lib/rbi/rbs_printer.rb#1086 sig { params(type: ::RBI::Type::TypeParameter).void } def visit_type_parameter(type); end # : (Type::Untyped type) -> void # - # source://rbi//lib/rbi/rbs_printer.rb#969 + # source://rbi//lib/rbi/rbs_printer.rb#979 sig { params(type: ::RBI::Type::Untyped).void } def visit_untyped(type); end # : (Type::Void type) -> void # - # source://rbi//lib/rbi/rbs_printer.rb#959 + # source://rbi//lib/rbi/rbs_printer.rb#969 sig { params(type: ::RBI::Type::Void).void } def visit_void(type); end @@ -6192,7 +6329,7 @@ class RBI::TypePrinter # : (String type_name) -> String # - # source://rbi//lib/rbi/rbs_printer.rb#1090 + # source://rbi//lib/rbi/rbs_printer.rb#1100 sig { params(type_name: ::String).returns(::String) } def translate_t_type(type_name); end end @@ -6244,7 +6381,7 @@ RBI::VERSION = T.let(T.unsafe(nil), String) # # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. # -# source://rbi//lib/rbi/model.rb#708 +# source://rbi//lib/rbi/model.rb#710 class RBI::Visibility < ::RBI::NodeWithComments abstract! @@ -6252,13 +6389,13 @@ class RBI::Visibility < ::RBI::NodeWithComments # # @return [Visibility] a new instance of Visibility # - # source://rbi//lib/rbi/model.rb#717 + # source://rbi//lib/rbi/model.rb#719 sig { params(visibility: ::Symbol, loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void } def initialize(visibility, loc: T.unsafe(nil), comments: T.unsafe(nil)); end # : (Object? other) -> bool # - # source://rbi//lib/rbi/model.rb#723 + # source://rbi//lib/rbi/model.rb#725 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end @@ -6266,7 +6403,7 @@ class RBI::Visibility < ::RBI::NodeWithComments # # @return [Boolean] # - # source://rbi//lib/rbi/model.rb#740 + # source://rbi//lib/rbi/model.rb#742 sig { returns(T::Boolean) } def private?; end @@ -6274,7 +6411,7 @@ class RBI::Visibility < ::RBI::NodeWithComments # # @return [Boolean] # - # source://rbi//lib/rbi/model.rb#735 + # source://rbi//lib/rbi/model.rb#737 sig { returns(T::Boolean) } def protected?; end @@ -6282,13 +6419,13 @@ class RBI::Visibility < ::RBI::NodeWithComments # # @return [Boolean] # - # source://rbi//lib/rbi/model.rb#730 + # source://rbi//lib/rbi/model.rb#732 sig { returns(T::Boolean) } def public?; end # : Symbol # - # source://rbi//lib/rbi/model.rb#714 + # source://rbi//lib/rbi/model.rb#716 sig { returns(::Symbol) } def visibility; end end @@ -6324,13 +6461,13 @@ class RBI::Visitor # : (Array[Node] nodes) -> void # - # source://rbi//lib/rbi/visitor.rb#109 + # source://rbi//lib/rbi/visitor.rb#111 sig { params(nodes: T::Array[::RBI::Node]).void } def visit_all(nodes); end # : (File file) -> void # - # source://rbi//lib/rbi/visitor.rb#114 + # source://rbi//lib/rbi/visitor.rb#116 sig { params(file: ::RBI::File).void } def visit_file(file); end @@ -6338,259 +6475,265 @@ class RBI::Visitor # : (Arg node) -> void # - # source://rbi//lib/rbi/visitor.rb#199 + # source://rbi//lib/rbi/visitor.rb#201 sig { params(node: ::RBI::Arg).void } def visit_arg(node); end # : (AttrAccessor node) -> void # - # source://rbi//lib/rbi/visitor.rb#148 + # source://rbi//lib/rbi/visitor.rb#150 sig { params(node: ::RBI::AttrAccessor).void } def visit_attr_accessor(node); end # : (AttrReader node) -> void # - # source://rbi//lib/rbi/visitor.rb#151 + # source://rbi//lib/rbi/visitor.rb#153 sig { params(node: ::RBI::AttrReader).void } def visit_attr_reader(node); end # : (AttrWriter node) -> void # - # source://rbi//lib/rbi/visitor.rb#154 + # source://rbi//lib/rbi/visitor.rb#156 sig { params(node: ::RBI::AttrWriter).void } def visit_attr_writer(node); end # : (BlankLine node) -> void # - # source://rbi//lib/rbi/visitor.rb#127 + # source://rbi//lib/rbi/visitor.rb#129 sig { params(node: ::RBI::BlankLine).void } def visit_blank_line(node); end # : (BlockParam node) -> void # - # source://rbi//lib/rbi/visitor.rb#178 + # source://rbi//lib/rbi/visitor.rb#180 sig { params(node: ::RBI::BlockParam).void } def visit_block_param(node); end # : (Class node) -> void # - # source://rbi//lib/rbi/visitor.rb#133 + # source://rbi//lib/rbi/visitor.rb#135 sig { params(node: ::RBI::Class).void } def visit_class(node); end # : (Comment node) -> void # - # source://rbi//lib/rbi/visitor.rb#121 + # source://rbi//lib/rbi/visitor.rb#123 sig { params(node: ::RBI::Comment).void } def visit_comment(node); end # : (ConflictTree node) -> void # - # source://rbi//lib/rbi/visitor.rb#244 + # source://rbi//lib/rbi/visitor.rb#249 sig { params(node: ::RBI::ConflictTree).void } def visit_conflict_tree(node); end # : (Const node) -> void # - # source://rbi//lib/rbi/visitor.rb#145 + # source://rbi//lib/rbi/visitor.rb#147 sig { params(node: ::RBI::Const).void } def visit_const(node); end # : (Extend node) -> void # - # source://rbi//lib/rbi/visitor.rb#184 + # source://rbi//lib/rbi/visitor.rb#186 sig { params(node: ::RBI::Extend).void } def visit_extend(node); end # : (Group node) -> void # - # source://rbi//lib/rbi/visitor.rb#238 + # source://rbi//lib/rbi/visitor.rb#243 sig { params(node: ::RBI::Group).void } def visit_group(node); end # : (Helper node) -> void # - # source://rbi//lib/rbi/visitor.rb#226 + # source://rbi//lib/rbi/visitor.rb#231 sig { params(node: ::RBI::Helper).void } def visit_helper(node); end # : (Include node) -> void # - # source://rbi//lib/rbi/visitor.rb#181 + # source://rbi//lib/rbi/visitor.rb#183 sig { params(node: ::RBI::Include).void } def visit_include(node); end # : (KwArg node) -> void # - # source://rbi//lib/rbi/visitor.rb#202 + # source://rbi//lib/rbi/visitor.rb#204 sig { params(node: ::RBI::KwArg).void } def visit_kw_arg(node); end # : (KwOptParam node) -> void # - # source://rbi//lib/rbi/visitor.rb#172 + # source://rbi//lib/rbi/visitor.rb#174 sig { params(node: ::RBI::KwOptParam).void } def visit_kw_opt_param(node); end # : (KwParam node) -> void # - # source://rbi//lib/rbi/visitor.rb#169 + # source://rbi//lib/rbi/visitor.rb#171 sig { params(node: ::RBI::KwParam).void } def visit_kw_param(node); end # : (KwRestParam node) -> void # - # source://rbi//lib/rbi/visitor.rb#175 + # source://rbi//lib/rbi/visitor.rb#177 sig { params(node: ::RBI::KwRestParam).void } def visit_kw_rest_param(node); end # : (Method node) -> void # - # source://rbi//lib/rbi/visitor.rb#157 + # source://rbi//lib/rbi/visitor.rb#159 sig { params(node: ::RBI::Method).void } def visit_method(node); end # : (MixesInClassMethods node) -> void # - # source://rbi//lib/rbi/visitor.rb#232 + # source://rbi//lib/rbi/visitor.rb#237 sig { params(node: ::RBI::MixesInClassMethods).void } def visit_mixes_in_class_methods(node); end # : (Module node) -> void # - # source://rbi//lib/rbi/visitor.rb#130 + # source://rbi//lib/rbi/visitor.rb#132 sig { params(node: ::RBI::Module).void } def visit_module(node); end # : (OptParam node) -> void # - # source://rbi//lib/rbi/visitor.rb#163 + # source://rbi//lib/rbi/visitor.rb#165 sig { params(node: ::RBI::OptParam).void } def visit_opt_param(node); end # : (Private node) -> void # - # source://rbi//lib/rbi/visitor.rb#193 + # source://rbi//lib/rbi/visitor.rb#195 sig { params(node: ::RBI::Private).void } def visit_private(node); end # : (Protected node) -> void # - # source://rbi//lib/rbi/visitor.rb#190 + # source://rbi//lib/rbi/visitor.rb#192 sig { params(node: ::RBI::Protected).void } def visit_protected(node); end # : (Public node) -> void # - # source://rbi//lib/rbi/visitor.rb#187 + # source://rbi//lib/rbi/visitor.rb#189 sig { params(node: ::RBI::Public).void } def visit_public(node); end # : (RBSComment node) -> void # - # source://rbi//lib/rbi/visitor.rb#124 + # source://rbi//lib/rbi/visitor.rb#126 sig { params(node: ::RBI::RBSComment).void } def visit_rbs_comment(node); end # : (ReqParam node) -> void # - # source://rbi//lib/rbi/visitor.rb#160 + # source://rbi//lib/rbi/visitor.rb#162 sig { params(node: ::RBI::ReqParam).void } def visit_req_param(node); end # : (RequiresAncestor node) -> void # - # source://rbi//lib/rbi/visitor.rb#235 + # source://rbi//lib/rbi/visitor.rb#240 sig { params(node: ::RBI::RequiresAncestor).void } def visit_requires_ancestor(node); end # : (RestParam node) -> void # - # source://rbi//lib/rbi/visitor.rb#166 + # source://rbi//lib/rbi/visitor.rb#168 sig { params(node: ::RBI::RestParam).void } def visit_rest_param(node); end # : (ScopeConflict node) -> void # - # source://rbi//lib/rbi/visitor.rb#247 + # source://rbi//lib/rbi/visitor.rb#252 sig { params(node: ::RBI::ScopeConflict).void } def visit_scope_conflict(node); end # : (Send node) -> void # - # source://rbi//lib/rbi/visitor.rb#196 + # source://rbi//lib/rbi/visitor.rb#198 sig { params(node: ::RBI::Send).void } def visit_send(node); end # : (Sig node) -> void # - # source://rbi//lib/rbi/visitor.rb#205 + # source://rbi//lib/rbi/visitor.rb#207 sig { params(node: ::RBI::Sig).void } def visit_sig(node); end # : (SigParam node) -> void # - # source://rbi//lib/rbi/visitor.rb#208 + # source://rbi//lib/rbi/visitor.rb#210 sig { params(node: ::RBI::SigParam).void } def visit_sig_param(node); end # : (SingletonClass node) -> void # - # source://rbi//lib/rbi/visitor.rb#136 + # source://rbi//lib/rbi/visitor.rb#138 sig { params(node: ::RBI::SingletonClass).void } def visit_singleton_class(node); end # : (Struct node) -> void # - # source://rbi//lib/rbi/visitor.rb#139 + # source://rbi//lib/rbi/visitor.rb#141 sig { params(node: ::RBI::Struct).void } def visit_struct(node); end # : (TEnum node) -> void # - # source://rbi//lib/rbi/visitor.rb#220 + # source://rbi//lib/rbi/visitor.rb#222 sig { params(node: ::RBI::TEnum).void } def visit_tenum(node); end # : (TEnumBlock node) -> void # - # source://rbi//lib/rbi/visitor.rb#223 + # source://rbi//lib/rbi/visitor.rb#225 sig { params(node: ::RBI::TEnumBlock).void } def visit_tenum_block(node); end + # : (TEnumValue node) -> void + # + # source://rbi//lib/rbi/visitor.rb#228 + sig { params(node: ::RBI::TEnumValue).void } + def visit_tenum_value(node); end + # : (Tree node) -> void # - # source://rbi//lib/rbi/visitor.rb#142 + # source://rbi//lib/rbi/visitor.rb#144 sig { params(node: ::RBI::Tree).void } def visit_tree(node); end # : (TStruct node) -> void # - # source://rbi//lib/rbi/visitor.rb#211 + # source://rbi//lib/rbi/visitor.rb#213 sig { params(node: ::RBI::TStruct).void } def visit_tstruct(node); end # : (TStructConst node) -> void # - # source://rbi//lib/rbi/visitor.rb#214 + # source://rbi//lib/rbi/visitor.rb#216 sig { params(node: ::RBI::TStructConst).void } def visit_tstruct_const(node); end # : (TStructProp node) -> void # - # source://rbi//lib/rbi/visitor.rb#217 + # source://rbi//lib/rbi/visitor.rb#219 sig { params(node: ::RBI::TStructProp).void } def visit_tstruct_prop(node); end # : (TypeMember node) -> void # - # source://rbi//lib/rbi/visitor.rb#229 + # source://rbi//lib/rbi/visitor.rb#234 sig { params(node: ::RBI::TypeMember).void } def visit_type_member(node); end # : (VisibilityGroup node) -> void # - # source://rbi//lib/rbi/visitor.rb#241 + # source://rbi//lib/rbi/visitor.rb#246 sig { params(node: ::RBI::VisibilityGroup).void } def visit_visibility_group(node); end end diff --git a/sorbet/rbi/gems/rbs@3.9.1.rbi b/sorbet/rbi/gems/rbs@4.0.0.dev.4.rbi similarity index 82% rename from sorbet/rbi/gems/rbs@3.9.1.rbi rename to sorbet/rbi/gems/rbs@4.0.0.dev.4.rbi index 681f7787d..8fe871723 100644 --- a/sorbet/rbi/gems/rbs@3.9.1.rbi +++ b/sorbet/rbi/gems/rbs@4.0.0.dev.4.rbi @@ -5,38 +5,29 @@ # Please instead update this file by running `bin/tapioca gem rbs`. -# source://rbs//lib/rbs/namespace.rb#120 -module Kernel - # source://rbs//lib/rbs/namespace.rb#121 - def Namespace(name); end - - # source://rbs//lib/rbs/type_name.rb#105 - def TypeName(string); end -end - # source://rbs//lib/rbs/version.rb#3 module RBS class << self - # source://rbs//lib/rbs.rb#69 + # source://rbs//lib/rbs.rb#81 def logger; end # Returns the value of attribute logger_level. # - # source://rbs//lib/rbs.rb#66 + # source://rbs//lib/rbs.rb#78 def logger_level; end - # source://rbs//lib/rbs.rb#78 + # source://rbs//lib/rbs.rb#90 def logger_level=(level); end # Returns the value of attribute logger_output. # - # source://rbs//lib/rbs.rb#67 + # source://rbs//lib/rbs.rb#79 def logger_output; end - # source://rbs//lib/rbs.rb#73 + # source://rbs//lib/rbs.rb#85 def logger_output=(val); end - # source://rbs//lib/rbs.rb#83 + # source://rbs//lib/rbs.rb#95 def print_warning; end end end @@ -1075,6 +1066,459 @@ module RBS::AST::Members::Var def type; end end +# source://rbs//lib/rbs/ast/ruby/comment_block.rb#5 +module RBS::AST::Ruby; end + +# source://rbs//lib/rbs/ast/ruby/annotations.rb#6 +module RBS::AST::Ruby::Annotations; end + +# source://rbs//lib/rbs/ast/ruby/annotations.rb#7 +class RBS::AST::Ruby::Annotations::Base + # @return [Base] a new instance of Base + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#10 + def initialize(location, prefix_location); end + + # source://rbs//lib/rbs/ast/ruby/annotations.rb#15 + def buffer; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#8 + def location; end + + # Returns the value of attribute prefix_location. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#8 + def prefix_location; end +end + +# source://rbs//lib/rbs/ast/ruby/annotations.rb#36 +class RBS::AST::Ruby::Annotations::ColonMethodTypeAnnotation < ::RBS::AST::Ruby::Annotations::Base + # @return [ColonMethodTypeAnnotation] a new instance of ColonMethodTypeAnnotation + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#39 + def initialize(location:, prefix_location:, annotations:, method_type:); end + + # Returns the value of attribute annotations. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#37 + def annotations; end + + # source://rbs//lib/rbs/ast/ruby/annotations.rb#45 + def map_type_name; end + + # Returns the value of attribute method_type. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#37 + def method_type; end +end + +# source://rbs//lib/rbs/ast/ruby/annotations.rb#55 +class RBS::AST::Ruby::Annotations::MethodTypesAnnotation < ::RBS::AST::Ruby::Annotations::Base + # @return [MethodTypesAnnotation] a new instance of MethodTypesAnnotation + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#60 + def initialize(location:, prefix_location:, overloads:, vertical_bar_locations:); end + + # source://rbs//lib/rbs/ast/ruby/annotations.rb#66 + def map_type_name(&block); end + + # Returns the value of attribute overloads. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#58 + def overloads; end + + # Returns the value of attribute vertical_bar_locations. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#58 + def vertical_bar_locations; end +end + +# source://rbs//lib/rbs/ast/ruby/annotations.rb#56 +RBS::AST::Ruby::Annotations::MethodTypesAnnotation::Overload = RBS::AST::Members::MethodDefinition::Overload + +# source://rbs//lib/rbs/ast/ruby/annotations.rb#20 +class RBS::AST::Ruby::Annotations::NodeTypeAssertion < ::RBS::AST::Ruby::Annotations::Base + # @return [NodeTypeAssertion] a new instance of NodeTypeAssertion + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#23 + def initialize(location:, prefix_location:, type:); end + + # source://rbs//lib/rbs/ast/ruby/annotations.rb#28 + def map_type_name; end + + # Returns the value of attribute type. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#21 + def type; end +end + +# source://rbs//lib/rbs/ast/ruby/annotations.rb#88 +class RBS::AST::Ruby::Annotations::ReturnTypeAnnotation < ::RBS::AST::Ruby::Annotations::Base + # @return [ReturnTypeAnnotation] a new instance of ReturnTypeAnnotation + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#97 + def initialize(location:, prefix_location:, return_location:, colon_location:, return_type:, comment_location:); end + + # Returns the value of attribute colon_location. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#91 + def colon_location; end + + # Returns the value of attribute comment_location. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#95 + def comment_location; end + + # source://rbs//lib/rbs/ast/ruby/annotations.rb#105 + def map_type_name(&block); end + + # Returns the value of attribute return_location. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#89 + def return_location; end + + # Returns the value of attribute return_type. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#93 + def return_type; end +end + +# source://rbs//lib/rbs/ast/ruby/annotations.rb#78 +class RBS::AST::Ruby::Annotations::SkipAnnotation < ::RBS::AST::Ruby::Annotations::Base + # @return [SkipAnnotation] a new instance of SkipAnnotation + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#81 + def initialize(location:, prefix_location:, skip_location:, comment_location:); end + + # Returns the value of attribute comment_location. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#79 + def comment_location; end + + # Returns the value of attribute skip_location. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#79 + def skip_location; end +end + +# source://rbs//lib/rbs/ast/ruby/comment_block.rb#6 +class RBS::AST::Ruby::CommentBlock + # @return [CommentBlock] a new instance of CommentBlock + # + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#9 + def initialize(source_buffer, comments); end + + # Returns the value of attribute comment_buffer. + # + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#7 + def comment_buffer; end + + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#204 + def comments; end + + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#98 + def each_paragraph(variables, &block); end + + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#50 + def end_line; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#36 + def leading?; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#208 + def leading_annotation?(index); end + + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#174 + def line_location(start_line, end_line); end + + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#54 + def line_starts; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#7 + def name; end + + # Returns the value of attribute offsets. + # + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#7 + def offsets; end + + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#180 + def parse_annotation_lines(start_line, end_line, variables); end + + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#46 + def start_line; end + + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#169 + def text(comment_index); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#41 + def trailing?; end + + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#190 + def trailing_annotation(variables); end + + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#130 + def yield_annotation(start_line, end_line, current_line, variables, &block); end + + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#110 + def yield_paragraph(start_line, current_line, variables, &block); end + + class << self + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#60 + def build(buffer, comments); end + end +end + +# source://rbs//lib/rbs/ast/ruby/comment_block.rb#96 +class RBS::AST::Ruby::CommentBlock::AnnotationSyntaxError < ::Struct + def error; end + def error=(_); end + def location; end + def location=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://rbs//lib/rbs/ast/ruby/declarations.rb#6 +module RBS::AST::Ruby::Declarations; end + +# source://rbs//lib/rbs/ast/ruby/declarations.rb#7 +class RBS::AST::Ruby::Declarations::Base + include ::RBS::AST::Ruby::Helpers::ConstantHelper + include ::RBS::AST::Ruby::Helpers::LocationHelper + + # @return [Base] a new instance of Base + # + # source://rbs//lib/rbs/ast/ruby/declarations.rb#13 + def initialize(buffer); end + + # Returns the value of attribute buffer. + # + # source://rbs//lib/rbs/ast/ruby/declarations.rb#8 + def buffer; end +end + +# source://rbs//lib/rbs/ast/ruby/declarations.rb#18 +class RBS::AST::Ruby::Declarations::ClassDecl < ::RBS::AST::Ruby::Declarations::Base + # @return [ClassDecl] a new instance of ClassDecl + # + # source://rbs//lib/rbs/ast/ruby/declarations.rb#25 + def initialize(buffer, name, node); end + + # Returns the value of attribute class_name. + # + # source://rbs//lib/rbs/ast/ruby/declarations.rb#19 + def class_name; end + + # source://rbs//lib/rbs/ast/ruby/declarations.rb#32 + def each_decl(&block); end + + # source://rbs//lib/rbs/ast/ruby/declarations.rb#46 + def location; end + + # Returns the value of attribute members. + # + # source://rbs//lib/rbs/ast/ruby/declarations.rb#21 + def members; end + + # Returns the value of attribute node. + # + # source://rbs//lib/rbs/ast/ruby/declarations.rb#23 + def node; end + + # source://rbs//lib/rbs/ast/ruby/declarations.rb#42 + def super_class; end + + # source://rbs//lib/rbs/ast/ruby/declarations.rb#44 + def type_params; end +end + +# source://rbs//lib/rbs/ast/ruby/declarations.rb#51 +class RBS::AST::Ruby::Declarations::ModuleDecl < ::RBS::AST::Ruby::Declarations::Base + # @return [ModuleDecl] a new instance of ModuleDecl + # + # source://rbs//lib/rbs/ast/ruby/declarations.rb#58 + def initialize(buffer, name, node); end + + # source://rbs//lib/rbs/ast/ruby/declarations.rb#65 + def each_decl(&block); end + + # source://rbs//lib/rbs/ast/ruby/declarations.rb#79 + def location; end + + # Returns the value of attribute members. + # + # source://rbs//lib/rbs/ast/ruby/declarations.rb#54 + def members; end + + # Returns the value of attribute module_name. + # + # source://rbs//lib/rbs/ast/ruby/declarations.rb#52 + def module_name; end + + # Returns the value of attribute node. + # + # source://rbs//lib/rbs/ast/ruby/declarations.rb#56 + def node; end + + # source://rbs//lib/rbs/ast/ruby/declarations.rb#77 + def self_types; end + + # source://rbs//lib/rbs/ast/ruby/declarations.rb#75 + def type_params; end +end + +# source://rbs//lib/rbs/ast/ruby/helpers/constant_helper.rb#6 +module RBS::AST::Ruby::Helpers; end + +# source://rbs//lib/rbs/ast/ruby/helpers/constant_helper.rb#7 +module RBS::AST::Ruby::Helpers::ConstantHelper + private + + # source://rbs//lib/rbs/ast/ruby/helpers/constant_helper.rb#10 + def constant_as_type_name(node); end + + class << self + # source://rbs//lib/rbs/ast/ruby/helpers/constant_helper.rb#10 + def constant_as_type_name(node); end + end +end + +# source://rbs//lib/rbs/ast/ruby/helpers/location_helper.rb#7 +module RBS::AST::Ruby::Helpers::LocationHelper + # source://rbs//lib/rbs/ast/ruby/helpers/location_helper.rb#8 + def rbs_location(location); end +end + +# source://rbs//lib/rbs/ast/ruby/members.rb#6 +module RBS::AST::Ruby::Members; end + +# source://rbs//lib/rbs/ast/ruby/members.rb#7 +class RBS::AST::Ruby::Members::Base + include ::RBS::AST::Ruby::Helpers::LocationHelper + + # @return [Base] a new instance of Base + # + # source://rbs//lib/rbs/ast/ruby/members.rb#10 + def initialize(buffer); end + + # Returns the value of attribute buffer. + # + # source://rbs//lib/rbs/ast/ruby/members.rb#8 + def buffer; end +end + +# source://rbs//lib/rbs/ast/ruby/members.rb#180 +class RBS::AST::Ruby::Members::DefMember < ::RBS::AST::Ruby::Members::Base + # @return [DefMember] a new instance of DefMember + # + # source://rbs//lib/rbs/ast/ruby/members.rb#187 + def initialize(buffer, name, node, method_type); end + + # source://rbs//lib/rbs/ast/ruby/members.rb#206 + def annotations; end + + # source://rbs//lib/rbs/ast/ruby/members.rb#194 + def location; end + + # Returns the value of attribute method_type. + # + # source://rbs//lib/rbs/ast/ruby/members.rb#185 + def method_type; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/ast/ruby/members.rb#183 + def name; end + + # Returns the value of attribute node. + # + # source://rbs//lib/rbs/ast/ruby/members.rb#184 + def node; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/ast/ruby/members.rb#202 + def overloading?; end + + # source://rbs//lib/rbs/ast/ruby/members.rb#198 + def overloads; end +end + +# source://rbs//lib/rbs/ast/ruby/members.rb#181 +RBS::AST::Ruby::Members::DefMember::Overload = RBS::AST::Members::MethodDefinition::Overload + +# source://rbs//lib/rbs/ast/ruby/members.rb#17 +class RBS::AST::Ruby::Members::MethodTypeAnnotation + # @return [MethodTypeAnnotation] a new instance of MethodTypeAnnotation + # + # source://rbs//lib/rbs/ast/ruby/members.rb#64 + def initialize(type_annotations:); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/ast/ruby/members.rb#139 + def empty?; end + + # source://rbs//lib/rbs/ast/ruby/members.rb#68 + def map_type_name(&block); end + + # source://rbs//lib/rbs/ast/ruby/members.rb#143 + def overloads; end + + # Returns the value of attribute type_annotations. + # + # source://rbs//lib/rbs/ast/ruby/members.rb#62 + def type_annotations; end + + class << self + # source://rbs//lib/rbs/ast/ruby/members.rb#81 + def build(leading_block, trailing_block, variables); end + end +end + +# source://rbs//lib/rbs/ast/ruby/members.rb#18 +class RBS::AST::Ruby::Members::MethodTypeAnnotation::DocStyle + # @return [DocStyle] a new instance of DocStyle + # + # source://rbs//lib/rbs/ast/ruby/members.rb#21 + def initialize; end + + # source://rbs//lib/rbs/ast/ruby/members.rb#25 + def map_type_name(&block); end + + # source://rbs//lib/rbs/ast/ruby/members.rb#31 + def method_type; end + + # Returns the value of attribute return_type_annotation. + # + # source://rbs//lib/rbs/ast/ruby/members.rb#19 + def return_type_annotation; end + + # Sets the attribute return_type_annotation + # + # @param value the value to set the attribute return_type_annotation to. + # + # source://rbs//lib/rbs/ast/ruby/members.rb#19 + def return_type_annotation=(_arg0); end +end + # source://rbs//lib/rbs/ast/type_param.rb#5 class RBS::AST::TypeParam # @return [TypeParam] a new instance of TypeParam @@ -1329,24 +1773,33 @@ class RBS::BaseError < ::StandardError; end class RBS::Buffer # @return [Buffer] a new instance of Buffer # - # source://rbs//lib/rbs/buffer.rb#8 - def initialize(name:, content:); end + # source://rbs//lib/rbs/buffer.rb#9 + def initialize(content:, name: T.unsafe(nil), parent: T.unsafe(nil)); end + + # source://rbs//lib/rbs/buffer.rb#126 + def absolute_position(position); end # Returns the value of attribute content. # # source://rbs//lib/rbs/buffer.rb#6 def content; end - # source://rbs//lib/rbs/buffer.rb#63 + # source://rbs//lib/rbs/buffer.rb#143 + def detach; end + + # source://rbs//lib/rbs/buffer.rb#81 def inspect; end - # source://rbs//lib/rbs/buffer.rb#59 + # source://rbs//lib/rbs/buffer.rb#73 def last_position; end - # source://rbs//lib/rbs/buffer.rb#13 + # source://rbs//lib/rbs/buffer.rb#26 + def line_count; end + + # source://rbs//lib/rbs/buffer.rb#22 def lines; end - # source://rbs//lib/rbs/buffer.rb#49 + # source://rbs//lib/rbs/buffer.rb#63 def loc_to_pos(loc); end # Returns the value of attribute name. @@ -1354,11 +1807,31 @@ class RBS::Buffer # source://rbs//lib/rbs/buffer.rb#5 def name; end - # source://rbs//lib/rbs/buffer.rb#37 + # Returns the value of attribute parent. + # + # source://rbs//lib/rbs/buffer.rb#7 + def parent; end + + # source://rbs//lib/rbs/buffer.rb#111 + def parent_buffer; end + + # source://rbs//lib/rbs/buffer.rb#117 + def parent_position(position); end + + # source://rbs//lib/rbs/buffer.rb#51 def pos_to_loc(pos); end - # source://rbs//lib/rbs/buffer.rb#17 + # source://rbs//lib/rbs/buffer.rb#30 def ranges; end + + # source://rbs//lib/rbs/buffer.rb#85 + def rbs_location(location, loc2 = T.unsafe(nil)); end + + # source://rbs//lib/rbs/buffer.rb#93 + def sub_buffer(lines:); end + + # source://rbs//lib/rbs/buffer.rb#135 + def top_buffer; end end # source://rbs//lib/rbs/builtin_names.rb#4 @@ -2038,51 +2511,51 @@ class RBS::Constant def type; end end -# source://rbs//lib/rbs/errors.rb#577 +# source://rbs//lib/rbs/errors.rb#578 class RBS::CyclicClassAliasDefinitionError < ::RBS::BaseError include ::RBS::DetailedMessageable # @return [CyclicClassAliasDefinitionError] a new instance of CyclicClassAliasDefinitionError # - # source://rbs//lib/rbs/errors.rb#582 + # source://rbs//lib/rbs/errors.rb#583 def initialize(entry); end # Returns the value of attribute alias_entry. # - # source://rbs//lib/rbs/errors.rb#580 + # source://rbs//lib/rbs/errors.rb#581 def alias_entry; end - # source://rbs//lib/rbs/errors.rb#588 + # source://rbs//lib/rbs/errors.rb#589 def location; end end -# source://rbs//lib/rbs/errors.rb#538 +# source://rbs//lib/rbs/errors.rb#539 class RBS::CyclicTypeParameterBound < ::RBS::BaseError include ::RBS::DetailedMessageable # @return [CyclicTypeParameterBound] a new instance of CyclicTypeParameterBound # - # source://rbs//lib/rbs/errors.rb#543 + # source://rbs//lib/rbs/errors.rb#544 def initialize(type_name:, method_name:, params:, location:); end # Returns the value of attribute location. # - # source://rbs//lib/rbs/errors.rb#541 + # source://rbs//lib/rbs/errors.rb#542 def location; end # Returns the value of attribute method_name. # - # source://rbs//lib/rbs/errors.rb#541 + # source://rbs//lib/rbs/errors.rb#542 def method_name; end # Returns the value of attribute params. # - # source://rbs//lib/rbs/errors.rb#541 + # source://rbs//lib/rbs/errors.rb#542 def params; end # Returns the value of attribute type_name. # - # source://rbs//lib/rbs/errors.rb#541 + # source://rbs//lib/rbs/errors.rb#542 def type_name; end end @@ -2090,170 +2563,170 @@ end class RBS::Definition # @return [Definition] a new instance of Definition # - # source://rbs//lib/rbs/definition.rb#297 + # source://rbs//lib/rbs/definition.rb#302 def initialize(type_name:, entry:, self_type:, ancestors:); end # Returns the value of attribute ancestors. # - # source://rbs//lib/rbs/definition.rb#291 + # source://rbs//lib/rbs/definition.rb#296 def ancestors; end # @return [Boolean] # - # source://rbs//lib/rbs/definition.rb#320 + # source://rbs//lib/rbs/definition.rb#325 def class?; end # @return [Boolean] # - # source://rbs//lib/rbs/definition.rb#337 + # source://rbs//lib/rbs/definition.rb#342 def class_type?; end # Returns the value of attribute class_variables. # - # source://rbs//lib/rbs/definition.rb#295 + # source://rbs//lib/rbs/definition.rb#300 def class_variables; end - # source://rbs//lib/rbs/definition.rb#384 + # source://rbs//lib/rbs/definition.rb#389 def each_type(&block); end # Returns the value of attribute entry. # - # source://rbs//lib/rbs/definition.rb#290 + # source://rbs//lib/rbs/definition.rb#295 def entry; end # @return [Boolean] # - # source://rbs//lib/rbs/definition.rb#341 + # source://rbs//lib/rbs/definition.rb#346 def instance_type?; end # Returns the value of attribute instance_variables. # - # source://rbs//lib/rbs/definition.rb#294 + # source://rbs//lib/rbs/definition.rb#299 def instance_variables; end # @return [Boolean] # - # source://rbs//lib/rbs/definition.rb#328 + # source://rbs//lib/rbs/definition.rb#333 def interface?; end # @return [Boolean] # - # source://rbs//lib/rbs/definition.rb#345 + # source://rbs//lib/rbs/definition.rb#350 def interface_type?; end - # source://rbs//lib/rbs/definition.rb#374 + # source://rbs//lib/rbs/definition.rb#379 def map_method_type(&block); end # Returns the value of attribute methods. # - # source://rbs//lib/rbs/definition.rb#293 + # source://rbs//lib/rbs/definition.rb#298 def methods; end # @return [Boolean] # - # source://rbs//lib/rbs/definition.rb#324 + # source://rbs//lib/rbs/definition.rb#329 def module?; end # Returns the value of attribute self_type. # - # source://rbs//lib/rbs/definition.rb#292 + # source://rbs//lib/rbs/definition.rb#297 def self_type; end - # source://rbs//lib/rbs/definition.rb#362 + # source://rbs//lib/rbs/definition.rb#367 def sub(s); end # Returns the value of attribute type_name. # - # source://rbs//lib/rbs/definition.rb#289 + # source://rbs//lib/rbs/definition.rb#294 def type_name; end - # source://rbs//lib/rbs/definition.rb#349 + # source://rbs//lib/rbs/definition.rb#354 def type_params; end - # source://rbs//lib/rbs/definition.rb#353 + # source://rbs//lib/rbs/definition.rb#358 def type_params_decl; end end -# source://rbs//lib/rbs/definition.rb#204 +# source://rbs//lib/rbs/definition.rb#209 module RBS::Definition::Ancestor; end -# source://rbs//lib/rbs/definition.rb#205 +# source://rbs//lib/rbs/definition.rb#210 class RBS::Definition::Ancestor::Instance # @return [Instance] a new instance of Instance # - # source://rbs//lib/rbs/definition.rb#208 + # source://rbs//lib/rbs/definition.rb#213 def initialize(name:, args:, source:); end - # source://rbs//lib/rbs/definition.rb#214 + # source://rbs//lib/rbs/definition.rb#219 def ==(other); end # Returns the value of attribute args. # - # source://rbs//lib/rbs/definition.rb#206 + # source://rbs//lib/rbs/definition.rb#211 def args; end - # source://rbs//lib/rbs/definition.rb#214 + # source://rbs//lib/rbs/definition.rb#219 def eql?(other); end - # source://rbs//lib/rbs/definition.rb#220 + # source://rbs//lib/rbs/definition.rb#225 def hash; end # Returns the value of attribute name. # - # source://rbs//lib/rbs/definition.rb#206 + # source://rbs//lib/rbs/definition.rb#211 def name; end # Returns the value of attribute source. # - # source://rbs//lib/rbs/definition.rb#206 + # source://rbs//lib/rbs/definition.rb#211 def source; end end -# source://rbs//lib/rbs/definition.rb#225 +# source://rbs//lib/rbs/definition.rb#230 class RBS::Definition::Ancestor::Singleton # @return [Singleton] a new instance of Singleton # - # source://rbs//lib/rbs/definition.rb#228 + # source://rbs//lib/rbs/definition.rb#233 def initialize(name:); end - # source://rbs//lib/rbs/definition.rb#232 + # source://rbs//lib/rbs/definition.rb#237 def ==(other); end - # source://rbs//lib/rbs/definition.rb#232 + # source://rbs//lib/rbs/definition.rb#237 def eql?(other); end - # source://rbs//lib/rbs/definition.rb#238 + # source://rbs//lib/rbs/definition.rb#243 def hash; end # Returns the value of attribute name. # - # source://rbs//lib/rbs/definition.rb#226 + # source://rbs//lib/rbs/definition.rb#231 def name; end end -# source://rbs//lib/rbs/definition.rb#244 +# source://rbs//lib/rbs/definition.rb#249 class RBS::Definition::InstanceAncestors # @return [InstanceAncestors] a new instance of InstanceAncestors # - # source://rbs//lib/rbs/definition.rb#249 + # source://rbs//lib/rbs/definition.rb#254 def initialize(type_name:, params:, ancestors:); end # Returns the value of attribute ancestors. # - # source://rbs//lib/rbs/definition.rb#247 + # source://rbs//lib/rbs/definition.rb#252 def ancestors; end - # source://rbs//lib/rbs/definition.rb#255 + # source://rbs//lib/rbs/definition.rb#260 def apply(args, env:, location:); end # Returns the value of attribute params. # - # source://rbs//lib/rbs/definition.rb#246 + # source://rbs//lib/rbs/definition.rb#251 def params; end # Returns the value of attribute type_name. # - # source://rbs//lib/rbs/definition.rb#245 + # source://rbs//lib/rbs/definition.rb#250 def type_name; end end @@ -2261,91 +2734,91 @@ end class RBS::Definition::Method # @return [Method] a new instance of Method # - # source://rbs//lib/rbs/definition.rb#102 + # source://rbs//lib/rbs/definition.rb#107 def initialize(super_method:, defs:, accessibility:, alias_of:, annotations: T.unsafe(nil), alias_member: T.unsafe(nil)); end - # source://rbs//lib/rbs/definition.rb#112 + # source://rbs//lib/rbs/definition.rb#117 def ==(other); end # Returns the value of attribute accessibility. # - # source://rbs//lib/rbs/definition.rb#96 + # source://rbs//lib/rbs/definition.rb#101 def accessibility; end # Returns the value of attribute alias_member. # - # source://rbs//lib/rbs/definition.rb#100 + # source://rbs//lib/rbs/definition.rb#105 def alias_member; end # Returns the value of attribute alias_of. # - # source://rbs//lib/rbs/definition.rb#99 + # source://rbs//lib/rbs/definition.rb#104 def alias_of; end # Returns the value of attribute annotations. # - # source://rbs//lib/rbs/definition.rb#98 + # source://rbs//lib/rbs/definition.rb#103 def annotations; end - # source://rbs//lib/rbs/definition.rb#146 + # source://rbs//lib/rbs/definition.rb#151 def comments; end - # source://rbs//lib/rbs/definition.rb#128 + # source://rbs//lib/rbs/definition.rb#133 def defined_in; end # Returns the value of attribute defs. # - # source://rbs//lib/rbs/definition.rb#95 + # source://rbs//lib/rbs/definition.rb#100 def defs; end - # source://rbs//lib/rbs/definition.rb#112 + # source://rbs//lib/rbs/definition.rb#117 def eql?(other); end # Returns the value of attribute extra_annotations. # - # source://rbs//lib/rbs/definition.rb#97 + # source://rbs//lib/rbs/definition.rb#102 def extra_annotations; end - # source://rbs//lib/rbs/definition.rb#124 + # source://rbs//lib/rbs/definition.rb#129 def hash; end - # source://rbs//lib/rbs/definition.rb#135 + # source://rbs//lib/rbs/definition.rb#140 def implemented_in; end - # source://rbs//lib/rbs/definition.rb#185 + # source://rbs//lib/rbs/definition.rb#190 def map_method_type(&block); end - # source://rbs//lib/rbs/definition.rb#171 + # source://rbs//lib/rbs/definition.rb#176 def map_type(&block); end - # source://rbs//lib/rbs/definition.rb#178 + # source://rbs//lib/rbs/definition.rb#183 def map_type_bound(&block); end - # source://rbs//lib/rbs/definition.rb#150 + # source://rbs//lib/rbs/definition.rb#155 def members; end - # source://rbs//lib/rbs/definition.rb#142 + # source://rbs//lib/rbs/definition.rb#147 def method_types; end # @return [Boolean] # - # source://rbs//lib/rbs/definition.rb#158 + # source://rbs//lib/rbs/definition.rb#163 def private?; end # @return [Boolean] # - # source://rbs//lib/rbs/definition.rb#154 + # source://rbs//lib/rbs/definition.rb#159 def public?; end - # source://rbs//lib/rbs/definition.rb#162 + # source://rbs//lib/rbs/definition.rb#167 def sub(s); end # Returns the value of attribute super_method. # - # source://rbs//lib/rbs/definition.rb#94 + # source://rbs//lib/rbs/definition.rb#99 def super_method; end - # source://rbs//lib/rbs/definition.rb#191 + # source://rbs//lib/rbs/definition.rb#196 def update(super_method: T.unsafe(nil), defs: T.unsafe(nil), accessibility: T.unsafe(nil), alias_of: T.unsafe(nil), annotations: T.unsafe(nil), alias_member: T.unsafe(nil)); end end @@ -2372,7 +2845,7 @@ class RBS::Definition::Method::TypeDef # source://rbs//lib/rbs/definition.rb#34 def defined_in; end - # source://rbs//lib/rbs/definition.rb#84 + # source://rbs//lib/rbs/definition.rb#89 def each_annotation(&block); end # source://rbs//lib/rbs/definition.rb#50 @@ -2398,7 +2871,7 @@ class RBS::Definition::Method::TypeDef # @return [Boolean] # - # source://rbs//lib/rbs/definition.rb#75 + # source://rbs//lib/rbs/definition.rb#80 def overload?; end # Returns the value of attribute overload_annotations. @@ -2411,25 +2884,25 @@ class RBS::Definition::Method::TypeDef # source://rbs//lib/rbs/definition.rb#32 def type; end - # source://rbs//lib/rbs/definition.rb#68 + # source://rbs//lib/rbs/definition.rb#73 def update(type: T.unsafe(nil), member: T.unsafe(nil), defined_in: T.unsafe(nil), implemented_in: T.unsafe(nil)); end end -# source://rbs//lib/rbs/definition.rb#279 +# source://rbs//lib/rbs/definition.rb#284 class RBS::Definition::SingletonAncestors # @return [SingletonAncestors] a new instance of SingletonAncestors # - # source://rbs//lib/rbs/definition.rb#283 + # source://rbs//lib/rbs/definition.rb#288 def initialize(type_name:, ancestors:); end # Returns the value of attribute ancestors. # - # source://rbs//lib/rbs/definition.rb#281 + # source://rbs//lib/rbs/definition.rb#286 def ancestors; end # Returns the value of attribute type_name. # - # source://rbs//lib/rbs/definition.rb#280 + # source://rbs//lib/rbs/definition.rb#285 def type_name; end end @@ -2496,7 +2969,7 @@ class RBS::DefinitionBuilder # source://rbs//lib/rbs/definition_builder.rb#33 def define_interface(definition, type_name, subst); end - # source://rbs//lib/rbs/definition_builder.rb#642 + # source://rbs//lib/rbs/definition_builder.rb#646 def define_method(methods, definition, method, subst, self_type_methods, defined_in:, implemented_in: T.unsafe(nil)); end # source://rbs//lib/rbs/definition_builder.rb#25 @@ -2507,19 +2980,19 @@ class RBS::DefinitionBuilder # source://rbs//lib/rbs/definition_builder.rb#5 def env; end - # source://rbs//lib/rbs/definition_builder.rb#826 + # source://rbs//lib/rbs/definition_builder.rb#861 def expand_alias(type_name); end - # source://rbs//lib/rbs/definition_builder.rb#830 + # source://rbs//lib/rbs/definition_builder.rb#865 def expand_alias1(type_name); end - # source://rbs//lib/rbs/definition_builder.rb#837 + # source://rbs//lib/rbs/definition_builder.rb#872 def expand_alias2(type_name, args); end - # source://rbs//lib/rbs/definition_builder.rb#581 + # source://rbs//lib/rbs/definition_builder.rb#585 def import_methods(definition, module_name, module_methods, interfaces_methods, subst, self_type_methods); end - # source://rbs//lib/rbs/definition_builder.rb#543 + # source://rbs//lib/rbs/definition_builder.rb#547 def insert_variable(type_name, variables, name:, type:, source:); end # Returns the value of attribute instance_cache. @@ -2556,10 +3029,10 @@ class RBS::DefinitionBuilder # source://rbs//lib/rbs/definition_builder.rb#66 def tapp_subst(name, args); end - # source://rbs//lib/rbs/definition_builder.rb#822 + # source://rbs//lib/rbs/definition_builder.rb#857 def try_cache(type_name, cache:); end - # source://rbs//lib/rbs/definition_builder.rb#861 + # source://rbs//lib/rbs/definition_builder.rb#896 def update(env:, except:, ancestor_builder:); end # source://rbs//lib/rbs/definition_builder.rb#437 @@ -2567,16 +3040,16 @@ class RBS::DefinitionBuilder # @raise [NoTypeFoundError] # - # source://rbs//lib/rbs/definition_builder.rb#890 + # source://rbs//lib/rbs/definition_builder.rb#925 def validate_type_name(name, location); end - # source://rbs//lib/rbs/definition_builder.rb#461 + # source://rbs//lib/rbs/definition_builder.rb#465 def validate_type_params(definition, ancestors:, methods:); end - # source://rbs//lib/rbs/definition_builder.rb#879 + # source://rbs//lib/rbs/definition_builder.rb#914 def validate_type_presence(type); end - # source://rbs//lib/rbs/definition_builder.rb#553 + # source://rbs//lib/rbs/definition_builder.rb#557 def validate_variable(var); end end @@ -2592,10 +3065,10 @@ class RBS::DefinitionBuilder::AncestorBuilder # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#151 def env; end - # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#608 + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#611 def fill_ancestor_source(ancestor, name:, source:, &block); end - # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#436 + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#439 def instance_ancestors(type_name, building_ancestors: T.unsafe(nil)); end # Returns the value of attribute instance_ancestors_cache. @@ -2603,7 +3076,7 @@ class RBS::DefinitionBuilder::AncestorBuilder # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#154 def instance_ancestors_cache; end - # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#572 + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#575 def interface_ancestors(type_name, building_ancestors: T.unsafe(nil)); end # Returns the value of attribute interface_ancestors_cache. @@ -2611,7 +3084,7 @@ class RBS::DefinitionBuilder::AncestorBuilder # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#160 def interface_ancestors_cache; end - # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#416 + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#421 def mixin_ancestors(entry, type_name, included_modules:, included_interfaces:, extended_modules:, prepended_modules:, extended_interfaces:); end # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#350 @@ -2641,7 +3114,7 @@ class RBS::DefinitionBuilder::AncestorBuilder # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#156 def one_singleton_ancestors_cache; end - # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#517 + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#520 def singleton_ancestors(type_name, building_ancestors: T.unsafe(nil)); end # Returns the value of attribute singleton_ancestors_cache. @@ -2750,26 +3223,26 @@ class RBS::DefinitionBuilder::MethodBuilder # source://rbs//lib/rbs/definition_builder/method_builder.rb#91 def initialize(env:); end - # source://rbs//lib/rbs/definition_builder/method_builder.rb#194 + # source://rbs//lib/rbs/definition_builder/method_builder.rb#209 def build_alias(methods, type, member:); end - # source://rbs//lib/rbs/definition_builder/method_builder.rb#199 + # source://rbs//lib/rbs/definition_builder/method_builder.rb#214 def build_attribute(methods, type, member:, accessibility:); end # source://rbs//lib/rbs/definition_builder/method_builder.rb#99 def build_instance(type_name); end - # source://rbs//lib/rbs/definition_builder/method_builder.rb#174 + # source://rbs//lib/rbs/definition_builder/method_builder.rb#189 def build_interface(type_name); end - # source://rbs//lib/rbs/definition_builder/method_builder.rb#215 + # source://rbs//lib/rbs/definition_builder/method_builder.rb#230 def build_method(methods, type, member:, accessibility:); end - # source://rbs//lib/rbs/definition_builder/method_builder.rb#145 + # source://rbs//lib/rbs/definition_builder/method_builder.rb#160 def build_singleton(type_name); end - # source://rbs//lib/rbs/definition_builder/method_builder.rb#226 - def each_member_with_accessibility(members, accessibility: T.unsafe(nil)); end + # source://rbs//lib/rbs/definition_builder/method_builder.rb#241 + def each_rbs_member_with_accessibility(members, accessibility: T.unsafe(nil)); end # Returns the value of attribute env. # @@ -2791,7 +3264,7 @@ class RBS::DefinitionBuilder::MethodBuilder # source://rbs//lib/rbs/definition_builder/method_builder.rb#88 def singleton_methods; end - # source://rbs//lib/rbs/definition_builder/method_builder.rb#239 + # source://rbs//lib/rbs/definition_builder/method_builder.rb#254 def update(env:, except:); end end @@ -2897,21 +3370,21 @@ class RBS::Diff def each_diff_methods(kind, before_methods, after_methods); end end -# source://rbs//lib/rbs/errors.rb#418 +# source://rbs//lib/rbs/errors.rb#419 class RBS::DuplicatedDeclarationError < ::RBS::LoadingError # @return [DuplicatedDeclarationError] a new instance of DuplicatedDeclarationError # - # source://rbs//lib/rbs/errors.rb#422 + # source://rbs//lib/rbs/errors.rb#423 def initialize(name, *decls); end # Returns the value of attribute decls. # - # source://rbs//lib/rbs/errors.rb#420 + # source://rbs//lib/rbs/errors.rb#421 def decls; end # Returns the value of attribute name. # - # source://rbs//lib/rbs/errors.rb#419 + # source://rbs//lib/rbs/errors.rb#420 def name; end end @@ -2990,330 +3463,337 @@ end class RBS::Environment # @return [Environment] a new instance of Environment # - # source://rbs//lib/rbs/environment.rb#145 + # source://rbs//lib/rbs/environment.rb#48 def initialize; end - # source://rbs//lib/rbs/environment.rb#470 - def <<(decl); end - - # source://rbs//lib/rbs/environment.rb#807 + # source://rbs//lib/rbs/environment.rb#841 def absolute_type(resolver, map, type, context:); end - # source://rbs//lib/rbs/environment.rb#802 + # source://rbs//lib/rbs/environment.rb#836 def absolute_type_name(resolver, map, type_name, context:); end - # source://rbs//lib/rbs/environment.rb#476 - def add_signature(buffer:, directives:, decls:); end + # source://rbs//lib/rbs/environment.rb#417 + def add_source(source); end - # source://rbs//lib/rbs/environment.rb#539 + # source://rbs//lib/rbs/environment.rb#522 def append_context(context, decl); end - # source://rbs//lib/rbs/environment.rb#818 + # source://rbs//lib/rbs/environment.rb#852 def buffers; end # @return [Boolean] # - # source://rbs//lib/rbs/environment.rb#218 + # source://rbs//lib/rbs/environment.rb#117 def class_alias?(name); end # Returns the value of attribute class_alias_decls. # - # source://rbs//lib/rbs/environment.rb#12 + # source://rbs//lib/rbs/environment.rb#10 def class_alias_decls; end # @return [Boolean] # - # source://rbs//lib/rbs/environment.rb#202 + # source://rbs//lib/rbs/environment.rb#101 def class_decl?(name); end # Returns the value of attribute class_decls. # - # source://rbs//lib/rbs/environment.rb#7 + # source://rbs//lib/rbs/environment.rb#5 def class_decls; end - # source://rbs//lib/rbs/environment.rb#226 + # source://rbs//lib/rbs/environment.rb#125 def class_entry(type_name); end # @return [Boolean] # - # source://rbs//lib/rbs/environment.rb#198 + # source://rbs//lib/rbs/environment.rb#97 def constant_decl?(name); end # Returns the value of attribute constant_decls. # - # source://rbs//lib/rbs/environment.rb#10 + # source://rbs//lib/rbs/environment.rb#8 def constant_decls; end - # source://rbs//lib/rbs/environment.rb#274 + # source://rbs//lib/rbs/environment.rb#173 def constant_entry(type_name); end # @return [Boolean] # - # source://rbs//lib/rbs/environment.rb#194 + # source://rbs//lib/rbs/environment.rb#93 def constant_name?(name); end - # Returns the value of attribute declarations. - # - # source://rbs//lib/rbs/environment.rb#5 + # source://rbs//lib/rbs/environment.rb#14 def declarations; end + # source://rbs//lib/rbs/environment.rb#432 + def each_rbs_source(&block); end + + # source://rbs//lib/rbs/environment.rb#444 + def each_ruby_source(&block); end + # Returns the value of attribute global_decls. # - # source://rbs//lib/rbs/environment.rb#11 + # source://rbs//lib/rbs/environment.rb#9 def global_decls; end - # source://rbs//lib/rbs/environment.rb#373 - def insert_decl(decl, outer:, namespace:); end + # source://rbs//lib/rbs/environment.rb#272 + def insert_rbs_decl(decl, context:, namespace:); end + + # source://rbs//lib/rbs/environment.rb#369 + def insert_ruby_decl(decl, context:, namespace:); end - # source://rbs//lib/rbs/environment.rb#813 + # source://rbs//lib/rbs/environment.rb#847 def inspect; end # Returns the value of attribute interface_decls. # - # source://rbs//lib/rbs/environment.rb#8 + # source://rbs//lib/rbs/environment.rb#6 def interface_decls; end # @return [Boolean] # - # source://rbs//lib/rbs/environment.rb#176 + # source://rbs//lib/rbs/environment.rb#75 def interface_name?(name); end # @return [Boolean] # - # source://rbs//lib/rbs/environment.rb#210 + # source://rbs//lib/rbs/environment.rb#109 def module_alias?(name); end - # source://rbs//lib/rbs/environment.rb#266 + # source://rbs//lib/rbs/environment.rb#165 def module_class_entry(type_name); end # @return [Boolean] # - # source://rbs//lib/rbs/environment.rb#206 + # source://rbs//lib/rbs/environment.rb#105 def module_decl?(name); end - # source://rbs//lib/rbs/environment.rb#235 + # source://rbs//lib/rbs/environment.rb#134 def module_entry(type_name); end # @return [Boolean] # - # source://rbs//lib/rbs/environment.rb#184 + # source://rbs//lib/rbs/environment.rb#83 def module_name?(name); end - # source://rbs//lib/rbs/environment.rb#332 + # source://rbs//lib/rbs/environment.rb#231 def normalize_module_name(name); end # @return [Boolean] # - # source://rbs//lib/rbs/environment.rb#336 + # source://rbs//lib/rbs/environment.rb#235 def normalize_module_name?(name); end - # source://rbs//lib/rbs/environment.rb#328 + # source://rbs//lib/rbs/environment.rb#227 def normalize_type_name(name); end - # source://rbs//lib/rbs/environment.rb#297 + # source://rbs//lib/rbs/environment.rb#196 def normalize_type_name!(name); end # @return [Boolean] # - # source://rbs//lib/rbs/environment.rb#278 + # source://rbs//lib/rbs/environment.rb#177 def normalize_type_name?(name); end - # source://rbs//lib/rbs/environment.rb#244 + # source://rbs//lib/rbs/environment.rb#143 def normalized_class_entry(type_name); end - # source://rbs//lib/rbs/environment.rb#270 + # source://rbs//lib/rbs/environment.rb#169 def normalized_module_class_entry(type_name); end - # source://rbs//lib/rbs/environment.rb#255 + # source://rbs//lib/rbs/environment.rb#154 def normalized_module_entry(type_name); end - # source://rbs//lib/rbs/environment.rb#323 + # source://rbs//lib/rbs/environment.rb#222 def normalized_type_name!(name); end # @return [Boolean] # - # source://rbs//lib/rbs/environment.rb#310 + # source://rbs//lib/rbs/environment.rb#209 def normalized_type_name?(type_name); end - # source://rbs//lib/rbs/environment.rb#548 - def resolve_declaration(resolver, map, decl, outer:, prefix:); end + # source://rbs//lib/rbs/environment.rb#531 + def resolve_declaration(resolver, map, decl, context:, prefix:); end - # source://rbs//lib/rbs/environment.rb#688 + # source://rbs//lib/rbs/environment.rb#722 def resolve_member(resolver, map, member, context:); end - # source://rbs//lib/rbs/environment.rb#788 + # source://rbs//lib/rbs/environment.rb#822 def resolve_method_type(resolver, map, type, context:); end - # source://rbs//lib/rbs/environment.rb#489 + # source://rbs//lib/rbs/environment.rb#667 + def resolve_ruby_decl(resolver, decl, context:, prefix:); end + + # source://rbs//lib/rbs/environment.rb#708 + def resolve_ruby_member(resolver, member, context:); end + + # source://rbs//lib/rbs/environment.rb#462 def resolve_signature(resolver, table, dirs, decls, only: T.unsafe(nil)); end - # source://rbs//lib/rbs/environment.rb#511 + # source://rbs//lib/rbs/environment.rb#484 def resolve_type_names(only: T.unsafe(nil)); end - # source://rbs//lib/rbs/environment.rb#796 + # source://rbs//lib/rbs/environment.rb#830 def resolve_type_params(resolver, map, params, context:); end - # source://rbs//lib/rbs/environment.rb#533 + # source://rbs//lib/rbs/environment.rb#516 def resolver_context(*nesting); end - # Returns the value of attribute signatures. + # Returns the value of attribute sources. # - # source://rbs//lib/rbs/environment.rb#14 - def signatures; end + # source://rbs//lib/rbs/environment.rb#12 + def sources; end # Returns the value of attribute type_alias_decls. # - # source://rbs//lib/rbs/environment.rb#9 + # source://rbs//lib/rbs/environment.rb#7 def type_alias_decls; end # @return [Boolean] # - # source://rbs//lib/rbs/environment.rb#180 + # source://rbs//lib/rbs/environment.rb#79 def type_alias_name?(name); end # @return [Boolean] # - # source://rbs//lib/rbs/environment.rb#188 + # source://rbs//lib/rbs/environment.rb#87 def type_name?(name); end - # source://rbs//lib/rbs/environment.rb#822 + # source://rbs//lib/rbs/environment.rb#856 def unload(buffers); end - # source://rbs//lib/rbs/environment.rb#483 + # source://rbs//lib/rbs/environment.rb#456 def validate_type_params; end private - # source://rbs//lib/rbs/environment.rb#158 + # source://rbs//lib/rbs/environment.rb#59 def initialize_copy(other); end class << self - # source://rbs//lib/rbs/environment.rb#170 + # source://rbs//lib/rbs/environment.rb#69 def from_loader(loader); end end end -# source://rbs//lib/rbs/environment.rb#130 +# source://rbs//lib/rbs/environment.rb#33 class RBS::Environment::ClassAliasEntry < ::RBS::Environment::SingleEntry; end -# source://rbs//lib/rbs/environment.rb#100 -class RBS::Environment::ClassEntry < ::RBS::Environment::MultiEntry - # source://rbs//lib/rbs/environment.rb#101 - def primary; end -end +# source://rbs//lib/rbs/environment/class_entry.rb#5 +class RBS::Environment::ClassEntry + # @return [ClassEntry] a new instance of ClassEntry + # + # source://rbs//lib/rbs/environment/class_entry.rb#10 + def initialize(name); end -# source://rbs//lib/rbs/environment.rb#139 -class RBS::Environment::ConstantEntry < ::RBS::Environment::SingleEntry; end + # source://rbs//lib/rbs/environment/class_entry.rb#15 + def <<(context_decl); end + + # Returns the value of attribute context_decls. + # + # source://rbs//lib/rbs/environment/class_entry.rb#8 + def context_decls; end + + # source://rbs//lib/rbs/environment/class_entry.rb#21 + def each_decl(&block); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/environment/class_entry.rb#31 + def empty?; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/environment/class_entry.rb#6 + def name; end + + # source://rbs//lib/rbs/environment/class_entry.rb#35 + def primary_decl; end -# source://rbs//lib/rbs/environment.rb#16 -module RBS::Environment::ContextUtil - # source://rbs//lib/rbs/environment.rb#17 - def calculate_context(decls); end + # source://rbs//lib/rbs/environment/class_entry.rb#47 + def type_params; end + + # source://rbs//lib/rbs/environment/class_entry.rb#52 + def validate_type_params; end end -# source://rbs//lib/rbs/environment.rb#142 +# source://rbs//lib/rbs/environment.rb#42 +class RBS::Environment::ConstantEntry < ::RBS::Environment::SingleEntry; end + +# source://rbs//lib/rbs/environment.rb#45 class RBS::Environment::GlobalEntry < ::RBS::Environment::SingleEntry; end -# source://rbs//lib/rbs/environment.rb#133 +# source://rbs//lib/rbs/environment.rb#36 class RBS::Environment::InterfaceEntry < ::RBS::Environment::SingleEntry; end -# source://rbs//lib/rbs/environment.rb#127 +# source://rbs//lib/rbs/environment.rb#30 class RBS::Environment::ModuleAliasEntry < ::RBS::Environment::SingleEntry; end -# source://rbs//lib/rbs/environment.rb#85 -class RBS::Environment::ModuleEntry < ::RBS::Environment::MultiEntry - # source://rbs//lib/rbs/environment.rb#92 - def primary; end +# source://rbs//lib/rbs/environment/module_entry.rb#5 +class RBS::Environment::ModuleEntry + # @return [ModuleEntry] a new instance of ModuleEntry + # + # source://rbs//lib/rbs/environment/module_entry.rb#10 + def initialize(name); end - # source://rbs//lib/rbs/environment.rb#86 - def self_types; end -end + # source://rbs//lib/rbs/environment/module_entry.rb#15 + def <<(context_decl); end -# source://rbs//lib/rbs/environment.rb#29 -class RBS::Environment::MultiEntry - # @return [MultiEntry] a new instance of MultiEntry + # Returns the value of attribute context_decls. # - # source://rbs//lib/rbs/environment.rb#43 - def initialize(name:); end + # source://rbs//lib/rbs/environment/module_entry.rb#8 + def context_decls; end - # @return [Boolean] - # - # source://rbs//lib/rbs/environment.rb#70 - def compatible_params?(ps1, ps2); end + # source://rbs//lib/rbs/environment/module_entry.rb#20 + def each_decl(&block); end - # Returns the value of attribute decls. + # @return [Boolean] # - # source://rbs//lib/rbs/environment.rb#41 - def decls; end - - # source://rbs//lib/rbs/environment.rb#48 - def insert(decl:, outer:); end + # source://rbs//lib/rbs/environment/module_entry.rb#30 + def empty?; end # Returns the value of attribute name. # - # source://rbs//lib/rbs/environment.rb#40 + # source://rbs//lib/rbs/environment/module_entry.rb#6 def name; end - # source://rbs//lib/rbs/environment.rb#80 - def primary; end + # source://rbs//lib/rbs/environment/module_entry.rb#34 + def primary_decl; end + + # source://rbs//lib/rbs/environment/module_entry.rb#43 + def self_types; end - # source://rbs//lib/rbs/environment.rb#76 + # source://rbs//lib/rbs/environment/module_entry.rb#38 def type_params; end - # source://rbs//lib/rbs/environment.rb#53 + # source://rbs//lib/rbs/environment/module_entry.rb#49 def validate_type_params; end end -# source://rbs//lib/rbs/environment.rb#30 -class RBS::Environment::MultiEntry::D < ::Struct - include ::RBS::Environment::ContextUtil - - # source://rbs//lib/rbs/environment.rb#35 - def context; end - - def decl; end - def decl=(_); end - def outer; end - def outer=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# source://rbs//lib/rbs/environment.rb#109 +# source://rbs//lib/rbs/environment.rb#18 class RBS::Environment::SingleEntry - include ::RBS::Environment::ContextUtil - # @return [SingleEntry] a new instance of SingleEntry # - # source://rbs//lib/rbs/environment.rb#114 - def initialize(name:, decl:, outer:); end + # source://rbs//lib/rbs/environment.rb#23 + def initialize(name:, decl:, context:); end - # source://rbs//lib/rbs/environment.rb#122 + # Returns the value of attribute context. + # + # source://rbs//lib/rbs/environment.rb#20 def context; end # Returns the value of attribute decl. # - # source://rbs//lib/rbs/environment.rb#112 + # source://rbs//lib/rbs/environment.rb#21 def decl; end # Returns the value of attribute name. # - # source://rbs//lib/rbs/environment.rb#110 + # source://rbs//lib/rbs/environment.rb#19 def name; end - - # Returns the value of attribute outer. - # - # source://rbs//lib/rbs/environment.rb#111 - def outer; end end -# source://rbs//lib/rbs/environment.rb#136 +# source://rbs//lib/rbs/environment.rb#39 class RBS::Environment::TypeAliasEntry < ::RBS::Environment::SingleEntry; end # source://rbs//lib/rbs/environment/use_map.rb#5 @@ -3537,7 +4017,7 @@ class RBS::GenericParameterMismatchError < ::RBS::LoadingError # @return [GenericParameterMismatchError] a new instance of GenericParameterMismatchError # # source://rbs//lib/rbs/errors.rb#411 - def initialize(name:, decl:); end + def initialize(name:, decl:, location: T.unsafe(nil)); end # Returns the value of attribute decl. # @@ -3550,21 +4030,21 @@ class RBS::GenericParameterMismatchError < ::RBS::LoadingError def name; end end -# source://rbs//lib/rbs/errors.rb#553 +# source://rbs//lib/rbs/errors.rb#554 class RBS::InconsistentClassModuleAliasError < ::RBS::BaseError include ::RBS::DetailedMessageable # @return [InconsistentClassModuleAliasError] a new instance of InconsistentClassModuleAliasError # - # source://rbs//lib/rbs/errors.rb#558 + # source://rbs//lib/rbs/errors.rb#559 def initialize(entry); end # Returns the value of attribute alias_entry. # - # source://rbs//lib/rbs/errors.rb#556 + # source://rbs//lib/rbs/errors.rb#557 def alias_entry; end - # source://rbs//lib/rbs/errors.rb#572 + # source://rbs//lib/rbs/errors.rb#573 def location; end end @@ -3591,6 +4071,217 @@ class RBS::InheritModuleError < ::RBS::DefinitionError end end +# source://rbs//lib/rbs/inline_parser.rb#4 +class RBS::InlineParser + class << self + # source://rbs//lib/rbs/inline_parser.rb#34 + def parse(buffer, prism); end + end +end + +# source://rbs//lib/rbs/inline_parser/comment_association.rb#5 +class RBS::InlineParser::CommentAssociation + # @return [CommentAssociation] a new instance of CommentAssociation + # + # source://rbs//lib/rbs/inline_parser/comment_association.rb#8 + def initialize(blocks); end + + # Returns the value of attribute associated_blocks. + # + # source://rbs//lib/rbs/inline_parser/comment_association.rb#6 + def associated_blocks; end + + # Returns the value of attribute blocks. + # + # source://rbs//lib/rbs/inline_parser/comment_association.rb#6 + def blocks; end + + # source://rbs//lib/rbs/inline_parser/comment_association.rb#84 + def each_enclosed_block(node); end + + # source://rbs//lib/rbs/inline_parser/comment_association.rb#104 + def each_unassociated_block; end + + # Returns the value of attribute end_line_map. + # + # source://rbs//lib/rbs/inline_parser/comment_association.rb#6 + def end_line_map; end + + # source://rbs//lib/rbs/inline_parser/comment_association.rb#47 + def leading_block(node); end + + # source://rbs//lib/rbs/inline_parser/comment_association.rb#55 + def leading_block!(node); end + + # Returns the value of attribute start_line_map. + # + # source://rbs//lib/rbs/inline_parser/comment_association.rb#6 + def start_line_map; end + + # source://rbs//lib/rbs/inline_parser/comment_association.rb#63 + def trailing_block(node); end + + # source://rbs//lib/rbs/inline_parser/comment_association.rb#76 + def trailing_block!(node); end + + class << self + # source://rbs//lib/rbs/inline_parser/comment_association.rb#24 + def build(buffer, result); end + end +end + +# source://rbs//lib/rbs/inline_parser/comment_association.rb#29 +class RBS::InlineParser::CommentAssociation::Reference + # @return [Reference] a new instance of Reference + # + # source://rbs//lib/rbs/inline_parser/comment_association.rb#32 + def initialize(block, association); end + + # source://rbs//lib/rbs/inline_parser/comment_association.rb#37 + def associate!; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/inline_parser/comment_association.rb#42 + def associated?; end + + # Returns the value of attribute block. + # + # source://rbs//lib/rbs/inline_parser/comment_association.rb#30 + def block; end +end + +# source://rbs//lib/rbs/inline_parser.rb#16 +module RBS::InlineParser::Diagnostic; end + +# source://rbs//lib/rbs/inline_parser.rb#31 +class RBS::InlineParser::Diagnostic::AnnotationSyntaxError < ::RBS::InlineParser::Diagnostic::Base; end + +# source://rbs//lib/rbs/inline_parser.rb#17 +class RBS::InlineParser::Diagnostic::Base + # @return [Base] a new instance of Base + # + # source://rbs//lib/rbs/inline_parser.rb#20 + def initialize(location, message); end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/inline_parser.rb#18 + def location; end + + # Returns the value of attribute message. + # + # source://rbs//lib/rbs/inline_parser.rb#18 + def message; end +end + +# source://rbs//lib/rbs/inline_parser.rb#27 +class RBS::InlineParser::Diagnostic::NonConstantClassName < ::RBS::InlineParser::Diagnostic::Base; end + +# source://rbs//lib/rbs/inline_parser.rb#28 +class RBS::InlineParser::Diagnostic::NonConstantModuleName < ::RBS::InlineParser::Diagnostic::Base; end + +# source://rbs//lib/rbs/inline_parser.rb#26 +class RBS::InlineParser::Diagnostic::NotImplementedYet < ::RBS::InlineParser::Diagnostic::Base; end + +# source://rbs//lib/rbs/inline_parser.rb#29 +class RBS::InlineParser::Diagnostic::TopLevelMethodDefinition < ::RBS::InlineParser::Diagnostic::Base; end + +# source://rbs//lib/rbs/inline_parser.rb#30 +class RBS::InlineParser::Diagnostic::UnusedInlineAnnotation < ::RBS::InlineParser::Diagnostic::Base; end + +# source://rbs//lib/rbs/inline_parser.rb#42 +class RBS::InlineParser::Parser < ::Prism::Visitor + include ::RBS::AST::Ruby::Helpers::ConstantHelper + include ::RBS::AST::Ruby::Helpers::LocationHelper + + # @return [Parser] a new instance of Parser + # + # source://rbs//lib/rbs/inline_parser.rb#48 + def initialize(result); end + + # source://rbs//lib/rbs/inline_parser.rb#54 + def buffer; end + + # Returns the value of attribute comments. + # + # source://rbs//lib/rbs/inline_parser.rb#43 + def comments; end + + # source://rbs//lib/rbs/inline_parser.rb#58 + def current_module; end + + # source://rbs//lib/rbs/inline_parser.rb#62 + def current_module!; end + + # source://rbs//lib/rbs/inline_parser.rb#66 + def diagnostics; end + + # source://rbs//lib/rbs/inline_parser.rb#171 + def insert_declaration(decl); end + + # Returns the value of attribute module_nesting. + # + # source://rbs//lib/rbs/inline_parser.rb#43 + def module_nesting; end + + # source://rbs//lib/rbs/inline_parser.rb#70 + def push_module_nesting(mod); end + + # source://rbs//lib/rbs/inline_parser.rb#179 + def report_unused_annotation(*annotations); end + + # source://rbs//lib/rbs/inline_parser.rb#194 + def report_unused_block(block); end + + # Returns the value of attribute result. + # + # source://rbs//lib/rbs/inline_parser.rb#43 + def result; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/inline_parser.rb#77 + def skip_node?(node); end + + # source://rbs//lib/rbs/inline_parser.rb#88 + def visit_class_node(node); end + + # source://rbs//lib/rbs/inline_parser.rb#132 + def visit_def_node(node); end + + # source://rbs//lib/rbs/inline_parser.rb#110 + def visit_module_node(node); end +end + +# source://rbs//lib/rbs/inline_parser.rb#5 +class RBS::InlineParser::Result + # @return [Result] a new instance of Result + # + # source://rbs//lib/rbs/inline_parser.rb#8 + def initialize(buffer, prism); end + + # Returns the value of attribute buffer. + # + # source://rbs//lib/rbs/inline_parser.rb#6 + def buffer; end + + # Returns the value of attribute declarations. + # + # source://rbs//lib/rbs/inline_parser.rb#6 + def declarations; end + + # Returns the value of attribute diagnostics. + # + # source://rbs//lib/rbs/inline_parser.rb#6 + def diagnostics; end + + # Returns the value of attribute prism_result. + # + # source://rbs//lib/rbs/inline_parser.rb#6 + def prism_result; end +end + # source://rbs//lib/rbs/errors.rb#341 class RBS::InstanceVariableDuplicationError < ::RBS::VariableDuplicationError # source://rbs//lib/rbs/errors.rb#342 @@ -3671,28 +4362,28 @@ class RBS::InvalidTypeApplicationError < ::RBS::DefinitionError end end -# source://rbs//lib/rbs/errors.rb#431 +# source://rbs//lib/rbs/errors.rb#432 class RBS::InvalidVarianceAnnotationError < ::RBS::DefinitionError include ::RBS::DetailedMessageable # @return [InvalidVarianceAnnotationError] a new instance of InvalidVarianceAnnotationError # - # source://rbs//lib/rbs/errors.rb#438 + # source://rbs//lib/rbs/errors.rb#439 def initialize(type_name:, param:, location:); end # Returns the value of attribute location. # - # source://rbs//lib/rbs/errors.rb#436 + # source://rbs//lib/rbs/errors.rb#437 def location; end # Returns the value of attribute param. # - # source://rbs//lib/rbs/errors.rb#435 + # source://rbs//lib/rbs/errors.rb#436 def param; end # Returns the value of attribute type_name. # - # source://rbs//lib/rbs/errors.rb#434 + # source://rbs//lib/rbs/errors.rb#435 def type_name; end end @@ -3703,40 +4394,43 @@ class RBS::LoadingError < ::RBS::BaseError; end class RBS::Location def initialize(_arg0, _arg1, _arg2); end - # source://rbs//lib/rbs/location_aux.rb#71 + # source://rbs//lib/rbs/location_aux.rb#79 def ==(other); end def [](_arg0); end def _add_optional_child(_arg0, _arg1, _arg2); end def _add_optional_no_child(_arg0); end def _add_required_child(_arg0, _arg1, _arg2); end + def _end_pos; end def _optional_keys; end def _required_keys; end + def _start_pos; end - # source://rbs//lib/rbs/location_aux.rb#102 + # source://rbs//lib/rbs/location_aux.rb#110 def add_optional_child(name, range); end - # source://rbs//lib/rbs/location_aux.rb#98 + # source://rbs//lib/rbs/location_aux.rb#106 def add_required_child(name, range); end def aref(_arg0); end def buffer; end - # source://rbs//lib/rbs/location_aux.rb#110 + # source://rbs//lib/rbs/location_aux.rb#118 def each_optional_key(&block); end - # source://rbs//lib/rbs/location_aux.rb#118 + # source://rbs//lib/rbs/location_aux.rb#126 def each_required_key(&block); end - # source://rbs//lib/rbs/location_aux.rb#47 + # source://rbs//lib/rbs/location_aux.rb#55 def end_column; end - # source://rbs//lib/rbs/location_aux.rb#43 + # source://rbs//lib/rbs/location_aux.rb#51 def end_line; end - # source://rbs//lib/rbs/location_aux.rb#55 + # source://rbs//lib/rbs/location_aux.rb#63 def end_loc; end + # source://rbs//lib/rbs/location_aux.rb#35 def end_pos; end # source://rbs//lib/rbs/location_aux.rb#5 @@ -3744,43 +4438,50 @@ class RBS::Location # @return [Boolean] # - # source://rbs//lib/rbs/location_aux.rb#126 + # source://rbs//lib/rbs/location_aux.rb#134 def key?(name); end - # source://rbs//lib/rbs/location_aux.rb#31 + # source://rbs//lib/rbs/location_aux.rb#146 + def local_location; end + + # source://rbs//lib/rbs/location_aux.rb#166 + def local_source; end + + # source://rbs//lib/rbs/location_aux.rb#39 def name; end # @return [Boolean] # - # source://rbs//lib/rbs/location_aux.rb#130 + # source://rbs//lib/rbs/location_aux.rb#138 def optional_key?(name); end - # source://rbs//lib/rbs/location_aux.rb#59 + # source://rbs//lib/rbs/location_aux.rb#67 def range; end # @return [Boolean] # - # source://rbs//lib/rbs/location_aux.rb#134 + # source://rbs//lib/rbs/location_aux.rb#142 def required_key?(name); end - # source://rbs//lib/rbs/location_aux.rb#63 + # source://rbs//lib/rbs/location_aux.rb#71 def source; end - # source://rbs//lib/rbs/location_aux.rb#39 + # source://rbs//lib/rbs/location_aux.rb#47 def start_column; end - # source://rbs//lib/rbs/location_aux.rb#35 + # source://rbs//lib/rbs/location_aux.rb#43 def start_line; end - # source://rbs//lib/rbs/location_aux.rb#51 + # source://rbs//lib/rbs/location_aux.rb#59 def start_loc; end + # source://rbs//lib/rbs/location_aux.rb#31 def start_pos; end - # source://rbs//lib/rbs/location_aux.rb#78 + # source://rbs//lib/rbs/location_aux.rb#86 def to_json(state = T.unsafe(nil)); end - # source://rbs//lib/rbs/location_aux.rb#67 + # source://rbs//lib/rbs/location_aux.rb#75 def to_s; end private @@ -3791,7 +4492,7 @@ class RBS::Location # source://rbs//lib/rbs/location_aux.rb#16 def new(buffer_ = T.unsafe(nil), start_pos_ = T.unsafe(nil), end_pos_ = T.unsafe(nil), buffer: T.unsafe(nil), start_pos: T.unsafe(nil), end_pos: T.unsafe(nil)); end - # source://rbs//lib/rbs/location_aux.rb#94 + # source://rbs//lib/rbs/location_aux.rb#102 def to_string(location, default: T.unsafe(nil)); end end end @@ -3931,35 +4632,35 @@ class RBS::MethodType def with_nonreturn_void?; end end -# source://rbs//lib/rbs/errors.rb#467 +# source://rbs//lib/rbs/errors.rb#468 class RBS::MixinClassError < ::RBS::DefinitionError include ::RBS::DetailedMessageable # @return [MixinClassError] a new instance of MixinClassError # - # source://rbs//lib/rbs/errors.rb#473 + # source://rbs//lib/rbs/errors.rb#474 def initialize(type_name:, member:); end - # source://rbs//lib/rbs/errors.rb#480 + # source://rbs//lib/rbs/errors.rb#481 def location; end # Returns the value of attribute member. # - # source://rbs//lib/rbs/errors.rb#471 + # source://rbs//lib/rbs/errors.rb#472 def member; end # Returns the value of attribute type_name. # - # source://rbs//lib/rbs/errors.rb#470 + # source://rbs//lib/rbs/errors.rb#471 def type_name; end private - # source://rbs//lib/rbs/errors.rb#492 + # source://rbs//lib/rbs/errors.rb#493 def mixin_name; end class << self - # source://rbs//lib/rbs/errors.rb#484 + # source://rbs//lib/rbs/errors.rb#485 def check!(type_name:, env:, member:); end end end @@ -4140,23 +4841,23 @@ class RBS::NoTypeFoundError < ::RBS::DefinitionError end end -# source://rbs//lib/rbs/errors.rb#524 +# source://rbs//lib/rbs/errors.rb#525 class RBS::NonregularTypeAliasError < ::RBS::BaseError include ::RBS::DetailedMessageable # @return [NonregularTypeAliasError] a new instance of NonregularTypeAliasError # - # source://rbs//lib/rbs/errors.rb#530 + # source://rbs//lib/rbs/errors.rb#531 def initialize(diagnostic:, location:); end # Returns the value of attribute diagnostic. # - # source://rbs//lib/rbs/errors.rb#527 + # source://rbs//lib/rbs/errors.rb#528 def diagnostic; end # Returns the value of attribute location. # - # source://rbs//lib/rbs/errors.rb#528 + # source://rbs//lib/rbs/errors.rb#529 def location; end end @@ -4164,19 +4865,28 @@ end class RBS::Parser class << self def _lex(_arg0, _arg1); end + def _parse_inline_leading_annotation(_arg0, _arg1, _arg2, _arg3); end + def _parse_inline_trailing_annotation(_arg0, _arg1, _arg2, _arg3); end def _parse_method_type(_arg0, _arg1, _arg2, _arg3, _arg4); end def _parse_signature(_arg0, _arg1, _arg2); end def _parse_type(_arg0, _arg1, _arg2, _arg3, _arg4); end + def _parse_type_params(_arg0, _arg1, _arg2, _arg3); end - # source://rbs//lib/rbs/parser_aux.rb#71 + # source://rbs//lib/rbs/parser_aux.rb#76 def buffer(source); end - # source://rbs//lib/rbs/parser_aux.rb#62 + # source://rbs//lib/rbs/parser_aux.rb#67 def lex(source); end - # source://rbs//lib/rbs/parser_aux.rb#38 + # source://rbs//lib/rbs/parser_aux.rb#43 def magic_comment(buf); end + # source://rbs//lib/rbs/parser_aux.rb#119 + def parse_inline_leading_annotation(source, range, variables: T.unsafe(nil)); end + + # source://rbs//lib/rbs/parser_aux.rb#124 + def parse_inline_trailing_annotation(source, range, variables: T.unsafe(nil)); end + # source://rbs//lib/rbs/parser_aux.rb#13 def parse_method_type(source, range: T.unsafe(nil), variables: T.unsafe(nil), require_eof: T.unsafe(nil)); end @@ -4185,10 +4895,13 @@ class RBS::Parser # source://rbs//lib/rbs/parser_aux.rb#8 def parse_type(source, range: T.unsafe(nil), variables: T.unsafe(nil), require_eof: T.unsafe(nil)); end + + # source://rbs//lib/rbs/parser_aux.rb#38 + def parse_type_params(source, module_type_params: T.unsafe(nil)); end end end -# source://rbs//lib/rbs/parser_aux.rb#80 +# source://rbs//lib/rbs/parser_aux.rb#85 RBS::Parser::KEYWORDS = T.let(T.unsafe(nil), Hash) # source://rbs//lib/rbs/parser/lex_result.rb#5 @@ -4883,26 +5596,26 @@ class RBS::RDocPlugin::Parser def fully_qualified_name(outer_name:, decl:); end end -# source://rbs//lib/rbs/errors.rb#447 +# source://rbs//lib/rbs/errors.rb#448 class RBS::RecursiveAliasDefinitionError < ::RBS::DefinitionError include ::RBS::DetailedMessageable # @return [RecursiveAliasDefinitionError] a new instance of RecursiveAliasDefinitionError # - # source://rbs//lib/rbs/errors.rb#453 + # source://rbs//lib/rbs/errors.rb#454 def initialize(type:, defs:); end # Returns the value of attribute defs. # - # source://rbs//lib/rbs/errors.rb#451 + # source://rbs//lib/rbs/errors.rb#452 def defs; end - # source://rbs//lib/rbs/errors.rb#460 + # source://rbs//lib/rbs/errors.rb#461 def location; end # Returns the value of attribute type. # - # source://rbs//lib/rbs/errors.rb#450 + # source://rbs//lib/rbs/errors.rb#451 def type; end end @@ -4929,26 +5642,26 @@ class RBS::RecursiveAncestorError < ::RBS::DefinitionError end end -# source://rbs//lib/rbs/errors.rb#506 +# source://rbs//lib/rbs/errors.rb#507 class RBS::RecursiveTypeAliasError < ::RBS::BaseError include ::RBS::DetailedMessageable # @return [RecursiveTypeAliasError] a new instance of RecursiveTypeAliasError # - # source://rbs//lib/rbs/errors.rb#512 + # source://rbs//lib/rbs/errors.rb#513 def initialize(alias_names:, location:); end # Returns the value of attribute alias_names. # - # source://rbs//lib/rbs/errors.rb#509 + # source://rbs//lib/rbs/errors.rb#510 def alias_names; end # Returns the value of attribute location. # - # source://rbs//lib/rbs/errors.rb#510 + # source://rbs//lib/rbs/errors.rb#511 def location; end - # source://rbs//lib/rbs/errors.rb#519 + # source://rbs//lib/rbs/errors.rb#520 def name; end end @@ -5182,6 +5895,72 @@ class RBS::Resolver::TypeNameResolver def try_cache(query); end end +# source://rbs//lib/rbs/source.rb#4 +module RBS::Source; end + +# source://rbs//lib/rbs/source.rb#5 +class RBS::Source::RBS + # @return [RBS] a new instance of RBS + # + # source://rbs//lib/rbs/source.rb#8 + def initialize(buffer, directives, decls); end + + # Returns the value of attribute buffer. + # + # source://rbs//lib/rbs/source.rb#6 + def buffer; end + + # Returns the value of attribute declarations. + # + # source://rbs//lib/rbs/source.rb#6 + def declarations; end + + # Returns the value of attribute directives. + # + # source://rbs//lib/rbs/source.rb#6 + def directives; end + + # source://rbs//lib/rbs/source.rb#25 + def each_declaration_type_name(names, decl, &block); end + + # source://rbs//lib/rbs/source.rb#14 + def each_type_name(&block); end +end + +# source://rbs//lib/rbs/source.rb#52 +class RBS::Source::Ruby + # @return [Ruby] a new instance of Ruby + # + # source://rbs//lib/rbs/source.rb#58 + def initialize(buffer, prism, declarations, diagnostics); end + + # Returns the value of attribute buffer. + # + # source://rbs//lib/rbs/source.rb#53 + def buffer; end + + # Returns the value of attribute declarations. + # + # source://rbs//lib/rbs/source.rb#55 + def declarations; end + + # Returns the value of attribute diagnostics. + # + # source://rbs//lib/rbs/source.rb#56 + def diagnostics; end + + # source://rbs//lib/rbs/source.rb#76 + def each_declaration_type_name(names, decl, &block); end + + # source://rbs//lib/rbs/source.rb#65 + def each_type_name(&block); end + + # Returns the value of attribute prism_result. + # + # source://rbs//lib/rbs/source.rb#54 + def prism_result; end +end + # source://rbs//lib/rbs/substitution.rb#4 class RBS::Substitution # @return [Substitution] a new instance of Substitution @@ -5244,12 +6023,12 @@ class RBS::Subtractor private - # source://rbs//lib/rbs/subtractor.rb#177 + # source://rbs//lib/rbs/subtractor.rb#178 def absolute_typename(name, context:); end # @return [Boolean] # - # source://rbs//lib/rbs/subtractor.rb#160 + # source://rbs//lib/rbs/subtractor.rb#161 def access_modifier?(decl); end # @return [Boolean] @@ -5263,7 +6042,7 @@ class RBS::Subtractor # source://rbs//lib/rbs/subtractor.rb#48 def filter_members(decl, context:); end - # source://rbs//lib/rbs/subtractor.rb#148 + # source://rbs//lib/rbs/subtractor.rb#149 def filter_redundant_access_modifiers(decls); end # @return [Boolean] @@ -5283,13 +6062,13 @@ class RBS::Subtractor # @return [Boolean] # - # source://rbs//lib/rbs/subtractor.rb#137 + # source://rbs//lib/rbs/subtractor.rb#138 def mixin_exist?(owner, mixin, context:); end - # source://rbs//lib/rbs/subtractor.rb#186 + # source://rbs//lib/rbs/subtractor.rb#187 def typename_candidates(name, context:); end - # source://rbs//lib/rbs/subtractor.rb#164 + # source://rbs//lib/rbs/subtractor.rb#165 def update_decl(decl, members:); end end @@ -5519,27 +6298,27 @@ class RBS::TypeName end end -# source://rbs//lib/rbs/errors.rb#604 +# source://rbs//lib/rbs/errors.rb#605 class RBS::TypeParamDefaultReferenceError < ::RBS::DefinitionError include ::RBS::DetailedMessageable # @return [TypeParamDefaultReferenceError] a new instance of TypeParamDefaultReferenceError # - # source://rbs//lib/rbs/errors.rb#610 + # source://rbs//lib/rbs/errors.rb#611 def initialize(type_param, location:); end # Returns the value of attribute location. # - # source://rbs//lib/rbs/errors.rb#608 + # source://rbs//lib/rbs/errors.rb#609 def location; end # Returns the value of attribute type_param. # - # source://rbs//lib/rbs/errors.rb#607 + # source://rbs//lib/rbs/errors.rb#608 def type_param; end class << self - # source://rbs//lib/rbs/errors.rb#616 + # source://rbs//lib/rbs/errors.rb#617 def check!(type_params); end end end @@ -5713,13 +6492,18 @@ class RBS::Types::Bases::Void < ::RBS::Types::Bases::Base; end class RBS::Types::Block # @return [Block] a new instance of Block # - # source://rbs//lib/rbs/types.rb#1343 - def initialize(type:, required:, self_type: T.unsafe(nil)); end + # source://rbs//lib/rbs/types.rb#1344 + def initialize(type:, required:, location: T.unsafe(nil), self_type: T.unsafe(nil)); end - # source://rbs//lib/rbs/types.rb#1349 + # source://rbs//lib/rbs/types.rb#1351 def ==(other); end - # source://rbs//lib/rbs/types.rb#1374 + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/types.rb#1342 + def location; end + + # source://rbs//lib/rbs/types.rb#1376 def map_type(&block); end # Returns the value of attribute required. @@ -5732,10 +6516,10 @@ class RBS::Types::Block # source://rbs//lib/rbs/types.rb#1341 def self_type; end - # source://rbs//lib/rbs/types.rb#1364 + # source://rbs//lib/rbs/types.rb#1366 def sub(s); end - # source://rbs//lib/rbs/types.rb#1356 + # source://rbs//lib/rbs/types.rb#1358 def to_json(state = T.unsafe(nil)); end # Returns the value of attribute type. @@ -6098,7 +6882,7 @@ class RBS::Types::Intersection def with_nonreturn_void?; end end -# source://rbs//lib/rbs/types.rb#1518 +# source://rbs//lib/rbs/types.rb#1520 class RBS::Types::Literal include ::RBS::Types::NoFreeVariables include ::RBS::Types::NoSubst @@ -6107,56 +6891,56 @@ class RBS::Types::Literal # @return [Literal] a new instance of Literal # - # source://rbs//lib/rbs/types.rb#1522 + # source://rbs//lib/rbs/types.rb#1524 def initialize(literal:, location:); end - # source://rbs//lib/rbs/types.rb#1527 + # source://rbs//lib/rbs/types.rb#1529 def ==(other); end - # source://rbs//lib/rbs/types.rb#1527 + # source://rbs//lib/rbs/types.rb#1529 def eql?(other); end # @return [Boolean] # - # source://rbs//lib/rbs/types.rb#1554 + # source://rbs//lib/rbs/types.rb#1556 def has_classish_type?; end # @return [Boolean] # - # source://rbs//lib/rbs/types.rb#1550 + # source://rbs//lib/rbs/types.rb#1552 def has_self_type?; end - # source://rbs//lib/rbs/types.rb#1533 + # source://rbs//lib/rbs/types.rb#1535 def hash; end # Returns the value of attribute literal. # - # source://rbs//lib/rbs/types.rb#1519 + # source://rbs//lib/rbs/types.rb#1521 def literal; end # Returns the value of attribute location. # - # source://rbs//lib/rbs/types.rb#1520 + # source://rbs//lib/rbs/types.rb#1522 def location; end - # source://rbs//lib/rbs/types.rb#1542 + # source://rbs//lib/rbs/types.rb#1544 def to_json(state = T.unsafe(nil)); end - # source://rbs//lib/rbs/types.rb#1546 + # source://rbs//lib/rbs/types.rb#1548 def to_s(level = T.unsafe(nil)); end # @return [Boolean] # - # source://rbs//lib/rbs/types.rb#1558 + # source://rbs//lib/rbs/types.rb#1560 def with_nonreturn_void?; end class << self - # source://rbs//lib/rbs/types.rb#1578 + # source://rbs//lib/rbs/types.rb#1580 def unescape_string(string, is_double_quote); end end end -# source://rbs//lib/rbs/types.rb#1562 +# source://rbs//lib/rbs/types.rb#1564 RBS::Types::Literal::TABLE = T.let(T.unsafe(nil), Hash) # source://rbs//lib/rbs/types.rb#5 @@ -6240,76 +7024,76 @@ class RBS::Types::Optional def with_nonreturn_void?; end end -# source://rbs//lib/rbs/types.rb#1395 +# source://rbs//lib/rbs/types.rb#1397 class RBS::Types::Proc # @return [Proc] a new instance of Proc # - # source://rbs//lib/rbs/types.rb#1401 + # source://rbs//lib/rbs/types.rb#1403 def initialize(location:, type:, block:, self_type: T.unsafe(nil)); end - # source://rbs//lib/rbs/types.rb#1408 + # source://rbs//lib/rbs/types.rb#1410 def ==(other); end # Returns the value of attribute block. # - # source://rbs//lib/rbs/types.rb#1397 + # source://rbs//lib/rbs/types.rb#1399 def block; end - # source://rbs//lib/rbs/types.rb#1462 + # source://rbs//lib/rbs/types.rb#1464 def each_type(&block); end - # source://rbs//lib/rbs/types.rb#1408 + # source://rbs//lib/rbs/types.rb#1410 def eql?(other); end - # source://rbs//lib/rbs/types.rb#1418 + # source://rbs//lib/rbs/types.rb#1420 def free_variables(set = T.unsafe(nil)); end # @return [Boolean] # - # source://rbs//lib/rbs/types.rb#1501 + # source://rbs//lib/rbs/types.rb#1503 def has_classish_type?; end # @return [Boolean] # - # source://rbs//lib/rbs/types.rb#1497 + # source://rbs//lib/rbs/types.rb#1499 def has_self_type?; end - # source://rbs//lib/rbs/types.rb#1414 + # source://rbs//lib/rbs/types.rb#1416 def hash; end # Returns the value of attribute location. # - # source://rbs//lib/rbs/types.rb#1399 + # source://rbs//lib/rbs/types.rb#1401 def location; end - # source://rbs//lib/rbs/types.rb#1484 + # source://rbs//lib/rbs/types.rb#1486 def map_type(&block); end - # source://rbs//lib/rbs/types.rb#1475 + # source://rbs//lib/rbs/types.rb#1477 def map_type_name(&block); end # Returns the value of attribute self_type. # - # source://rbs//lib/rbs/types.rb#1398 + # source://rbs//lib/rbs/types.rb#1400 def self_type; end - # source://rbs//lib/rbs/types.rb#1435 + # source://rbs//lib/rbs/types.rb#1437 def sub(s); end - # source://rbs//lib/rbs/types.rb#1425 + # source://rbs//lib/rbs/types.rb#1427 def to_json(state = T.unsafe(nil)); end - # source://rbs//lib/rbs/types.rb#1446 + # source://rbs//lib/rbs/types.rb#1448 def to_s(level = T.unsafe(nil)); end # Returns the value of attribute type. # - # source://rbs//lib/rbs/types.rb#1396 + # source://rbs//lib/rbs/types.rb#1398 def type; end # @return [Boolean] # - # source://rbs//lib/rbs/types.rb#1505 + # source://rbs//lib/rbs/types.rb#1507 def with_nonreturn_void?; end end @@ -6386,15 +7170,15 @@ class RBS::Types::Record def with_nonreturn_void?; end end -# source://rbs//lib/rbs/types.rb#1383 +# source://rbs//lib/rbs/types.rb#1385 module RBS::Types::SelfTypeBindingHelper private - # source://rbs//lib/rbs/types.rb#1386 + # source://rbs//lib/rbs/types.rb#1388 def self_type_binding_to_s(t); end class << self - # source://rbs//lib/rbs/types.rb#1386 + # source://rbs//lib/rbs/types.rb#1388 def self_type_binding_to_s(t); end end end @@ -6876,18 +7660,18 @@ class RBS::Vendorer def vendor_dir; end end -# source://rbs//lib/rbs/errors.rb#593 +# source://rbs//lib/rbs/errors.rb#594 class RBS::WillSyntaxError < ::RBS::DefinitionError include ::RBS::DetailedMessageable # @return [WillSyntaxError] a new instance of WillSyntaxError # - # source://rbs//lib/rbs/errors.rb#598 + # source://rbs//lib/rbs/errors.rb#599 def initialize(message, location:); end # Returns the value of attribute location. # - # source://rbs//lib/rbs/errors.rb#596 + # source://rbs//lib/rbs/errors.rb#597 def location; end end diff --git a/sorbet/rbi/gems/require-hooks@0.2.2.rbi b/sorbet/rbi/gems/require-hooks@0.2.2.rbi new file mode 100644 index 000000000..a1b3d289f --- /dev/null +++ b/sorbet/rbi/gems/require-hooks@0.2.2.rbi @@ -0,0 +1,110 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `require-hooks` gem. +# Please instead update this file by running `bin/tapioca gem require-hooks`. + + +# source://require-hooks//lib/require-hooks/api.rb#3 +module RequireHooks + class << self + # Define a block to wrap the code loading. + # The return value MUST be a result of calling the passed block. + # For example, you can use such hooks for instrumentation, debugging purposes. + # + # RequireHooks.around_load do |path, &block| + # puts "Loading #{path}" + # block.call.tap { puts "Loaded #{path}" } + # end + # + # source://require-hooks//lib/require-hooks/api.rb#71 + def around_load(patterns: T.unsafe(nil), exclude_patterns: T.unsafe(nil), &block); end + + # source://require-hooks//lib/require-hooks/api.rb#107 + def context_for(path); end + + # This hook should be used to manually compile byte code to be loaded by the VM. + # The arguments are (path, source = nil), where source is only defined if transformations took place. + # Otherwise, you MUST read the source code from the file yourself. + # + # The return value MUST be either nil (continue to the next hook or default behavior) or a platform-specific bytecode object (e.g., RubyVM::InstructionSequence). + # + # RequireHooks.hijack_load do |path, source| + # source ||= File.read(path) + # if defined?(RubyVM::InstructionSequence) + # RubyVM::InstructionSequence.compile(source) + # elsif defined?(JRUBY_VERSION) + # JRuby.compile(source) + # end + # end + # + # source://require-hooks//lib/require-hooks/api.rb#103 + def hijack_load(patterns: T.unsafe(nil), exclude_patterns: T.unsafe(nil), &block); end + + # Returns the value of attribute print_warnings. + # + # source://require-hooks//lib/require-hooks/api.rb#61 + def print_warnings; end + + # Sets the attribute print_warnings + # + # @param value the value to set the attribute print_warnings to. + # + # source://require-hooks//lib/require-hooks/api.rb#61 + def print_warnings=(_arg0); end + + # Define hooks to perform source-to-source transformations. + # The return value MUST be either String (new source code) or nil (indicating that no transformations were performed). + # + # NOTE: The second argument (`source`) MAY be nil, indicating that no transformer tried to transform the source code. + # + # + # RequireHooks.source_transform do |path, source| + # end + # + # source://require-hooks//lib/require-hooks/api.rb#85 + def source_transform(patterns: T.unsafe(nil), exclude_patterns: T.unsafe(nil), &block); end + end +end + +# source://require-hooks//lib/require-hooks/api.rb#8 +class RequireHooks::Context + # @return [Context] a new instance of Context + # + # source://require-hooks//lib/require-hooks/api.rb#9 + def initialize(around_load, source_transform, hijack_load); end + + # @return [Boolean] + # + # source://require-hooks//lib/require-hooks/api.rb#15 + def empty?; end + + # @return [Boolean] + # + # source://require-hooks//lib/require-hooks/api.rb#23 + def hijack?; end + + # source://require-hooks//lib/require-hooks/api.rb#37 + def perform_source_transform(path); end + + # source://require-hooks//lib/require-hooks/api.rb#27 + def run_around_load_callbacks(path); end + + # @return [Boolean] + # + # source://require-hooks//lib/require-hooks/api.rb#19 + def source_transform?; end + + # source://require-hooks//lib/require-hooks/api.rb#49 + def try_hijack_load(path, source); end +end + +# source://require-hooks//lib/require-hooks/mode/load_iseq.rb#4 +module RequireHooks::LoadIseq + # source://require-hooks//lib/require-hooks/mode/load_iseq.rb#5 + def load_iseq(path); end +end + +class RubyVM::InstructionSequence + extend ::RequireHooks::LoadIseq +end diff --git a/sorbet/rbi/gems/rexml@3.4.1.rbi b/sorbet/rbi/gems/rexml@3.4.1.rbi new file mode 100644 index 000000000..a8f3de3bc --- /dev/null +++ b/sorbet/rbi/gems/rexml@3.4.1.rbi @@ -0,0 +1,5240 @@ +# typed: false + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rexml` gem. +# Please instead update this file by running `bin/tapioca gem rexml`. + + +# This class needs: +# * Documentation +# * Work! Not all types of attlists are intelligently parsed, so we just +# spew back out what we get in. This works, but it would be better if +# we formatted the output ourselves. +# +# AttlistDecls provide *just* enough support to allow namespace +# declarations. If you need some sort of generalized support, or have an +# interesting idea about how to map the hideous, terrible design of DTD +# AttlistDecls onto an intuitive Ruby interface, let me know. I'm desperate +# for anything to make DTDs more palateable. +# +# source://rexml//lib/rexml/attlistdecl.rb#18 +class REXML::AttlistDecl < ::REXML::Child + include ::Enumerable + + # Create an AttlistDecl, pulling the information from a Source. Notice + # that this isn't very convenient; to create an AttlistDecl, you basically + # have to format it yourself, and then have the initializer parse it. + # Sorry, but for the foreseeable future, DTD support in REXML is pretty + # weak on convenience. Have I mentioned how much I hate DTDs? + # + # @return [AttlistDecl] a new instance of AttlistDecl + # + # source://rexml//lib/rexml/attlistdecl.rb#29 + def initialize(source); end + + # Access the attlist attribute/value pairs. + # value = attlist_decl[ attribute_name ] + # + # source://rexml//lib/rexml/attlistdecl.rb#38 + def [](key); end + + # Iterate over the key/value pairs: + # attlist_decl.each { |attribute_name, attribute_value| ... } + # + # source://rexml//lib/rexml/attlistdecl.rb#50 + def each(&block); end + + # What is this? Got me. + # + # source://rexml//lib/rexml/attlistdecl.rb#22 + def element_name; end + + # Whether an attlist declaration includes the given attribute definition + # if attlist_decl.include? "xmlns:foobar" + # + # @return [Boolean] + # + # source://rexml//lib/rexml/attlistdecl.rb#44 + def include?(key); end + + # source://rexml//lib/rexml/attlistdecl.rb#59 + def node_type; end + + # Write out exactly what we got in. + # + # source://rexml//lib/rexml/attlistdecl.rb#55 + def write(out, indent = T.unsafe(nil)); end +end + +# Defines an Element Attribute; IE, a attribute=value pair, as in: +# . Attributes can be in their own +# namespaces. General users of REXML will not interact with the +# Attribute class much. +# +# source://rexml//lib/rexml/attribute.rb#10 +class REXML::Attribute + include ::REXML::Node + include ::REXML::XMLTokens + include ::REXML::Namespace + + # Constructor. + # FIXME: The parser doesn't catch illegal characters in attributes + # + # first:: + # Either: an Attribute, which this new attribute will become a + # clone of; or a String, which is the name of this attribute + # second:: + # If +first+ is an Attribute, then this may be an Element, or nil. + # If nil, then the Element parent of this attribute is the parent + # of the +first+ Attribute. If the first argument is a String, + # then this must also be a String, and is the content of the attribute. + # If this is the content, it must be fully normalized (contain no + # illegal characters). + # parent:: + # Ignored unless +first+ is a String; otherwise, may be the Element + # parent of this attribute, or nil. + # + # + # Attribute.new( attribute_to_clone ) + # Attribute.new( attribute_to_clone, parent_element ) + # Attribute.new( "attr", "attr_value" ) + # Attribute.new( "attr", "attr_value", parent_element ) + # + # @return [Attribute] a new instance of Attribute + # + # source://rexml//lib/rexml/attribute.rb#42 + def initialize(first, second = T.unsafe(nil), parent = T.unsafe(nil)); end + + # Returns true if other is an Attribute and has the same name and value, + # false otherwise. + # + # source://rexml//lib/rexml/attribute.rb#106 + def ==(other); end + + # Returns a copy of this attribute + # + # source://rexml//lib/rexml/attribute.rb#164 + def clone; end + + # source://rexml//lib/rexml/attribute.rb#132 + def doctype; end + + # The element to which this attribute belongs + # + # source://rexml//lib/rexml/attribute.rb#15 + def element; end + + # Sets the element of which this object is an attribute. Normally, this + # is not directly called. + # + # Returns this attribute + # + # source://rexml//lib/rexml/attribute.rb#172 + def element=(element); end + + # Creates (and returns) a hash from both the name and value + # + # source://rexml//lib/rexml/attribute.rb#111 + def hash; end + + # source://rexml//lib/rexml/attribute.rb#198 + def inspect; end + + # Returns the namespace URL, if defined, or nil otherwise + # + # e = Element.new("el") + # e.add_namespace("ns", "http://url") + # e.add_attribute("ns:a", "b") + # e.add_attribute("nsx:a", "c") + # e.attribute("ns:a").namespace # => "http://url" + # e.attribute("nsx:a").namespace # => nil + # + # This method always returns "" for no namespace attribute. Because + # the default namespace doesn't apply to attribute names. + # + # From https://www.w3.org/TR/xml-names/#uniqAttrs + # + # > the default namespace does not apply to attribute names + # + # e = REXML::Element.new("el") + # e.add_namespace("", "http://example.com/") + # e.namespace # => "http://example.com/" + # e.add_attribute("a", "b") + # e.attribute("a").namespace # => "" + # + # source://rexml//lib/rexml/attribute.rb#95 + def namespace(arg = T.unsafe(nil)); end + + # source://rexml//lib/rexml/attribute.rb#194 + def node_type; end + + # The normalized value of this attribute. That is, the attribute with + # entities intact. + # + # source://rexml//lib/rexml/attribute.rb#158 + def normalized=(new_normalized); end + + # Returns the namespace of the attribute. + # + # e = Element.new( "elns:myelement" ) + # e.add_attribute( "nsa:a", "aval" ) + # e.add_attribute( "b", "bval" ) + # e.attributes.get_attribute( "a" ).prefix # -> "nsa" + # e.attributes.get_attribute( "b" ).prefix # -> "" + # a = Attribute.new( "x", "y" ) + # a.prefix # -> "" + # + # source://rexml//lib/rexml/attribute.rb#70 + def prefix; end + + # Removes this Attribute from the tree, and returns true if successful + # + # This method is usually not called directly. + # + # source://rexml//lib/rexml/attribute.rb#185 + def remove; end + + # Returns the attribute value, with entities replaced + # + # source://rexml//lib/rexml/attribute.rb#140 + def to_s; end + + # Returns this attribute out as XML source, expanding the name + # + # a = Attribute.new( "x", "y" ) + # a.to_string # -> "x='y'" + # b = Attribute.new( "ns:x", "y" ) + # b.to_string # -> "ns:x='y'" + # + # source://rexml//lib/rexml/attribute.rb#121 + def to_string; end + + # Returns the UNNORMALIZED value of this attribute. That is, entities + # have been expanded to their values + # + # source://rexml//lib/rexml/attribute.rb#149 + def value; end + + # Writes this attribute (EG, puts 'key="value"' to the output) + # + # source://rexml//lib/rexml/attribute.rb#190 + def write(output, indent = T.unsafe(nil)); end + + # source://rexml//lib/rexml/attribute.rb#204 + def xpath; end +end + +# A class that defines the set of Attributes of an Element and provides +# operations for accessing elements in that set. +# +# source://rexml//lib/rexml/element.rb#2137 +class REXML::Attributes < ::Hash + # :call-seq: + # new(element) + # + # Creates and returns a new \REXML::Attributes object. + # The element given by argument +element+ is stored, + # but its own attributes are not modified: + # + # ele = REXML::Element.new('foo') + # attrs = REXML::Attributes.new(ele) + # attrs.object_id == ele.attributes.object_id # => false + # + # Other instance methods in class \REXML::Attributes may refer to: + # + # - +element.document+. + # - +element.prefix+. + # - +element.expanded_name+. + # + # @return [Attributes] a new instance of Attributes + # + # source://rexml//lib/rexml/element.rb#2156 + def initialize(element); end + + # :call-seq: + # add(attribute) -> attribute + # + # Adds attribute +attribute+, replacing the previous + # attribute of the same name if it exists; + # returns +attribute+: + # + # xml_string = <<-EOT + # + # + # + # EOT + # d = REXML::Document.new(xml_string) + # ele = d.root.elements['//ele'] # => + # attrs = ele.attributes + # attrs # => {"att"=>{"foo"=>foo:att='1', "bar"=>bar:att='2', ""=>att='<'}} + # attrs.add(REXML::Attribute.new('foo:att', '2')) # => foo:att='2' + # attrs.add(REXML::Attribute.new('baz', '3')) # => baz='3' + # attrs.include?('baz') # => true + # + # source://rexml//lib/rexml/element.rb#2522 + def <<(attribute); end + + # :call-seq: + # [name] -> attribute_value or nil + # + # Returns the value for the attribute given by +name+, + # if it exists; otherwise +nil+. + # The value returned is the unnormalized attribute value, + # with entities expanded: + # + # xml_string = <<-EOT + # + # + # + # EOT + # d = REXML::Document.new(xml_string) + # ele = d.elements['//ele'] # => + # ele.attributes['att'] # => "<" + # ele.attributes['bar:att'] # => "2" + # ele.attributes['nosuch'] # => nil + # + # Related: get_attribute (returns an \Attribute object). + # + # source://rexml//lib/rexml/element.rb#2181 + def [](name); end + + # :call-seq: + # [name] = value -> value + # + # When +value+ is non-+nil+, + # assigns that to the attribute for the given +name+, + # overwriting the previous value if it exists: + # + # xml_string = <<-EOT + # + # + # + # EOT + # d = REXML::Document.new(xml_string) + # ele = d.root.elements['//ele'] # => + # attrs = ele.attributes + # attrs['foo:att'] = '2' # => "2" + # attrs['baz:att'] = '3' # => "3" + # + # When +value+ is +nil+, deletes the attribute if it exists: + # + # attrs['baz:att'] = nil + # attrs.include?('baz:att') # => false + # + # source://rexml//lib/rexml/element.rb#2365 + def []=(name, value); end + + # :call-seq: + # add(attribute) -> attribute + # + # Adds attribute +attribute+, replacing the previous + # attribute of the same name if it exists; + # returns +attribute+: + # + # xml_string = <<-EOT + # + # + # + # EOT + # d = REXML::Document.new(xml_string) + # ele = d.root.elements['//ele'] # => + # attrs = ele.attributes + # attrs # => {"att"=>{"foo"=>foo:att='1', "bar"=>bar:att='2', ""=>att='<'}} + # attrs.add(REXML::Attribute.new('foo:att', '2')) # => foo:att='2' + # attrs.add(REXML::Attribute.new('baz', '3')) # => baz='3' + # attrs.include?('baz') # => true + # + # source://rexml//lib/rexml/element.rb#2522 + def add(attribute); end + + # :call-seq: + # delete(name) -> element + # delete(attribute) -> element + # + # Removes a specified attribute if it exists; + # returns the attributes' element. + # + # When string argument +name+ is given, + # removes the attribute of that name if it exists: + # + # xml_string = <<-EOT + # + # + # + # EOT + # d = REXML::Document.new(xml_string) + # ele = d.root.elements['//ele'] # => + # attrs = ele.attributes + # attrs.delete('foo:att') # => + # attrs.delete('foo:att') # => + # + # When attribute argument +attribute+ is given, + # removes that attribute if it exists: + # + # attr = REXML::Attribute.new('bar:att', '2') + # attrs.delete(attr) # => # => + # attrs.delete(attr) # => # => + # + # source://rexml//lib/rexml/element.rb#2475 + def delete(attribute); end + + # :call-seq: + # delete_all(name) -> array_of_removed_attributes + # + # Removes all attributes matching the given +name+; + # returns an array of the removed attributes: + # + # xml_string = <<-EOT + # + # + # + # EOT + # d = REXML::Document.new(xml_string) + # ele = d.root.elements['//ele'] # => + # attrs = ele.attributes + # attrs.delete_all('att') # => [att='<'] + # + # source://rexml//lib/rexml/element.rb#2544 + def delete_all(name); end + + # :call-seq: + # each {|expanded_name, value| ... } + # + # Calls the given block with each expanded-name/value pair: + # + # xml_string = <<-EOT + # + # + # + # EOT + # d = REXML::Document.new(xml_string) + # ele = d.root.elements['//ele'] # => + # ele.attributes.each do |expanded_name, value| + # p [expanded_name, value] + # end + # + # Output: + # + # ["foo:att", "1"] + # ["bar:att", "2"] + # ["att", "<"] + # + # source://rexml//lib/rexml/element.rb#2283 + def each; end + + # :call-seq: + # each_attribute {|attr| ... } + # + # Calls the given block with each \REXML::Attribute object: + # + # xml_string = <<-EOT + # + # + # + # EOT + # d = REXML::Document.new(xml_string) + # ele = d.root.elements['//ele'] # => + # ele.attributes.each_attribute do |attr| + # p [attr.class, attr] + # end + # + # Output: + # + # [REXML::Attribute, foo:att='1'] + # [REXML::Attribute, bar:att='2'] + # [REXML::Attribute, att='<'] + # + # source://rexml//lib/rexml/element.rb#2250 + def each_attribute; end + + # :call-seq: + # get_attribute(name) -> attribute_object or nil + # + # Returns the \REXML::Attribute object for the given +name+: + # + # xml_string = <<-EOT + # + # + # + # EOT + # d = REXML::Document.new(xml_string) + # ele = d.root.elements['//ele'] # => + # attrs = ele.attributes + # attrs.get_attribute('foo:att') # => foo:att='1' + # attrs.get_attribute('foo:att').class # => REXML::Attribute + # attrs.get_attribute('bar:att') # => bar:att='2' + # attrs.get_attribute('att') # => att='<' + # attrs.get_attribute('nosuch') # => nil + # + # source://rexml//lib/rexml/element.rb#2309 + def get_attribute(name); end + + # :call-seq: + # get_attribute_ns(namespace, name) + # + # Returns the \REXML::Attribute object among the attributes + # that matches the given +namespace+ and +name+: + # + # xml_string = <<-EOT + # + # + # + # EOT + # d = REXML::Document.new(xml_string) + # ele = d.root.elements['//ele'] # => + # attrs = ele.attributes + # attrs.get_attribute_ns('http://foo', 'att') # => foo:att='1' + # attrs.get_attribute_ns('http://foo', 'nosuch') # => nil + # + # source://rexml//lib/rexml/element.rb#2570 + def get_attribute_ns(namespace, name); end + + # :call-seq: + # length + # + # Returns the count of attributes: + # + # xml_string = <<-EOT + # + # + # + # EOT + # d = REXML::Document.new(xml_string) + # ele = d.root.elements['//ele'] # => + # ele.attributes.length # => 3 + # + # source://rexml//lib/rexml/element.rb#2221 + def length; end + + # :call-seq: + # namespaces + # + # Returns a hash of name/value pairs for the namespaces: + # + # xml_string = '' + # d = REXML::Document.new(xml_string) + # d.root.attributes.namespaces # => {"xmlns"=>"foo", "x"=>"bar", "y"=>"twee"} + # + # source://rexml//lib/rexml/element.rb#2431 + def namespaces; end + + # :call-seq: + # prefixes -> array_of_prefix_strings + # + # Returns an array of prefix strings in the attributes. + # The array does not include the default + # namespace declaration, if one exists. + # + # xml_string = '' + # d = REXML::Document.new(xml_string) + # d.root.attributes.prefixes # => ["x", "y"] + # + # source://rexml//lib/rexml/element.rb#2406 + def prefixes; end + + # :call-seq: + # length + # + # Returns the count of attributes: + # + # xml_string = <<-EOT + # + # + # + # EOT + # d = REXML::Document.new(xml_string) + # ele = d.root.elements['//ele'] # => + # ele.attributes.length # => 3 + # + # source://rexml//lib/rexml/element.rb#2221 + def size; end + + # :call-seq: + # to_a -> array_of_attribute_objects + # + # Returns an array of \REXML::Attribute objects representing + # the attributes: + # + # xml_string = <<-EOT + # + # + # + # EOT + # d = REXML::Document.new(xml_string) + # ele = d.root.elements['//ele'] # => + # attrs = ele.attributes.to_a # => [foo:att='1', bar:att='2', att='<'] + # attrs.first.class # => REXML::Attribute + # + # source://rexml//lib/rexml/element.rb#2203 + def to_a; end +end + +# source://rexml//lib/rexml/cdata.rb#5 +class REXML::CData < ::REXML::Text + # Constructor. CData is data between + # + # _Examples_ + # CData.new( source ) + # CData.new( "Here is some CDATA" ) + # CData.new( "Some unprocessed data", respect_whitespace_TF, parent_element ) + # + # @return [CData] a new instance of CData + # + # source://rexml//lib/rexml/cdata.rb#16 + def initialize(first, whitespace = T.unsafe(nil), parent = T.unsafe(nil)); end + + # Make a copy of this object + # + # _Examples_ + # c = CData.new( "Some text" ) + # d = c.clone + # d.to_s # -> "Some text" + # + # source://rexml//lib/rexml/cdata.rb#26 + def clone; end + + # Returns the content of this CData object + # + # _Examples_ + # c = CData.new( "Some text" ) + # c.to_s # -> "Some text" + # + # source://rexml//lib/rexml/cdata.rb#35 + def to_s; end + + # source://rexml//lib/rexml/cdata.rb#39 + def value; end + + # == DEPRECATED + # See the rexml/formatters package + # + # Generates XML output of this object + # + # output:: + # Where to write the string. Defaults to $stdout + # indent:: + # The amount to indent this node by + # transitive:: + # Ignored + # ie_hack:: + # Ignored + # + # _Examples_ + # c = CData.new( " Some text " ) + # c.write( $stdout ) #-> + # + # source://rexml//lib/rexml/cdata.rb#60 + def write(output = T.unsafe(nil), indent = T.unsafe(nil), transitive = T.unsafe(nil), ie_hack = T.unsafe(nil)); end +end + +# A Child object is something contained by a parent, and this class +# contains methods to support that. Most user code will not use this +# class directly. +# +# source://rexml//lib/rexml/child.rb#9 +class REXML::Child + include ::REXML::Node + + # Constructor. Any inheritors of this class should call super to make + # sure this method is called. + # parent:: + # if supplied, the parent of this child will be set to the + # supplied value, and self will be added to the parent + # + # @return [Child] a new instance of Child + # + # source://rexml//lib/rexml/child.rb#18 + def initialize(parent = T.unsafe(nil)); end + + # This doesn't yet handle encodings + # + # source://rexml//lib/rexml/child.rb#91 + def bytes; end + + # Returns:: the document this child belongs to, or nil if this child + # belongs to no document + # + # source://rexml//lib/rexml/child.rb#85 + def document; end + + # source://rexml//lib/rexml/node.rb#11 + def next_sibling; end + + # Sets the next sibling of this child. This can be used to insert a child + # after some other child. + # a = Element.new("a") + # b = a.add_element("b") + # c = Element.new("c") + # b.next_sibling = c + # # => + # + # source://rexml//lib/rexml/child.rb#68 + def next_sibling=(other); end + + # The Parent of this object + # + # source://rexml//lib/rexml/child.rb#11 + def parent; end + + # Sets the parent of this child to the supplied argument. + # + # other:: + # Must be a Parent object. If this object is the same object as the + # existing parent of this child, no action is taken. Otherwise, this + # child is removed from the current parent (if one exists), and is added + # to the new parent. + # Returns:: The parent added + # + # source://rexml//lib/rexml/child.rb#52 + def parent=(other); end + + # source://rexml//lib/rexml/node.rb#17 + def previous_sibling; end + + # Sets the previous sibling of this child. This can be used to insert a + # child before some other child. + # a = Element.new("a") + # b = a.add_element("b") + # c = Element.new("c") + # b.previous_sibling = c + # # => + # + # source://rexml//lib/rexml/child.rb#79 + def previous_sibling=(other); end + + # Removes this child from the parent. + # + # Returns:: self + # + # source://rexml//lib/rexml/child.rb#37 + def remove; end + + # Replaces this object with another object. Basically, calls + # Parent.replace_child + # + # Returns:: self + # + # source://rexml//lib/rexml/child.rb#29 + def replace_with(child); end +end + +# Represents an XML comment; that is, text between \ +# +# source://rexml//lib/rexml/comment.rb#7 +class REXML::Comment < ::REXML::Child + include ::Comparable + + # Constructor. The first argument can be one of three types: + # argument. If Comment, the argument is duplicated. If + # Source, the argument is scanned for a comment. + # should be nil, not supplied, or a Parent to be set as the parent + # of this object + # + # @param first If String, the contents of this comment are set to the + # @param second If the first argument is a Source, this argument + # @return [Comment] a new instance of Comment + # + # source://rexml//lib/rexml/comment.rb#24 + def initialize(first, second = T.unsafe(nil)); end + + # Compares this Comment to another; the contents of the comment are used + # in the comparison. + # + # source://rexml//lib/rexml/comment.rb#63 + def <=>(other); end + + # Compares this Comment to another; the contents of the comment are used + # in the comparison. + # + # source://rexml//lib/rexml/comment.rb#70 + def ==(other); end + + # source://rexml//lib/rexml/comment.rb#33 + def clone; end + + # source://rexml//lib/rexml/comment.rb#75 + def node_type; end + + # The content text + # + # source://rexml//lib/rexml/comment.rb#14 + def string; end + + # The content text + # + # source://rexml//lib/rexml/comment.rb#14 + def string=(_arg0); end + + # The content text + # + # source://rexml//lib/rexml/comment.rb#14 + def to_s; end + + # == DEPRECATED + # See REXML::Formatters + # + # output:: + # Where to write the string + # indent:: + # An integer. If -1, no indenting will be used; otherwise, the + # indentation will be this number of spaces, and children will be + # indented an additional amount. + # transitive:: + # Ignored by this class. The contents of comments are never modified. + # ie_hack:: + # Needed for conformity to the child API, but not used by this class. + # + # source://rexml//lib/rexml/comment.rb#50 + def write(output, indent = T.unsafe(nil), transitive = T.unsafe(nil), ie_hack = T.unsafe(nil)); end +end + +# source://rexml//lib/rexml/xpath_parser.rb#11 +module REXML::DClonable; end + +# This is an abstract class. You never use this directly; it serves as a +# parent class for the specific declarations. +# +# source://rexml//lib/rexml/doctype.rb#242 +class REXML::Declaration < ::REXML::Child + # @return [Declaration] a new instance of Declaration + # + # source://rexml//lib/rexml/doctype.rb#243 + def initialize(src); end + + # source://rexml//lib/rexml/doctype.rb#248 + def to_s; end + + # == DEPRECATED + # See REXML::Formatters + # + # source://rexml//lib/rexml/doctype.rb#255 + def write(output, indent); end +end + +# Represents an XML DOCTYPE declaration; that is, the contents of . DOCTYPES can be used to declare the DTD of a document, as well as +# being used to declare entities used in the document. +# +# source://rexml//lib/rexml/doctype.rb#51 +class REXML::DocType < ::REXML::Parent + include ::REXML::XMLTokens + + # Constructor + # + # dt = DocType.new( 'foo', '-//I/Hate/External/IDs' ) + # # + # dt = DocType.new( doctype_to_clone ) + # # Incomplete. Shallow clone of doctype + # + # +Note+ that the constructor: + # + # Doctype.new( Source.new( "" ) ) + # + # is _deprecated_. Do not use it. It will probably disappear. + # + # @return [DocType] a new instance of DocType + # + # source://rexml//lib/rexml/doctype.rb#80 + def initialize(first, parent = T.unsafe(nil)); end + + # source://rexml//lib/rexml/doctype.rb#185 + def add(child); end + + # source://rexml//lib/rexml/doctype.rb#125 + def attribute_of(element, attribute); end + + # source://rexml//lib/rexml/doctype.rb#115 + def attributes_of(element); end + + # source://rexml//lib/rexml/doctype.rb#135 + def clone; end + + # source://rexml//lib/rexml/doctype.rb#173 + def context; end + + # name is the name of the doctype + # external_id is the referenced DTD, if given + # + # source://rexml//lib/rexml/doctype.rb#66 + def entities; end + + # source://rexml//lib/rexml/doctype.rb#181 + def entity(name); end + + # name is the name of the doctype + # external_id is the referenced DTD, if given + # + # source://rexml//lib/rexml/doctype.rb#66 + def external_id; end + + # name is the name of the doctype + # external_id is the referenced DTD, if given + # + # source://rexml//lib/rexml/doctype.rb#66 + def name; end + + # name is the name of the doctype + # external_id is the referenced DTD, if given + # + # source://rexml//lib/rexml/doctype.rb#66 + def namespaces; end + + # source://rexml//lib/rexml/doctype.rb#111 + def node_type; end + + # Retrieves a named notation. Only notations declared in the internal + # DTD subset can be retrieved. + # + # Method contributed by Henrik Martensson + # + # source://rexml//lib/rexml/doctype.rb#229 + def notation(name); end + + # This method returns a list of notations that have been declared in the + # _internal_ DTD subset. Notations in the external DTD subset are not + # listed. + # + # Method contributed by Henrik Martensson + # + # source://rexml//lib/rexml/doctype.rb#221 + def notations; end + + # This method retrieves the public identifier identifying the document's + # DTD. + # + # Method contributed by Henrik Martensson + # + # source://rexml//lib/rexml/doctype.rb#195 + def public; end + + # This method retrieves the system identifier identifying the document's DTD + # + # Method contributed by Henrik Martensson + # + # source://rexml//lib/rexml/doctype.rb#207 + def system; end + + # output:: + # Where to write the string + # indent:: + # An integer. If -1, no indentation will be used; otherwise, the + # indentation will be this number of spaces, and children will be + # indented an additional amount. + # transitive:: + # Ignored + # ie_hack:: + # Ignored + # + # source://rexml//lib/rexml/doctype.rb#149 + def write(output, indent = T.unsafe(nil), transitive = T.unsafe(nil), ie_hack = T.unsafe(nil)); end +end + +# Represents an XML document. +# +# A document may have: +# +# - A single child that may be accessed via method #root. +# - An XML declaration. +# - A document type. +# - Processing instructions. +# +# == In a Hurry? +# +# If you're somewhat familiar with XML +# and have a particular task in mind, +# you may want to see the +# {tasks pages}[../doc/rexml/tasks/tocs/master_toc_rdoc.html], +# and in particular, the +# {tasks page for documents}[../doc/rexml/tasks/tocs/document_toc_rdoc.html]. +# +# source://rexml//lib/rexml/document.rb#35 +class REXML::Document < ::REXML::Element + # :call-seq: + # new(string = nil, context = {}) -> new_document + # new(io_stream = nil, context = {}) -> new_document + # new(document = nil, context = {}) -> new_document + # + # Returns a new \REXML::Document object. + # + # When no arguments are given, + # returns an empty document: + # + # d = REXML::Document.new + # d.to_s # => "" + # + # When argument +string+ is given, it must be a string + # containing a valid XML document: + # + # xml_string = 'FooBar' + # d = REXML::Document.new(xml_string) + # d.to_s # => "FooBar" + # + # When argument +io_stream+ is given, it must be an \IO object + # that is opened for reading, and when read must return a valid XML document: + # + # File.write('t.xml', xml_string) + # d = File.open('t.xml', 'r') do |io| + # REXML::Document.new(io) + # end + # d.to_s # => "FooBar" + # + # When argument +document+ is given, it must be an existing + # document object, whose context and attributes (but not children) + # are cloned into the new document: + # + # d = REXML::Document.new(xml_string) + # d.children # => [ ... ] + # d.context = {raw: :all, compress_whitespace: :all} + # d.add_attributes({'bar' => 0, 'baz' => 1}) + # d1 = REXML::Document.new(d) + # d1.children # => [] + # d1.context # => {:raw=>:all, :compress_whitespace=>:all} + # d1.attributes # => {"bar"=>bar='0', "baz"=>baz='1'} + # + # When argument +context+ is given, it must be a hash + # containing context entries for the document; + # see {Element Context}[../doc/rexml/context_rdoc.html]: + # + # context = {raw: :all, compress_whitespace: :all} + # d = REXML::Document.new(xml_string, context) + # d.context # => {:raw=>:all, :compress_whitespace=>:all} + # + # @return [Document] a new instance of Document + # + # source://rexml//lib/rexml/document.rb#92 + def initialize(source = T.unsafe(nil), context = T.unsafe(nil)); end + + # :call-seq: + # add(xml_decl) -> self + # add(doc_type) -> self + # add(object) -> self + # + # Adds an object to the document; returns +self+. + # + # When argument +xml_decl+ is given, + # it must be an REXML::XMLDecl object, + # which becomes the XML declaration for the document, + # replacing the previous XML declaration if any: + # + # d = REXML::Document.new + # d.xml_decl.to_s # => "" + # d.add(REXML::XMLDecl.new('2.0')) + # d.xml_decl.to_s # => "" + # + # When argument +doc_type+ is given, + # it must be an REXML::DocType object, + # which becomes the document type for the document, + # replacing the previous document type, if any: + # + # d = REXML::Document.new + # d.doctype.to_s # => "" + # d.add(REXML::DocType.new('foo')) + # d.doctype.to_s # => "" + # + # When argument +object+ (not an REXML::XMLDecl or REXML::DocType object) + # is given it is added as the last child: + # + # d = REXML::Document.new + # d.add(REXML::Element.new('foo')) + # d.to_s # => "" + # + # source://rexml//lib/rexml/document.rb#172 + def <<(child); end + + # :call-seq: + # add(xml_decl) -> self + # add(doc_type) -> self + # add(object) -> self + # + # Adds an object to the document; returns +self+. + # + # When argument +xml_decl+ is given, + # it must be an REXML::XMLDecl object, + # which becomes the XML declaration for the document, + # replacing the previous XML declaration if any: + # + # d = REXML::Document.new + # d.xml_decl.to_s # => "" + # d.add(REXML::XMLDecl.new('2.0')) + # d.xml_decl.to_s # => "" + # + # When argument +doc_type+ is given, + # it must be an REXML::DocType object, + # which becomes the document type for the document, + # replacing the previous document type, if any: + # + # d = REXML::Document.new + # d.doctype.to_s # => "" + # d.add(REXML::DocType.new('foo')) + # d.doctype.to_s # => "" + # + # When argument +object+ (not an REXML::XMLDecl or REXML::DocType object) + # is given it is added as the last child: + # + # d = REXML::Document.new + # d.add(REXML::Element.new('foo')) + # d.to_s # => "" + # + # source://rexml//lib/rexml/document.rb#172 + def add(child); end + + # :call-seq: + # add_element(name_or_element = nil, attributes = nil) -> new_element + # + # Adds an element to the document by calling REXML::Element.add_element: + # + # REXML::Element.add_element(name_or_element, attributes) + # + # source://rexml//lib/rexml/document.rb#211 + def add_element(arg = T.unsafe(nil), arg2 = T.unsafe(nil)); end + + # :call-seq: + # clone -> new_document + # + # Returns the new document resulting from executing + # Document.new(self). See Document.new. + # + # source://rexml//lib/rexml/document.rb#122 + def clone; end + + # :call-seq: + # doctype -> doc_type or nil + # + # Returns the DocType object for the document, if it exists, otherwise +nil+: + # + # d = REXML::Document.new('') + # d.doctype.class # => REXML::DocType + # d = REXML::Document.new('') + # d.doctype.class # => nil + # + # source://rexml//lib/rexml/document.rb#243 + def doctype; end + + # source://rexml//lib/rexml/document.rb#446 + def document; end + + # :call-seq: + # encoding -> encoding_string + # + # Returns the XMLDecl encoding of the document, + # + # d = REXML::Document.new('') + # d.encoding # => "UTF-16" + # d = REXML::Document.new('') + # d.encoding # => "UTF-8" + # + # source://rexml//lib/rexml/document.rb#292 + def encoding; end + + # Returns the value of attribute entity_expansion_count. + # + # source://rexml//lib/rexml/document.rb#435 + def entity_expansion_count; end + + # Sets the attribute entity_expansion_limit + # + # @param value the value to set the attribute entity_expansion_limit to. + # + # source://rexml//lib/rexml/document.rb#436 + def entity_expansion_limit=(_arg0); end + + # Returns the value of attribute entity_expansion_text_limit. + # + # source://rexml//lib/rexml/document.rb#437 + def entity_expansion_text_limit; end + + # Sets the attribute entity_expansion_text_limit + # + # @param value the value to set the attribute entity_expansion_text_limit to. + # + # source://rexml//lib/rexml/document.rb#437 + def entity_expansion_text_limit=(_arg0); end + + # :call-seq: + # expanded_name -> empty_string + # + # Returns an empty string. + # + # source://rexml//lib/rexml/document.rb#131 + def expanded_name; end + + # :call-seq: + # expanded_name -> empty_string + # + # Returns an empty string. + # d = doc_type + # d ? d.name : "UNDEFINED" + # + # source://rexml//lib/rexml/document.rb#131 + def name; end + + # :call-seq: + # node_type -> :document + # + # Returns the symbol +:document+. + # + # source://rexml//lib/rexml/document.rb#112 + def node_type; end + + # source://rexml//lib/rexml/document.rb#439 + def record_entity_expansion; end + + # :call-seq: + # root -> root_element or nil + # + # Returns the root element of the document, if it exists, otherwise +nil+: + # + # d = REXML::Document.new('') + # d.root # => + # d = REXML::Document.new('') + # d.root # => nil + # + # source://rexml//lib/rexml/document.rb#227 + def root; end + + # :call-seq: + # stand_alone? + # + # Returns the XMLDecl standalone value of the document as a string, + # if it has been set, otherwise the default standalone value: + # + # d = REXML::Document.new('') + # d.stand_alone? # => "yes" + # d = REXML::Document.new('') + # d.stand_alone? # => nil + # + # @return [Boolean] + # + # source://rexml//lib/rexml/document.rb#307 + def stand_alone?; end + + # :call-seq: + # version -> version_string + # + # Returns the XMLDecl version of this document as a string, + # if it has been set, otherwise the default version: + # + # d = REXML::Document.new('') + # d.version # => "2.0" + # d = REXML::Document.new('') + # d.version # => "1.0" + # + # source://rexml//lib/rexml/document.rb#277 + def version; end + + # :call-seq: + # doc.write(output=$stdout, indent=-1, transtive=false, ie_hack=false, encoding=nil) + # doc.write(options={:output => $stdout, :indent => -1, :transtive => false, :ie_hack => false, :encoding => nil}) + # + # Write the XML tree out, optionally with indent. This writes out the + # entire XML document, including XML declarations, doctype declarations, + # and processing instructions (if any are given). + # + # A controversial point is whether Document should always write the XML + # declaration () whether or not one is given by the + # user (or source document). REXML does not write one if one was not + # specified, because it adds unnecessary bandwidth to applications such + # as XML-RPC. + # + # Accept Nth argument style and options Hash style as argument. + # The recommended style is options Hash style for one or more + # arguments case. + # + # _Examples_ + # Document.new("").write + # + # output = "" + # Document.new("").write(output) + # + # output = "" + # Document.new("").write(:output => output, :indent => 2) + # + # See also the classes in the rexml/formatters package for the proper way + # to change the default formatting of XML output. + # + # _Examples_ + # + # output = "" + # tr = Transitive.new + # tr.write(Document.new(""), output) + # + # output:: + # output an object which supports '<< string'; this is where the + # document will be written. + # indent:: + # An integer. If -1, no indenting will be used; otherwise, the + # indentation will be twice this number of spaces, and children will be + # indented an additional amount. For a value of 3, every item will be + # indented 3 more levels, or 6 more spaces (2 * 3). Defaults to -1 + # transitive:: + # If transitive is true and indent is >= 0, then the output will be + # pretty-printed in such a way that the added whitespace does not affect + # the absolute *value* of the document -- that is, it leaves the value + # and number of Text nodes in the document unchanged. + # ie_hack:: + # This hack inserts a space before the /> on empty tags to address + # a limitation of Internet Explorer. Defaults to false + # Encoding name as String. Change output encoding to specified encoding + # instead of encoding in XML declaration. + # Defaults to nil. It means encoding in XML declaration is used. + # + # source://rexml//lib/rexml/document.rb#367 + def write(*arguments); end + + # :call-seq: + # xml_decl -> xml_decl + # + # Returns the XMLDecl object for the document, if it exists, + # otherwise the default XMLDecl object: + # + # d = REXML::Document.new('') + # d.xml_decl.class # => REXML::XMLDecl + # d.xml_decl.to_s # => "" + # d = REXML::Document.new('') + # d.xml_decl.class # => REXML::XMLDecl + # d.xml_decl.to_s # => "" + # + # source://rexml//lib/rexml/document.rb#260 + def xml_decl; end + + private + + # source://rexml//lib/rexml/document.rb#451 + def build(source); end + + class << self + # Get the entity expansion limit. By default the limit is set to 10000. + # + # Deprecated. Use REXML::Security.entity_expansion_limit= instead. + # + # source://rexml//lib/rexml/document.rb#417 + def entity_expansion_limit; end + + # Set the entity expansion limit. By default the limit is set to 10000. + # + # Deprecated. Use REXML::Security.entity_expansion_limit= instead. + # + # source://rexml//lib/rexml/document.rb#410 + def entity_expansion_limit=(val); end + + # Get the entity expansion limit. By default the limit is set to 10240. + # + # Deprecated. Use REXML::Security.entity_expansion_text_limit instead. + # + # source://rexml//lib/rexml/document.rb#431 + def entity_expansion_text_limit; end + + # Set the entity expansion limit. By default the limit is set to 10240. + # + # Deprecated. Use REXML::Security.entity_expansion_text_limit= instead. + # + # source://rexml//lib/rexml/document.rb#424 + def entity_expansion_text_limit=(val); end + + # source://rexml//lib/rexml/document.rb#403 + def parse_stream(source, listener); end + end +end + +# An \REXML::Element object represents an XML element. +# +# An element: +# +# - Has a name (string). +# - May have a parent (another element). +# - Has zero or more children +# (other elements, text, CDATA, processing instructions, and comments). +# - Has zero or more siblings +# (other elements, text, CDATA, processing instructions, and comments). +# - Has zero or more named attributes. +# +# == In a Hurry? +# +# If you're somewhat familiar with XML +# and have a particular task in mind, +# you may want to see the +# {tasks pages}[../doc/rexml/tasks/tocs/master_toc_rdoc.html], +# and in particular, the +# {tasks page for elements}[../doc/rexml/tasks/tocs/element_toc_rdoc.html]. +# +# === Name +# +# An element has a name, which is initially set when the element is created: +# +# e = REXML::Element.new('foo') +# e.name # => "foo" +# +# The name may be changed: +# +# e.name = 'bar' +# e.name # => "bar" +# +# +# === \Parent +# +# An element may have a parent. +# +# Its parent may be assigned explicitly when the element is created: +# +# e0 = REXML::Element.new('foo') +# e1 = REXML::Element.new('bar', e0) +# e1.parent # => ... +# +# Note: the representation of an element always shows the element's name. +# If the element has children, the representation indicates that +# by including an ellipsis (...). +# +# The parent may be assigned explicitly at any time: +# +# e2 = REXML::Element.new('baz') +# e1.parent = e2 +# e1.parent # => +# +# When an element is added as a child, its parent is set automatically: +# +# e1.add_element(e0) +# e0.parent # => ... +# +# For an element that has no parent, method +parent+ returns +nil+. +# +# === Children +# +# An element has zero or more children. +# The children are an ordered collection +# of all objects whose parent is the element itself. +# +# The children may include any combination of elements, text, comments, +# processing instructions, and CDATA. +# (This example keeps things clean by controlling whitespace +# via a +context+ setting.) +# +# xml_string = <<-EOT +# +# +# text 0 +# +# +# +# +# text 1 +# +# +# +# +# EOT +# context = {ignore_whitespace_nodes: :all, compress_whitespace: :all} +# d = REXML::Document.new(xml_string, context) +# root = d.root +# root.children.size # => 10 +# root.each {|child| p "#{child.class}: #{child}" } +# +# Output: +# +# "REXML::Element: " +# "REXML::Text: \n text 0\n " +# "REXML::Comment: comment 0" +# "REXML::Instruction: " +# "REXML::CData: cdata 0" +# "REXML::Element: " +# "REXML::Text: \n text 1\n " +# "REXML::Comment: comment 1" +# "REXML::Instruction: " +# "REXML::CData: cdata 1" +# +# A child may be added using inherited methods +# Parent#insert_before or Parent#insert_after: +# +# xml_string = '' +# d = REXML::Document.new(xml_string) +# root = d.root +# c = d.root[1] # => +# root.insert_before(c, REXML::Element.new('b')) +# root.to_a # => [, , , ] +# +# A child may be replaced using Parent#replace_child: +# +# root.replace_child(c, REXML::Element.new('x')) +# root.to_a # => [, , , ] +# +# A child may be removed using Parent#delete: +# +# x = root[2] # => +# root.delete(x) +# root.to_a # => [, , ] +# +# === Siblings +# +# An element has zero or more siblings, +# which are the other children of the element's parent. +# +# In the example above, element +ele_1+ is between a CDATA sibling +# and a text sibling: +# +# ele_1 = root[5] # => +# ele_1.previous_sibling # => "cdata 0" +# ele_1.next_sibling # => "\n text 1\n " +# +# === \Attributes +# +# An element has zero or more named attributes. +# +# A new element has no attributes: +# +# e = REXML::Element.new('foo') +# e.attributes # => {} +# +# Attributes may be added: +# +# e.add_attribute('bar', 'baz') +# e.add_attribute('bat', 'bam') +# e.attributes.size # => 2 +# e['bar'] # => "baz" +# e['bat'] # => "bam" +# +# An existing attribute may be modified: +# +# e.add_attribute('bar', 'bad') +# e.attributes.size # => 2 +# e['bar'] # => "bad" +# +# An existing attribute may be deleted: +# +# e.delete_attribute('bar') +# e.attributes.size # => 1 +# e['bar'] # => nil +# +# == What's Here +# +# To begin with, what's elsewhere? +# +# \Class \REXML::Element inherits from its ancestor classes: +# +# - REXML::Child +# - REXML::Parent +# +# \REXML::Element itself and its ancestors also include modules: +# +# - {Enumerable}[https://docs.ruby-lang.org/en/master/Enumerable.html] +# - REXML::Namespace +# - REXML::Node +# - REXML::XMLTokens +# +# === Methods for Creating an \Element +# +# ::new:: Returns a new empty element. +# #clone:: Returns a clone of another element. +# +# === Methods for Attributes +# +# {[attribute_name]}[#method-i-5B-5D]:: Returns an attribute value. +# #add_attribute:: Adds a new attribute. +# #add_attributes:: Adds multiple new attributes. +# #attribute:: Returns the attribute value for a given name and optional namespace. +# #delete_attribute:: Removes an attribute. +# +# === Methods for Children +# +# {[index]}[#method-i-5B-5D]:: Returns the child at the given offset. +# #add_element:: Adds an element as the last child. +# #delete_element:: Deletes a child element. +# #each_element:: Calls the given block with each child element. +# #each_element_with_attribute:: Calls the given block with each child element +# that meets given criteria, +# which can include the attribute name. +# #each_element_with_text:: Calls the given block with each child element +# that meets given criteria, +# which can include text. +# #get_elements:: Returns an array of element children that match a given xpath. +# +# === Methods for \Text Children +# +# #add_text:: Adds a text node to the element. +# #get_text:: Returns a text node that meets specified criteria. +# #text:: Returns the text string from the first node that meets specified criteria. +# #texts:: Returns an array of the text children of the element. +# #text=:: Adds, removes, or replaces the first text child of the element +# +# === Methods for Other Children +# +# #cdatas:: Returns an array of the cdata children of the element. +# #comments:: Returns an array of the comment children of the element. +# #instructions:: Returns an array of the instruction children of the element. +# +# === Methods for Namespaces +# +# #add_namespace:: Adds a namespace to the element. +# #delete_namespace:: Removes a namespace from the element. +# #namespace:: Returns the string namespace URI for the element. +# #namespaces:: Returns a hash of all defined namespaces in the element. +# #prefixes:: Returns an array of the string prefixes (names) +# of all defined namespaces in the element +# +# === Methods for Querying +# +# #document:: Returns the document, if any, that the element belongs to. +# #root:: Returns the most distant element (not document) ancestor of the element. +# #root_node:: Returns the most distant ancestor of the element. +# #xpath:: Returns the string xpath to the element +# relative to the most distant parent +# #has_attributes?:: Returns whether the element has attributes. +# #has_elements?:: Returns whether the element has elements. +# #has_text?:: Returns whether the element has text. +# #next_element:: Returns the next sibling that is an element. +# #previous_element:: Returns the previous sibling that is an element. +# #raw:: Returns whether raw mode is set for the element. +# #whitespace:: Returns whether whitespace is respected for the element. +# #ignore_whitespace_nodes:: Returns whether whitespace nodes +# are to be ignored for the element. +# #node_type:: Returns symbol :element. +# +# === One More Method +# +# #inspect:: Returns a string representation of the element. +# +# === Accessors +# +# #elements:: Returns the REXML::Elements object for the element. +# #attributes:: Returns the REXML::Attributes object for the element. +# #context:: Returns or sets the context hash for the element. +# +# source://rexml//lib/rexml/element.rb#271 +class REXML::Element < ::REXML::Parent + include ::REXML::XMLTokens + include ::REXML::Namespace + + # :call-seq: + # Element.new(name = 'UNDEFINED', parent = nil, context = nil) -> new_element + # Element.new(element, parent = nil, context = nil) -> new_element + # + # Returns a new \REXML::Element object. + # + # When no arguments are given, + # returns an element with name 'UNDEFINED': + # + # e = REXML::Element.new # => + # e.class # => REXML::Element + # e.name # => "UNDEFINED" + # + # When only argument +name+ is given, + # returns an element of the given name: + # + # REXML::Element.new('foo') # => + # + # When only argument +element+ is given, it must be an \REXML::Element object; + # returns a shallow copy of the given element: + # + # e0 = REXML::Element.new('foo') + # e1 = REXML::Element.new(e0) # => + # + # When argument +parent+ is also given, it must be an REXML::Parent object: + # + # e = REXML::Element.new('foo', REXML::Parent.new) + # e.parent # => #]> + # + # When argument +context+ is also given, it must be a hash + # representing the context for the element; + # see {Element Context}[../doc/rexml/context_rdoc.html]: + # + # e = REXML::Element.new('foo', nil, {raw: :all}) + # e.context # => {:raw=>:all} + # + # @return [Element] a new instance of Element + # + # source://rexml//lib/rexml/element.rb#319 + def initialize(arg = T.unsafe(nil), parent = T.unsafe(nil), context = T.unsafe(nil)); end + + # :call-seq: + # [index] -> object + # [attr_name] -> attr_value + # [attr_sym] -> attr_value + # + # With integer argument +index+ given, + # returns the child at offset +index+, or +nil+ if none: + # + # d = REXML::Document.new '>textmore' + # root = d.root + # (0..root.size).each do |index| + # node = root[index] + # p "#{index}: #{node} (#{node.class})" + # end + # + # Output: + # + # "0: (REXML::Element)" + # "1: text (REXML::Text)" + # "2: (REXML::Element)" + # "3: more (REXML::Text)" + # "4: (REXML::Element)" + # "5: (NilClass)" + # + # With string argument +attr_name+ given, + # returns the string value for the given attribute name if it exists, + # otherwise +nil+: + # + # d = REXML::Document.new('') + # root = d.root + # root['attr'] # => "value" + # root['nosuch'] # => nil + # + # With symbol argument +attr_sym+ given, + # returns [attr_sym.to_s]: + # + # root[:attr] # => "value" + # root[:nosuch] # => nil + # + # source://rexml//lib/rexml/element.rb#1246 + def [](name_or_index); end + + # :call-seq: + # add_attribute(name, value) -> value + # add_attribute(attribute) -> attribute + # + # Adds an attribute to this element, overwriting any existing attribute + # by the same name. + # + # With string argument +name+ and object +value+ are given, + # adds the attribute created with that name and value: + # + # e = REXML::Element.new + # e.add_attribute('attr', 'value') # => "value" + # e['attr'] # => "value" + # e.add_attribute('attr', 'VALUE') # => "VALUE" + # e['attr'] # => "VALUE" + # + # With only attribute object +attribute+ given, + # adds the given attribute: + # + # a = REXML::Attribute.new('attr', 'value') + # e.add_attribute(a) # => attr='value' + # e['attr'] # => "value" + # a = REXML::Attribute.new('attr', 'VALUE') + # e.add_attribute(a) # => attr='VALUE' + # e['attr'] # => "VALUE" + # + # source://rexml//lib/rexml/element.rb#1345 + def add_attribute(key, value = T.unsafe(nil)); end + + # :call-seq: + # add_attributes(hash) -> hash + # add_attributes(array) + # + # Adds zero or more attributes to the element; + # returns the argument. + # + # If hash argument +hash+ is given, + # each key must be a string; + # adds each attribute created with the key/value pair: + # + # e = REXML::Element.new + # h = {'foo' => 'bar', 'baz' => 'bat'} + # e.add_attributes(h) + # + # If argument +array+ is given, + # each array member must be a 2-element array [name, value]; + # each name must be a string: + # + # e = REXML::Element.new + # a = [['foo' => 'bar'], ['baz' => 'bat']] + # e.add_attributes(a) + # + # source://rexml//lib/rexml/element.rb#1376 + def add_attributes(hash); end + + # :call-seq: + # add_element(name, attributes = nil) -> new_element + # add_element(element, attributes = nil) -> element + # + # Adds a child element, optionally setting attributes + # on the added element; returns the added element. + # + # With string argument +name+, creates a new element with that name + # and adds the new element as a child: + # + # e0 = REXML::Element.new('foo') + # e0.add_element('bar') + # e0[0] # => + # + # + # With argument +name+ and hash argument +attributes+, + # sets attributes on the new element: + # + # e0.add_element('baz', {'bat' => '0', 'bam' => '1'}) + # e0[1] # => + # + # With element argument +element+, adds that element as a child: + # + # e0 = REXML::Element.new('foo') + # e1 = REXML::Element.new('bar') + # e0.add_element(e1) + # e0[0] # => + # + # With argument +element+ and hash argument +attributes+, + # sets attributes on the added element: + # + # e0.add_element(e1, {'bat' => '0', 'bam' => '1'}) + # e0[1] # => + # + # source://rexml//lib/rexml/element.rb#732 + def add_element(element, attrs = T.unsafe(nil)); end + + # :call-seq: + # add_namespace(prefix, uri = nil) -> self + # + # Adds a namespace to the element; returns +self+. + # + # With the single argument +prefix+, + # adds a namespace using the given +prefix+ and the namespace URI: + # + # e = REXML::Element.new('foo') + # e.add_namespace('bar') + # e.namespaces # => {"xmlns"=>"bar"} + # + # With both arguments +prefix+ and +uri+ given, + # adds a namespace using both arguments: + # + # e.add_namespace('baz', 'bat') + # e.namespaces # => {"xmlns"=>"bar", "baz"=>"bat"} + # + # source://rexml//lib/rexml/element.rb#655 + def add_namespace(prefix, uri = T.unsafe(nil)); end + + # :call-seq: + # add_text(string) -> nil + # add_text(text_node) -> self + # + # Adds text to the element. + # + # When string argument +string+ is given, returns +nil+. + # + # If the element has no child text node, + # creates a \REXML::Text object using the string, + # honoring the current settings for whitespace and raw, + # then adds that node to the element: + # + # d = REXML::Document.new('') + # a = d.root + # a.add_text('foo') + # a.to_a # => [, "foo"] + # + # If the element has child text nodes, + # appends the string to the _last_ text node: + # + # d = REXML::Document.new('foobar') + # a = d.root + # a.add_text('baz') + # a.to_a # => ["foo", , "barbaz"] + # a.add_text('baz') + # a.to_a # => ["foo", , "barbazbaz"] + # + # When text node argument +text_node+ is given, + # appends the node as the last text node in the element; + # returns +self+: + # + # d = REXML::Document.new('foobar') + # a = d.root + # a.add_text(REXML::Text.new('baz')) + # a.to_a # => ["foo", , "bar", "baz"] + # a.add_text(REXML::Text.new('baz')) + # a.to_a # => ["foo", , "bar", "baz", "baz"] + # + # source://rexml//lib/rexml/element.rb#1147 + def add_text(text); end + + # :call-seq: + # attribute(name, namespace = nil) + # + # Returns the string value for the given attribute name. + # + # With only argument +name+ given, + # returns the value of the named attribute if it exists, otherwise +nil+: + # + # xml_string = <<-EOT + # + # + # + # + # + # EOT + # d = REXML::Document.new(xml_string) + # root = d.root + # a = root[1] # => + # a.attribute('attr') # => attr='value' + # a.attribute('nope') # => nil + # + # With arguments +name+ and +namespace+ given, + # returns the value of the named attribute if it exists, otherwise +nil+: + # + # xml_string = "" + # document = REXML::Document.new(xml_string) + # document.root.attribute("x") # => x='x' + # document.root.attribute("x", "a") # => a:x='a:x' + # + # source://rexml//lib/rexml/element.rb#1287 + def attribute(name, namespace = T.unsafe(nil)); end + + # Mechanisms for accessing attributes and child elements of this + # element. + # + # source://rexml//lib/rexml/element.rb#278 + def attributes; end + + # :call-seq: + # cdatas -> array_of_cdata_children + # + # Returns a frozen array of the REXML::CData children of the element: + # + # xml_string = <<-EOT + # + # + # + # + # EOT + # d = REXML::Document.new(xml_string) + # cds = d.root.cdatas # => ["foo", "bar"] + # cds.frozen? # => true + # cds.map {|cd| cd.class } # => [REXML::CData, REXML::CData] + # + # source://rexml//lib/rexml/element.rb#1420 + def cdatas; end + + # :call-seq: + # clone -> new_element + # + # Returns a shallow copy of the element, containing the name and attributes, + # but not the parent or children: + # + # e = REXML::Element.new('foo') + # e.add_attributes({'bar' => 0, 'baz' => 1}) + # e.clone # => + # + # source://rexml//lib/rexml/element.rb#383 + def clone; end + + # :call-seq: + # comments -> array_of_comment_children + # + # Returns a frozen array of the REXML::Comment children of the element: + # + # xml_string = <<-EOT + # + # + # + # + # EOT + # d = REXML::Document.new(xml_string) + # cs = d.root.comments + # cs.frozen? # => true + # cs.map {|c| c.class } # => [REXML::Comment, REXML::Comment] + # cs.map {|c| c.to_s } # => ["foo", "bar"] + # + # source://rexml//lib/rexml/element.rb#1441 + def comments; end + + # The context holds information about the processing environment, such as + # whitespace handling. + # + # source://rexml//lib/rexml/element.rb#281 + def context; end + + # The context holds information about the processing environment, such as + # whitespace handling. + # + # source://rexml//lib/rexml/element.rb#281 + def context=(_arg0); end + + # :call-seq: + # delete_attribute(name) -> removed_attribute or nil + # + # Removes a named attribute if it exists; + # returns the removed attribute if found, otherwise +nil+: + # + # e = REXML::Element.new('foo') + # e.add_attribute('bar', 'baz') + # e.delete_attribute('bar') # => + # e.delete_attribute('bar') # => nil + # + # source://rexml//lib/rexml/element.rb#1395 + def delete_attribute(key); end + + # :call-seq: + # delete_element(index) -> removed_element or nil + # delete_element(element) -> removed_element or nil + # delete_element(xpath) -> removed_element or nil + # + # Deletes a child element. + # + # When 1-based integer argument +index+ is given, + # removes and returns the child element at that offset if it exists; + # indexing does not include text nodes; + # returns +nil+ if the element does not exist: + # + # d = REXML::Document.new 'text' + # a = d.root # => ... + # a.delete_element(1) # => + # a.delete_element(1) # => + # a.delete_element(1) # => nil + # + # When element argument +element+ is given, + # removes and returns that child element if it exists, + # otherwise returns +nil+: + # + # d = REXML::Document.new 'text' + # a = d.root # => ... + # c = a[2] # => + # a.delete_element(c) # => + # a.delete_element(c) # => nil + # + # When xpath argument +xpath+ is given, + # removes and returns the element at xpath if it exists, + # otherwise returns +nil+: + # + # d = REXML::Document.new 'text' + # a = d.root # => ... + # a.delete_element('//c') # => + # a.delete_element('//c') # => nil + # + # source://rexml//lib/rexml/element.rb#778 + def delete_element(element); end + + # :call-seq: + # delete_namespace(namespace = 'xmlns') -> self + # + # Removes a namespace from the element. + # + # With no argument, removes the default namespace: + # + # d = REXML::Document.new "" + # d.to_s # => "" + # d.root.delete_namespace # => + # d.to_s # => "" + # + # With argument +namespace+, removes the specified namespace: + # + # d.root.delete_namespace('foo') + # d.to_s # => "" + # + # Does nothing if no such namespace is found: + # + # d.root.delete_namespace('nosuch') + # d.to_s # => "" + # + # source://rexml//lib/rexml/element.rb#687 + def delete_namespace(namespace = T.unsafe(nil)); end + + # :call-seq: + # document -> document or nil + # + # If the element is part of a document, returns that document: + # + # d = REXML::Document.new('') + # top_element = d.first + # child = top_element.first + # top_element.document == d # => true + # child.document == d # => true + # + # If the element is not part of a document, returns +nil+: + # + # REXML::Element.new.document # => nil + # + # For a document, returns +self+: + # + # d.document == d # => true + # + # Related: #root, #root_node. + # + # source://rexml//lib/rexml/element.rb#475 + def document; end + + # :call-seq: + # each_element {|e| ... } + # + # Calls the given block with each child element: + # + # d = REXML::Document.new 'bbd' + # a = d.root + # a.each_element {|e| p e } + # + # Output: + # + # ... + # ... + # ... + # + # + # source://rexml//lib/rexml/element.rb#930 + def each_element(xpath = T.unsafe(nil), &block); end + + # :call-seq: + # each_element_with_attribute(attr_name, value = nil, max = 0, xpath = nil) {|e| ... } + # + # Calls the given block with each child element that meets given criteria. + # + # When only string argument +attr_name+ is given, + # calls the block with each child element that has that attribute: + # + # d = REXML::Document.new '' + # a = d.root + # a.each_element_with_attribute('id') {|e| p e } + # + # Output: + # + # + # + # + # + # With argument +attr_name+ and string argument +value+ given, + # calls the block with each child element that has that attribute + # with that value: + # + # a.each_element_with_attribute('id', '1') {|e| p e } + # + # Output: + # + # + # + # + # With arguments +attr_name+, +value+, and integer argument +max+ given, + # calls the block with at most +max+ child elements: + # + # a.each_element_with_attribute('id', '1', 1) {|e| p e } + # + # Output: + # + # + # + # With all arguments given, including +xpath+, + # calls the block with only those child elements + # that meet the first three criteria, + # and also match the given +xpath+: + # + # a.each_element_with_attribute('id', '1', 2, '//d') {|e| p e } + # + # Output: + # + # + # + # source://rexml//lib/rexml/element.rb#847 + def each_element_with_attribute(key, value = T.unsafe(nil), max = T.unsafe(nil), name = T.unsafe(nil), &block); end + + # :call-seq: + # each_element_with_text(text = nil, max = 0, xpath = nil) {|e| ... } + # + # Calls the given block with each child element that meets given criteria. + # + # With no arguments, calls the block with each child element that has text: + # + # d = REXML::Document.new 'bbd' + # a = d.root + # a.each_element_with_text {|e| p e } + # + # Output: + # + # ... + # ... + # ... + # + # With the single string argument +text+, + # calls the block with each element that has exactly that text: + # + # a.each_element_with_text('b') {|e| p e } + # + # Output: + # + # ... + # ... + # + # With argument +text+ and integer argument +max+, + # calls the block with at most +max+ elements: + # + # a.each_element_with_text('b', 1) {|e| p e } + # + # Output: + # + # ... + # + # With all arguments given, including +xpath+, + # calls the block with only those child elements + # that meet the first two criteria, + # and also match the given +xpath+: + # + # a.each_element_with_text('b', 2, '//c') {|e| p e } + # + # Output: + # + # ... + # + # source://rexml//lib/rexml/element.rb#904 + def each_element_with_text(text = T.unsafe(nil), max = T.unsafe(nil), name = T.unsafe(nil), &block); end + + # Mechanisms for accessing attributes and child elements of this + # element. + # + # source://rexml//lib/rexml/element.rb#278 + def elements; end + + # :call-seq: + # get_elements(xpath) + # + # Returns an array of the elements that match the given +xpath+: + # + # xml_string = <<-EOT + # + # + # + # + # + # EOT + # d = REXML::Document.new(xml_string) + # d.root.get_elements('//a') # => [ ... , ] + # + # source://rexml//lib/rexml/element.rb#949 + def get_elements(xpath); end + + # :call-seq: + # get_text(xpath = nil) -> text_node or nil + # + # Returns the first text node child in a specified element, if it exists, + # +nil+ otherwise. + # + # With no argument, returns the first text node from +self+: + # + # d = REXML::Document.new "

some text this is bold! more text

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

some text this is bold! more text

" + # d.root.text.class # => String + # d.root.text # => "some text " + # + # With argument +xpath+, returns text from the first text node + # in the element that matches +xpath+: + # + # d.root.text(1) # => "this is bold!" + # + # Note that an element may have multiple text nodes, + # possibly separated by other non-text children, as above. + # Even so, the returned value is the string text from the first such node. + # + # Note also that the text note is retrieved by method get_text, + # and so is always normalized text. + # + # source://rexml//lib/rexml/element.rb#1030 + def text(path = T.unsafe(nil)); end + + # :call-seq: + # text = string -> string + # text = nil -> nil + # + # Adds, replaces, or removes the first text node child in the element. + # + # With string argument +string+, + # creates a new \REXML::Text node containing that string, + # honoring the current settings for whitespace and row, + # then places the node as the first text child in the element; + # returns +string+. + # + # If the element has no text child, the text node is added: + # + # d = REXML::Document.new '
' + # d.root.text = 'foo' #-> 'foo' + # + # If the element has a text child, it is replaced: + # + # d.root.text = 'bar' #-> 'bar' + # + # With argument +nil+, removes the first text child: + # + # d.root.text = nil #-> '' + # + # source://rexml//lib/rexml/element.rb#1089 + def text=(text); end + + # :call-seq: + # texts -> array_of_text_children + # + # Returns a frozen array of the REXML::Text children of the element: + # + # xml_string = 'textmore' + # d = REXML::Document.new(xml_string) + # ts = d.root.texts + # ts.frozen? # => true + # ts.map {|t| t.class } # => [REXML::Text, REXML::Text] + # ts.map {|t| t.to_s } # => ["text", "more"] + # + # source://rexml//lib/rexml/element.rb#1478 + def texts; end + + # :call-seq: + # whitespace + # + # Returns +true+ if whitespace is respected for this element, + # +false+ otherwise. + # + # See {Element Context}[../doc/rexml/context_rdoc.html]. + # + # The evaluation is tested against the element's +expanded_name+, + # and so is namespace-sensitive. + # + # source://rexml//lib/rexml/element.rb#490 + def whitespace; end + + # == DEPRECATED + # See REXML::Formatters + # + # Writes out this element, and recursively, all children. + # output:: + # output an object which supports '<< string'; this is where the + # document will be written. + # indent:: + # An integer. If -1, no indenting will be used; otherwise, the + # indentation will be this number of spaces, and children will be + # indented an additional amount. Defaults to -1 + # transitive:: + # If transitive is true and indent is >= 0, then the output will be + # pretty-printed in such a way that the added whitespace does not affect + # the parse tree of the document + # ie_hack:: + # This hack inserts a space before the /> on empty tags to address + # a limitation of Internet Explorer. Defaults to false + # + # out = '' + # doc.write( out ) #-> doc is written to the string 'out' + # doc.write( $stdout ) #-> doc written to the console + # + # source://rexml//lib/rexml/element.rb#1504 + def write(output = T.unsafe(nil), indent = T.unsafe(nil), transitive = T.unsafe(nil), ie_hack = T.unsafe(nil)); end + + # :call-seq: + # xpath -> string_xpath + # + # Returns the string xpath to the element + # relative to the most distant parent: + # + # d = REXML::Document.new('') + # a = d.root # => ... + # b = a[0] # => ... + # c = b[0] # => + # d.xpath # => "" + # a.xpath # => "/a" + # b.xpath # => "/a/b" + # c.xpath # => "/a/b/c" + # + # If there is no parent, returns the expanded name of the element: + # + # e = REXML::Element.new('foo') + # e.xpath # => "foo" + # + # source://rexml//lib/rexml/element.rb#1192 + def xpath; end + + private + + # source://rexml//lib/rexml/element.rb#1521 + def __to_xpath_helper(node); end + + # A private helper method + # + # source://rexml//lib/rexml/element.rb#1536 + def each_with_something(test, max = T.unsafe(nil), name = T.unsafe(nil)); end +end + +# source://rexml//lib/rexml/doctype.rb#261 +class REXML::ElementDecl < ::REXML::Declaration + # @return [ElementDecl] a new instance of ElementDecl + # + # source://rexml//lib/rexml/doctype.rb#262 + def initialize(src); end +end + +# A class which provides filtering of children for Elements, and +# XPath search support. You are expected to only encounter this class as +# the element.elements object. Therefore, you are +# _not_ expected to instantiate this yourself. +# +# xml_string = <<-EOT +# +# +# +# Everyday Italian +# Giada De Laurentiis +# 2005 +# 30.00 +# +# +# Harry Potter +# J K. Rowling +# 2005 +# 29.99 +# +# +# XQuery Kick Start +# James McGovern +# Per Bothner +# Kurt Cagle +# James Linn +# Vaidyanathan Nagarajan +# 2003 +# 49.99 +# +# +# Learning XML +# Erik T. Ray +# 2003 +# 39.95 +# +# +# EOT +# d = REXML::Document.new(xml_string) +# elements = d.root.elements +# elements # => # ... > +# +# source://rexml//lib/rexml/element.rb#1591 +class REXML::Elements + include ::Enumerable + + # :call-seq: + # new(parent) -> new_elements_object + # + # Returns a new \Elements object with the given +parent+. + # Does _not_ assign parent.elements = self: + # + # d = REXML::Document.new(xml_string) + # eles = REXML::Elements.new(d.root) + # eles # => # ... > + # eles == d.root.elements # => false + # + # @return [Elements] a new instance of Elements + # + # source://rexml//lib/rexml/element.rb#1604 + def initialize(parent); end + + # :call-seq: + # add -> new_element + # add(name) -> new_element + # add(element) -> element + # + # Adds an element; returns the element added. + # + # With no argument, creates and adds a new element. + # The new element has: + # + # - No name. + # - \Parent from the \Elements object. + # - Context from the that parent. + # + # Example: + # + # d = REXML::Document.new(xml_string) + # elements = d.root.elements + # parent = elements.parent # => ... + # parent.context = {raw: :all} + # elements.size # => 4 + # new_element = elements.add # => + # elements.size # => 5 + # new_element.name # => nil + # new_element.parent # => ... + # new_element.context # => {:raw=>:all} + # + # With string argument +name+, creates and adds a new element. + # The new element has: + # + # - Name +name+. + # - \Parent from the \Elements object. + # - Context from the that parent. + # + # Example: + # + # d = REXML::Document.new(xml_string) + # elements = d.root.elements + # parent = elements.parent # => ... + # parent.context = {raw: :all} + # elements.size # => 4 + # new_element = elements.add('foo') # => + # elements.size # => 5 + # new_element.name # => "foo" + # new_element.parent # => ... + # new_element.context # => {:raw=>:all} + # + # With argument +element+, + # creates and adds a clone of the given +element+. + # The new element has name, parent, and context from the given +element+. + # + # d = REXML::Document.new(xml_string) + # elements = d.root.elements + # elements.size # => 4 + # e0 = REXML::Element.new('foo') + # e1 = REXML::Element.new('bar', e0, {raw: :all}) + # element = elements.add(e1) # => + # elements.size # => 5 + # element.name # => "bar" + # element.parent # => ... + # element.context # => {:raw=>:all} + # + # source://rexml//lib/rexml/element.rb#1921 + def <<(element = T.unsafe(nil)); end + + # :call-seq: + # elements[index] -> element or nil + # elements[xpath] -> element or nil + # elements[n, name] -> element or nil + # + # Returns the first \Element object selected by the arguments, + # if any found, or +nil+ if none found. + # + # Notes: + # - The +index+ is 1-based, not 0-based, so that: + # - The first element has index 1 + # - The _nth_ element has index +n+. + # - The selection ignores non-\Element nodes. + # + # When the single argument +index+ is given, + # returns the element given by the index, if any; otherwise, +nil+: + # + # d = REXML::Document.new(xml_string) + # eles = d.root.elements + # eles # => # ... > + # eles[1] # => ... + # eles.size # => 4 + # eles[4] # => ... + # eles[5] # => nil + # + # The node at this index is not an \Element, and so is not returned: + # + # eles = d.root.first.first # => ... </> + # eles.to_a # => ["Everyday Italian"] + # eles[1] # => nil + # + # When the single argument +xpath+ is given, + # returns the first element found via that +xpath+, if any; otherwise, +nil+: + # + # eles = d.root.elements # => #<REXML::Elements @element=<bookstore> ... </>> + # eles['/bookstore'] # => <bookstore> ... </> + # eles['//book'] # => <book category='cooking'> ... </> + # eles['//book [@category="children"]'] # => <book category='children'> ... </> + # eles['/nosuch'] # => nil + # eles['//nosuch'] # => nil + # eles['//book [@category="nosuch"]'] # => nil + # eles['.'] # => <bookstore> ... </> + # eles['..'].class # => REXML::Document + # + # With arguments +n+ and +name+ given, + # returns the _nth_ found element that has the given +name+, + # or +nil+ if there is no such _nth_ element: + # + # eles = d.root.elements # => #<REXML::Elements @element=<bookstore> ... </>> + # eles[1, 'book'] # => <book category='cooking'> ... </> + # eles[4, 'book'] # => <book category='web' cover='paperback'> ... </> + # eles[5, 'book'] # => nil + # + # source://rexml//lib/rexml/element.rb#1676 + def [](index, name = T.unsafe(nil)); end + + # :call-seq: + # elements[] = index, replacement_element -> replacement_element or nil + # + # Replaces or adds an element. + # + # When <tt>eles[index]</tt> exists, replaces it with +replacement_element+ + # and returns +replacement_element+: + # + # d = REXML::Document.new(xml_string) + # eles = d.root.elements # => #<REXML::Elements @element=<bookstore> ... </>> + # eles[1] # => <book category='cooking'> ... </> + # eles[1] = REXML::Element.new('foo') + # eles[1] # => <foo/> + # + # Does nothing (or raises an exception) + # if +replacement_element+ is not an \Element: + # eles[2] # => <book category='web' cover='paperback'> ... </> + # eles[2] = REXML::Text.new('bar') + # eles[2] # => <book category='web' cover='paperback'> ... </> + # + # When <tt>eles[index]</tt> does not exist, + # adds +replacement_element+ to the element and returns + # + # d = REXML::Document.new(xml_string) + # eles = d.root.elements # => #<REXML::Elements @element=<bookstore> ... </>> + # eles.size # => 4 + # eles[50] = REXML::Element.new('foo') # => <foo/> + # eles.size # => 5 + # eles[5] # => <foo/> + # + # Does nothing (or raises an exception) + # if +replacement_element+ is not an \Element: + # + # eles[50] = REXML::Text.new('bar') # => "bar" + # eles.size # => 5 + # + # source://rexml//lib/rexml/element.rb#1731 + def []=(index, element); end + + # :call-seq: + # add -> new_element + # add(name) -> new_element + # add(element) -> element + # + # Adds an element; returns the element added. + # + # With no argument, creates and adds a new element. + # The new element has: + # + # - No name. + # - \Parent from the \Elements object. + # - Context from the that parent. + # + # Example: + # + # d = REXML::Document.new(xml_string) + # elements = d.root.elements + # parent = elements.parent # => <bookstore> ... </> + # parent.context = {raw: :all} + # elements.size # => 4 + # new_element = elements.add # => </> + # elements.size # => 5 + # new_element.name # => nil + # new_element.parent # => <bookstore> ... </> + # new_element.context # => {:raw=>:all} + # + # With string argument +name+, creates and adds a new element. + # The new element has: + # + # - Name +name+. + # - \Parent from the \Elements object. + # - Context from the that parent. + # + # Example: + # + # d = REXML::Document.new(xml_string) + # elements = d.root.elements + # parent = elements.parent # => <bookstore> ... </> + # parent.context = {raw: :all} + # elements.size # => 4 + # new_element = elements.add('foo') # => <foo/> + # elements.size # => 5 + # new_element.name # => "foo" + # new_element.parent # => <bookstore> ... </> + # new_element.context # => {:raw=>:all} + # + # With argument +element+, + # creates and adds a clone of the given +element+. + # The new element has name, parent, and context from the given +element+. + # + # d = REXML::Document.new(xml_string) + # elements = d.root.elements + # elements.size # => 4 + # e0 = REXML::Element.new('foo') + # e1 = REXML::Element.new('bar', e0, {raw: :all}) + # element = elements.add(e1) # => <bar/> + # elements.size # => 5 + # element.name # => "bar" + # element.parent # => <bookstore> ... </> + # element.context # => {:raw=>:all} + # + # source://rexml//lib/rexml/element.rb#1921 + def add(element = T.unsafe(nil)); end + + # :call-seq: + # collect(xpath = nil) {|element| ... } -> array + # + # Iterates over the elements; returns the array of block return values. + # + # With no argument, iterates over all elements: + # + # d = REXML::Document.new(xml_string) + # elements = d.root.elements + # elements.collect {|element| element.size } # => [9, 9, 17, 9] + # + # With argument +xpath+, iterates over elements that match + # the given +xpath+: + # + # xpath = '//book [@category="web"]' + # elements.collect(xpath) {|element| element.size } # => [17, 9] + # + # source://rexml//lib/rexml/element.rb#1984 + def collect(xpath = T.unsafe(nil)); end + + # :call-seq: + # delete(index) -> removed_element or nil + # delete(element) -> removed_element or nil + # delete(xpath) -> removed_element or nil + # + # Removes an element; returns the removed element, or +nil+ if none removed. + # + # With integer argument +index+ given, + # removes the child element at that offset: + # + # d = REXML::Document.new(xml_string) + # elements = d.root.elements + # elements.size # => 4 + # elements[2] # => <book category='children'> ... </> + # elements.delete(2) # => <book category='children'> ... </> + # elements.size # => 3 + # elements[2] # => <book category='web'> ... </> + # elements.delete(50) # => nil + # + # With element argument +element+ given, + # removes that child element: + # + # d = REXML::Document.new(xml_string) + # elements = d.root.elements + # ele_1, ele_2, ele_3, ele_4 = *elements + # elements.size # => 4 + # elements[2] # => <book category='children'> ... </> + # elements.delete(ele_2) # => <book category='children'> ... </> + # elements.size # => 3 + # elements[2] # => <book category='web'> ... </> + # elements.delete(ele_2) # => nil + # + # With string argument +xpath+ given, + # removes the first element found via that xpath: + # + # d = REXML::Document.new(xml_string) + # elements = d.root.elements + # elements.delete('//book') # => <book category='cooking'> ... </> + # elements.delete('//book [@category="children"]') # => <book category='children'> ... </> + # elements.delete('//nosuch') # => nil + # + # source://rexml//lib/rexml/element.rb#1821 + def delete(element); end + + # :call-seq: + # delete_all(xpath) + # + # Removes all elements found via the given +xpath+; + # returns the array of removed elements, if any, else +nil+. + # + # d = REXML::Document.new(xml_string) + # elements = d.root.elements + # elements.size # => 4 + # deleted_elements = elements.delete_all('//book [@category="web"]') + # deleted_elements.size # => 2 + # elements.size # => 2 + # deleted_elements = elements.delete_all('//book') + # deleted_elements.size # => 2 + # elements.size # => 0 + # elements.delete_all('//book') # => [] + # + # source://rexml//lib/rexml/element.rb#1847 + def delete_all(xpath); end + + # :call-seq: + # each(xpath = nil) {|element| ... } -> self + # + # Iterates over the elements. + # + # With no argument, calls the block with each element: + # + # d = REXML::Document.new(xml_string) + # elements = d.root.elements + # elements.each {|element| p element } + # + # Output: + # + # <book category='cooking'> ... </> + # <book category='children'> ... </> + # <book category='web'> ... </> + # <book category='web' cover='paperback'> ... </> + # + # With argument +xpath+, calls the block with each element + # that matches the given +xpath+: + # + # elements.each('//book [@category="web"]') {|element| p element } + # + # Output: + # + # <book category='web'> ... </> + # <book category='web' cover='paperback'> ... </> + # + # source://rexml//lib/rexml/element.rb#1963 + def each(xpath = T.unsafe(nil)); end + + # :call-seq: + # empty? -> true or false + # + # Returns +true+ if there are no children, +false+ otherwise. + # + # d = REXML::Document.new('') + # d.elements.empty? # => true + # d = REXML::Document.new(xml_string) + # d.elements.empty? # => false + # + # @return [Boolean] + # + # source://rexml//lib/rexml/element.rb#1751 + def empty?; end + + # :call-seq: + # index(element) + # + # Returns the 1-based index of the given +element+, if found; + # otherwise, returns -1: + # + # d = REXML::Document.new(xml_string) + # elements = d.root.elements + # ele_1, ele_2, ele_3, ele_4 = *elements + # elements.index(ele_4) # => 4 + # elements.delete(ele_3) + # elements.index(ele_4) # => 3 + # elements.index(ele_3) # => -1 + # + # source://rexml//lib/rexml/element.rb#1769 + def index(element); end + + # :call-seq: + # inject(xpath = nil, initial = nil) -> object + # + # Calls the block with elements; returns the last block return value. + # + # With no argument, iterates over the elements, calling the block + # <tt>elements.size - 1</tt> times. + # + # - The first call passes the first and second elements. + # - The second call passes the first block return value and the third element. + # - The third call passes the second block return value and the fourth element. + # - And so on. + # + # In this example, the block returns the passed element, + # which is then the object argument to the next call: + # + # d = REXML::Document.new(xml_string) + # elements = d.root.elements + # elements.inject do |object, element| + # p [elements.index(object), elements.index(element)] + # element + # end + # + # Output: + # + # [1, 2] + # [2, 3] + # [3, 4] + # + # With the single argument +xpath+, calls the block only with + # elements matching that xpath: + # + # elements.inject('//book [@category="web"]') do |object, element| + # p [elements.index(object), elements.index(element)] + # element + # end + # + # Output: + # + # [3, 4] + # + # With argument +xpath+ given as +nil+ + # and argument +initial+ also given, + # calls the block once for each element. + # + # - The first call passes the +initial+ and the first element. + # - The second call passes the first block return value and the second element. + # - The third call passes the second block return value and the third element. + # - And so on. + # + # In this example, the first object index is <tt>-1</tt> + # + # elements.inject(nil, 'Initial') do |object, element| + # p [elements.index(object), elements.index(element)] + # element + # end + # + # Output: + # + # [-1, 1] + # [1, 2] + # [2, 3] + # [3, 4] + # + # In this form the passed object can be used as an accumulator: + # + # elements.inject(nil, 0) do |total, element| + # total += element.size + # end # => 44 + # + # With both arguments +xpath+ and +initial+ are given, + # calls the block only with elements matching that xpath: + # + # elements.inject('//book [@category="web"]', 0) do |total, element| + # total += element.size + # end # => 26 + # + # source://rexml//lib/rexml/element.rb#2069 + def inject(xpath = T.unsafe(nil), initial = T.unsafe(nil)); end + + # :call-seq: + # parent + # + # Returns the parent element cited in creating the \Elements object. + # This element is also the default starting point for searching + # in the \Elements object. + # + # d = REXML::Document.new(xml_string) + # elements = REXML::Elements.new(d.root) + # elements.parent == d.root # => true + # + # source://rexml//lib/rexml/element.rb#1619 + def parent; end + + # :call-seq: + # size -> integer + # + # Returns the count of \Element children: + # + # d = REXML::Document.new '<a>sean<b/>elliott<b/>russell<b/></a>' + # d.root.elements.size # => 3 # Three elements. + # d.root.size # => 6 # Three elements plus three text nodes.. + # + # source://rexml//lib/rexml/element.rb#2093 + def size; end + + # :call-seq: + # to_a(xpath = nil) -> array_of_elements + # + # Returns an array of element children (not including non-element children). + # + # With no argument, returns an array of all element children: + # + # d = REXML::Document.new '<a>sean<b/>elliott<c/></a>' + # elements = d.root.elements + # elements.to_a # => [<b/>, <c/>] # Omits non-element children. + # children = d.root.children + # children # => ["sean", <b/>, "elliott", <c/>] # Includes non-element children. + # + # With argument +xpath+, returns an array of element children + # that match the xpath: + # + # elements.to_a('//c') # => [<c/>] + # + # source://rexml//lib/rexml/element.rb#2117 + def to_a(xpath = T.unsafe(nil)); end + + private + + # Private helper class. Removes quotes from quoted strings + # + # source://rexml//lib/rexml/element.rb#2125 + def literalize(name); end +end + +# source://rexml//lib/rexml/encoding.rb#4 +module REXML::Encoding + # source://rexml//lib/rexml/encoding.rb#29 + def decode(string); end + + # source://rexml//lib/rexml/encoding.rb#25 + def encode(string); end + + # ID ---> Encoding name + # + # source://rexml//lib/rexml/encoding.rb#6 + def encoding; end + + # source://rexml//lib/rexml/encoding.rb#7 + def encoding=(encoding); end + + private + + # source://rexml//lib/rexml/encoding.rb#34 + def find_encoding(name); end +end + +# source://rexml//lib/rexml/entity.rb#7 +class REXML::Entity < ::REXML::Child + include ::REXML::XMLTokens + + # Create a new entity. Simple entities can be constructed by passing a + # name, value to the constructor; this creates a generic, plain entity + # reference. For anything more complicated, you have to pass a Source to + # the constructor with the entity definition, or use the accessor methods. + # +WARNING+: There is no validation of entity state except when the entity + # is read from a stream. If you start poking around with the accessors, + # you can easily create a non-conformant Entity. + # + # e = Entity.new( 'amp', '&' ) + # + # @return [Entity] a new instance of Entity + # + # source://rexml//lib/rexml/entity.rb#34 + def initialize(stream, value = T.unsafe(nil), parent = T.unsafe(nil), reference = T.unsafe(nil)); end + + # Returns the value of attribute external. + # + # source://rexml//lib/rexml/entity.rb#23 + def external; end + + # Returns the value of attribute name. + # + # source://rexml//lib/rexml/entity.rb#23 + def name; end + + # Returns the value of attribute ndata. + # + # source://rexml//lib/rexml/entity.rb#23 + def ndata; end + + # Returns the value of this entity unprocessed -- raw. This is the + # normalized value; that is, with all %ent; and &ent; entities intact + # + # source://rexml//lib/rexml/entity.rb#86 + def normalized; end + + # Returns the value of attribute pubid. + # + # source://rexml//lib/rexml/entity.rb#23 + def pubid; end + + # Returns the value of attribute ref. + # + # source://rexml//lib/rexml/entity.rb#23 + def ref; end + + # Returns this entity as a string. See write(). + # + # source://rexml//lib/rexml/entity.rb#120 + def to_s; end + + # Evaluates to the unnormalized value of this entity; that is, replacing + # &ent; entities. + # + # source://rexml//lib/rexml/entity.rb#73 + def unnormalized; end + + # Returns the value of attribute value. + # + # source://rexml//lib/rexml/entity.rb#23 + def value; end + + # Write out a fully formed, correct entity definition (assuming the Entity + # object itself is valid.) + # + # out:: + # An object implementing <TT><<</TT> to which the entity will be + # output + # indent:: + # *DEPRECATED* and ignored + # + # source://rexml//lib/rexml/entity.rb#98 + def write(out, indent = T.unsafe(nil)); end + + class << self + # Evaluates whether the given string matches an entity definition, + # returning true if so, and false otherwise. + # + # @return [Boolean] + # + # source://rexml//lib/rexml/entity.rb#67 + def matches?(string); end + end +end + +# source://rexml//lib/rexml/doctype.rb#267 +class REXML::ExternalEntity < ::REXML::Child + # @return [ExternalEntity] a new instance of ExternalEntity + # + # source://rexml//lib/rexml/doctype.rb#268 + def initialize(src); end + + # source://rexml//lib/rexml/doctype.rb#272 + def to_s; end + + # source://rexml//lib/rexml/doctype.rb#275 + def write(output, indent); end +end + +# source://rexml//lib/rexml/formatters/default.rb#5 +class REXML::Formatters::Default + # Prints out the XML document with no formatting -- except if ie_hack is + # set. + # + # ie_hack:: + # If set to true, then inserts whitespace before the close of an empty + # tag, so that IE's bad XML parser doesn't choke. + # + # @return [Default] a new instance of Default + # + # source://rexml//lib/rexml/formatters/default.rb#12 + def initialize(ie_hack = T.unsafe(nil)); end + + # Writes the node to some output. + # + # node:: + # The node to write + # output:: + # A class implementing <TT><<</TT>. Pass in an Output object to + # change the output encoding. + # + # source://rexml//lib/rexml/formatters/default.rb#23 + def write(node, output); end + + protected + + # source://rexml//lib/rexml/formatters/default.rb#98 + def write_cdata(node, output); end + + # source://rexml//lib/rexml/formatters/default.rb#92 + def write_comment(node, output); end + + # source://rexml//lib/rexml/formatters/default.rb#61 + def write_document(node, output); end + + # source://rexml//lib/rexml/formatters/default.rb#65 + def write_element(node, output); end + + # source://rexml//lib/rexml/formatters/default.rb#104 + def write_instruction(node, output); end + + # source://rexml//lib/rexml/formatters/default.rb#88 + def write_text(node, output); end +end + +# Pretty-prints an XML document. This destroys whitespace in text nodes +# and will insert carriage returns and indentations. +# +# TODO: Add an option to print attributes on new lines +# +# source://rexml//lib/rexml/formatters/pretty.rb#10 +class REXML::Formatters::Pretty < ::REXML::Formatters::Default + # Create a new pretty printer. + # + # output:: + # An object implementing '<<(String)', to which the output will be written. + # indentation:: + # An integer greater than 0. The indentation of each level will be + # this number of spaces. If this is < 1, the behavior of this object + # is undefined. Defaults to 2. + # ie_hack:: + # If true, the printer will insert whitespace before closing empty + # tags, thereby allowing Internet Explorer's XML parser to + # function. Defaults to false. + # + # @return [Pretty] a new instance of Pretty + # + # source://rexml//lib/rexml/formatters/pretty.rb#30 + def initialize(indentation = T.unsafe(nil), ie_hack = T.unsafe(nil)); end + + # If compact is set to true, then the formatter will attempt to use as + # little space as possible + # + # source://rexml//lib/rexml/formatters/pretty.rb#14 + def compact; end + + # If compact is set to true, then the formatter will attempt to use as + # little space as possible + # + # source://rexml//lib/rexml/formatters/pretty.rb#14 + def compact=(_arg0); end + + # The width of a page. Used for formatting text + # + # source://rexml//lib/rexml/formatters/pretty.rb#16 + def width; end + + # The width of a page. Used for formatting text + # + # source://rexml//lib/rexml/formatters/pretty.rb#16 + def width=(_arg0); end + + protected + + # source://rexml//lib/rexml/formatters/pretty.rb#102 + def write_cdata(node, output); end + + # source://rexml//lib/rexml/formatters/pretty.rb#97 + def write_comment(node, output); end + + # source://rexml//lib/rexml/formatters/pretty.rb#107 + def write_document(node, output); end + + # source://rexml//lib/rexml/formatters/pretty.rb#39 + def write_element(node, output); end + + # source://rexml//lib/rexml/formatters/pretty.rb#88 + def write_text(node, output); end + + private + + # source://rexml//lib/rexml/formatters/pretty.rb#124 + def indent_text(string, level = T.unsafe(nil), style = T.unsafe(nil), indentfirstline = T.unsafe(nil)); end + + # source://rexml//lib/rexml/formatters/pretty.rb#129 + def wrap(string, width); end +end + +# If you add a method, keep in mind two things: +# (1) the first argument will always be a list of nodes from which to +# filter. In the case of context methods (such as position), the function +# should return an array with a value for each child in the array. +# (2) all method calls from XML will have "-" replaced with "_". +# Therefore, in XML, "local-name()" is identical (and actually becomes) +# "local_name()" +# +# source://rexml//lib/rexml/functions.rb#10 +module REXML::Functions + class << self + # source://rexml//lib/rexml/functions.rb#317 + def boolean(object = T.unsafe(nil)); end + + # source://rexml//lib/rexml/functions.rb#417 + def ceiling(number); end + + # source://rexml//lib/rexml/functions.rb#370 + def compare_language(lang1, lang2); end + + # source://rexml//lib/rexml/functions.rb#190 + def concat(*objects); end + + # Fixed by Mike Stok + # + # source://rexml//lib/rexml/functions.rb#204 + def contains(string, test); end + + # source://rexml//lib/rexml/functions.rb#38 + def context=(value); end + + # Returns the size of the given list of nodes. + # + # source://rexml//lib/rexml/functions.rb#60 + def count(node_set); end + + # UNTESTED + # + # source://rexml//lib/rexml/functions.rb#347 + def false; end + + # source://rexml//lib/rexml/functions.rb#413 + def floor(number); end + + # Helper method. + # + # source://rexml//lib/rexml/functions.rb#87 + def get_namespace(node_set = T.unsafe(nil)); end + + # Since REXML is non-validating, this method is not implemented as it + # requires a DTD + # + # source://rexml//lib/rexml/functions.rb#66 + def id(object); end + + # UNTESTED + # + # source://rexml//lib/rexml/functions.rb#352 + def lang(language); end + + # Returns the last node of the given list of nodes. + # + # source://rexml//lib/rexml/functions.rb#51 + def last; end + + # source://rexml//lib/rexml/functions.rb#69 + def local_name(node_set = T.unsafe(nil)); end + + # source://rexml//lib/rexml/functions.rb#80 + def name(node_set = T.unsafe(nil)); end + + # source://rexml//lib/rexml/functions.rb#35 + def namespace_context; end + + # source://rexml//lib/rexml/functions.rb#33 + def namespace_context=(x); end + + # source://rexml//lib/rexml/functions.rb#76 + def namespace_uri(node_set = T.unsafe(nil)); end + + # source://rexml//lib/rexml/functions.rb#265 + def normalize_space(string = T.unsafe(nil)); end + + # UNTESTED + # + # source://rexml//lib/rexml/functions.rb#337 + def not(object); end + + # a string that consists of optional whitespace followed by an optional + # minus sign followed by a Number followed by whitespace is converted to + # the IEEE 754 number that is nearest (according to the IEEE 754 + # round-to-nearest rule) to the mathematical value represented by the + # string; any other string is converted to NaN + # + # boolean true is converted to 1; boolean false is converted to 0 + # + # a node-set is first converted to a string as if by a call to the string + # function and then converted in the same way as a string argument + # + # an object of a type other than the four basic types is converted to a + # number in a way that is dependent on that type + # + # source://rexml//lib/rexml/functions.rb#387 + def number(object = T.unsafe(nil)); end + + # source://rexml//lib/rexml/functions.rb#55 + def position; end + + # source://rexml//lib/rexml/functions.rb#432 + def processing_instruction(node); end + + # source://rexml//lib/rexml/functions.rb#421 + def round(number); end + + # source://rexml//lib/rexml/functions.rb#436 + def send(name, *args); end + + # source://rexml//lib/rexml/functions.rb#26 + def singleton_method_added(name); end + + # Fixed by Mike Stok + # + # source://rexml//lib/rexml/functions.rb#199 + def starts_with(string, test); end + + # A node-set is converted to a string by returning the string-value of the + # node in the node-set that is first in document order. If the node-set is + # empty, an empty string is returned. + # + # A number is converted to a string as follows + # + # NaN is converted to the string NaN + # + # positive zero is converted to the string 0 + # + # negative zero is converted to the string 0 + # + # positive infinity is converted to the string Infinity + # + # negative infinity is converted to the string -Infinity + # + # if the number is an integer, the number is represented in decimal form + # as a Number with no decimal point and no leading zeros, preceded by a + # minus sign (-) if the number is negative + # + # otherwise, the number is represented in decimal form as a Number + # including a decimal point with at least one digit before the decimal + # point and at least one digit after the decimal point, preceded by a + # minus sign (-) if the number is negative; there must be no leading zeros + # before the decimal point apart possibly from the one required digit + # immediately before the decimal point; beyond the one required digit + # after the decimal point there must be as many, but only as many, more + # digits as are needed to uniquely distinguish the number from all other + # IEEE 754 numeric values. + # + # The boolean false value is converted to the string false. The boolean + # true value is converted to the string true. + # + # An object of a type other than the four basic types is converted to a + # string in a way that is dependent on that type. + # + # source://rexml//lib/rexml/functions.rb#138 + def string(object = T.unsafe(nil)); end + + # UNTESTED + # + # source://rexml//lib/rexml/functions.rb#261 + def string_length(string); end + + # A node-set is converted to a string by + # returning the concatenation of the string-value + # of each of the children of the node in the + # node-set that is first in document order. + # If the node-set is empty, an empty string is returned. + # + # source://rexml//lib/rexml/functions.rb#178 + def string_value(o); end + + # Take equal portions of Mike Stok and Sean Russell; mix + # vigorously, and pour into a tall, chilled glass. Serves 10,000. + # + # source://rexml//lib/rexml/functions.rb#228 + def substring(string, start, length = T.unsafe(nil)); end + + # Kouhei fixed this too + # + # source://rexml//lib/rexml/functions.rb#220 + def substring_after(string, test); end + + # Kouhei fixed this + # + # source://rexml//lib/rexml/functions.rb#209 + def substring_before(string, test); end + + # source://rexml//lib/rexml/functions.rb#408 + def sum(nodes); end + + # source://rexml//lib/rexml/functions.rb#40 + def text; end + + # This is entirely Mike Stok's beast + # + # source://rexml//lib/rexml/functions.rb#275 + def translate(string, tr1, tr2); end + + # UNTESTED + # + # source://rexml//lib/rexml/functions.rb#342 + def true; end + + # source://rexml//lib/rexml/functions.rb#36 + def variables; end + + # source://rexml//lib/rexml/functions.rb#34 + def variables=(x); end + end +end + +# A Source that wraps an IO. See the Source class for method +# documentation +# +# source://rexml//lib/rexml/source.rb#215 +class REXML::IOSource < ::REXML::Source + # block_size has been deprecated + # + # @return [IOSource] a new instance of IOSource + # + # source://rexml//lib/rexml/source.rb#219 + def initialize(arg, block_size = T.unsafe(nil), encoding = T.unsafe(nil)); end + + # @return the current line in the source + # + # source://rexml//lib/rexml/source.rb#324 + def current_line; end + + # @return [Boolean] + # + # source://rexml//lib/rexml/source.rb#319 + def empty?; end + + # source://rexml//lib/rexml/source.rb#279 + def ensure_buffer; end + + # source://rexml//lib/rexml/source.rb#283 + def match(pattern, cons = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rexml//lib/rexml/source.rb#302 + def match?(pattern, cons = T.unsafe(nil)); end + + # source://rexml//lib/rexml/source.rb#240 + def read(term = T.unsafe(nil), min_bytes = T.unsafe(nil)); end + + # source://rexml//lib/rexml/source.rb#261 + def read_until(term); end + + private + + # source://rexml//lib/rexml/source.rb#371 + def encoding_updated; end + + # source://rexml//lib/rexml/source.rb#346 + def readline(term = T.unsafe(nil)); end +end + +# Represents an XML Instruction; IE, <? ... ?> +# TODO: Add parent arg (3rd arg) to constructor +# +# source://rexml//lib/rexml/instruction.rb#9 +class REXML::Instruction < ::REXML::Child + # Constructs a new Instruction + # the target of this instruction is set to this. If an Instruction, + # then the Instruction is shallowly cloned (target and content are + # copied). + # be a Parent if the target argument is a Source. Otherwise, this + # String is set as the content of this instruction. + # + # @param target can be one of a number of things. If String, then + # @param content Must be either a String, or a Parent. Can only + # @return [Instruction] a new instance of Instruction + # + # source://rexml//lib/rexml/instruction.rb#25 + def initialize(target, content = T.unsafe(nil)); end + + # of the other matches the target and content of this object. + # + # @return true if other is an Instruction, and the content and target + # + # source://rexml//lib/rexml/instruction.rb#65 + def ==(other); end + + # source://rexml//lib/rexml/instruction.rb#44 + def clone; end + + # target is the "name" of the Instruction; IE, the "tag" in <?tag ...?> + # content is everything else. + # + # source://rexml//lib/rexml/instruction.rb#15 + def content; end + + # target is the "name" of the Instruction; IE, the "tag" in <?tag ...?> + # content is everything else. + # + # source://rexml//lib/rexml/instruction.rb#15 + def content=(_arg0); end + + # source://rexml//lib/rexml/instruction.rb#75 + def inspect; end + + # source://rexml//lib/rexml/instruction.rb#71 + def node_type; end + + # target is the "name" of the Instruction; IE, the "tag" in <?tag ...?> + # content is everything else. + # + # source://rexml//lib/rexml/instruction.rb#15 + def target; end + + # target is the "name" of the Instruction; IE, the "tag" in <?tag ...?> + # content is everything else. + # + # source://rexml//lib/rexml/instruction.rb#15 + def target=(_arg0); end + + # == DEPRECATED + # See the rexml/formatters package + # + # source://rexml//lib/rexml/instruction.rb#51 + def write(writer, indent = T.unsafe(nil), transitive = T.unsafe(nil), ie_hack = T.unsafe(nil)); end +end + +# Adds named attributes to an object. +# +# source://rexml//lib/rexml/namespace.rb#7 +module REXML::Namespace + include ::REXML::XMLTokens + + # The name of the object, valid if set + # + # source://rexml//lib/rexml/namespace.rb#9 + def expanded_name; end + + # Fully expand the name, even if the prefix wasn't specified in the + # source file. + # + # source://rexml//lib/rexml/namespace.rb#57 + def fully_expanded_name; end + + # Compares names optionally WITH namespaces + # + # @return [Boolean] + # + # source://rexml//lib/rexml/namespace.rb#43 + def has_name?(other, ns = T.unsafe(nil)); end + + # The name of the object, valid if set + # + # source://rexml//lib/rexml/namespace.rb#9 + def name; end + + # Sets the name and the expanded name + # + # source://rexml//lib/rexml/namespace.rb#17 + def name=(name); end + + # The expanded name of the object, valid if name is set + # + # source://rexml//lib/rexml/namespace.rb#11 + def prefix; end + + # The expanded name of the object, valid if name is set + # + # source://rexml//lib/rexml/namespace.rb#11 + def prefix=(_arg0); end +end + +# source://rexml//lib/rexml/namespace.rb#13 +REXML::Namespace::NAME_WITHOUT_NAMESPACE = T.let(T.unsafe(nil), Regexp) + +# Represents a node in the tree. Nodes are never encountered except as +# superclasses of other objects. Nodes have siblings. +# +# source://rexml//lib/rexml/node.rb#9 +module REXML::Node + # Visit all subnodes of +self+ recursively + # + # source://rexml//lib/rexml/node.rb#54 + def each_recursive(&block); end + + # Find (and return) first subnode (recursively) for which the block + # evaluates to true. Returns +nil+ if none was found. + # + # source://rexml//lib/rexml/node.rb#67 + def find_first_recursive(&block); end + + # source://rexml//lib/rexml/node.rb#39 + def indent(to, ind); end + + # Returns the position that +self+ holds in its parent's array, indexed + # from 1. + # + # source://rexml//lib/rexml/node.rb#76 + def index_in_parent; end + + # @return the next sibling (nil if unset) + # + # source://rexml//lib/rexml/node.rb#11 + def next_sibling_node; end + + # @return [Boolean] + # + # source://rexml//lib/rexml/node.rb#48 + def parent?; end + + # @return the previous sibling (nil if unset) + # + # source://rexml//lib/rexml/node.rb#17 + def previous_sibling_node; end + + # indent:: + # *DEPRECATED* This parameter is now ignored. See the formatters in the + # REXML::Formatters package for changing the output style. + # + # source://rexml//lib/rexml/node.rb#27 + def to_s(indent = T.unsafe(nil)); end +end + +# source://rexml//lib/rexml/doctype.rb#280 +class REXML::NotationDecl < ::REXML::Child + # @return [NotationDecl] a new instance of NotationDecl + # + # source://rexml//lib/rexml/doctype.rb#282 + def initialize(name, middle, pub, sys); end + + # This method retrieves the name of the notation. + # + # Method contributed by Henrik Martensson + # + # source://rexml//lib/rexml/doctype.rb#307 + def name; end + + # Returns the value of attribute public. + # + # source://rexml//lib/rexml/doctype.rb#281 + def public; end + + # Sets the attribute public + # + # @param value the value to set the attribute public to. + # + # source://rexml//lib/rexml/doctype.rb#281 + def public=(_arg0); end + + # Returns the value of attribute system. + # + # source://rexml//lib/rexml/doctype.rb#281 + def system; end + + # Sets the attribute system + # + # @param value the value to set the attribute system to. + # + # source://rexml//lib/rexml/doctype.rb#281 + def system=(_arg0); end + + # source://rexml//lib/rexml/doctype.rb#290 + def to_s; end + + # source://rexml//lib/rexml/doctype.rb#300 + def write(output, indent = T.unsafe(nil)); end +end + +# source://rexml//lib/rexml/output.rb#5 +class REXML::Output + include ::REXML::Encoding + + # @return [Output] a new instance of Output + # + # source://rexml//lib/rexml/output.rb#10 + def initialize(real_IO, encd = T.unsafe(nil)); end + + # source://rexml//lib/rexml/output.rb#22 + def <<(content); end + + # Returns the value of attribute encoding. + # + # source://rexml//lib/rexml/output.rb#8 + def encoding; end + + # source://rexml//lib/rexml/output.rb#26 + def to_s; end +end + +# A parent has children, and has methods for accessing them. The Parent +# class is never encountered except as the superclass for some other +# object. +# +# source://rexml//lib/rexml/parent.rb#8 +class REXML::Parent < ::REXML::Child + include ::Enumerable + + # Constructor + # + # @param parent if supplied, will be set as the parent of this object + # @return [Parent] a new instance of Parent + # + # source://rexml//lib/rexml/parent.rb#13 + def initialize(parent = T.unsafe(nil)); end + + # source://rexml//lib/rexml/parent.rb#18 + def <<(object); end + + # Fetches a child at a given index + # + # @param index the Integer index of the child to fetch + # + # source://rexml//lib/rexml/parent.rb#57 + def [](index); end + + # Set an index entry. See Array.[]= + # + # @param index the index of the element to set + # @param opt either the object to set, or an Integer length + # @param child if opt is an Integer, this is the child to set + # @return the parent (self) + # + # source://rexml//lib/rexml/parent.rb#70 + def []=(*args); end + + # source://rexml//lib/rexml/parent.rb#18 + def add(object); end + + # source://rexml//lib/rexml/parent.rb#115 + def children; end + + # Deeply clones this object. This creates a complete duplicate of this + # Parent, including all descendants. + # + # source://rexml//lib/rexml/parent.rb#148 + def deep_clone; end + + # source://rexml//lib/rexml/parent.rb#32 + def delete(object); end + + # source://rexml//lib/rexml/parent.rb#47 + def delete_at(index); end + + # source://rexml//lib/rexml/parent.rb#43 + def delete_if(&block); end + + # source://rexml//lib/rexml/parent.rb#39 + def each(&block); end + + # source://rexml//lib/rexml/parent.rb#39 + def each_child(&block); end + + # source://rexml//lib/rexml/parent.rb#51 + def each_index(&block); end + + # Fetches the index of a given child + # of this parent. + # + # @param child the child to get the index of + # @return the index of the child, or nil if the object is not a child + # + # source://rexml//lib/rexml/parent.rb#123 + def index(child); end + + # Inserts an child after another child + # child2 will be inserted after child1 in the child list of the parent. + # If an xpath, child2 will be inserted after the first child to match + # the xpath. + # + # @param child1 this is either an xpath or an Element. If an Element, + # @param child2 the child to insert + # @return the parent (self) + # + # source://rexml//lib/rexml/parent.rb#102 + def insert_after(child1, child2); end + + # Inserts an child before another child + # child2 will be inserted before child1 in the child list of the parent. + # If an xpath, child2 will be inserted before the first child to match + # the xpath. + # + # @param child1 this is either an xpath or an Element. If an Element, + # @param child2 the child to insert + # @return the parent (self) + # + # source://rexml//lib/rexml/parent.rb#82 + def insert_before(child1, child2); end + + # @return the number of children of this parent + # + # source://rexml//lib/rexml/parent.rb#130 + def length; end + + # @return [Boolean] + # + # source://rexml//lib/rexml/parent.rb#162 + def parent?; end + + # source://rexml//lib/rexml/parent.rb#18 + def push(object); end + + # Replaces one child with another, making sure the nodelist is correct + # Child) + # + # @param to_replace the child to replace (must be a Child) + # @param replacement the child to insert into the nodelist (must be a + # + # source://rexml//lib/rexml/parent.rb#140 + def replace_child(to_replace, replacement); end + + # @return the number of children of this parent + # + # source://rexml//lib/rexml/parent.rb#130 + def size; end + + # source://rexml//lib/rexml/parent.rb#115 + def to_a; end + + # source://rexml//lib/rexml/parent.rb#27 + def unshift(object); end +end + +# source://rexml//lib/rexml/parseexception.rb#3 +class REXML::ParseException < ::RuntimeError + # @return [ParseException] a new instance of ParseException + # + # source://rexml//lib/rexml/parseexception.rb#6 + def initialize(message, source = T.unsafe(nil), parser = T.unsafe(nil), exception = T.unsafe(nil)); end + + # source://rexml//lib/rexml/parseexception.rb#49 + def context; end + + # Returns the value of attribute continued_exception. + # + # source://rexml//lib/rexml/parseexception.rb#4 + def continued_exception; end + + # Sets the attribute continued_exception + # + # @param value the value to set the attribute continued_exception to. + # + # source://rexml//lib/rexml/parseexception.rb#4 + def continued_exception=(_arg0); end + + # source://rexml//lib/rexml/parseexception.rb#44 + def line; end + + # Returns the value of attribute parser. + # + # source://rexml//lib/rexml/parseexception.rb#4 + def parser; end + + # Sets the attribute parser + # + # @param value the value to set the attribute parser to. + # + # source://rexml//lib/rexml/parseexception.rb#4 + def parser=(_arg0); end + + # source://rexml//lib/rexml/parseexception.rb#39 + def position; end + + # Returns the value of attribute source. + # + # source://rexml//lib/rexml/parseexception.rb#4 + def source; end + + # Sets the attribute source + # + # @param value the value to set the attribute source to. + # + # source://rexml//lib/rexml/parseexception.rb#4 + def source=(_arg0); end + + # source://rexml//lib/rexml/parseexception.rb#13 + def to_s; end +end + +# = Using the Pull Parser +# <em>This API is experimental, and subject to change.</em> +# parser = PullParser.new( "<a>text<b att='val'/>txet</a>" ) +# while parser.has_next? +# res = parser.next +# puts res[1]['att'] if res.start_tag? and res[0] == 'b' +# end +# See the PullEvent class for information on the content of the results. +# The data is identical to the arguments passed for the various events to +# the StreamListener API. +# +# Notice that: +# parser = PullParser.new( "<a>BAD DOCUMENT" ) +# while parser.has_next? +# res = parser.next +# raise res[1] if res.error? +# end +# +# Nat Price gave me some good ideas for the API. +# +# source://rexml//lib/rexml/parsers/baseparser.rb#57 +class REXML::Parsers::BaseParser + # @return [BaseParser] a new instance of BaseParser + # + # source://rexml//lib/rexml/parsers/baseparser.rb#163 + def initialize(source); end + + # source://rexml//lib/rexml/parsers/baseparser.rb#173 + def add_listener(listener); end + + # Returns true if there are no more events + # + # @return [Boolean] + # + # source://rexml//lib/rexml/parsers/baseparser.rb#208 + def empty?; end + + # source://rexml//lib/rexml/parsers/baseparser.rb#543 + def entity(reference, entities); end + + # Returns the value of attribute entity_expansion_count. + # + # source://rexml//lib/rexml/parsers/baseparser.rb#178 + def entity_expansion_count; end + + # Sets the attribute entity_expansion_limit + # + # @param value the value to set the attribute entity_expansion_limit to. + # + # source://rexml//lib/rexml/parsers/baseparser.rb#179 + def entity_expansion_limit=(_arg0); end + + # Sets the attribute entity_expansion_text_limit + # + # @param value the value to set the attribute entity_expansion_text_limit to. + # + # source://rexml//lib/rexml/parsers/baseparser.rb#180 + def entity_expansion_text_limit=(_arg0); end + + # Returns true if there are more events. Synonymous with !empty? + # + # @return [Boolean] + # + # source://rexml//lib/rexml/parsers/baseparser.rb#213 + def has_next?; end + + # Escapes all possible entities + # + # source://rexml//lib/rexml/parsers/baseparser.rb#554 + def normalize(input, entities = T.unsafe(nil), entity_filter = T.unsafe(nil)); end + + # Peek at the +depth+ event in the stack. The first element on the stack + # is at depth 0. If +depth+ is -1, will parse to the end of the input + # stream and return the last event, which is always :end_document. + # Be aware that this causes the stream to be parsed up to the +depth+ + # event, so you can effectively pre-parse the entire document (pull the + # entire thing into memory) using this method. + # + # source://rexml//lib/rexml/parsers/baseparser.rb#229 + def peek(depth = T.unsafe(nil)); end + + # source://rexml//lib/rexml/parsers/baseparser.rb#198 + def position; end + + # Returns the next event. This is a +PullEvent+ object. + # + # source://rexml//lib/rexml/parsers/baseparser.rb#244 + def pull; end + + # source://rexml//lib/rexml/parsers/baseparser.rb#187 + def reset; end + + # Returns the value of attribute source. + # + # source://rexml//lib/rexml/parsers/baseparser.rb#177 + def source; end + + # source://rexml//lib/rexml/parsers/baseparser.rb#182 + def stream=(source); end + + # Unescapes all possible entities + # + # source://rexml//lib/rexml/parsers/baseparser.rb#570 + def unnormalize(string, entities = T.unsafe(nil), filter = T.unsafe(nil)); end + + # Push an event back on the head of the stream. This method + # has (theoretically) infinite depth. + # + # source://rexml//lib/rexml/parsers/baseparser.rb#219 + def unshift(token); end + + private + + # source://rexml//lib/rexml/parsers/baseparser.rb#619 + def add_namespace(prefix, uri); end + + # @return [Boolean] + # + # source://rexml//lib/rexml/parsers/baseparser.rb#652 + def need_source_encoding_update?(xml_declaration_encoding); end + + # source://rexml//lib/rexml/parsers/baseparser.rb#791 + def parse_attributes(prefixes); end + + # source://rexml//lib/rexml/parsers/baseparser.rb#671 + def parse_id(base_error_message, accept_external_id:, accept_public_id:); end + + # source://rexml//lib/rexml/parsers/baseparser.rb#699 + def parse_id_invalid_details(accept_external_id:, accept_public_id:); end + + # source://rexml//lib/rexml/parsers/baseparser.rb#658 + def parse_name(base_error_message); end + + # source://rexml//lib/rexml/parsers/baseparser.rb#634 + def pop_namespaces_restore; end + + # source://rexml//lib/rexml/parsers/baseparser.rb#737 + def process_instruction; end + + # source://rexml//lib/rexml/parsers/baseparser.rb#254 + def pull_event; end + + # source://rexml//lib/rexml/parsers/baseparser.rb#628 + def push_namespaces_restore; end + + # source://rexml//lib/rexml/parsers/baseparser.rb#645 + def record_entity_expansion(delta = T.unsafe(nil)); end + + # source://rexml//lib/rexml/parsers/baseparser.rb#777 + def scan_quote; end +end + +# source://rexml//lib/rexml/parsers/baseparser.rb#130 +REXML::Parsers::BaseParser::EXTERNAL_ID_PUBLIC = T.let(T.unsafe(nil), Regexp) + +# source://rexml//lib/rexml/parsers/baseparser.rb#131 +REXML::Parsers::BaseParser::EXTERNAL_ID_SYSTEM = T.let(T.unsafe(nil), Regexp) + +# source://rexml//lib/rexml/parsers/baseparser.rb#132 +REXML::Parsers::BaseParser::PUBLIC_ID = T.let(T.unsafe(nil), Regexp) + +# source://rexml//lib/rexml/parsers/baseparser.rb#143 +module REXML::Parsers::BaseParser::Private; end + +# source://rexml//lib/rexml/parsers/baseparser.rb#147 +REXML::Parsers::BaseParser::Private::ATTLISTDECL_END = T.let(T.unsafe(nil), Regexp) + +# source://rexml//lib/rexml/parsers/baseparser.rb#152 +REXML::Parsers::BaseParser::Private::CARRIAGE_RETURN_NEWLINE_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://rexml//lib/rexml/parsers/baseparser.rb#153 +REXML::Parsers::BaseParser::Private::CHARACTER_REFERENCES = T.let(T.unsafe(nil), Regexp) + +# source://rexml//lib/rexml/parsers/baseparser.rb#146 +REXML::Parsers::BaseParser::Private::CLOSE_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://rexml//lib/rexml/parsers/baseparser.rb#154 +REXML::Parsers::BaseParser::Private::DEFAULT_ENTITIES_PATTERNS = T.let(T.unsafe(nil), Hash) + +# source://rexml//lib/rexml/parsers/baseparser.rb#151 +REXML::Parsers::BaseParser::Private::ENTITYDECL_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://rexml//lib/rexml/parsers/baseparser.rb#149 +REXML::Parsers::BaseParser::Private::GEDECL_PATTERN = T.let(T.unsafe(nil), String) + +# source://rexml//lib/rexml/parsers/baseparser.rb#148 +REXML::Parsers::BaseParser::Private::NAME_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://rexml//lib/rexml/parsers/baseparser.rb#150 +REXML::Parsers::BaseParser::Private::PEDECL_PATTERN = T.let(T.unsafe(nil), String) + +# source://rexml//lib/rexml/parsers/baseparser.rb#144 +REXML::Parsers::BaseParser::Private::PEREFERENCE_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://rexml//lib/rexml/parsers/baseparser.rb#145 +REXML::Parsers::BaseParser::Private::TAG_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://rexml//lib/rexml/parsers/baseparser.rb#159 +REXML::Parsers::BaseParser::Private::XML_PREFIXED_NAMESPACE = T.let(T.unsafe(nil), String) + +# source://rexml//lib/rexml/parsers/baseparser.rb#66 +REXML::Parsers::BaseParser::QNAME = T.let(T.unsafe(nil), Regexp) + +# source://rexml//lib/rexml/parsers/baseparser.rb#65 +REXML::Parsers::BaseParser::QNAME_STR = T.let(T.unsafe(nil), String) + +# source://rexml//lib/rexml/parsers/streamparser.rb#6 +class REXML::Parsers::StreamParser + # @return [StreamParser] a new instance of StreamParser + # + # source://rexml//lib/rexml/parsers/streamparser.rb#7 + def initialize(source, listener); end + + # source://rexml//lib/rexml/parsers/streamparser.rb#13 + def add_listener(listener); end + + # source://rexml//lib/rexml/parsers/streamparser.rb#17 + def entity_expansion_count; end + + # source://rexml//lib/rexml/parsers/streamparser.rb#21 + def entity_expansion_limit=(limit); end + + # source://rexml//lib/rexml/parsers/streamparser.rb#25 + def entity_expansion_text_limit=(limit); end + + # source://rexml//lib/rexml/parsers/streamparser.rb#29 + def parse; end +end + +# source://rexml//lib/rexml/parsers/treeparser.rb#7 +class REXML::Parsers::TreeParser + # @return [TreeParser] a new instance of TreeParser + # + # source://rexml//lib/rexml/parsers/treeparser.rb#8 + def initialize(source, build_context = T.unsafe(nil)); end + + # source://rexml//lib/rexml/parsers/treeparser.rb#13 + def add_listener(listener); end + + # source://rexml//lib/rexml/parsers/treeparser.rb#17 + def parse; end +end + +# You don't want to use this class. Really. Use XPath, which is a wrapper +# for this class. Believe me. You don't want to poke around in here. +# There is strange, dark magic at work in this code. Beware. Go back! Go +# back while you still can! +# +# source://rexml//lib/rexml/parsers/xpathparser.rb#12 +class REXML::Parsers::XPathParser + include ::REXML::XMLTokens + + # source://rexml//lib/rexml/parsers/xpathparser.rb#42 + def abbreviate(path_or_parsed); end + + # source://rexml//lib/rexml/parsers/xpathparser.rb#132 + def expand(path_or_parsed); end + + # source://rexml//lib/rexml/parsers/xpathparser.rb#16 + def namespaces=(namespaces); end + + # source://rexml//lib/rexml/parsers/xpathparser.rb#21 + def parse(path); end + + # For backward compatibility + # + # source://rexml//lib/rexml/parsers/xpathparser.rb#174 + def preciate_to_string(parsed, &block); end + + # source://rexml//lib/rexml/parsers/xpathparser.rb#36 + def predicate(path); end + + # source://rexml//lib/rexml/parsers/xpathparser.rb#174 + def predicate_to_path(parsed, &block); end + + private + + # | AdditiveExpr ('+' | '-') MultiplicativeExpr + # | MultiplicativeExpr + # + # source://rexml//lib/rexml/parsers/xpathparser.rb#505 + def AdditiveExpr(path, parsed); end + + # | AndExpr S 'and' S EqualityExpr + # | EqualityExpr + # + # source://rexml//lib/rexml/parsers/xpathparser.rb#438 + def AndExpr(path, parsed); end + + # | EqualityExpr ('=' | '!=') RelationalExpr + # | RelationalExpr + # + # source://rexml//lib/rexml/parsers/xpathparser.rb#457 + def EqualityExpr(path, parsed); end + + # | FilterExpr Predicate + # | PrimaryExpr + # + # source://rexml//lib/rexml/parsers/xpathparser.rb#608 + def FilterExpr(path, parsed); end + + # | FUNCTION_NAME '(' ( expr ( ',' expr )* )? ')' + # + # source://rexml//lib/rexml/parsers/xpathparser.rb#663 + def FunctionCall(rest, parsed); end + + # LocationPath + # | RelativeLocationPath + # | '/' RelativeLocationPath? + # | '//' RelativeLocationPath + # + # source://rexml//lib/rexml/parsers/xpathparser.rb#243 + def LocationPath(path, parsed); end + + # | MultiplicativeExpr ('*' | S ('div' | 'mod') S) UnaryExpr + # | UnaryExpr + # + # source://rexml//lib/rexml/parsers/xpathparser.rb#528 + def MultiplicativeExpr(path, parsed); end + + # source://rexml//lib/rexml/parsers/xpathparser.rb#343 + def NodeTest(path, parsed); end + + # | OrExpr S 'or' S AndExpr + # | AndExpr + # + # source://rexml//lib/rexml/parsers/xpathparser.rb#419 + def OrExpr(path, parsed); end + + # | LocationPath + # | FilterExpr ('/' | '//') RelativeLocationPath + # + # source://rexml//lib/rexml/parsers/xpathparser.rb#590 + def PathExpr(path, parsed); end + + # Filters the supplied nodeset on the predicate(s) + # + # source://rexml//lib/rexml/parsers/xpathparser.rb#395 + def Predicate(path, parsed); end + + # source://rexml//lib/rexml/parsers/xpathparser.rb#626 + def PrimaryExpr(path, parsed); end + + # | RelationalExpr ('<' | '>' | '<=' | '>=') AdditiveExpr + # | AdditiveExpr + # + # source://rexml//lib/rexml/parsers/xpathparser.rb#480 + def RelationalExpr(path, parsed); end + + # source://rexml//lib/rexml/parsers/xpathparser.rb#267 + def RelativeLocationPath(path, parsed); end + + # | '-' UnaryExpr + # | UnionExpr + # + # source://rexml//lib/rexml/parsers/xpathparser.rb#553 + def UnaryExpr(path, parsed); end + + # | UnionExpr '|' PathExpr + # | PathExpr + # + # source://rexml//lib/rexml/parsers/xpathparser.rb#571 + def UnionExpr(path, parsed); end + + # get_group( '[foo]bar' ) -> ['bar', '[foo]'] + # + # source://rexml//lib/rexml/parsers/xpathparser.rb#676 + def get_group(string); end + + # source://rexml//lib/rexml/parsers/xpathparser.rb#694 + def parse_args(string); end + + # source://rexml//lib/rexml/parsers/xpathparser.rb#224 + def quote_literal(literal); end +end + +# source://rexml//lib/rexml/parsers/xpathparser.rb#339 +REXML::Parsers::XPathParser::LOCAL_NAME_WILDCARD = T.let(T.unsafe(nil), Regexp) + +# Returns a 1-1 map of the nodeset +# The contents of the resulting array are either: +# true/false, if a positive match +# String, if a name match +# NodeTest +# | ('*' | NCNAME ':' '*' | QNAME) NameTest +# | '*' ':' NCNAME NameTest since XPath 2.0 +# | NODE_TYPE '(' ')' NodeType +# | PI '(' LITERAL ')' PI +# | '[' expr ']' Predicate +# +# source://rexml//lib/rexml/parsers/xpathparser.rb#338 +REXML::Parsers::XPathParser::PREFIX_WILDCARD = T.let(T.unsafe(nil), Regexp) + +# source://rexml//lib/rexml/doctype.rb#10 +class REXML::ReferenceWriter + # @return [ReferenceWriter] a new instance of ReferenceWriter + # + # source://rexml//lib/rexml/doctype.rb#11 + def initialize(id_type, public_id_literal, system_literal, context = T.unsafe(nil)); end + + # source://rexml//lib/rexml/doctype.rb#25 + def write(output); end +end + +# source://rexml//lib/rexml/security.rb#3 +module REXML::Security + class << self + # Get the entity expansion limit. By default the limit is set to 10000. + # + # source://rexml//lib/rexml/security.rb#12 + def entity_expansion_limit; end + + # Set the entity expansion limit. By default the limit is set to 10000. + # + # source://rexml//lib/rexml/security.rb#7 + def entity_expansion_limit=(val); end + + # Get the entity expansion limit. By default the limit is set to 10240. + # + # source://rexml//lib/rexml/security.rb#24 + def entity_expansion_text_limit; end + + # Set the entity expansion limit. By default the limit is set to 10240. + # + # source://rexml//lib/rexml/security.rb#19 + def entity_expansion_text_limit=(val); end + end +end + +# A Source can be searched for patterns, and wraps buffers and other +# objects and provides consumption of text +# +# source://rexml//lib/rexml/source.rb#61 +class REXML::Source + include ::REXML::Encoding + + # Constructor + # value, overriding all encoding detection + # + # @param arg must be a String, and should be a valid XML document + # @param encoding if non-null, sets the encoding of the source to this + # @return [Source] a new instance of Source + # + # source://rexml//lib/rexml/source.rb#87 + def initialize(arg, encoding = T.unsafe(nil)); end + + # The current buffer (what we're going to read next) + # + # source://rexml//lib/rexml/source.rb#100 + def buffer; end + + # source://rexml//lib/rexml/source.rb#110 + def buffer_encoding=(encoding); end + + # @return the current line in the source + # + # source://rexml//lib/rexml/source.rb#175 + def current_line; end + + # source://rexml//lib/rexml/source.rb#104 + def drop_parsed_content; end + + # @return [Boolean] true if the Source is exhausted + # + # source://rexml//lib/rexml/source.rb#170 + def empty?; end + + # Returns the value of attribute encoding. + # + # source://rexml//lib/rexml/source.rb#65 + def encoding; end + + # Inherited from Encoding + # Overridden to support optimized en/decoding + # + # source://rexml//lib/rexml/source.rb#116 + def encoding=(enc); end + + # source://rexml//lib/rexml/source.rb#134 + def ensure_buffer; end + + # The line number of the last consumed text + # + # source://rexml//lib/rexml/source.rb#64 + def line; end + + # source://rexml//lib/rexml/source.rb#137 + def match(pattern, cons = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rexml//lib/rexml/source.rb#145 + def match?(pattern, cons = T.unsafe(nil)); end + + # source://rexml//lib/rexml/source.rb#161 + def peek_byte; end + + # source://rexml//lib/rexml/source.rb#153 + def position; end + + # source://rexml//lib/rexml/source.rb#157 + def position=(pos); end + + # source://rexml//lib/rexml/source.rb#121 + def read(term = T.unsafe(nil)); end + + # source://rexml//lib/rexml/source.rb#124 + def read_until(term); end + + # source://rexml//lib/rexml/source.rb#165 + def scan_byte; end + + private + + # source://rexml//lib/rexml/source.rb#184 + def detect_encoding; end + + # source://rexml//lib/rexml/source.rb#202 + def encoding_updated; end +end + +# source://rexml//lib/rexml/source.rb#67 +module REXML::Source::Private; end + +# source://rexml//lib/rexml/source.rb#69 +REXML::Source::Private::PRE_DEFINED_TERM_PATTERNS = T.let(T.unsafe(nil), Hash) + +# source://rexml//lib/rexml/source.rb#68 +REXML::Source::Private::SCANNER_RESET_SIZE = T.let(T.unsafe(nil), Integer) + +# Generates Source-s. USE THIS CLASS. +# +# source://rexml//lib/rexml/source.rb#38 +class REXML::SourceFactory + class << self + # Generates a Source object + # + # @param arg Either a String, or an IO + # @return a Source, or nil if a bad argument was given + # + # source://rexml//lib/rexml/source.rb#42 + def create_from(arg); end + end +end + +# Represents text nodes in an XML document +# +# source://rexml//lib/rexml/text.rb#11 +class REXML::Text < ::REXML::Child + include ::Comparable + + # Constructor + # +arg+ if a String, the content is set to the String. If a Text, + # the object is shallowly cloned. + # + # +respect_whitespace+ (boolean, false) if true, whitespace is + # respected + # + # +parent+ (nil) if this is a Parent object, the parent + # will be set to this. + # + # +raw+ (nil) This argument can be given three values. + # If true, then the value of used to construct this object is expected to + # contain no unescaped XML markup, and REXML will not change the text. If + # this value is false, the string may contain any characters, and REXML will + # escape any and all defined entities whose values are contained in the + # text. If this value is nil (the default), then the raw value of the + # parent will be used as the raw value for this node. If there is no raw + # value for the parent, and no value is supplied, the default is false. + # Use this field if you have entities defined for some text, and you don't + # want REXML to escape that text in output. + # Text.new( "<&", false, nil, false ) #-> "<&" + # Text.new( "<&", false, nil, false ) #-> "&lt;&amp;" + # Text.new( "<&", false, nil, true ) #-> Parse exception + # Text.new( "<&", false, nil, true ) #-> "<&" + # # Assume that the entity "s" is defined to be "sean" + # # and that the entity "r" is defined to be "russell" + # Text.new( "sean russell" ) #-> "&s; &r;" + # Text.new( "sean russell", false, nil, true ) #-> "sean russell" + # + # +entity_filter+ (nil) This can be an array of entities to match in the + # supplied text. This argument is only useful if +raw+ is set to false. + # Text.new( "sean russell", false, nil, false, ["s"] ) #-> "&s; russell" + # Text.new( "sean russell", false, nil, true, ["s"] ) #-> "sean russell" + # In the last example, the +entity_filter+ argument is ignored. + # + # +illegal+ INTERNAL USE ONLY + # + # @return [Text] a new instance of Text + # + # source://rexml//lib/rexml/text.rb#79 + def initialize(arg, respect_whitespace = T.unsafe(nil), parent = T.unsafe(nil), raw = T.unsafe(nil), entity_filter = T.unsafe(nil), illegal = T.unsafe(nil)); end + + # Appends text to this text node. The text is appended in the +raw+ mode + # of this text node. + # + # +returns+ the text itself to enable method chain like + # 'text << "XXX" << "YYY"'. + # + # source://rexml//lib/rexml/text.rb#189 + def <<(to_append); end + + # +other+ a String or a Text + # +returns+ the result of (to_s <=> arg.to_s) + # + # source://rexml//lib/rexml/text.rb#198 + def <=>(other); end + + # source://rexml//lib/rexml/text.rb#179 + def clone; end + + # source://rexml//lib/rexml/text.rb#202 + def doctype; end + + # @return [Boolean] + # + # source://rexml//lib/rexml/text.rb#174 + def empty?; end + + # source://rexml//lib/rexml/text.rb#274 + def indent_text(string, level = T.unsafe(nil), style = T.unsafe(nil), indentfirstline = T.unsafe(nil)); end + + # source://rexml//lib/rexml/text.rb#228 + def inspect; end + + # source://rexml//lib/rexml/text.rb#170 + def node_type; end + + # source://rexml//lib/rexml/text.rb#110 + def parent=(parent); end + + # If +raw+ is true, then REXML leaves the value alone + # + # source://rexml//lib/rexml/text.rb#21 + def raw; end + + # If +raw+ is true, then REXML leaves the value alone + # + # source://rexml//lib/rexml/text.rb#21 + def raw=(_arg0); end + + # Returns the string value of this text node. This string is always + # escaped, meaning that it is a valid XML text node string, and all + # entities that can be escaped, have been inserted. This method respects + # the entity filter set in the constructor. + # + # # Assume that the entity "s" is defined to be "sean", and that the + # # entity "r" is defined to be "russell" + # t = Text.new( "< & sean russell", false, nil, false, ['s'] ) + # t.to_s #-> "< & &s; russell" + # t = Text.new( "< & &s; russell", false, nil, false ) + # t.to_s #-> "< & &s; russell" + # u = Text.new( "sean russell", false, nil, true ) + # u.to_s #-> "sean russell" + # + # source://rexml//lib/rexml/text.rb#223 + def to_s; end + + # Returns the string value of this text. This is the text without + # entities, as it might be used programmatically, or printed to the + # console. This ignores the 'raw' attribute setting, and any + # entity_filter. + # + # # Assume that the entity "s" is defined to be "sean", and that the + # # entity "r" is defined to be "russell" + # t = Text.new( "< & sean russell", false, nil, false, ['s'] ) + # t.value #-> "< & sean russell" + # t = Text.new( "< & &s; russell", false, nil, false ) + # t.value #-> "< & sean russell" + # u = Text.new( "sean russell", false, nil, true ) + # u.value #-> "sean russell" + # + # source://rexml//lib/rexml/text.rb#245 + def value; end + + # Sets the contents of this text node. This expects the text to be + # unnormalized. It returns self. + # + # e = Element.new( "a" ) + # e.add_text( "foo" ) # <a>foo</a> + # e[0].value = "bar" # <a>bar</a> + # e[0].value = "<a>" # <a><a></a> + # + # source://rexml//lib/rexml/text.rb#257 + def value=(val); end + + # source://rexml//lib/rexml/text.rb#263 + def wrap(string, width, addnewline = T.unsafe(nil)); end + + # == DEPRECATED + # See REXML::Formatters + # + # source://rexml//lib/rexml/text.rb#289 + def write(writer, indent = T.unsafe(nil), transitive = T.unsafe(nil), ie_hack = T.unsafe(nil)); end + + # Writes out text, substituting special characters beforehand. + # +out+ A String, IO, or any other object supporting <<( String ) + # +input+ the text to substitute and the write out + # + # z=utf8.unpack("U*") + # ascOut="" + # z.each{|r| + # if r < 0x100 + # ascOut.concat(r.chr) + # else + # ascOut.concat(sprintf("&#x%x;", r)) + # end + # } + # puts ascOut + # + # source://rexml//lib/rexml/text.rb#321 + def write_with_substitution(out, input); end + + # FIXME + # This probably won't work properly + # + # source://rexml//lib/rexml/text.rb#301 + def xpath; end + + private + + # source://rexml//lib/rexml/text.rb#334 + def clear_cache; end + + class << self + # check for illegal characters + # + # source://rexml//lib/rexml/text.rb#116 + def check(string, pattern, doctype); end + + # source://rexml//lib/rexml/text.rb#404 + def expand(ref, doctype, filter); end + + # Escapes all possible entities + # + # source://rexml//lib/rexml/text.rb#366 + def normalize(input, doctype = T.unsafe(nil), entity_filter = T.unsafe(nil)); end + + # Reads text, substituting entities + # + # source://rexml//lib/rexml/text.rb#340 + def read_with_substitution(input, illegal = T.unsafe(nil)); end + + # Unescapes all possible entities + # + # source://rexml//lib/rexml/text.rb#390 + def unnormalize(string, doctype = T.unsafe(nil), filter = T.unsafe(nil), illegal = T.unsafe(nil), entity_expansion_text_limit: T.unsafe(nil)); end + end +end + +# source://rexml//lib/rexml/undefinednamespaceexception.rb#4 +class REXML::UndefinedNamespaceException < ::REXML::ParseException + # @return [UndefinedNamespaceException] a new instance of UndefinedNamespaceException + # + # source://rexml//lib/rexml/undefinednamespaceexception.rb#5 + def initialize(prefix, source, parser); end +end + +# source://rexml//lib/rexml/validation/validationexception.rb#4 +class REXML::Validation::ValidationException < ::RuntimeError + # @return [ValidationException] a new instance of ValidationException + # + # source://rexml//lib/rexml/validation/validationexception.rb#5 + def initialize(msg); end +end + +# NEEDS DOCUMENTATION +# +# source://rexml//lib/rexml/xmldecl.rb#8 +class REXML::XMLDecl < ::REXML::Child + include ::REXML::Encoding + + # @return [XMLDecl] a new instance of XMLDecl + # + # source://rexml//lib/rexml/xmldecl.rb#20 + def initialize(version = T.unsafe(nil), encoding = T.unsafe(nil), standalone = T.unsafe(nil)); end + + # source://rexml//lib/rexml/xmldecl.rb#56 + def ==(other); end + + # source://rexml//lib/rexml/xmldecl.rb#39 + def clone; end + + # source://rexml//lib/rexml/xmldecl.rb#102 + def dowrite; end + + # source://rexml//lib/rexml/xmldecl.rb#76 + def encoding=(enc); end + + # source://rexml//lib/rexml/xmldecl.rb#106 + def inspect; end + + # source://rexml//lib/rexml/xmldecl.rb#69 + def node_type; end + + # source://rexml//lib/rexml/xmldecl.rb#98 + def nowrite; end + + # source://rexml//lib/rexml/encoding.rb#7 + def old_enc=(encoding); end + + # Returns the value of attribute standalone. + # + # source://rexml//lib/rexml/xmldecl.rb#17 + def stand_alone?; end + + # Returns the value of attribute standalone. + # + # source://rexml//lib/rexml/xmldecl.rb#17 + def standalone; end + + # Sets the attribute standalone + # + # @param value the value to set the attribute standalone to. + # + # source://rexml//lib/rexml/xmldecl.rb#17 + def standalone=(_arg0); end + + # Returns the value of attribute version. + # + # source://rexml//lib/rexml/xmldecl.rb#17 + def version; end + + # Sets the attribute version + # + # @param value the value to set the attribute version to. + # + # source://rexml//lib/rexml/xmldecl.rb#17 + def version=(_arg0); end + + # indent:: + # Ignored. There must be no whitespace before an XML declaration + # transitive:: + # Ignored + # ie_hack:: + # Ignored + # + # source://rexml//lib/rexml/xmldecl.rb#49 + def write(writer, indent = T.unsafe(nil), transitive = T.unsafe(nil), ie_hack = T.unsafe(nil)); end + + # Returns the value of attribute writeencoding. + # + # source://rexml//lib/rexml/xmldecl.rb#18 + def writeencoding; end + + # Returns the value of attribute writethis. + # + # source://rexml//lib/rexml/xmldecl.rb#18 + def writethis; end + + # source://rexml//lib/rexml/xmldecl.rb#63 + def xmldecl(version, encoding, standalone); end + + private + + # source://rexml//lib/rexml/xmldecl.rb#111 + def content(enc); end + + class << self + # Only use this if you do not want the XML declaration to be written; + # this object is ignored by the XML writer. Otherwise, instantiate your + # own XMLDecl and add it to the document. + # + # Note that XML 1.1 documents *must* include an XML declaration + # + # source://rexml//lib/rexml/xmldecl.rb#92 + def default; end + end +end + +# Wrapper class. Use this class to access the XPath functions. +# +# source://rexml//lib/rexml/xpath.rb#7 +class REXML::XPath + include ::REXML::Functions + + class << self + # Iterates over nodes that match the given path, calling the supplied + # block with the match. + # element:: + # The context element + # path:: + # The xpath to search for. If not supplied or nil, defaults to '*' + # namespaces:: + # If supplied, a Hash which defines a namespace mapping + # variables:: + # If supplied, a Hash which maps $variables in the query + # to values. This can be used to avoid XPath injection attacks + # or to automatically handle escaping string values. + # + # XPath.each( node ) { |el| ... } + # XPath.each( node, '/*[@attr='v']' ) { |el| ... } + # XPath.each( node, 'ancestor::x' ) { |el| ... } + # XPath.each( node, '/book/publisher/text()=$publisher', {}, {"publisher"=>"O'Reilly"}) \ + # {|el| ... } + # + # source://rexml//lib/rexml/xpath.rb#60 + def each(element, path = T.unsafe(nil), namespaces = T.unsafe(nil), variables = T.unsafe(nil), options = T.unsafe(nil), &block); end + + # Finds and returns the first node that matches the supplied xpath. + # element:: + # The context element + # path:: + # The xpath to search for. If not supplied or nil, returns the first + # node matching '*'. + # namespaces:: + # If supplied, a Hash which defines a namespace mapping. + # variables:: + # If supplied, a Hash which maps $variables in the query + # to values. This can be used to avoid XPath injection attacks + # or to automatically handle escaping string values. + # + # XPath.first( node ) + # XPath.first( doc, "//b"} ) + # XPath.first( node, "a/x:b", { "x"=>"http://doofus" } ) + # XPath.first( node, '/book/publisher/text()=$publisher', {}, {"publisher"=>"O'Reilly"}) + # + # source://rexml//lib/rexml/xpath.rb#31 + def first(element, path = T.unsafe(nil), namespaces = T.unsafe(nil), variables = T.unsafe(nil), options = T.unsafe(nil)); end + + # Returns an array of nodes matching a given XPath. + # + # source://rexml//lib/rexml/xpath.rb#72 + def match(element, path = T.unsafe(nil), namespaces = T.unsafe(nil), variables = T.unsafe(nil), options = T.unsafe(nil)); end + end +end + +# @private +# +# source://rexml//lib/rexml/xpath_parser.rb#963 +class REXML::XPathNode + # @return [XPathNode] a new instance of XPathNode + # + # source://rexml//lib/rexml/xpath_parser.rb#965 + def initialize(node, context = T.unsafe(nil)); end + + # Returns the value of attribute context. + # + # source://rexml//lib/rexml/xpath_parser.rb#964 + def context; end + + # source://rexml//lib/rexml/xpath_parser.rb#974 + def position; end + + # Returns the value of attribute raw_node. + # + # source://rexml//lib/rexml/xpath_parser.rb#964 + def raw_node; end +end + +# You don't want to use this class. Really. Use XPath, which is a wrapper +# for this class. Believe me. You don't want to poke around in here. +# There is strange, dark magic at work in this code. Beware. Go back! Go +# back while you still can! +# +# source://rexml//lib/rexml/xpath_parser.rb#54 +class REXML::XPathParser + include ::REXML::XMLTokens + + # @return [XPathParser] a new instance of XPathParser + # + # source://rexml//lib/rexml/xpath_parser.rb#60 + def initialize(strict: T.unsafe(nil)); end + + # source://rexml//lib/rexml/xpath_parser.rb#94 + def []=(variable_name, value); end + + # Performs a depth-first (document order) XPath search, and returns the + # first match. This is the fastest, lightest way to return a single result. + # + # FIXME: This method is incomplete! + # + # source://rexml//lib/rexml/xpath_parser.rb#103 + def first(path_stack, node); end + + # source://rexml//lib/rexml/xpath_parser.rb#84 + def get_first(path, nodeset); end + + # source://rexml//lib/rexml/xpath_parser.rb#139 + def match(path_stack, nodeset); end + + # source://rexml//lib/rexml/xpath_parser.rb#69 + def namespaces=(namespaces = T.unsafe(nil)); end + + # source://rexml//lib/rexml/xpath_parser.rb#79 + def parse(path, nodeset); end + + # source://rexml//lib/rexml/xpath_parser.rb#89 + def predicate(path, nodeset); end + + # source://rexml//lib/rexml/xpath_parser.rb#74 + def variables=(vars = T.unsafe(nil)); end + + private + + # source://rexml//lib/rexml/xpath_parser.rb#779 + def child(nodeset); end + + # source://rexml//lib/rexml/xpath_parser.rb#920 + def compare(a, operator, b); end + + # source://rexml//lib/rexml/xpath_parser.rb#682 + def descendant(nodeset, include_self); end + + # source://rexml//lib/rexml/xpath_parser.rb#693 + def descendant_recursive(raw_node, new_nodeset, new_nodes, include_self); end + + # source://rexml//lib/rexml/xpath_parser.rb#942 + def each_unnode(nodeset); end + + # source://rexml//lib/rexml/xpath_parser.rb#641 + def enter(tag, *args); end + + # source://rexml//lib/rexml/xpath_parser.rb#819 + def equality_relational_compare(set1, op, set2); end + + # source://rexml//lib/rexml/xpath_parser.rb#591 + def evaluate_predicate(expression, nodesets); end + + # Expr takes a stack of path elements and a set of nodes (either a Parent + # or an Array and returns an Array of matching nodes + # + # source://rexml//lib/rexml/xpath_parser.rb#175 + def expr(path_stack, nodeset, context = T.unsafe(nil)); end + + # source://rexml//lib/rexml/xpath_parser.rb#582 + def filter_nodeset(nodeset); end + + # source://rexml//lib/rexml/xpath_parser.rb#749 + def following(node); end + + # source://rexml//lib/rexml/xpath_parser.rb#760 + def following_node_of(node); end + + # Returns a String namespace for a node, given a prefix + # The rules are: + # + # 1. Use the supplied namespace mapping first. + # 2. If no mapping was supplied, use the context node to look up the namespace + # + # source://rexml//lib/rexml/xpath_parser.rb#163 + def get_namespace(node, prefix); end + + # source://rexml//lib/rexml/xpath_parser.rb#646 + def leave(tag, *args); end + + # source://rexml//lib/rexml/xpath_parser.rb#767 + def next_sibling_node(node); end + + # source://rexml//lib/rexml/xpath_parser.rb#477 + def node_test(path_stack, nodesets, any_type: T.unsafe(nil)); end + + # source://rexml//lib/rexml/xpath_parser.rb#806 + def norm(b); end + + # source://rexml//lib/rexml/xpath_parser.rb#894 + def normalize_compare_values(a, operator, b); end + + # Builds a nodeset of all of the preceding nodes of the supplied node, + # in reverse document order + # preceding:: includes every element in the document that precedes this node, + # except for ancestors + # + # source://rexml//lib/rexml/xpath_parser.rb#712 + def preceding(node); end + + # source://rexml//lib/rexml/xpath_parser.rb#734 + def preceding_node_of(node); end + + # Reorders an array of nodes so that they are in document order + # It tries to do this efficiently. + # + # FIXME: I need to get rid of this, but the issue is that most of the XPath + # interpreter functions as a filter, which means that we lose context going + # in and out of function calls. If I knew what the index of the nodes was, + # I wouldn't have to do this. Maybe add a document IDX for each node? + # Problems with mutable documents. Or, rewrite everything. + # + # source://rexml//lib/rexml/xpath_parser.rb#659 + def sort(array_of_nodes, order); end + + # source://rexml//lib/rexml/xpath_parser.rb#441 + def step(path_stack, any_type: T.unsafe(nil), order: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rexml//lib/rexml/xpath_parser.rb#154 + def strict?; end + + # source://rexml//lib/rexml/xpath_parser.rb#634 + def trace(*args); end + + # source://rexml//lib/rexml/xpath_parser.rb#954 + def unnode(nodeset); end + + # source://rexml//lib/rexml/xpath_parser.rb#881 + def value_type(value); end +end + +# source://rexml//lib/rexml/xpath_parser.rb#58 +REXML::XPathParser::DEBUG = T.let(T.unsafe(nil), FalseClass) diff --git a/sorbet/rbi/gems/spoom@1.6.1.rbi b/sorbet/rbi/gems/spoom@1.7.0.rbi similarity index 84% rename from sorbet/rbi/gems/spoom@1.6.1.rbi rename to sorbet/rbi/gems/spoom@1.7.0.rbi index ce2e76446..139b8fcb0 100644 --- a/sorbet/rbi/gems/spoom@1.6.1.rbi +++ b/sorbet/rbi/gems/spoom@1.7.0.rbi @@ -14,17 +14,11 @@ # source://spoom//lib/spoom.rb#7 module Spoom class << self - # : (String ruby, file: String) -> Prism::Node + # : (String ruby, file: String, ?comments: bool) -> Prism::Node # # source://spoom//lib/spoom/parse.rb#11 - sig { params(ruby: ::String, file: ::String).returns(::Prism::Node) } - def parse_ruby(ruby, file:); end - - # : (String ruby, file: String) -> [Prism::Node, Array[Prism::Comment]] - # - # source://spoom//lib/spoom/parse.rb#27 - sig { params(ruby: ::String, file: ::String).returns([::Prism::Node, T::Array[::Prism::Comment]]) } - def parse_ruby_with_comments(ruby, file:); end + sig { params(ruby: ::String, file: ::String, comments: T::Boolean).returns(::Prism::Node) } + def parse_ruby(ruby, file:, comments: T.unsafe(nil)); end end end @@ -36,9 +30,12 @@ class Spoom::BacktraceFilter::Minitest < ::Minitest::BacktraceFilter # : (Array[String]? bt) -> Array[String] # # source://spoom//lib/spoom/backtrace_filter/minitest.rb#13 + sig { override.params(bt: T.nilable(T::Array[::String])).returns(T::Array[::String]) } def filter(bt); end end +# : Array[String] +# # source://spoom//lib/spoom/backtrace_filter/minitest.rb#9 Spoom::BacktraceFilter::Minitest::SORBET_PATHS = T.let(T.unsafe(nil), Array) @@ -70,33 +67,30 @@ module Spoom::Cli::Helper # : (String string) -> String # - # source://spoom//lib/spoom/cli/helper.rb#147 + # source://spoom//lib/spoom/cli/helper.rb#149 sig { params(string: ::String).returns(::String) } def blue(string); end # Collect files from `paths`, defaulting to `exec_path` - # : (Array[String] paths) -> Array[String] + # : (Array[String] paths, ?include_rbi_files: bool) -> Array[String] # # source://spoom//lib/spoom/cli/helper.rb#85 - # Collect files from `paths`, defaulting to `exec_path` - sig { params(paths: T::Array[::String]).returns(T::Array[::String]) } - def collect_files(paths); end + sig { params(paths: T::Array[::String], include_rbi_files: T::Boolean).returns(T::Array[::String]) } + def collect_files(paths, include_rbi_files: T.unsafe(nil)); end # Is the `--color` option true? # : -> bool # # @return [Boolean] # - # source://spoom//lib/spoom/cli/helper.rb#111 - # Is the `--color` option true? + # source://spoom//lib/spoom/cli/helper.rb#113 sig { returns(T::Boolean) } def color?; end # Colorize a string if `color?` # : (String string, *Color color) -> String # - # source://spoom//lib/spoom/cli/helper.rb#140 - # Colorize a string if `color?` + # source://spoom//lib/spoom/cli/helper.rb#142 sig { params(string: ::String, color: ::Spoom::Color).returns(::String) } def colorize(string, *color); end @@ -104,7 +98,6 @@ module Spoom::Cli::Helper # : -> Context # # source://spoom//lib/spoom/cli/helper.rb#58 - # Returns the context at `--path` (by default the current working directory) sig { returns(::Spoom::Context) } def context; end @@ -112,13 +105,12 @@ module Spoom::Cli::Helper # : -> Context # # source://spoom//lib/spoom/cli/helper.rb#64 - # Raise if `spoom` is not ran inside a context with a `sorbet/config` file sig { returns(::Spoom::Context) } def context_requiring_sorbet!; end # : (String string) -> String # - # source://spoom//lib/spoom/cli/helper.rb#152 + # source://spoom//lib/spoom/cli/helper.rb#154 sig { params(string: ::String).returns(::String) } def cyan(string); end @@ -126,31 +118,30 @@ module Spoom::Cli::Helper # : -> String # # source://spoom//lib/spoom/cli/helper.rb#79 - # Return the path specified through `--path` sig { returns(::String) } def exec_path; end # : (String string) -> String # - # source://spoom//lib/spoom/cli/helper.rb#157 + # source://spoom//lib/spoom/cli/helper.rb#159 sig { params(string: ::String).returns(::String) } def gray(string); end # : (String string) -> String # - # source://spoom//lib/spoom/cli/helper.rb#162 + # source://spoom//lib/spoom/cli/helper.rb#164 sig { params(string: ::String).returns(::String) } def green(string); end # : (String string) -> String # - # source://spoom//lib/spoom/cli/helper.rb#116 + # source://spoom//lib/spoom/cli/helper.rb#118 sig { params(string: ::String).returns(::String) } def highlight(string); end # : (String string) -> String # - # source://spoom//lib/spoom/cli/helper.rb#167 + # source://spoom//lib/spoom/cli/helper.rb#169 sig { params(string: ::String).returns(::String) } def red(string); end @@ -158,7 +149,6 @@ module Spoom::Cli::Helper # : (String message) -> void # # source://spoom//lib/spoom/cli/helper.rb#19 - # Print `message` on `$stdout` sig { params(message: ::String).void } def say(message); end @@ -168,8 +158,6 @@ module Spoom::Cli::Helper # : (String message, ?status: String?, ?nl: bool) -> void # # source://spoom//lib/spoom/cli/helper.rb#32 - # Print `message` on `$stderr` - # The message is prefixed by a status (default: `Error`). sig { params(message: ::String, status: T.nilable(::String), nl: T::Boolean).void } def say_error(message, status: T.unsafe(nil), nl: T.unsafe(nil)); end @@ -179,14 +167,12 @@ module Spoom::Cli::Helper # : (String message, ?status: String?, ?nl: bool) -> void # # source://spoom//lib/spoom/cli/helper.rb#46 - # Print `message` on `$stderr` - # The message is prefixed by a status (default: `Warning`). sig { params(message: ::String, status: T.nilable(::String), nl: T::Boolean).void } def say_warning(message, status: T.unsafe(nil), nl: T.unsafe(nil)); end # : (String string) -> String # - # source://spoom//lib/spoom/cli/helper.rb#172 + # source://spoom//lib/spoom/cli/helper.rb#174 sig { params(string: ::String).returns(::String) } def yellow(string); end end @@ -389,26 +375,26 @@ class Spoom::Cli::Srb::Main < ::Thor def tc(*args); end end -# source://spoom//lib/spoom/cli/srb/sigs.rb#9 +# source://spoom//lib/spoom/cli/srb/sigs.rb#7 class Spoom::Cli::Srb::Sigs < ::Thor include ::Spoom::Colorize include ::Spoom::Cli::Helper - # source://spoom//lib/spoom/cli/srb/sigs.rb#197 + # source://spoom//lib/spoom/cli/srb/sigs.rb#196 def exec(context, command); end - # source://spoom//lib/spoom/cli/srb/sigs.rb#68 + # source://spoom//lib/spoom/cli/srb/sigs.rb#67 def export(output_path = T.unsafe(nil)); end def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end - # source://spoom//lib/spoom/cli/srb/sigs.rb#49 + # source://spoom//lib/spoom/cli/srb/sigs.rb#48 def strip(*paths); end - # source://spoom//lib/spoom/cli/srb/sigs.rb#174 + # source://spoom//lib/spoom/cli/srb/sigs.rb#173 def transform_files(files, &block); end - # source://spoom//lib/spoom/cli/srb/sigs.rb#20 + # source://spoom//lib/spoom/cli/srb/sigs.rb#19 def translate(*paths); end end @@ -417,15 +403,15 @@ class Spoom::Cli::Srb::Tc < ::Thor include ::Spoom::Colorize include ::Spoom::Cli::Helper - # source://spoom//lib/spoom/cli/srb/tc.rb#132 + # source://spoom//lib/spoom/cli/srb/tc.rb#147 def colorize_message(message); end - # source://spoom//lib/spoom/cli/srb/tc.rb#123 + # source://spoom//lib/spoom/cli/srb/tc.rb#138 def format_error(error, format); end def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end - # source://spoom//lib/spoom/cli/srb/tc.rb#27 + # source://spoom//lib/spoom/cli/srb/tc.rb#28 def tc(*paths_to_select); end end @@ -486,8 +472,6 @@ end # It is used to manipulate files and run commands in the context of this directory. # # source://spoom//lib/spoom/context/bundle.rb#5 -# An abstraction to a Ruby project context -# A context maps to a directory in the file system. class Spoom::Context include ::Spoom::Context::Bundle include ::Spoom::Context::Exec @@ -504,9 +488,6 @@ class Spoom::Context # @return [Context] a new instance of Context # # source://spoom//lib/spoom/context.rb#47 - # Create a new context about `absolute_path` - # The directory will not be created if it doesn't exist. - # Call `#make!` to create it. sig { params(absolute_path: ::String).void } def initialize(absolute_path); end @@ -514,7 +495,6 @@ class Spoom::Context # : String # # source://spoom//lib/spoom/context.rb#40 - # The absolute path to the directory this context is about sig { returns(::String) } def absolute_path; end @@ -526,9 +506,6 @@ class Spoom::Context # : (?String? name) -> instance # # source://spoom//lib/spoom/context.rb#33 - # Create a new context in the system's temporary directory - # `name` is used as prefix to the temporary directory name. - # The directory will be created if it doesn't exist. sig { params(name: T.nilable(::String)).returns(T.attached_class) } def mktmp!(name = T.unsafe(nil)); end end @@ -544,7 +521,6 @@ module Spoom::Context::Bundle # : (String command, ?version: String?, ?capture_err: bool) -> ExecResult # # source://spoom//lib/spoom/context/bundle.rb#32 - # Run a command with `bundle` in this context directory sig { params(command: ::String, version: T.nilable(::String), capture_err: T::Boolean).returns(::Spoom::ExecResult) } def bundle(command, version: T.unsafe(nil), capture_err: T.unsafe(nil)); end @@ -552,7 +528,6 @@ module Spoom::Context::Bundle # : (String command, ?version: String?, ?capture_err: bool) -> ExecResult # # source://spoom//lib/spoom/context/bundle.rb#45 - # Run a command `bundle exec` in this context directory sig { params(command: ::String, version: T.nilable(::String), capture_err: T::Boolean).returns(::Spoom::ExecResult) } def bundle_exec(command, version: T.unsafe(nil), capture_err: T.unsafe(nil)); end @@ -560,7 +535,6 @@ module Spoom::Context::Bundle # : (?version: String?, ?capture_err: bool) -> ExecResult # # source://spoom//lib/spoom/context/bundle.rb#39 - # Run `bundle install` in this context directory sig { params(version: T.nilable(::String), capture_err: T::Boolean).returns(::Spoom::ExecResult) } def bundle_install!(version: T.unsafe(nil), capture_err: T.unsafe(nil)); end @@ -570,8 +544,6 @@ module Spoom::Context::Bundle # : (String gem) -> Gem::Version? # # source://spoom//lib/spoom/context/bundle.rb#61 - # Get `gem` version from the `Gemfile.lock` content - # Returns `nil` if `gem` cannot be found in the Gemfile. sig { params(gem: ::String).returns(T.nilable(::Gem::Version)) } def gem_version_from_gemfile_lock(gem); end @@ -585,7 +557,6 @@ module Spoom::Context::Bundle # : -> String? # # source://spoom//lib/spoom/context/bundle.rb#14 - # Read the contents of the Gemfile in this context directory sig { returns(T.nilable(::String)) } def read_gemfile; end @@ -593,7 +564,6 @@ module Spoom::Context::Bundle # : -> String? # # source://spoom//lib/spoom/context/bundle.rb#20 - # Read the contents of the Gemfile.lock in this context directory sig { returns(T.nilable(::String)) } def read_gemfile_lock; end @@ -601,7 +571,6 @@ module Spoom::Context::Bundle # : (String contents, ?append: bool) -> void # # source://spoom//lib/spoom/context/bundle.rb#26 - # Set the `contents` of the Gemfile in this context directory sig { params(contents: ::String, append: T::Boolean).void } def write_gemfile!(contents, append: T.unsafe(nil)); end end @@ -616,7 +585,6 @@ module Spoom::Context::Exec # : (String command, ?capture_err: bool) -> ExecResult # # source://spoom//lib/spoom/context/exec.rb#32 - # Run a command in this context directory sig { params(command: ::String, capture_err: T::Boolean).returns(::Spoom::ExecResult) } def exec(command, capture_err: T.unsafe(nil)); end end @@ -631,7 +599,6 @@ module Spoom::Context::FileSystem # : (String relative_path) -> String # # source://spoom//lib/spoom/context/file_system.rb#14 - # Returns the absolute path to `relative_path` in the context's directory sig { params(relative_path: ::String).returns(::String) } def absolute_path_to(relative_path); end @@ -653,8 +620,6 @@ module Spoom::Context::FileSystem # : -> void # # source://spoom//lib/spoom/context/file_system.rb#98 - # Delete this context and its content - # Warning: it will `rm -rf` the context directory on the file system. sig { void } def destroy!; end @@ -664,7 +629,6 @@ module Spoom::Context::FileSystem # @return [Boolean] # # source://spoom//lib/spoom/context/file_system.rb#20 - # Does the context directory at `absolute_path` exist and is a directory? sig { returns(T::Boolean) } def exist?; end @@ -674,7 +638,6 @@ module Spoom::Context::FileSystem # @return [Boolean] # # source://spoom//lib/spoom/context/file_system.rb#58 - # Does `relative_path` point to an existing file in this context directory? sig { params(relative_path: ::String).returns(T::Boolean) } def file?(relative_path); end @@ -682,7 +645,6 @@ module Spoom::Context::FileSystem # : (?String pattern) -> Array[String] # # source://spoom//lib/spoom/context/file_system.rb#33 - # List all files in this context matching `pattern` sig { params(pattern: ::String).returns(T::Array[::String]) } def glob(pattern = T.unsafe(nil)); end @@ -690,7 +652,6 @@ module Spoom::Context::FileSystem # : -> Array[String] # # source://spoom//lib/spoom/context/file_system.rb#41 - # List all files at the top level of this context directory sig { returns(T::Array[::String]) } def list; end @@ -698,7 +659,6 @@ module Spoom::Context::FileSystem # : -> void # # source://spoom//lib/spoom/context/file_system.rb#26 - # Create the context directory at `absolute_path` sig { void } def mkdir!; end @@ -706,7 +666,6 @@ module Spoom::Context::FileSystem # : (String from_relative_path, String to_relative_path) -> void # # source://spoom//lib/spoom/context/file_system.rb#88 - # Move the file or directory from `from_relative_path` to `to_relative_path` sig { params(from_relative_path: ::String, to_relative_path: ::String).void } def move!(from_relative_path, to_relative_path); end @@ -716,8 +675,6 @@ module Spoom::Context::FileSystem # : (String relative_path) -> String # # source://spoom//lib/spoom/context/file_system.rb#66 - # Return the contents of the file at `relative_path` in this context directory - # Will raise if the file doesn't exist. sig { params(relative_path: ::String).returns(::String) } def read(relative_path); end @@ -725,7 +682,6 @@ module Spoom::Context::FileSystem # : (String relative_path) -> void # # source://spoom//lib/spoom/context/file_system.rb#82 - # Remove the path at `relative_path` (recursive + force) in this context directory sig { params(relative_path: ::String).void } def remove!(relative_path); end @@ -735,8 +691,6 @@ module Spoom::Context::FileSystem # : (String relative_path, ?String contents, ?append: bool) -> void # # source://spoom//lib/spoom/context/file_system.rb#74 - # Write `contents` in the file at `relative_path` in this context directory - # Append to the file if `append` is true. sig { params(relative_path: ::String, contents: ::String, append: T::Boolean).void } def write!(relative_path, contents = T.unsafe(nil), append: T.unsafe(nil)); end end @@ -751,7 +705,6 @@ module Spoom::Context::Git # : (String command) -> ExecResult # # source://spoom//lib/spoom/context/git.rb#38 - # Run a command prefixed by `git` in this context directory sig { params(command: ::String).returns(::Spoom::ExecResult) } def git(command); end @@ -759,7 +712,6 @@ module Spoom::Context::Git # : (?ref: String) -> ExecResult # # source://spoom//lib/spoom/context/git.rb#57 - # Run `git checkout` in this context directory sig { params(ref: ::String).returns(::Spoom::ExecResult) } def git_checkout!(ref: T.unsafe(nil)); end @@ -767,7 +719,6 @@ module Spoom::Context::Git # : (String branch_name, ?ref: String?) -> ExecResult # # source://spoom//lib/spoom/context/git.rb#63 - # Run `git checkout -b <branch-name> <ref>` in this context directory sig { params(branch_name: ::String, ref: T.nilable(::String)).returns(::Spoom::ExecResult) } def git_checkout_new_branch!(branch_name, ref: T.unsafe(nil)); end @@ -775,7 +726,6 @@ module Spoom::Context::Git # : (?message: String, ?time: Time, ?allow_empty: bool) -> ExecResult # # source://spoom//lib/spoom/context/git.rb#73 - # Run `git add . && git commit` in this context directory sig { params(message: ::String, time: ::Time, allow_empty: T::Boolean).returns(::Spoom::ExecResult) } def git_commit!(message: T.unsafe(nil), time: T.unsafe(nil), allow_empty: T.unsafe(nil)); end @@ -783,7 +733,6 @@ module Spoom::Context::Git # : -> String? # # source://spoom//lib/spoom/context/git.rb#84 - # Get the current git branch in this context directory sig { returns(T.nilable(::String)) } def git_current_branch; end @@ -791,7 +740,6 @@ module Spoom::Context::Git # : (*String arg) -> ExecResult # # source://spoom//lib/spoom/context/git.rb#93 - # Run `git diff` in this context directory sig { params(arg: ::String).returns(::Spoom::ExecResult) } def git_diff(*arg); end @@ -802,9 +750,6 @@ module Spoom::Context::Git # : (?branch: String?) -> ExecResult # # source://spoom//lib/spoom/context/git.rb#47 - # Run `git init` in this context directory - # Warning: passing a branch will run `git init -b <branch>` which is only available in git 2.28+. - # In older versions, use `git_init!` followed by `git("checkout -b <branch>")`. sig { params(branch: T.nilable(::String)).returns(::Spoom::ExecResult) } def git_init!(branch: T.unsafe(nil)); end @@ -812,7 +757,6 @@ module Spoom::Context::Git # : (?short_sha: bool) -> Spoom::Git::Commit? # # source://spoom//lib/spoom/context/git.rb#99 - # Get the last commit in the currently checked out branch sig { params(short_sha: T::Boolean).returns(T.nilable(::Spoom::Git::Commit)) } def git_last_commit(short_sha: T.unsafe(nil)); end @@ -826,7 +770,6 @@ module Spoom::Context::Git # : (String remote, String ref, ?force: bool) -> ExecResult # # source://spoom//lib/spoom/context/git.rb#116 - # Run `git push <remote> <ref>` in this context directory sig { params(remote: ::String, ref: ::String, force: T::Boolean).returns(::Spoom::ExecResult) } def git_push!(remote, ref, force: T.unsafe(nil)); end @@ -842,7 +785,6 @@ module Spoom::Context::Git # @return [Boolean] # # source://spoom//lib/spoom/context/git.rb#127 - # Is there uncommitted changes in this context directory? sig { params(path: ::String).returns(T::Boolean) } def git_workdir_clean?(path: T.unsafe(nil)); end end @@ -859,7 +801,6 @@ module Spoom::Context::Sorbet # @return [Boolean] # # source://spoom//lib/spoom/context/sorbet.rb#106 - # Does this context has a `sorbet/config` file? sig { returns(T::Boolean) } def has_sorbet_config?; end @@ -867,7 +808,6 @@ module Spoom::Context::Sorbet # : (String relative_path) -> String? # # source://spoom//lib/spoom/context/sorbet.rb#129 - # Read the strictness sigil from the file at `relative_path` (returns `nil` if no sigil) sig { params(relative_path: ::String).returns(T.nilable(::String)) } def read_file_strictness(relative_path); end @@ -875,7 +815,6 @@ module Spoom::Context::Sorbet # : -> String # # source://spoom//lib/spoom/context/sorbet.rb#117 - # Read the contents of `sorbet/config` in this context directory sig { returns(::String) } def read_sorbet_config; end @@ -889,7 +828,6 @@ module Spoom::Context::Sorbet # : -> Spoom::Git::Commit? # # source://spoom//lib/spoom/context/sorbet.rb#135 - # Get the commit introducing the `sorbet/config` file sig { returns(T.nilable(::Spoom::Git::Commit)) } def sorbet_intro_commit; end @@ -897,7 +835,6 @@ module Spoom::Context::Sorbet # : -> Spoom::Git::Commit? # # source://spoom//lib/spoom/context/sorbet.rb#147 - # Get the commit removing the `sorbet/config` file sig { returns(T.nilable(::Spoom::Git::Commit)) } def sorbet_removal_commit; end @@ -905,7 +842,6 @@ module Spoom::Context::Sorbet # : (*String arg, ?sorbet_bin: String?, ?capture_err: bool) -> ExecResult # # source://spoom//lib/spoom/context/sorbet.rb#14 - # Run `bundle exec srb` in this context directory sig { params(arg: ::String, sorbet_bin: T.nilable(::String), capture_err: T::Boolean).returns(::Spoom::ExecResult) } def srb(*arg, sorbet_bin: T.unsafe(nil), capture_err: T.unsafe(nil)); end @@ -913,7 +849,6 @@ module Spoom::Context::Sorbet # : (?with_config: Spoom::Sorbet::Config?, ?include_rbis: bool) -> Array[String] # # source://spoom//lib/spoom/context/sorbet.rb#58 - # List all files typechecked by Sorbet from its `config` sig { params(with_config: T.nilable(::Spoom::Sorbet::Config), include_rbis: T::Boolean).returns(T::Array[::String]) } def srb_files(with_config: T.unsafe(nil), include_rbis: T.unsafe(nil)); end @@ -921,7 +856,6 @@ module Spoom::Context::Sorbet # : (String strictness, ?with_config: Spoom::Sorbet::Config?, ?include_rbis: bool) -> Array[String] # # source://spoom//lib/spoom/context/sorbet.rb#91 - # List all files typechecked by Sorbet from its `config` that matches `strictness` sig do params( strictness: ::String, @@ -959,7 +893,6 @@ module Spoom::Context::Sorbet # : (String contents, ?append: bool) -> void # # source://spoom//lib/spoom/context/sorbet.rb#123 - # Set the `contents` of `sorbet/config` in this context directory sig { params(contents: ::String, append: T::Boolean).void } def write_sorbet_config!(contents, append: T.unsafe(nil)); end end @@ -1015,7 +948,6 @@ class Spoom::Coverage::Cards::Card < ::Spoom::Coverage::Template # : String? # # source://spoom//lib/spoom/coverage/report.rb#94 - # @return [String, nil] def body; end # : String? @@ -1025,6 +957,8 @@ class Spoom::Coverage::Cards::Card < ::Spoom::Coverage::Template def title; end end +# : String +# # source://spoom//lib/spoom/coverage/report.rb#91 Spoom::Coverage::Cards::Card::TEMPLATE = T.let(T.unsafe(nil), String) @@ -1108,6 +1042,8 @@ class Spoom::Coverage::Cards::Snapshot < ::Spoom::Coverage::Cards::Card def snapshot; end end +# : String +# # source://spoom//lib/spoom/coverage/report.rb#123 Spoom::Coverage::Cards::Snapshot::TEMPLATE = T.let(T.unsafe(nil), String) @@ -1346,7 +1282,7 @@ class Spoom::Coverage::D3::ColorPalette < ::T::Struct prop :strong, ::String class << self - # source://sorbet-runtime/0.5.11965/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.12123/lib/types/struct.rb#13 def inherited(s); end end end @@ -1740,6 +1676,8 @@ class Spoom::Coverage::Page < ::Spoom::Coverage::Template def title; end end +# : String +# # source://spoom//lib/spoom/coverage/report.rb#43 Spoom::Coverage::Page::TEMPLATE = T.let(T.unsafe(nil), String) @@ -1824,7 +1762,7 @@ class Spoom::Coverage::Snapshot < ::T::Struct sig { params(obj: T::Hash[::String, T.untyped]).returns(::Spoom::Coverage::Snapshot) } def from_obj(obj); end - # source://sorbet-runtime/0.5.11965/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.12123/lib/types/struct.rb#13 def inherited(s); end end end @@ -1869,7 +1807,6 @@ class Spoom::Coverage::Template # @return [Template] a new instance of Template # # source://spoom//lib/spoom/coverage/report.rb#17 - # Create a new template from an Erb file path sig { params(template: ::String).void } def initialize(template:); end @@ -1897,13 +1834,13 @@ module Spoom::Deadcode class << self # : (Context context) -> Array[singleton(Plugins::Base)] # - # source://spoom//lib/spoom/deadcode/plugins.rb#73 + # source://spoom//lib/spoom/deadcode/plugins.rb#67 sig { params(context: ::Spoom::Context).returns(T::Array[T.class_of(Spoom::Deadcode::Plugins::Base)]) } def load_custom_plugins(context); end # : (Context context) -> Set[singleton(Plugins::Base)] # - # source://spoom//lib/spoom/deadcode/plugins.rb#59 + # source://spoom//lib/spoom/deadcode/plugins.rb#53 sig { params(context: ::Spoom::Context).returns(T::Set[T.class_of(Spoom::Deadcode::Plugins::Base)]) } def plugins_from_gemfile_lock(context); end end @@ -1936,7 +1873,6 @@ class Spoom::Deadcode::Definition < ::T::Struct # @return [Boolean] # # source://spoom//lib/spoom/deadcode/definition.rb#71 - # Status sig { returns(T::Boolean) } def alive?; end @@ -1945,7 +1881,6 @@ class Spoom::Deadcode::Definition < ::T::Struct # @return [Boolean] # # source://spoom//lib/spoom/deadcode/definition.rb#39 - # Kind sig { returns(T::Boolean) } def attr_reader?; end @@ -2014,12 +1949,11 @@ class Spoom::Deadcode::Definition < ::T::Struct # : (*untyped args) -> String # # source://spoom//lib/spoom/deadcode/definition.rb#98 - # Utils sig { params(args: T.untyped).returns(::String) } def to_json(*args); end class << self - # source://sorbet-runtime/0.5.11965/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.12123/lib/types/struct.rb#13 def inherited(s); end end end @@ -2136,7 +2070,6 @@ class Spoom::Deadcode::Index # : (String name) -> Array[Definition] # # source://spoom//lib/spoom/deadcode/index.rb#210 - # Utils sig { params(name: ::String).returns(T::Array[::Spoom::Deadcode::Definition]) } def definitions_for_name(name); end @@ -2146,8 +2079,6 @@ class Spoom::Deadcode::Index # : -> void # # source://spoom//lib/spoom/deadcode/index.rb#118 - # Mark all definitions having a reference of the same name as `alive` - # To be called once all the files have been indexed and all the definitions and references discovered. sig { void } def finalize!; end @@ -2166,7 +2097,6 @@ class Spoom::Deadcode::Index # : (String file, ?plugins: Array[Plugins::Base]) -> void # # source://spoom//lib/spoom/deadcode/index.rb#35 - # Indexing sig { params(file: ::String, plugins: T::Array[::Spoom::Deadcode::Plugins::Base]).void } def index_file(file, plugins: T.unsafe(nil)); end @@ -2247,7 +2177,9 @@ class Spoom::Deadcode::Indexer < ::Spoom::Visitor def visit_call_node(node); end end -# source://spoom//lib/spoom/deadcode/plugins.rb#36 +# : Set[singleton(Plugins::Base)] +# +# source://spoom//lib/spoom/deadcode/plugins.rb#33 Spoom::Deadcode::PLUGINS_FOR_GEM = T.let(T.unsafe(nil), Hash) # source://spoom//lib/spoom/deadcode/plugins/base.rb#8 @@ -2275,13 +2207,13 @@ end class Spoom::Deadcode::Plugins::ActionPack < ::Spoom::Deadcode::Plugins::Base # : (Model::Method definition) -> void # - # source://spoom//lib/spoom/deadcode/plugins/actionpack.rb#30 + # source://spoom//lib/spoom/deadcode/plugins/actionpack.rb#27 sig { override.params(definition: ::Spoom::Model::Method).void } def on_define_method(definition); end # : (Send send) -> void # - # source://spoom//lib/spoom/deadcode/plugins/actionpack.rb#39 + # source://spoom//lib/spoom/deadcode/plugins/actionpack.rb#36 sig { override.params(send: ::Spoom::Deadcode::Send).void } def on_send(send); end end @@ -2305,18 +2237,27 @@ end class Spoom::Deadcode::Plugins::ActiveRecord < ::Spoom::Deadcode::Plugins::Base # : (Send send) -> void # - # source://spoom//lib/spoom/deadcode/plugins/active_record.rb#73 + # source://spoom//lib/spoom/deadcode/plugins/active_record.rb#69 sig { override.params(send: ::Spoom::Deadcode::Send).void } def on_send(send); end end -# source://spoom//lib/spoom/deadcode/plugins/active_record.rb#62 +# : Array[String] +# +# source://spoom//lib/spoom/deadcode/plugins/active_record.rb#61 Spoom::Deadcode::Plugins::ActiveRecord::ARRAY_METHODS = T.let(T.unsafe(nil), Array) # source://spoom//lib/spoom/deadcode/plugins/active_record.rb#18 Spoom::Deadcode::Plugins::ActiveRecord::CALLBACKS = T.let(T.unsafe(nil), Array) -# source://spoom//lib/spoom/deadcode/plugins/active_record.rb#47 +# : Array[String] +# +# source://spoom//lib/spoom/deadcode/plugins/active_record.rb#44 +Spoom::Deadcode::Plugins::ActiveRecord::CALLBACK_CONDITIONS = T.let(T.unsafe(nil), Array) + +# : Array[String] +# +# source://spoom//lib/spoom/deadcode/plugins/active_record.rb#49 Spoom::Deadcode::Plugins::ActiveRecord::CRUD_METHODS = T.let(T.unsafe(nil), Array) # source://spoom//lib/spoom/deadcode/plugins/active_support.rb#7 @@ -2328,6 +2269,8 @@ class Spoom::Deadcode::Plugins::ActiveSupport < ::Spoom::Deadcode::Plugins::Base def on_send(send); end end +# : Array[String] +# # source://spoom//lib/spoom/deadcode/plugins/active_support.rb#19 Spoom::Deadcode::Plugins::ActiveSupport::SETUP_AND_TEARDOWN_METHODS = T.let(T.unsafe(nil), Array) @@ -2355,7 +2298,6 @@ class Spoom::Deadcode::Plugins::Base # : (Model::Attr definition) -> void # # source://spoom//lib/spoom/deadcode/plugins/base.rb#155 - # Do not override this method, use `on_define_accessor` instead. sig { params(definition: ::Spoom::Model::Attr).void } def internal_on_define_accessor(definition); end @@ -2363,7 +2305,6 @@ class Spoom::Deadcode::Plugins::Base # : (Model::Class definition) -> void # # source://spoom//lib/spoom/deadcode/plugins/base.rb#179 - # Do not override this method, use `on_define_class` instead. sig { params(definition: ::Spoom::Model::Class).void } def internal_on_define_class(definition); end @@ -2371,7 +2312,6 @@ class Spoom::Deadcode::Plugins::Base # : (Model::Constant definition) -> void # # source://spoom//lib/spoom/deadcode/plugins/base.rb#209 - # Do not override this method, use `on_define_constant` instead. sig { params(definition: ::Spoom::Model::Constant).void } def internal_on_define_constant(definition); end @@ -2379,7 +2319,6 @@ class Spoom::Deadcode::Plugins::Base # : (Model::Method definition) -> void # # source://spoom//lib/spoom/deadcode/plugins/base.rb#235 - # Do not override this method, use `on_define_method` instead. sig { params(definition: ::Spoom::Model::Method).void } def internal_on_define_method(definition); end @@ -2387,7 +2326,6 @@ class Spoom::Deadcode::Plugins::Base # : (Model::Module definition) -> void # # source://spoom//lib/spoom/deadcode/plugins/base.rb#261 - # Do not override this method, use `on_define_module` instead. sig { params(definition: ::Spoom::Model::Module).void } def internal_on_define_module(definition); end @@ -2407,17 +2345,6 @@ class Spoom::Deadcode::Plugins::Base # : (Model::Attr definition) -> void # # source://spoom//lib/spoom/deadcode/plugins/base.rb#149 - # Called when an accessor is defined. - # Will be called when the indexer processes a `attr_reader`, `attr_writer` or `attr_accessor` node. - # Note that when this method is called, the definition for the node has already been added to the index. - # It is still possible to ignore it from the plugin: - # ~~~rb - # class MyPlugin < Spoom::Deadcode::Plugins::Base - # def on_define_accessor(definition) - # @index.ignore(definition) if symbol_def.name == "foo" - # end - # end - # ~~~ sig { params(definition: ::Spoom::Model::Attr).void } def on_define_accessor(definition); end @@ -2437,17 +2364,6 @@ class Spoom::Deadcode::Plugins::Base # : (Model::Class definition) -> void # # source://spoom//lib/spoom/deadcode/plugins/base.rb#173 - # Called when a class is defined. - # Will be called when the indexer processes a `class` node. - # Note that when this method is called, the definition for the node has already been added to the index. - # It is still possible to ignore it from the plugin: - # ~~~rb - # class MyPlugin < Spoom::Deadcode::Plugins::Base - # def on_define_class(definition) - # @index.ignore(definition) if definition.name == "Foo" - # end - # end - # ~~~ sig { params(definition: ::Spoom::Model::Class).void } def on_define_class(definition); end @@ -2467,17 +2383,6 @@ class Spoom::Deadcode::Plugins::Base # : (Model::Constant definition) -> void # # source://spoom//lib/spoom/deadcode/plugins/base.rb#203 - # Called when a constant is defined. - # Will be called when the indexer processes a `CONST =` node. - # Note that when this method is called, the definition for the node has already been added to the index. - # It is still possible to ignore it from the plugin: - # ~~~rb - # class MyPlugin < Spoom::Deadcode::Plugins::Base - # def on_define_constant(definition) - # @index.ignore(definition) if definition.name == "FOO" - # end - # end - # ~~~ sig { params(definition: ::Spoom::Model::Constant).void } def on_define_constant(definition); end @@ -2497,17 +2402,6 @@ class Spoom::Deadcode::Plugins::Base # : (Model::Method definition) -> void # # source://spoom//lib/spoom/deadcode/plugins/base.rb#229 - # Called when a method is defined. - # Will be called when the indexer processes a `def` or `defs` node. - # Note that when this method is called, the definition for the node has already been added to the index. - # It is still possible to ignore it from the plugin: - # ~~~rb - # class MyPlugin < Spoom::Deadcode::Plugins::Base - # def on_define_method(definition) - # @index.ignore(definition) if definition.name == "foo" - # end - # end - # ~~~ sig { params(definition: ::Spoom::Model::Method).void } def on_define_method(definition); end @@ -2527,17 +2421,6 @@ class Spoom::Deadcode::Plugins::Base # : (Model::Module definition) -> void # # source://spoom//lib/spoom/deadcode/plugins/base.rb#255 - # Called when a module is defined. - # Will be called when the indexer processes a `module` node. - # Note that when this method is called, the definition for the node has already been added to the index. - # It is still possible to ignore it from the plugin: - # ~~~rb - # class MyPlugin < Spoom::Deadcode::Plugins::Base - # def on_define_module(definition) - # @index.ignore(definition) if definition.name == "Foo" - # end - # end - # ~~~ sig { params(definition: ::Spoom::Model::Module).void } def on_define_module(definition); end @@ -2557,17 +2440,6 @@ class Spoom::Deadcode::Plugins::Base # : (Send send) -> void # # source://spoom//lib/spoom/deadcode/plugins/base.rb#281 - # Called when a send is being processed - # ~~~rb - # class MyPlugin < Spoom::Deadcode::Plugins::Base - # def on_send(send) - # return unless send.name == "dsl_method" - # return if send.args.empty? - # method_name = send.args.first.slice.delete_prefix(":") - # @index.reference_method(method_name, send.node, send.loc) - # end - # end - # ~~~ sig { params(send: ::Spoom::Deadcode::Send).void } def on_send(send); end @@ -2576,7 +2448,6 @@ class Spoom::Deadcode::Plugins::Base # : (String name) -> String # # source://spoom//lib/spoom/deadcode/plugins/base.rb#349 - # Plugin utils sig { params(name: ::String).returns(::String) } def camelize(name); end @@ -2645,7 +2516,6 @@ class Spoom::Deadcode::Plugins::Base # @return [Boolean] # # source://spoom//lib/spoom/deadcode/plugins/base.rb#290 - # DSL support sig { params(definition: ::Spoom::Model::Namespace, superclass_name: ::String).returns(T::Boolean) } def subclass_of?(definition, superclass_name); end @@ -2666,17 +2536,6 @@ class Spoom::Deadcode::Plugins::Base # : (*(String | Regexp) names) -> void # # source://spoom//lib/spoom/deadcode/plugins/base.rb#49 - # Mark classes directly subclassing a class matching `names` as ignored. - # Names can be either strings or regexps: - # ~~~rb - # class MyPlugin < Spoom::Deadcode::Plugins::Base - # ignore_classes_inheriting_from( - # "Foo", - # "Bar", - # /Baz.*/, - # ) - # end - # ~~~ sig { params(names: T.any(::Regexp, ::String)).void } def ignore_classes_inheriting_from(*names); end @@ -2696,17 +2555,6 @@ class Spoom::Deadcode::Plugins::Base # : (*(String | Regexp) names) -> void # # source://spoom//lib/spoom/deadcode/plugins/base.rb#31 - # Mark classes matching `names` as ignored. - # Names can be either strings or regexps: - # ~~~rb - # class MyPlugin < Spoom::Deadcode::Plugins::Base - # ignore_class_names( - # "Foo", - # "Bar", - # /Baz.*/, - # ) - # end - # ~~~ sig { params(names: T.any(::Regexp, ::String)).void } def ignore_classes_named(*names); end @@ -2726,17 +2574,6 @@ class Spoom::Deadcode::Plugins::Base # : (*(String | Regexp) names) -> void # # source://spoom//lib/spoom/deadcode/plugins/base.rb#67 - # Mark constants matching `names` as ignored. - # Names can be either strings or regexps: - # ~~~rb - # class MyPlugin < Spoom::Deadcode::Plugins::Base - # ignore_class_names( - # "FOO", - # "BAR", - # /BAZ.*/, - # ) - # end - # ~~~ sig { params(names: T.any(::Regexp, ::String)).void } def ignore_constants_named(*names); end @@ -2756,17 +2593,6 @@ class Spoom::Deadcode::Plugins::Base # : (*(String | Regexp) names) -> void # # source://spoom//lib/spoom/deadcode/plugins/base.rb#85 - # Mark methods matching `names` as ignored. - # Names can be either strings or regexps: - # ~~~rb - # class MyPlugin < Spoom::Deadcode::Plugins::Base - # ignore_method_names( - # "foo", - # "bar", - # /baz.*/, - # ) - # end - # ~~~ sig { params(names: T.any(::Regexp, ::String)).void } def ignore_methods_named(*names); end @@ -2786,17 +2612,6 @@ class Spoom::Deadcode::Plugins::Base # : (*(String | Regexp) names) -> void # # source://spoom//lib/spoom/deadcode/plugins/base.rb#103 - # Mark modules matching `names` as ignored. - # Names can be either strings or regexps: - # ~~~rb - # class MyPlugin < Spoom::Deadcode::Plugins::Base - # ignore_class_names( - # "Foo", - # "Bar", - # /Baz.*/, - # ) - # end - # ~~~ sig { params(names: T.any(::Regexp, ::String)).void } def ignore_modules_named(*names); end @@ -2911,6 +2726,8 @@ class Spoom::Deadcode::Plugins::Rubocop < ::Spoom::Deadcode::Plugins::Base def on_define_method(definition); end end +# : Set[String] +# # source://spoom//lib/spoom/deadcode/plugins/rubocop.rb#8 Spoom::Deadcode::Plugins::Rubocop::RUBOCOP_CONSTANTS = T.let(T.unsafe(nil), Set) @@ -2993,13 +2810,13 @@ end # source://spoom//lib/spoom/deadcode/remover.rb#7 class Spoom::Deadcode::Remover::Error < ::Spoom::Error; end -# source://spoom//lib/spoom/deadcode/remover.rb#362 +# source://spoom//lib/spoom/deadcode/remover.rb#366 class Spoom::Deadcode::Remover::NodeContext # : (String source, Hash[Integer, Prism::Comment] comments, Prism::Node node, Array[Prism::Node] nesting) -> void # # @return [NodeContext] a new instance of NodeContext # - # source://spoom//lib/spoom/deadcode/remover.rb#373 + # source://spoom//lib/spoom/deadcode/remover.rb#377 sig do params( source: ::String, @@ -3012,49 +2829,48 @@ class Spoom::Deadcode::Remover::NodeContext # : (Prism::Node node) -> Array[Prism::Comment] # - # source://spoom//lib/spoom/deadcode/remover.rb#487 + # source://spoom//lib/spoom/deadcode/remover.rb#491 sig { params(node: ::Prism::Node).returns(T::Array[::Prism::Comment]) } def attached_comments(node); end # : -> Prism::CallNode? # - # source://spoom//lib/spoom/deadcode/remover.rb#515 + # source://spoom//lib/spoom/deadcode/remover.rb#519 sig { returns(T.nilable(::Prism::CallNode)) } def attached_sig; end # : -> Array[Prism::Node] # - # source://spoom//lib/spoom/deadcode/remover.rb#502 + # source://spoom//lib/spoom/deadcode/remover.rb#506 sig { returns(T::Array[::Prism::Node]) } def attached_sigs; end # : Hash[Integer, Prism::Comment] # - # source://spoom//lib/spoom/deadcode/remover.rb#364 + # source://spoom//lib/spoom/deadcode/remover.rb#368 sig { returns(T::Hash[::Integer, ::Prism::Comment]) } def comments; end # : (Integer start_line, Integer end_line) -> Array[Prism::Comment] # - # source://spoom//lib/spoom/deadcode/remover.rb#475 + # source://spoom//lib/spoom/deadcode/remover.rb#479 sig { params(start_line: ::Integer, end_line: ::Integer).returns(T::Array[::Prism::Comment]) } def comments_between_lines(start_line, end_line); end # : Array[Prism::Node] # - # source://spoom//lib/spoom/deadcode/remover.rb#370 + # source://spoom//lib/spoom/deadcode/remover.rb#374 sig { returns(T::Array[::Prism::Node]) } def nesting; end # : Array[Prism::Node] # - # source://spoom//lib/spoom/deadcode/remover.rb#370 - # @return [Array<Prism::Node>] + # source://spoom//lib/spoom/deadcode/remover.rb#374 def nesting=(_arg0); end # : -> Prism::Node? # - # source://spoom//lib/spoom/deadcode/remover.rb#425 + # source://spoom//lib/spoom/deadcode/remover.rb#429 sig { returns(T.nilable(::Prism::Node)) } def next_node; end @@ -3062,13 +2878,13 @@ class Spoom::Deadcode::Remover::NodeContext # # @raise [Error] # - # source://spoom//lib/spoom/deadcode/remover.rb#414 + # source://spoom//lib/spoom/deadcode/remover.rb#418 sig { returns(T::Array[::Prism::Node]) } def next_nodes; end # : Prism::Node # - # source://spoom//lib/spoom/deadcode/remover.rb#367 + # source://spoom//lib/spoom/deadcode/remover.rb#371 sig { returns(::Prism::Node) } def node; end @@ -3076,7 +2892,7 @@ class Spoom::Deadcode::Remover::NodeContext # # @raise [Error] # - # source://spoom//lib/spoom/deadcode/remover.rb#389 + # source://spoom//lib/spoom/deadcode/remover.rb#393 sig { returns(::Spoom::Deadcode::Remover::NodeContext) } def parent_context; end @@ -3084,13 +2900,13 @@ class Spoom::Deadcode::Remover::NodeContext # # @raise [Error] # - # source://spoom//lib/spoom/deadcode/remover.rb#381 + # source://spoom//lib/spoom/deadcode/remover.rb#385 sig { returns(::Prism::Node) } def parent_node; end # : -> Prism::Node? # - # source://spoom//lib/spoom/deadcode/remover.rb#409 + # source://spoom//lib/spoom/deadcode/remover.rb#413 sig { returns(T.nilable(::Prism::Node)) } def previous_node; end @@ -3098,13 +2914,13 @@ class Spoom::Deadcode::Remover::NodeContext # # @raise [Error] # - # source://spoom//lib/spoom/deadcode/remover.rb#398 + # source://spoom//lib/spoom/deadcode/remover.rb#402 sig { returns(T::Array[::Prism::Node]) } def previous_nodes; end # : -> NodeContext? # - # source://spoom//lib/spoom/deadcode/remover.rb#430 + # source://spoom//lib/spoom/deadcode/remover.rb#434 sig { returns(T.nilable(::Spoom::Deadcode::Remover::NodeContext)) } def sclass_context; end @@ -3112,7 +2928,7 @@ class Spoom::Deadcode::Remover::NodeContext # # @return [Boolean] # - # source://spoom//lib/spoom/deadcode/remover.rb#463 + # source://spoom//lib/spoom/deadcode/remover.rb#467 sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } def sorbet_extend_sig?(node); end @@ -3120,43 +2936,43 @@ class Spoom::Deadcode::Remover::NodeContext # # @return [Boolean] # - # source://spoom//lib/spoom/deadcode/remover.rb#458 + # source://spoom//lib/spoom/deadcode/remover.rb#462 sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } def sorbet_signature?(node); end end -# source://spoom//lib/spoom/deadcode/remover.rb#530 +# source://spoom//lib/spoom/deadcode/remover.rb#534 class Spoom::Deadcode::Remover::NodeFinder < ::Spoom::Visitor # : (Location location, Definition::Kind? kind) -> void # # @return [NodeFinder] a new instance of NodeFinder # - # source://spoom//lib/spoom/deadcode/remover.rb#598 + # source://spoom//lib/spoom/deadcode/remover.rb#599 sig { params(location: ::Spoom::Location, kind: T.nilable(::Spoom::Deadcode::Definition::Kind)).void } def initialize(location, kind); end # : Prism::Node? # - # source://spoom//lib/spoom/deadcode/remover.rb#592 + # source://spoom//lib/spoom/deadcode/remover.rb#593 sig { returns(T.nilable(::Prism::Node)) } def node; end # : Array[Prism::Node] # - # source://spoom//lib/spoom/deadcode/remover.rb#595 + # source://spoom//lib/spoom/deadcode/remover.rb#596 sig { returns(T::Array[::Prism::Node]) } def nodes_nesting; end # : (Prism::Node? node) -> void # - # source://spoom//lib/spoom/deadcode/remover.rb#608 + # source://spoom//lib/spoom/deadcode/remover.rb#609 sig { override.params(node: T.nilable(::Prism::Node)).void } def visit(node); end class << self # : (String source, Location location, Definition::Kind? kind) -> NodeContext # - # source://spoom//lib/spoom/deadcode/remover.rb#533 + # source://spoom//lib/spoom/deadcode/remover.rb#537 sig do params( source: ::String, @@ -3170,7 +2986,7 @@ class Spoom::Deadcode::Remover::NodeFinder < ::Spoom::Visitor # # @return [Boolean] # - # source://spoom//lib/spoom/deadcode/remover.rb#567 + # source://spoom//lib/spoom/deadcode/remover.rb#568 sig { params(node: ::Prism::Node, kind: ::Spoom::Deadcode::Definition::Kind).returns(T::Boolean) } def node_match_kind?(node, kind); end end @@ -3208,13 +3024,13 @@ class Spoom::Deadcode::Remover::NodeRemover # : (NodeContext context) -> void # - # source://spoom//lib/spoom/deadcode/remover.rb#149 + # source://spoom//lib/spoom/deadcode/remover.rb#151 sig { params(context: ::Spoom::Deadcode::Remover::NodeContext).void } def delete_attr_accessor(context); end # : (Integer start_char, Integer end_char) -> void # - # source://spoom//lib/spoom/deadcode/remover.rb#321 + # source://spoom//lib/spoom/deadcode/remover.rb#325 sig { params(start_char: ::Integer, end_char: ::Integer).void } def delete_chars(start_char, end_char); end @@ -3226,19 +3042,19 @@ class Spoom::Deadcode::Remover::NodeRemover # : (Integer start_line, Integer end_line) -> void # - # source://spoom//lib/spoom/deadcode/remover.rb#314 + # source://spoom//lib/spoom/deadcode/remover.rb#318 sig { params(start_line: ::Integer, end_line: ::Integer).void } def delete_lines(start_line, end_line); end # : (NodeContext context) -> void # - # source://spoom//lib/spoom/deadcode/remover.rb#251 + # source://spoom//lib/spoom/deadcode/remover.rb#255 sig { params(context: ::Spoom::Deadcode::Remover::NodeContext).void } def delete_node_and_comments_and_sigs(context); end # : (Prism::Node node, NodeContext send_context, was_removed: bool) -> void # - # source://spoom//lib/spoom/deadcode/remover.rb#208 + # source://spoom//lib/spoom/deadcode/remover.rb#212 sig do params( node: ::Prism::Node, @@ -3250,13 +3066,13 @@ class Spoom::Deadcode::Remover::NodeRemover # : (Integer start_char, Integer end_char, String replacement) -> void # - # source://spoom//lib/spoom/deadcode/remover.rb#326 + # source://spoom//lib/spoom/deadcode/remover.rb#330 sig { params(start_char: ::Integer, end_char: ::Integer, replacement: ::String).void } def replace_chars(start_char, end_char, replacement); end # : (Prism::CallNode node, name: String, kind: Definition::Kind?) -> String # - # source://spoom//lib/spoom/deadcode/remover.rb#331 + # source://spoom//lib/spoom/deadcode/remover.rb#335 sig do params( node: ::Prism::CallNode, @@ -3297,7 +3113,7 @@ class Spoom::Deadcode::Send < ::T::Struct def each_arg_assoc(&block); end class << self - # source://sorbet-runtime/0.5.11965/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.12123/lib/types/struct.rb#13 def inherited(s); end end end @@ -3319,7 +3135,7 @@ class Spoom::ExecResult < ::T::Struct def to_s; end class << self - # source://sorbet-runtime/0.5.11965/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.12123/lib/types/struct.rb#13 def inherited(s); end end end @@ -3339,12 +3155,6 @@ class Spoom::FileCollector # @return [FileCollector] a new instance of FileCollector # # source://spoom//lib/spoom/file_collector.rb#18 - # Initialize a new file collector - # If `allow_extensions` is empty, all files are collected. - # If `allow_extensions` is an array of extensions, only files with one of these extensions are collected. - # If `allow_mime_types` is empty, all files are collected. - # If `allow_mime_types` is an array of mimetypes, files without an extension are collected if their mimetype is in - # the list. sig do params( allow_extensions: T::Array[::String], @@ -3433,8 +3243,6 @@ class Spoom::FileTree # : (String path) -> Node # # source://spoom//lib/spoom/file_tree.rb#23 - # Add a `path` to the tree - # This will create all nodes until the root of `path`. sig { params(path: ::String).returns(::Spoom::FileTree::Node) } def add_path(path); end @@ -3442,7 +3250,6 @@ class Spoom::FileTree # : (T::Enumerable[String] paths) -> void # # source://spoom//lib/spoom/file_tree.rb#15 - # Add all `paths` to the tree sig { params(paths: T::Enumerable[::String]).void } def add_paths(paths); end @@ -3450,7 +3257,6 @@ class Spoom::FileTree # : -> Array[Node] # # source://spoom//lib/spoom/file_tree.rb#43 - # All the nodes in this tree sig { returns(T::Array[::Spoom::FileTree::Node]) } def nodes; end @@ -3458,7 +3264,6 @@ class Spoom::FileTree # : (Context context) -> Hash[Node, Float] # # source://spoom//lib/spoom/file_tree.rb#57 - # Return a map of typing scores for each node in the tree sig { params(context: ::Spoom::Context).returns(T::Hash[::Spoom::FileTree::Node, ::Float]) } def nodes_strictness_scores(context); end @@ -3466,7 +3271,6 @@ class Spoom::FileTree # : -> Array[String] # # source://spoom//lib/spoom/file_tree.rb#51 - # All the paths in this tree sig { returns(T::Array[::String]) } def paths; end @@ -3474,7 +3278,6 @@ class Spoom::FileTree # : (Context context) -> Hash[String, Float] # # source://spoom//lib/spoom/file_tree.rb#65 - # Return a map of typing scores for each path in the tree sig { params(context: ::Spoom::Context).returns(T::Hash[::String, ::Float]) } def paths_strictness_scores(context); end @@ -3488,7 +3291,6 @@ class Spoom::FileTree # : -> Array[Node] # # source://spoom//lib/spoom/file_tree.rb#37 - # All root nodes sig { returns(T::Array[::Spoom::FileTree::Node]) } def roots; end end @@ -3594,12 +3396,11 @@ class Spoom::FileTree::Node < ::T::Struct # : -> String # # source://spoom//lib/spoom/file_tree.rb#88 - # Full path to this node from root sig { returns(::String) } def path; end class << self - # source://sorbet-runtime/0.5.11965/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.12123/lib/types/struct.rb#13 def inherited(s); end end end @@ -3609,7 +3410,6 @@ end # See `FileTree#print` # # source://spoom//lib/spoom/file_tree.rb#204 -# An internal class used to print a FileTree class Spoom::FileTree::Printer < ::Spoom::FileTree::Visitor # : (Hash[FileTree::Node, String?] strictnesses, ?out: (IO | StringIO), ?colors: bool) -> void # @@ -3682,14 +3482,13 @@ class Spoom::Git::Commit < ::T::Struct def timestamp; end class << self - # source://sorbet-runtime/0.5.11965/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.12123/lib/types/struct.rb#13 def inherited(s); end # Parse a line formatted as `%h %at` into a `Commit` # : (String string) -> Commit? # # source://spoom//lib/spoom/context/git.rb#10 - # Parse a line formatted as `%h %at` into a `Commit` sig { params(string: ::String).returns(T.nilable(::Spoom::Git::Commit)) } def parse_line(string); end end @@ -3743,7 +3542,6 @@ class Spoom::LSP::Client # @raise [Error::AlreadyOpen] # # source://spoom//lib/spoom/sorbet/lsp.rb#70 - # LSP requests sig { params(workspace_path: ::String).void } def open(workspace_path); end @@ -3833,7 +3631,7 @@ class Spoom::LSP::Diagnostic < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Diagnostic) } def from_json(json); end - # source://sorbet-runtime/0.5.11965/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.12123/lib/types/struct.rb#13 def inherited(s); end end end @@ -3874,7 +3672,7 @@ class Spoom::LSP::DocumentSymbol < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::DocumentSymbol) } def from_json(json); end - # source://sorbet-runtime/0.5.11965/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.12123/lib/types/struct.rb#13 def inherited(s); end end end @@ -3948,7 +3746,7 @@ class Spoom::LSP::Hover < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Hover) } def from_json(json); end - # source://sorbet-runtime/0.5.11965/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.12123/lib/types/struct.rb#13 def inherited(s); end end end @@ -3979,7 +3777,7 @@ class Spoom::LSP::Location < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Location) } def from_json(json); end - # source://sorbet-runtime/0.5.11965/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.12123/lib/types/struct.rb#13 def inherited(s); end end end @@ -3989,7 +3787,6 @@ end # The language server protocol always uses `"2.0"` as the `jsonrpc` version. # # source://spoom//lib/spoom/sorbet/lsp/base.rb#12 -# A general message as defined by JSON-RPC. class Spoom::LSP::Message # : -> void # @@ -4017,7 +3814,6 @@ end # A processed notification message must not send a response back. They work like events. # # source://spoom//lib/spoom/sorbet/lsp/base.rb#54 -# A notification message. class Spoom::LSP::Notification < ::Spoom::LSP::Message # : (String method, Hash[untyped, untyped] params) -> void # @@ -4066,7 +3862,7 @@ class Spoom::LSP::Position < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Position) } def from_json(json); end - # source://sorbet-runtime/0.5.11965/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.12123/lib/types/struct.rb#13 def inherited(s); end end end @@ -4110,7 +3906,7 @@ class Spoom::LSP::Range < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Range) } def from_json(json); end - # source://sorbet-runtime/0.5.11965/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.12123/lib/types/struct.rb#13 def inherited(s); end end end @@ -4120,7 +3916,6 @@ end # Every processed request must send a response back to the sender of the request. # # source://spoom//lib/spoom/sorbet/lsp/base.rb#35 -# A request message to describe a request between the client and the server. class Spoom::LSP::Request < ::Spoom::LSP::Message # : (Integer id, String method, Hash[untyped, untyped] params) -> void # @@ -4201,18 +3996,18 @@ class Spoom::LSP::SignatureHelp < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::SignatureHelp) } def from_json(json); end - # source://sorbet-runtime/0.5.11965/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.12123/lib/types/struct.rb#13 def inherited(s); end end end -# source://spoom//lib/spoom/sorbet/lsp/structures.rb#295 +# source://spoom//lib/spoom/sorbet/lsp/structures.rb#292 class Spoom::LSP::SymbolPrinter < ::Spoom::Printer # : (?out: (IO | StringIO), ?colors: bool, ?indent_level: Integer, ?prefix: String?) -> void # # @return [SymbolPrinter] a new instance of SymbolPrinter # - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#303 + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#300 sig do params( out: T.any(::IO, ::StringIO), @@ -4225,43 +4020,42 @@ class Spoom::LSP::SymbolPrinter < ::Spoom::Printer # : (String uri) -> String # - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#325 + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#322 sig { params(uri: ::String).returns(::String) } def clean_uri(uri); end # : String? # - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#300 + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#297 sig { returns(T.nilable(::String)) } def prefix; end # : String? # - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#300 - # @return [String, nil] + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#297 def prefix=(_arg0); end # : (Array[PrintableSymbol] objects) -> void # - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#333 + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#330 sig { params(objects: T::Array[::Spoom::LSP::PrintableSymbol]).void } def print_list(objects); end # : (PrintableSymbol? object) -> void # - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#313 + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#310 sig { params(object: T.nilable(::Spoom::LSP::PrintableSymbol)).void } def print_object(object); end # : (Array[PrintableSymbol] objects) -> void # - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#320 + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#317 sig { params(objects: T::Array[::Spoom::LSP::PrintableSymbol]).void } def print_objects(objects); end # : Set[Integer] # - # source://spoom//lib/spoom/sorbet/lsp/structures.rb#297 + # source://spoom//lib/spoom/sorbet/lsp/structures.rb#294 sig { returns(T::Set[::Integer]) } def seen; end end @@ -4296,13 +4090,11 @@ class Spoom::Location # : Integer? # # source://spoom//lib/spoom/location.rb#58 - # @return [Integer, nil] def end_column; end # : Integer? # # source://spoom//lib/spoom/location.rb#58 - # @return [Integer, nil] def end_line; end # : String @@ -4322,7 +4114,6 @@ class Spoom::Location # : Integer? # # source://spoom//lib/spoom/location.rb#58 - # @return [Integer, nil] def start_column; end # : Integer? @@ -4375,8 +4166,6 @@ class Spoom::Model # @raise [Error] # # source://spoom//lib/spoom/model/model.rb#244 - # Get a symbol by it's full name - # Raises an error if the symbol is not found sig { params(full_name: ::String).returns(::Spoom::Model::Symbol) } def [](full_name); end @@ -4392,8 +4181,6 @@ class Spoom::Model # : (String full_name) -> Symbol # # source://spoom//lib/spoom/model/model.rb#255 - # Register a new symbol by it's full name - # If the symbol already exists, it will be returned. sig { params(full_name: ::String).returns(::Spoom::Model::Symbol) } def register_symbol(full_name); end @@ -4419,7 +4206,6 @@ class Spoom::Model # : Hash[String, Symbol] # # source://spoom//lib/spoom/model/model.rb#229 - # All the symbols registered in this model sig { returns(T::Hash[::String, ::Spoom::Model::Symbol]) } def symbols; end @@ -4458,59 +4244,59 @@ class Spoom::Model::AttrWriter < ::Spoom::Model::Attr; end # # source://spoom//lib/spoom/model/builder.rb#7 class Spoom::Model::Builder < ::Spoom::Model::NamespaceVisitor - # : (Model model, String file, ?comments: Array[Prism::Comment]) -> void + # : (Model model, String file) -> void # # @return [Builder] a new instance of Builder # # source://spoom//lib/spoom/model/builder.rb#9 - sig { params(model: ::Spoom::Model, file: ::String, comments: T::Array[::Prism::Comment]).void } - def initialize(model, file, comments:); end + sig { params(model: ::Spoom::Model, file: ::String).void } + def initialize(model, file); end # : (Prism::CallNode node) -> void # - # source://spoom//lib/spoom/model/builder.rb#165 + # source://spoom//lib/spoom/model/builder.rb#159 sig { override.params(node: ::Prism::CallNode).void } def visit_call_node(node); end # : (Prism::ClassNode node) -> void # - # source://spoom//lib/spoom/model/builder.rb#29 + # source://spoom//lib/spoom/model/builder.rb#23 sig { override.params(node: ::Prism::ClassNode).void } def visit_class_node(node); end # : (Prism::ConstantPathWriteNode node) -> void # - # source://spoom//lib/spoom/model/builder.rb#82 + # source://spoom//lib/spoom/model/builder.rb#76 sig { override.params(node: ::Prism::ConstantPathWriteNode).void } def visit_constant_path_write_node(node); end # : (Prism::ConstantWriteNode node) -> void # - # source://spoom//lib/spoom/model/builder.rb#105 + # source://spoom//lib/spoom/model/builder.rb#99 sig { override.params(node: ::Prism::ConstantWriteNode).void } def visit_constant_write_node(node); end # : (Prism::DefNode node) -> void # - # source://spoom//lib/spoom/model/builder.rb#144 + # source://spoom//lib/spoom/model/builder.rb#138 sig { override.params(node: ::Prism::DefNode).void } def visit_def_node(node); end # : (Prism::ModuleNode node) -> void # - # source://spoom//lib/spoom/model/builder.rb#64 + # source://spoom//lib/spoom/model/builder.rb#58 sig { override.params(node: ::Prism::ModuleNode).void } def visit_module_node(node); end # : (Prism::MultiWriteNode node) -> void # - # source://spoom//lib/spoom/model/builder.rb#121 + # source://spoom//lib/spoom/model/builder.rb#115 sig { override.params(node: ::Prism::MultiWriteNode).void } def visit_multi_write_node(node); end # : (Prism::SingletonClassNode node) -> void # - # source://spoom//lib/spoom/model/builder.rb#46 + # source://spoom//lib/spoom/model/builder.rb#40 sig { override.params(node: ::Prism::SingletonClassNode).void } def visit_singleton_class_node(node); end @@ -4518,25 +4304,25 @@ class Spoom::Model::Builder < ::Spoom::Model::NamespaceVisitor # : -> Array[Sig] # - # source://spoom//lib/spoom/model/builder.rb#256 + # source://spoom//lib/spoom/model/builder.rb#250 sig { returns(T::Array[::Spoom::Model::Sig]) } def collect_sigs; end # : -> Visibility # - # source://spoom//lib/spoom/model/builder.rb#251 + # source://spoom//lib/spoom/model/builder.rb#245 sig { returns(::Spoom::Model::Visibility) } def current_visibility; end # : (Prism::Node node) -> Array[Comment] # - # source://spoom//lib/spoom/model/builder.rb#268 + # source://spoom//lib/spoom/model/builder.rb#262 sig { params(node: ::Prism::Node).returns(T::Array[::Spoom::Model::Comment]) } def node_comments(node); end # : (Prism::Node node) -> Location # - # source://spoom//lib/spoom/model/builder.rb#263 + # source://spoom//lib/spoom/model/builder.rb#257 sig { params(node: ::Prism::Node).returns(::Spoom::Location) } def node_location(node); end end @@ -4568,7 +4354,6 @@ class Spoom::Model::Class < ::Spoom::Model::Namespace # : String? # # source://spoom//lib/spoom/model/model.rb#134 - # @return [String, nil] def superclass_name=(_arg0); end end @@ -4762,8 +4547,6 @@ end # Methods could be accessors, instance or class methods, aliases, etc. # # source://spoom//lib/spoom/model/reference.rb#10 -# A reference to something that looks like a constant or a method -# Constants could be classes, modules, or actual constants. class Spoom::Model::Reference < ::T::Struct const :kind, ::Spoom::Model::Reference::Kind const :name, ::String @@ -4792,7 +4575,7 @@ class Spoom::Model::Reference < ::T::Struct sig { params(name: ::String, location: ::Spoom::Location).returns(::Spoom::Model::Reference) } def constant(name, location); end - # source://sorbet-runtime/0.5.11965/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.12123/lib/types/struct.rb#13 def inherited(s); end # : (String name, Spoom::Location location) -> Reference @@ -5011,9 +4794,6 @@ class Spoom::Model::SingletonClass < ::Spoom::Model::Namespace; end # e.g. `foo` method can be defined both as a method and as an attribute accessor. # # source://spoom//lib/spoom/model/model.rb#27 -# A Symbol is a uniquely named entity in the Ruby codebase -# A symbol can have multiple definitions, e.g. a class can be reopened. -# Sometimes a symbol can have multiple definitions of different types, class Spoom::Model::Symbol # : (String full_name) -> void # @@ -5027,7 +4807,6 @@ class Spoom::Model::Symbol # : Array[SymbolDef] # # source://spoom//lib/spoom/model/model.rb#34 - # The definitions of this symbol (where it exists in the code) sig { returns(T::Array[::Spoom::Model::SymbolDef]) } def definitions; end @@ -5035,7 +4814,6 @@ class Spoom::Model::Symbol # : String # # source://spoom//lib/spoom/model/model.rb#30 - # The full, unique name of this symbol sig { returns(::String) } def full_name; end @@ -5043,7 +4821,6 @@ class Spoom::Model::Symbol # : -> String # # source://spoom//lib/spoom/model/model.rb#44 - # The short name of this symbol sig { returns(::String) } def name; end @@ -5062,12 +4839,10 @@ end # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. # # source://spoom//lib/spoom/model/model.rb#66 -# A SymbolDef is a definition of a Symbol -# It can be a class, module, constant, method, etc. class Spoom::Model::SymbolDef abstract! - # : (Symbol symbol, owner: Namespace?, location: Location, ?comments: Array[Comment]) -> void + # : (Symbol symbol, owner: Namespace?, location: Location, comments: Array[Comment]) -> void # # @return [SymbolDef] a new instance of SymbolDef # @@ -5086,7 +4861,6 @@ class Spoom::Model::SymbolDef # : Array[Comment] # # source://spoom//lib/spoom/model/model.rb#85 - # The comments associated with this definition sig { returns(T::Array[::Spoom::Model::Comment]) } def comments; end @@ -5094,7 +4868,6 @@ class Spoom::Model::SymbolDef # : -> String # # source://spoom//lib/spoom/model/model.rb#100 - # The full name of the symbol this definition belongs to sig { returns(::String) } def full_name; end @@ -5102,7 +4875,6 @@ class Spoom::Model::SymbolDef # : Location # # source://spoom//lib/spoom/model/model.rb#81 - # The actual code location of this definition sig { returns(::Spoom::Location) } def location; end @@ -5110,7 +4882,6 @@ class Spoom::Model::SymbolDef # : -> String # # source://spoom//lib/spoom/model/model.rb#106 - # The short name of the symbol this definition belongs to sig { returns(::String) } def name; end @@ -5118,7 +4889,6 @@ class Spoom::Model::SymbolDef # : Namespace? # # source://spoom//lib/spoom/model/model.rb#77 - # The enclosing namespace this definition belongs to sig { returns(T.nilable(::Spoom::Model::Namespace)) } def owner; end @@ -5126,7 +4896,6 @@ class Spoom::Model::SymbolDef # : Symbol # # source://spoom//lib/spoom/model/model.rb#73 - # The symbol this definition belongs to sig { returns(::Spoom::Model::Symbol) } def symbol; end end @@ -5158,8 +4927,6 @@ class Spoom::ParseError < ::Spoom::Error; end # It can be used to represent a hierarchy of classes or modules, the dependencies between gems, etc. # # source://spoom//lib/spoom/poset.rb#9 -# A Poset is a set of elements with a partial order relation. -# The partial order relation is a binary relation that is reflexive, antisymmetric, and transitive. class Spoom::Poset extend T::Generic @@ -5181,8 +4948,6 @@ class Spoom::Poset # @raise [Error] # # source://spoom//lib/spoom/poset.rb#25 - # Get the POSet element for a given value - # Raises if the element is not found sig { params(value: E).returns(Spoom::Poset::Element[E]) } def [](value); end @@ -5194,10 +4959,6 @@ class Spoom::Poset # : (E from, E to) -> void # # source://spoom//lib/spoom/poset.rb#53 - # Add a direct edge from one element to another - # Transitive edges (transitive closure) are automatically computed. - # Adds the elements if they don't exist. - # If the direct edge already exists, nothing is done. sig { params(from: E, to: E).void } def add_direct_edge(from, to); end @@ -5205,7 +4966,6 @@ class Spoom::Poset # : (E value) -> Element[E] # # source://spoom//lib/spoom/poset.rb#34 - # Add an element to the POSet sig { params(value: E).returns(Spoom::Poset::Element[E]) } def add_element(value); end @@ -5215,7 +4975,6 @@ class Spoom::Poset # @return [Boolean] # # source://spoom//lib/spoom/poset.rb#100 - # Is there a direct edge from `from` to `to`? sig { params(from: E, to: E).returns(T::Boolean) } def direct_edge?(from, to); end @@ -5225,7 +4984,6 @@ class Spoom::Poset # @return [Boolean] # # source://spoom//lib/spoom/poset.rb#91 - # Is there an edge (direct or indirect) from `from` to `to`? sig { params(from: E, to: E).returns(T::Boolean) } def edge?(from, to); end @@ -5235,7 +4993,6 @@ class Spoom::Poset # @return [Boolean] # # source://spoom//lib/spoom/poset.rb#43 - # Is the given value a element in the POSet? sig { params(value: E).returns(T::Boolean) } def element?(value); end @@ -5243,7 +5000,6 @@ class Spoom::Poset # : (?direct: bool, ?transitive: bool) -> void # # source://spoom//lib/spoom/poset.rb#106 - # Show the POSet as a DOT graph using xdot (used for debugging) sig { params(direct: T::Boolean, transitive: T::Boolean).void } def show_dot(direct: T.unsafe(nil), transitive: T.unsafe(nil)); end @@ -5251,7 +5007,6 @@ class Spoom::Poset # : (?direct: bool, ?transitive: bool) -> String # # source://spoom//lib/spoom/poset.rb#115 - # Return the POSet as a DOT graph sig { params(direct: T::Boolean, transitive: T::Boolean).returns(::String) } def to_dot(direct: T.unsafe(nil), transitive: T.unsafe(nil)); end end @@ -5260,8 +5015,8 @@ end # # source://spoom//lib/spoom/poset.rb#135 class Spoom::Poset::Element - extend T::Generic include ::Comparable + extend T::Generic E = type_member { { upper: Object } } @@ -5283,7 +5038,6 @@ class Spoom::Poset::Element # : -> Array[E] # # source://spoom//lib/spoom/poset.rb#178 - # Direct and indirect ancestors of this element sig { returns(T::Array[E]) } def ancestors; end @@ -5291,7 +5045,6 @@ class Spoom::Poset::Element # : -> Array[E] # # source://spoom//lib/spoom/poset.rb#184 - # Direct children of this element sig { returns(T::Array[E]) } def children; end @@ -5299,7 +5052,6 @@ class Spoom::Poset::Element # : -> Array[E] # # source://spoom//lib/spoom/poset.rb#190 - # Direct and indirect descendants of this element sig { returns(T::Array[E]) } def descendants; end @@ -5307,15 +5059,12 @@ class Spoom::Poset::Element # : Set[Element[E]] # # source://spoom//lib/spoom/poset.rb#147 - # Edges (direct and indirect) from this element to other elements in the same POSet - # @return [Set<Element[E]>] def dfroms; end # Edges (direct and indirect) from this element to other elements in the same POSet # : Set[Element[E]] # # source://spoom//lib/spoom/poset.rb#147 - # Edges (direct and indirect) from this element to other elements in the same POSet sig { returns(T::Set[Spoom::Poset::Element[E]]) } def dtos; end @@ -5323,15 +5072,12 @@ class Spoom::Poset::Element # : Set[Element[E]] # # source://spoom//lib/spoom/poset.rb#147 - # Edges (direct and indirect) from this element to other elements in the same POSet - # @return [Set<Element[E]>] def froms; end # Direct parents of this element # : -> Array[E] # # source://spoom//lib/spoom/poset.rb#172 - # Direct parents of this element sig { returns(T::Array[E]) } def parents; end @@ -5339,15 +5085,12 @@ class Spoom::Poset::Element # : Set[Element[E]] # # source://spoom//lib/spoom/poset.rb#147 - # Edges (direct and indirect) from this element to other elements in the same POSet - # @return [Set<Element[E]>] def tos; end # The value held by this element # : E # # source://spoom//lib/spoom/poset.rb#143 - # The value held by this element sig { returns(E) } def value; end end @@ -5371,7 +5114,6 @@ class Spoom::Printer # : (String string, *Spoom::Color color) -> String # # source://spoom//lib/spoom/printer.rb#75 - # Colorize `string` with color if `@colors` sig { params(string: ::String, color: ::Spoom::Color).returns(::String) } def colorize(string, *color); end @@ -5379,7 +5121,6 @@ class Spoom::Printer # : -> void # # source://spoom//lib/spoom/printer.rb#28 - # Decrease indent level sig { void } def dedent; end @@ -5387,7 +5128,6 @@ class Spoom::Printer # : -> void # # source://spoom//lib/spoom/printer.rb#22 - # Increase indent level sig { void } def indent; end @@ -5400,14 +5140,12 @@ class Spoom::Printer # : (IO | StringIO) # # source://spoom//lib/spoom/printer.rb#11 - # @return [IO, StringIO] def out=(_arg0); end # Print `string` into `out` # : (String? string) -> void # # source://spoom//lib/spoom/printer.rb#34 - # Print `string` into `out` sig { params(string: T.nilable(::String)).void } def print(string); end @@ -5417,8 +5155,6 @@ class Spoom::Printer # : (String? string, *Color color) -> void # # source://spoom//lib/spoom/printer.rb#44 - # Print `string` colored with `color` into `out` - # Does not use colors unless `@colors`. sig { params(string: T.nilable(::String), color: ::Spoom::Color).void } def print_colored(string, *color); end @@ -5426,7 +5162,6 @@ class Spoom::Printer # : (String? string) -> void # # source://spoom//lib/spoom/printer.rb#59 - # Print `string` with indent and newline sig { params(string: T.nilable(::String)).void } def printl(string); end @@ -5434,7 +5169,6 @@ class Spoom::Printer # : -> void # # source://spoom//lib/spoom/printer.rb#53 - # Print a new line into `out` sig { void } def printn; end @@ -5442,301 +5176,92 @@ class Spoom::Printer # : -> void # # source://spoom//lib/spoom/printer.rb#69 - # Print an indent space into `out` sig { void } def printt; end end -# source://spoom//lib/spoom.rb#8 -Spoom::SPOOM_PATH = T.let(T.unsafe(nil), String) - -# source://spoom//lib/spoom/sorbet/assertions.rb#7 -module Spoom::Sorbet; end - -# source://spoom//lib/spoom/sorbet/assertions.rb#8 -class Spoom::Sorbet::Assertions - class << self - # : (String, file: String) -> String - # - # source://spoom//lib/spoom/sorbet/assertions.rb#11 - sig { params(ruby_contents: ::String, file: ::String).returns(::String) } - def rbi_to_rbs(ruby_contents, file:); end +# source://spoom//lib/spoom/rbs.rb#5 +module Spoom::RBS; end - private - - # : (String, file: String) -> Array[AssignNode] - # - # source://spoom//lib/spoom/sorbet/assertions.rb#46 - sig { params(ruby_contents: ::String, file: ::String).returns(T::Array[::Spoom::Sorbet::Assertions::AssignNode]) } - def collect_assigns(ruby_contents, file:); end - - # : (AssignNode) -> String - # - # source://spoom//lib/spoom/sorbet/assertions.rb#54 - sig { params(assign: ::Spoom::Sorbet::Assertions::AssignNode).returns(::String) } - def dedent_value(assign); end - end -end +# source://spoom//lib/spoom/rbs.rb#39 +class Spoom::RBS::Annotations < ::Spoom::RBS::Comment; end -# source://spoom//lib/spoom/sorbet/assertions.rb#122 -class Spoom::Sorbet::Assertions::AssignNode - # : (AssignType, Prism::Location, Prism::Node, Prism::Node) -> void - # - # @return [AssignNode] a new instance of AssignNode +# source://spoom//lib/spoom/rbs.rb#25 +class Spoom::RBS::Comment + # : (String, Prism::Location) -> void # - # source://spoom//lib/spoom/sorbet/assertions.rb#133 - sig do - params( - node: T.any(::Prism::ClassVariableAndWriteNode, ::Prism::ClassVariableOperatorWriteNode, ::Prism::ClassVariableOrWriteNode, ::Prism::ClassVariableWriteNode, ::Prism::ConstantAndWriteNode, ::Prism::ConstantOperatorWriteNode, ::Prism::ConstantOrWriteNode, ::Prism::ConstantPathAndWriteNode, ::Prism::ConstantPathOperatorWriteNode, ::Prism::ConstantPathOrWriteNode, ::Prism::ConstantPathWriteNode, ::Prism::ConstantWriteNode, ::Prism::GlobalVariableAndWriteNode, ::Prism::GlobalVariableOperatorWriteNode, ::Prism::GlobalVariableOrWriteNode, ::Prism::GlobalVariableWriteNode, ::Prism::InstanceVariableAndWriteNode, ::Prism::InstanceVariableOperatorWriteNode, ::Prism::InstanceVariableOrWriteNode, ::Prism::InstanceVariableWriteNode, ::Prism::LocalVariableAndWriteNode, ::Prism::LocalVariableOperatorWriteNode, ::Prism::LocalVariableOrWriteNode, ::Prism::LocalVariableWriteNode), - operator_loc: ::Prism::Location, - value: ::Prism::Node, - type: ::Prism::Node - ).void - end - def initialize(node, operator_loc, value, type); end - - # : AssignType + # @return [Comment] a new instance of Comment # - # source://spoom//lib/spoom/sorbet/assertions.rb#124 - sig do - returns(T.any(::Prism::ClassVariableAndWriteNode, ::Prism::ClassVariableOperatorWriteNode, ::Prism::ClassVariableOrWriteNode, ::Prism::ClassVariableWriteNode, ::Prism::ConstantAndWriteNode, ::Prism::ConstantOperatorWriteNode, ::Prism::ConstantOrWriteNode, ::Prism::ConstantPathAndWriteNode, ::Prism::ConstantPathOperatorWriteNode, ::Prism::ConstantPathOrWriteNode, ::Prism::ConstantPathWriteNode, ::Prism::ConstantWriteNode, ::Prism::GlobalVariableAndWriteNode, ::Prism::GlobalVariableOperatorWriteNode, ::Prism::GlobalVariableOrWriteNode, ::Prism::GlobalVariableWriteNode, ::Prism::InstanceVariableAndWriteNode, ::Prism::InstanceVariableOperatorWriteNode, ::Prism::InstanceVariableOrWriteNode, ::Prism::InstanceVariableWriteNode, ::Prism::LocalVariableAndWriteNode, ::Prism::LocalVariableOperatorWriteNode, ::Prism::LocalVariableOrWriteNode, ::Prism::LocalVariableWriteNode)) - end - def node; end + # source://spoom//lib/spoom/rbs.rb#33 + sig { params(string: ::String, location: ::Prism::Location).void } + def initialize(string, location); end # : Prism::Location # - # source://spoom//lib/spoom/sorbet/assertions.rb#127 + # source://spoom//lib/spoom/rbs.rb#30 sig { returns(::Prism::Location) } - def operator_loc; end + def location; end - # : -> String + # : String # - # source://spoom//lib/spoom/sorbet/assertions.rb#141 + # source://spoom//lib/spoom/rbs.rb#27 sig { returns(::String) } - def rbs_type; end - - # : Prism::Node - # - # source://spoom//lib/spoom/sorbet/assertions.rb#130 - # @return [Prism::Node] - def type; end - - # : Prism::Node - # - # source://spoom//lib/spoom/sorbet/assertions.rb#130 - sig { returns(::Prism::Node) } - def value; end + def string; end end -# source://spoom//lib/spoom/sorbet/assertions.rb#93 -Spoom::Sorbet::Assertions::AssignType = T.type_alias { T.any(::Prism::ClassVariableAndWriteNode, ::Prism::ClassVariableOperatorWriteNode, ::Prism::ClassVariableOrWriteNode, ::Prism::ClassVariableWriteNode, ::Prism::ConstantAndWriteNode, ::Prism::ConstantOperatorWriteNode, ::Prism::ConstantOrWriteNode, ::Prism::ConstantPathAndWriteNode, ::Prism::ConstantPathOperatorWriteNode, ::Prism::ConstantPathOrWriteNode, ::Prism::ConstantPathWriteNode, ::Prism::ConstantWriteNode, ::Prism::GlobalVariableAndWriteNode, ::Prism::GlobalVariableOperatorWriteNode, ::Prism::GlobalVariableOrWriteNode, ::Prism::GlobalVariableWriteNode, ::Prism::InstanceVariableAndWriteNode, ::Prism::InstanceVariableOperatorWriteNode, ::Prism::InstanceVariableOrWriteNode, ::Prism::InstanceVariableWriteNode, ::Prism::LocalVariableAndWriteNode, ::Prism::LocalVariableOperatorWriteNode, ::Prism::LocalVariableOrWriteNode, ::Prism::LocalVariableWriteNode) } - -# source://spoom//lib/spoom/sorbet/assertions.rb#146 -class Spoom::Sorbet::Assertions::Locator < ::Spoom::Visitor +# source://spoom//lib/spoom/rbs.rb#6 +class Spoom::RBS::Comments # : -> void # - # @return [Locator] a new instance of Locator + # @return [Comments] a new instance of Comments # - # source://spoom//lib/spoom/sorbet/assertions.rb#153 + # source://spoom//lib/spoom/rbs.rb#14 sig { void } def initialize; end - # : Array[AssignNode] + # : Array[Annotations] # - # source://spoom//lib/spoom/sorbet/assertions.rb#150 - sig { returns(T::Array[::Spoom::Sorbet::Assertions::AssignNode]) } - def assigns; end + # source://spoom//lib/spoom/rbs.rb#8 + sig { returns(T::Array[::Spoom::RBS::Annotations]) } + def annotations; end - # : (Prism::Node) -> bool - # - # @return [Boolean] - # - # source://spoom//lib/spoom/sorbet/assertions.rb#245 - sig { params(node: ::Prism::Node).returns(T::Boolean) } - def contains_heredoc?(node); end - - # Is this node a `T` or `::T` constant? - # : (Prism::Node?) -> bool - # - # @return [Boolean] - # - # source://spoom//lib/spoom/sorbet/assertions.rb#223 - # Is this node a `T` or `::T` constant? - sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } - def t?(node); end - - # Is this node a `T.let` or `T.cast`? - # : (Prism::CallNode) -> bool + # : -> bool # # @return [Boolean] # - # source://spoom//lib/spoom/sorbet/assertions.rb#236 - # Is this node a `T.let` or `T.cast`? - sig { params(node: ::Prism::CallNode).returns(T::Boolean) } - def t_annotation?(node); end - - # : (AssignType) -> void - # - # source://spoom//lib/spoom/sorbet/assertions.rb#159 - sig do - params( - node: T.any(::Prism::ClassVariableAndWriteNode, ::Prism::ClassVariableOperatorWriteNode, ::Prism::ClassVariableOrWriteNode, ::Prism::ClassVariableWriteNode, ::Prism::ConstantAndWriteNode, ::Prism::ConstantOperatorWriteNode, ::Prism::ConstantOrWriteNode, ::Prism::ConstantPathAndWriteNode, ::Prism::ConstantPathOperatorWriteNode, ::Prism::ConstantPathOrWriteNode, ::Prism::ConstantPathWriteNode, ::Prism::ConstantWriteNode, ::Prism::GlobalVariableAndWriteNode, ::Prism::GlobalVariableOperatorWriteNode, ::Prism::GlobalVariableOrWriteNode, ::Prism::GlobalVariableWriteNode, ::Prism::InstanceVariableAndWriteNode, ::Prism::InstanceVariableOperatorWriteNode, ::Prism::InstanceVariableOrWriteNode, ::Prism::InstanceVariableWriteNode, ::Prism::LocalVariableAndWriteNode, ::Prism::LocalVariableOperatorWriteNode, ::Prism::LocalVariableOrWriteNode, ::Prism::LocalVariableWriteNode) - ).void - end - def visit_assign(node); end - - # : (AssignType) -> void - # - # source://spoom//lib/spoom/sorbet/assertions.rb#159 - def visit_class_variable_and_write_node(node); end - - # : (AssignType) -> void - # - # source://spoom//lib/spoom/sorbet/assertions.rb#159 - def visit_class_variable_operator_write_node(node); end - - # : (AssignType) -> void - # - # source://spoom//lib/spoom/sorbet/assertions.rb#159 - def visit_class_variable_or_write_node(node); end - - # : (AssignType) -> void - # - # source://spoom//lib/spoom/sorbet/assertions.rb#159 - def visit_class_variable_write_node(node); end - - # : (AssignType) -> void - # - # source://spoom//lib/spoom/sorbet/assertions.rb#159 - def visit_constant_and_write_node(node); end - - # : (AssignType) -> void - # - # source://spoom//lib/spoom/sorbet/assertions.rb#159 - def visit_constant_operator_write_node(node); end - - # : (AssignType) -> void - # - # source://spoom//lib/spoom/sorbet/assertions.rb#159 - def visit_constant_or_write_node(node); end - - # : (AssignType) -> void - # - # source://spoom//lib/spoom/sorbet/assertions.rb#159 - def visit_constant_path_and_write_node(node); end - - # : (AssignType) -> void - # - # source://spoom//lib/spoom/sorbet/assertions.rb#159 - def visit_constant_path_operator_write_node(node); end - - # : (AssignType) -> void - # - # source://spoom//lib/spoom/sorbet/assertions.rb#159 - def visit_constant_path_or_write_node(node); end - - # : (AssignType) -> void - # - # source://spoom//lib/spoom/sorbet/assertions.rb#159 - def visit_constant_path_write_node(node); end - - # : (AssignType) -> void - # - # source://spoom//lib/spoom/sorbet/assertions.rb#159 - def visit_constant_write_node(node); end - - # : (AssignType) -> void - # - # source://spoom//lib/spoom/sorbet/assertions.rb#159 - def visit_global_variable_and_write_node(node); end - - # : (AssignType) -> void - # - # source://spoom//lib/spoom/sorbet/assertions.rb#159 - def visit_global_variable_operator_write_node(node); end - - # : (AssignType) -> void - # - # source://spoom//lib/spoom/sorbet/assertions.rb#159 - def visit_global_variable_or_write_node(node); end - - # : (AssignType) -> void - # - # source://spoom//lib/spoom/sorbet/assertions.rb#159 - def visit_global_variable_write_node(node); end - - # : (AssignType) -> void - # - # source://spoom//lib/spoom/sorbet/assertions.rb#159 - def visit_instance_variable_and_write_node(node); end - - # : (AssignType) -> void - # - # source://spoom//lib/spoom/sorbet/assertions.rb#159 - def visit_instance_variable_operator_write_node(node); end - - # : (AssignType) -> void - # - # source://spoom//lib/spoom/sorbet/assertions.rb#159 - def visit_instance_variable_or_write_node(node); end - - # : (AssignType) -> void - # - # source://spoom//lib/spoom/sorbet/assertions.rb#159 - def visit_instance_variable_write_node(node); end - - # : (AssignType) -> void - # - # source://spoom//lib/spoom/sorbet/assertions.rb#159 - def visit_local_variable_and_write_node(node); end - - # : (AssignType) -> void - # - # source://spoom//lib/spoom/sorbet/assertions.rb#159 - def visit_local_variable_operator_write_node(node); end - - # : (AssignType) -> void - # - # source://spoom//lib/spoom/sorbet/assertions.rb#159 - def visit_local_variable_or_write_node(node); end + # source://spoom//lib/spoom/rbs.rb#20 + sig { returns(T::Boolean) } + def empty?; end - # : (AssignType) -> void + # : Array[Signature] # - # source://spoom//lib/spoom/sorbet/assertions.rb#159 - def visit_local_variable_write_node(node); end + # source://spoom//lib/spoom/rbs.rb#11 + sig { returns(T::Array[::Spoom::RBS::Signature]) } + def signatures; end +end - # : (AssignType) -> void +# source://spoom//lib/spoom/rbs.rb#42 +module Spoom::RBS::ExtractRBSComments + # : (Prism::Node) -> Comments # - # source://spoom//lib/spoom/sorbet/assertions.rb#159 - def visit_multi_write_node(node); end + # source://spoom//lib/spoom/rbs.rb#44 + sig { params(node: ::Prism::Node).returns(::Spoom::RBS::Comments) } + def node_rbs_comments(node); end end -# source://spoom//lib/spoom/sorbet/assertions.rb#147 -Spoom::Sorbet::Assertions::Locator::ANNOTATION_METHODS = T.let(T.unsafe(nil), Array) +# source://spoom//lib/spoom/rbs.rb#40 +class Spoom::RBS::Signature < ::Spoom::RBS::Comment; end -# source://spoom//lib/spoom/sorbet/assertions.rb#251 -class Spoom::Sorbet::Assertions::Locator::HeredocVisitor < ::Spoom::Visitor - # : -> void - # - # @return [HeredocVisitor] a new instance of HeredocVisitor - # - # source://spoom//lib/spoom/sorbet/assertions.rb#256 - sig { void } - def initialize; end - - # : bool - # - # source://spoom//lib/spoom/sorbet/assertions.rb#253 - sig { returns(T::Boolean) } - def contains_heredoc; end +# : String +# +# source://spoom//lib/spoom.rb#8 +Spoom::SPOOM_PATH = T.let(T.unsafe(nil), String) - # : (Prism::Node?) -> void - # - # source://spoom//lib/spoom/sorbet/assertions.rb#264 - sig { override.params(node: T.nilable(::Prism::Node)).void } - def visit(node); end -end +# source://spoom//lib/spoom/sorbet/config.rb#5 +module Spoom::Sorbet; end +# : String +# # source://spoom//lib/spoom/sorbet.rb#33 Spoom::Sorbet::BIN_PATH = T.let(T.unsafe(nil), String) @@ -5765,19 +5290,6 @@ Spoom::Sorbet::CONFIG_PATH = T.let(T.unsafe(nil), String) # ``` # # source://spoom//lib/spoom/sorbet/config.rb#26 -# Parse Sorbet config files -# Parses a Sorbet config file: -# ```ruby -# config = Spoom::Sorbet::Config.parse_file("sorbet/config") -# puts config.paths # "." -# Parses a Sorbet config string: -# config = Spoom::Sorbet::Config.parse_string(<<~CONFIG) -# a -# --file=b -# --ignore=c -# CONFIG -# puts config.paths # "a", "b" -# puts config.ignore # "c" class Spoom::Sorbet::Config # : -> void # @@ -5790,13 +5302,11 @@ class Spoom::Sorbet::Config # : Array[String] # # source://spoom//lib/spoom/sorbet/config.rb#30 - # @return [Array<String>] def allowed_extensions; end # : Array[String] # # source://spoom//lib/spoom/sorbet/config.rb#30 - # @return [Array<String>] def allowed_extensions=(_arg0); end # : -> Config @@ -5808,13 +5318,11 @@ class Spoom::Sorbet::Config # : Array[String] # # source://spoom//lib/spoom/sorbet/config.rb#30 - # @return [Array<String>] def ignore; end # : Array[String] # # source://spoom//lib/spoom/sorbet/config.rb#30 - # @return [Array<String>] def ignore=(_arg0); end # : bool @@ -5826,7 +5334,6 @@ class Spoom::Sorbet::Config # : bool # # source://spoom//lib/spoom/sorbet/config.rb#33 - # @return [Boolean] def no_stdlib=(_arg0); end # Returns self as a string of options that can be passed to Sorbet @@ -5844,16 +5351,6 @@ class Spoom::Sorbet::Config # : -> String # # source://spoom//lib/spoom/sorbet/config.rb#66 - # Returns self as a string of options that can be passed to Sorbet - # Example: - # ~~~rb - # config = Sorbet::Config.new - # config.paths << "/foo" - # config.paths << "/bar" - # config.ignore << "/baz" - # config.allowed_extensions << ".rb" - # puts config.options_string # "/foo /bar --ignore /baz --allowed-extension .rb" - # ~~~ sig { returns(::String) } def options_string; end @@ -5866,7 +5363,6 @@ class Spoom::Sorbet::Config # : Array[String] # # source://spoom//lib/spoom/sorbet/config.rb#30 - # @return [Array<String>] def paths=(_arg0); end class << self @@ -5892,6 +5388,8 @@ class Spoom::Sorbet::Config end end +# : Array[String] +# # source://spoom//lib/spoom/sorbet/config.rb#27 Spoom::Sorbet::Config::DEFAULT_ALLOWED_EXTENSIONS = T.let(T.unsafe(nil), Array) @@ -5918,21 +5416,27 @@ class Spoom::Sorbet::Error::Killed < ::Spoom::Sorbet::Error; end # source://spoom//lib/spoom/sorbet.rb#17 class Spoom::Sorbet::Error::Segfault < ::Spoom::Sorbet::Error; end -# source://spoom//lib/spoom/sorbet/errors.rb#6 +# source://spoom//lib/spoom/sorbet/errors.rb#8 module Spoom::Sorbet::Errors class << self # : (Array[Error] errors) -> Array[Error] # - # source://spoom//lib/spoom/sorbet/errors.rb#11 + # source://spoom//lib/spoom/sorbet/errors.rb#13 sig { params(errors: T::Array[::Spoom::Sorbet::Errors::Error]).returns(T::Array[::Spoom::Sorbet::Errors::Error]) } def sort_errors_by_code(errors); end + + # : (Array[Error]) -> REXML::Document + # + # source://spoom//lib/spoom/sorbet/errors.rb#18 + sig { params(errors: T::Array[::Spoom::Sorbet::Errors::Error]).returns(::REXML::Document) } + def to_junit_xml(errors); end end end -# source://spoom//lib/spoom/sorbet/errors.rb#7 +# source://spoom//lib/spoom/sorbet/errors.rb#9 Spoom::Sorbet::Errors::DEFAULT_ERROR_URL_BASE = T.let(T.unsafe(nil), String) -# source://spoom//lib/spoom/sorbet/errors.rb#121 +# source://spoom//lib/spoom/sorbet/errors.rb#149 class Spoom::Sorbet::Errors::Error include ::Comparable @@ -5940,7 +5444,7 @@ class Spoom::Sorbet::Errors::Error # # @return [Error] a new instance of Error # - # source://spoom//lib/spoom/sorbet/errors.rb#138 + # source://spoom//lib/spoom/sorbet/errors.rb#166 sig do params( file: T.nilable(::String), @@ -5955,71 +5459,73 @@ class Spoom::Sorbet::Errors::Error # By default errors are sorted by location # : (untyped other) -> Integer # - # source://spoom//lib/spoom/sorbet/errors.rb#149 - # By default errors are sorted by location + # source://spoom//lib/spoom/sorbet/errors.rb#177 sig { params(other: T.untyped).returns(::Integer) } def <=>(other); end # : Integer? # - # source://spoom//lib/spoom/sorbet/errors.rb#128 - # @return [Integer, nil] + # source://spoom//lib/spoom/sorbet/errors.rb#156 def code; end # : String? # - # source://spoom//lib/spoom/sorbet/errors.rb#125 + # source://spoom//lib/spoom/sorbet/errors.rb#153 sig { returns(T.nilable(::String)) } def file; end # Other files associated with the error # : Set[String] # - # source://spoom//lib/spoom/sorbet/errors.rb#135 - # Other files associated with the error + # source://spoom//lib/spoom/sorbet/errors.rb#163 sig { returns(T::Set[::String]) } def files_from_error_sections; end # : Integer? # - # source://spoom//lib/spoom/sorbet/errors.rb#128 + # source://spoom//lib/spoom/sorbet/errors.rb#156 sig { returns(T.nilable(::Integer)) } def line; end # : String? # - # source://spoom//lib/spoom/sorbet/errors.rb#125 - # @return [String, nil] + # source://spoom//lib/spoom/sorbet/errors.rb#153 def message; end # : Array[String] # - # source://spoom//lib/spoom/sorbet/errors.rb#131 + # source://spoom//lib/spoom/sorbet/errors.rb#159 sig { returns(T::Array[::String]) } def more; end + # : -> REXML::Element + # + # source://spoom//lib/spoom/sorbet/errors.rb#189 + sig { returns(::REXML::Element) } + def to_junit_xml_element; end + # : -> String # - # source://spoom//lib/spoom/sorbet/errors.rb#156 + # source://spoom//lib/spoom/sorbet/errors.rb#184 sig { returns(::String) } def to_s; end end # Parse errors from Sorbet output # -# source://spoom//lib/spoom/sorbet/errors.rb#16 +# source://spoom//lib/spoom/sorbet/errors.rb#47 class Spoom::Sorbet::Errors::Parser # : (?error_url_base: String) -> void # # @return [Parser] a new instance of Parser # - # source://spoom//lib/spoom/sorbet/errors.rb#39 + # source://spoom//lib/spoom/sorbet/errors.rb#67 sig { params(error_url_base: ::String).void } def initialize(error_url_base: T.unsafe(nil)); end # : (String output) -> Array[Error] # - # source://spoom//lib/spoom/sorbet/errors.rb#46 + # source://spoom//lib/spoom/sorbet/errors.rb#74 sig { params(output: ::String).returns(T::Array[::Spoom::Sorbet::Errors::Error]) } def parse(output); end @@ -6029,7 +5535,7 @@ class Spoom::Sorbet::Errors::Parser # # @raise [ParseError] # - # source://spoom//lib/spoom/sorbet/errors.rb#110 + # source://spoom//lib/spoom/sorbet/errors.rb#138 sig { params(line: ::String).void } def append_error(line); end @@ -6037,19 +5543,19 @@ class Spoom::Sorbet::Errors::Parser # # @raise [ParseError] # - # source://spoom//lib/spoom/sorbet/errors.rb#102 + # source://spoom//lib/spoom/sorbet/errors.rb#130 sig { void } def close_error; end # : (String error_url_base) -> Regexp # - # source://spoom//lib/spoom/sorbet/errors.rb#69 + # source://spoom//lib/spoom/sorbet/errors.rb#97 sig { params(error_url_base: ::String).returns(::Regexp) } def error_line_match_regexp(error_url_base); end # : (String line) -> Error? # - # source://spoom//lib/spoom/sorbet/errors.rb#86 + # source://spoom//lib/spoom/sorbet/errors.rb#114 sig { params(line: ::String).returns(T.nilable(::Spoom::Sorbet::Errors::Error)) } def match_error_line(line); end @@ -6057,28 +5563,32 @@ class Spoom::Sorbet::Errors::Parser # # @raise [ParseError] # - # source://spoom//lib/spoom/sorbet/errors.rb#95 + # source://spoom//lib/spoom/sorbet/errors.rb#123 sig { params(error: ::Spoom::Sorbet::Errors::Error).void } def open_error(error); end class << self # : (String output, ?error_url_base: String) -> Array[Error] # - # source://spoom//lib/spoom/sorbet/errors.rb#32 + # source://spoom//lib/spoom/sorbet/errors.rb#60 sig { params(output: ::String, error_url_base: ::String).returns(T::Array[::Spoom::Sorbet::Errors::Error]) } def parse_string(output, error_url_base: T.unsafe(nil)); end end end -# source://spoom//lib/spoom/sorbet/errors.rb#19 +# source://spoom//lib/spoom/sorbet/errors.rb#50 Spoom::Sorbet::Errors::Parser::HEADER = T.let(T.unsafe(nil), Array) -# source://spoom//lib/spoom/sorbet/errors.rb#17 +# source://spoom//lib/spoom/sorbet/errors.rb#48 class Spoom::Sorbet::Errors::Parser::ParseError < ::Spoom::Error; end +# : String +# # source://spoom//lib/spoom/sorbet.rb#31 Spoom::Sorbet::GEM_PATH = T.let(T.unsafe(nil), String) +# : String +# # source://spoom//lib/spoom/sorbet.rb#32 Spoom::Sorbet::GEM_VERSION = T.let(T.unsafe(nil), String) @@ -6120,16 +5630,14 @@ module Spoom::Sorbet::Sigils # changes the sigil in the file at the passed path to the specified new strictness # : ((String | Pathname) path, String new_strictness) -> bool # - # source://spoom//lib/spoom/sorbet/sigils.rb#68 - # changes the sigil in the file at the passed path to the specified new strictness + # source://spoom//lib/spoom/sorbet/sigils.rb#65 sig { params(path: T.any(::Pathname, ::String), new_strictness: ::String).returns(T::Boolean) } def change_sigil_in_file(path, new_strictness); end # changes the sigil to have a new strictness in a list of files # : (Array[String] path_list, String new_strictness) -> Array[String] # - # source://spoom//lib/spoom/sorbet/sigils.rb#79 - # changes the sigil to have a new strictness in a list of files + # source://spoom//lib/spoom/sorbet/sigils.rb#76 sig { params(path_list: T::Array[::String], new_strictness: ::String).returns(T::Array[::String]) } def change_sigil_in_files(path_list, new_strictness); end @@ -6137,33 +5645,28 @@ module Spoom::Sorbet::Sigils # * returns nil if no sigil # : ((String | Pathname) path) -> String? # - # source://spoom//lib/spoom/sorbet/sigils.rb#59 - # returns a string containing the strictness of a sigil in a file at the passed path - # * returns nil if no sigil + # source://spoom//lib/spoom/sorbet/sigils.rb#56 sig { params(path: T.any(::Pathname, ::String)).returns(T.nilable(::String)) } def file_strictness(path); end # returns the full sigil comment string for the passed strictness # : (String strictness) -> String # - # source://spoom//lib/spoom/sorbet/sigils.rb#34 - # returns the full sigil comment string for the passed strictness + # source://spoom//lib/spoom/sorbet/sigils.rb#31 sig { params(strictness: ::String).returns(::String) } def sigil_string(strictness); end # returns the strictness of a sigil in the passed file content string (nil if no sigil) # : (String content) -> String? # - # source://spoom//lib/spoom/sorbet/sigils.rb#46 - # returns the strictness of a sigil in the passed file content string (nil if no sigil) + # source://spoom//lib/spoom/sorbet/sigils.rb#43 sig { params(content: ::String).returns(T.nilable(::String)) } def strictness_in_content(content); end # returns a string which is the passed content but with the sigil updated to a new strictness # : (String content, String new_strictness) -> String # - # source://spoom//lib/spoom/sorbet/sigils.rb#52 - # returns a string which is the passed content but with the sigil updated to a new strictness + # source://spoom//lib/spoom/sorbet/sigils.rb#49 sig { params(content: ::String, new_strictness: ::String).returns(::String) } def update_sigil(content, new_strictness); end @@ -6172,14 +5675,15 @@ module Spoom::Sorbet::Sigils # # @return [Boolean] # - # source://spoom//lib/spoom/sorbet/sigils.rb#40 - # returns true if the passed string is a valid strictness (else false) + # source://spoom//lib/spoom/sorbet/sigils.rb#37 sig { params(strictness: ::String).returns(T::Boolean) } def valid_strictness?(strictness); end end end -# source://spoom//lib/spoom/sorbet/sigils.rb#29 +# : Array[String] +# +# source://spoom//lib/spoom/sorbet/sigils.rb#26 Spoom::Sorbet::Sigils::SIGIL_REGEXP = T.let(T.unsafe(nil), Regexp) # source://spoom//lib/spoom/sorbet/sigils.rb#11 @@ -6203,153 +5707,539 @@ Spoom::Sorbet::Sigils::STRICTNESS_TRUE = T.let(T.unsafe(nil), String) # source://spoom//lib/spoom/sorbet/sigils.rb#17 Spoom::Sorbet::Sigils::VALID_STRICTNESS = T.let(T.unsafe(nil), Array) -# source://spoom//lib/spoom/sorbet/sigs.rb#8 -class Spoom::Sorbet::Sigs +# source://spoom//lib/spoom/sorbet/translate/translator.rb#6 +module Spoom::Sorbet::Translate class << self - # : (String ruby_contents, positional_names: bool) -> String - # - # source://spoom//lib/spoom/sorbet/sigs.rb#24 - sig { params(ruby_contents: ::String, positional_names: T::Boolean).returns(::String) } - def rbi_to_rbs(ruby_contents, positional_names: T.unsafe(nil)); end - - # : (String ruby_contents) -> String + # Converts all the RBS comments in the given Ruby code to `sig` nodes. + # It also handles type members and class annotations. + # : (String ruby_contents, file: String) -> String # - # source://spoom//lib/spoom/sorbet/sigs.rb#46 - sig { params(ruby_contents: ::String).returns(::String) } - def rbs_to_rbi(ruby_contents); end + # source://spoom//lib/spoom/sorbet/translate.rb#36 + sig { params(ruby_contents: ::String, file: ::String).returns(::String) } + def rbs_comments_to_sorbet_sigs(ruby_contents, file:); end - # : (String ruby_contents) -> String + # Converts all `T.let` and `T.cast` nodes to RBS comments in the given Ruby code. + # It also handles type members and class annotations. + # : (String ruby_contents, file: String) -> String # - # source://spoom//lib/spoom/sorbet/sigs.rb#12 - sig { params(ruby_contents: ::String).returns(::String) } - def strip(ruby_contents); end - - private + # source://spoom//lib/spoom/sorbet/translate.rb#43 + sig { params(ruby_contents: ::String, file: ::String).returns(::String) } + def sorbet_assertions_to_rbs_comments(ruby_contents, file:); end - # : (String ruby_contents) -> Array[[RBI::RBSComment, (RBI::Method | RBI::Attr)]] + # Converts all `sig` nodes to RBS comments in the given Ruby code. + # It also handles type members and class annotations. + # : (String ruby_contents, file: String, ?positional_names: bool) -> String # - # source://spoom//lib/spoom/sorbet/sigs.rb#80 - sig { params(ruby_contents: ::String).returns(T::Array[[::RBI::RBSComment, T.any(::RBI::Attr, ::RBI::Method)]]) } - def collect_rbs_comments(ruby_contents); end + # source://spoom//lib/spoom/sorbet/translate.rb#29 + sig { params(ruby_contents: ::String, file: ::String, positional_names: T::Boolean).returns(::String) } + def sorbet_sigs_to_rbs_comments(ruby_contents, file:, positional_names: T.unsafe(nil)); end - # : (String ruby_contents) -> Array[[RBI::Sig, (RBI::Method | RBI::Attr)]] + # Deletes all `sig` nodes from the given Ruby code. + # It doesn't handle type members and class annotations. + # : (String ruby_contents, file: String) -> String # - # source://spoom//lib/spoom/sorbet/sigs.rb#72 - sig { params(ruby_contents: ::String).returns(T::Array[[::RBI::Sig, T.any(::RBI::Attr, ::RBI::Method)]]) } - def collect_sorbet_sigs(ruby_contents); end + # source://spoom//lib/spoom/sorbet/translate.rb#22 + sig { params(ruby_contents: ::String, file: ::String).returns(::String) } + def strip_sorbet_sigs(ruby_contents, file:); end end end -# source://spoom//lib/spoom/sorbet/sigs.rb#9 -class Spoom::Sorbet::Sigs::Error < ::Spoom::Error; end +# source://spoom//lib/spoom/sorbet/translate.rb#16 +class Spoom::Sorbet::Translate::Error < ::Spoom::Error; end -# source://spoom//lib/spoom/sorbet/sigs.rb#123 -class Spoom::Sorbet::Sigs::RBIToRBSTranslator - class << self - # : (RBI::Sig sig, (RBI::Method | RBI::Attr) node, positional_names: bool) -> String - # - # source://spoom//lib/spoom/sorbet/sigs.rb#126 - sig do - params( - sig: ::RBI::Sig, - node: T.any(::RBI::Attr, ::RBI::Method), - positional_names: T::Boolean - ).returns(::String) - end - def translate(sig, node, positional_names: T.unsafe(nil)); end +# source://spoom//lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs.rb#7 +class Spoom::Sorbet::Translate::RBSCommentsToSorbetSigs < ::Spoom::Sorbet::Translate::Translator + include ::Spoom::RBS::ExtractRBSComments - private + # : (Prism::CallNode node) -> void + # + # source://spoom//lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs.rb#66 + sig { override.params(node: ::Prism::CallNode).void } + def visit_call_node(node); end - # : (RBI::Sig sig, RBI::Attr node, positional_names: bool) -> String - # - # source://spoom//lib/spoom/sorbet/sigs.rb#173 - sig { params(sig: ::RBI::Sig, node: ::RBI::Attr, positional_names: T::Boolean).returns(::String) } - def translate_attr_sig(sig, node, positional_names: T.unsafe(nil)); end + # : (Prism::ClassNode node) -> void + # + # source://spoom//lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs.rb#12 + sig { override.params(node: ::Prism::ClassNode).void } + def visit_class_node(node); end - # : (RBI::Sig sig, RBI::Method node, positional_names: bool) -> String - # - # source://spoom//lib/spoom/sorbet/sigs.rb#138 - sig { params(sig: ::RBI::Sig, node: ::RBI::Method, positional_names: T::Boolean).returns(::String) } - def translate_method_sig(sig, node, positional_names: T.unsafe(nil)); end + # : (Prism::DefNode node) -> void + # + # source://spoom//lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs.rb#36 + sig { override.params(node: ::Prism::DefNode).void } + def visit_def_node(node); end + + # : (Prism::ModuleNode node) -> void + # + # source://spoom//lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs.rb#20 + sig { override.params(node: ::Prism::ModuleNode).void } + def visit_module_node(node); end + + # : (Prism::SingletonClassNode node) -> void + # + # source://spoom//lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs.rb#28 + sig { override.params(node: ::Prism::SingletonClassNode).void } + def visit_singleton_class_node(node); end + + private + + # : (Prism::ClassNode | Prism::ModuleNode | Prism::SingletonClassNode, Regexp) -> bool + # + # @return [Boolean] + # + # source://spoom//lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs.rb#222 + sig do + params( + node: T.any(::Prism::ClassNode, ::Prism::ModuleNode, ::Prism::SingletonClassNode), + constant_regex: ::Regexp + ).returns(T::Boolean) end + def already_extends?(node, constant_regex); end + + # : (Prism::ClassNode | Prism::ModuleNode | Prism::SingletonClassNode) -> void + # + # source://spoom//lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs.rb#113 + sig { params(node: T.any(::Prism::ClassNode, ::Prism::ModuleNode, ::Prism::SingletonClassNode)).void } + def apply_class_annotations(node); end + + # : (Array[RBS::Annotations], RBI::Sig) -> void + # + # source://spoom//lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs.rb#201 + sig { params(annotations: T::Array[::Spoom::RBS::Annotations], sig: ::RBI::Sig).void } + def apply_member_annotations(annotations, sig); end + + # : (Prism::CallNode) -> void + # + # source://spoom//lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs.rb#78 + sig { params(node: ::Prism::CallNode).void } + def visit_attr(node); end end -# source://spoom//lib/spoom/sorbet/sigs.rb#182 -class Spoom::Sorbet::Sigs::RBSToRBITranslator - class << self - # : (RBI::RBSComment comment, (RBI::Method | RBI::Attr) node) -> String? - # - # source://spoom//lib/spoom/sorbet/sigs.rb#187 - sig { params(comment: ::RBI::RBSComment, node: T.any(::RBI::Attr, ::RBI::Method)).returns(T.nilable(::String)) } - def translate(comment, node); end +# Translates Sorbet assertions to RBS comments. +# +# source://spoom//lib/spoom/sorbet/translate/sorbet_assertions_to_rbs_comments.rb#8 +class Spoom::Sorbet::Translate::SorbetAssertionsToRBSComments < ::Spoom::Sorbet::Translate::Translator + # : (Prism::CallNode) -> void + # + # source://spoom//lib/spoom/sorbet/translate/sorbet_assertions_to_rbs_comments.rb#13 + sig { override.params(node: ::Prism::CallNode).void } + def visit_call_node(node); end - private + private - # : (RBI::RBSComment comment, RBI::Attr node) -> String - # - # source://spoom//lib/spoom/sorbet/sigs.rb#228 - sig { params(comment: ::RBI::RBSComment, node: ::RBI::Attr).returns(::String) } - def translate_attr_sig(comment, node); end + # : (Prism::Node) -> bool + # + # @return [Boolean] + # + # source://spoom//lib/spoom/sorbet/translate/sorbet_assertions_to_rbs_comments.rb#76 + sig { params(node: ::Prism::Node).returns(T::Boolean) } + def at_end_of_line?(node); end - # : (RBI::RBSComment rbs_comment, RBI::Method node) -> String - # - # source://spoom//lib/spoom/sorbet/sigs.rb#201 - sig { params(rbs_comment: ::RBI::RBSComment, node: ::RBI::Method).returns(::String) } - def translate_method_sig(rbs_comment, node); end + # : (Prism::CallNode) -> void + # + # source://spoom//lib/spoom/sorbet/translate/sorbet_assertions_to_rbs_comments.rb#28 + sig { params(call: ::Prism::CallNode).void } + def build_rbs_annotation(call); end + + # : (Prism::Node, Prism::Node) -> String + # + # source://spoom//lib/spoom/sorbet/translate/sorbet_assertions_to_rbs_comments.rb#83 + sig { params(assign: ::Prism::Node, value: ::Prism::Node).returns(::String) } + def dedent_value(assign, value); end + + # Is this node a `T` or `::T` constant? + # : (Prism::Node?) -> bool + # + # @return [Boolean] + # + # source://spoom//lib/spoom/sorbet/translate/sorbet_assertions_to_rbs_comments.rb#49 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } + def t?(node); end + + # Is this node a `T.let` or `T.cast`? + # : (Prism::CallNode) -> bool + # + # @return [Boolean] + # + # source://spoom//lib/spoom/sorbet/translate/sorbet_assertions_to_rbs_comments.rb#62 + sig { params(node: ::Prism::CallNode).returns(T::Boolean) } + def t_annotation?(node); end +end + +# : Integer +# +# source://spoom//lib/spoom/sorbet/translate/sorbet_assertions_to_rbs_comments.rb#9 +Spoom::Sorbet::Translate::SorbetAssertionsToRBSComments::LINE_BREAK = T.let(T.unsafe(nil), Integer) + +# Converts all `sig` nodes to RBS comments in the given Ruby code. +# It also handles type members and class annotations. +# +# source://spoom//lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb#9 +class Spoom::Sorbet::Translate::SorbetSigsToRBSComments < ::Spoom::Sorbet::Translate::Translator + # : (String, file: String, positional_names: bool) -> void + # + # @return [SorbetSigsToRBSComments] a new instance of SorbetSigsToRBSComments + # + # source://spoom//lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb#11 + sig { params(ruby_contents: ::String, file: ::String, positional_names: T::Boolean).void } + def initialize(ruby_contents, file:, positional_names:); end + + # : (Prism::CallNode) -> void + # + # source://spoom//lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb#65 + sig { override.params(node: ::Prism::CallNode).void } + def visit_call_node(node); end + + # : (Prism::ClassNode) -> void + # + # source://spoom//lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb#22 + sig { override.params(node: ::Prism::ClassNode).void } + def visit_class_node(node); end + + # : (Prism::ConstantWriteNode) -> void + # + # source://spoom//lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb#82 + sig { override.params(node: ::Prism::ConstantWriteNode).void } + def visit_constant_write_node(node); end + + # : (Prism::DefNode) -> void + # + # source://spoom//lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb#40 + sig { override.params(node: ::Prism::DefNode).void } + def visit_def_node(node); end + + # : (Prism::ModuleNode) -> void + # + # source://spoom//lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb#28 + sig { override.params(node: ::Prism::ModuleNode).void } + def visit_module_node(node); end + + # : (Prism::SingletonClassNode) -> void + # + # source://spoom//lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb#34 + sig { override.params(node: ::Prism::SingletonClassNode).void } + def visit_singleton_class_node(node); end + + private + + # : (Array[[Prism::CallNode, RBI::Sig]]) -> void + # + # source://spoom//lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb#214 + sig { params(sigs: T::Array[[::Prism::CallNode, ::RBI::Sig]]).void } + def apply_member_annotations(sigs); end + + # : (Prism::ConstantWriteNode) -> String + # + # @raise [Error] + # + # source://spoom//lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb#246 + sig { params(node: ::Prism::ConstantWriteNode).returns(::String) } + def build_type_member_string(node); end + + # : (Prism::CallNode) -> void + # + # source://spoom//lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb#128 + sig { params(node: ::Prism::CallNode).void } + def visit_attr(node); end + + # : (Prism::CallNode node) -> void + # + # source://spoom//lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb#172 + sig { params(node: ::Prism::CallNode).void } + def visit_class_annotation(node); end + + # : (Prism::CallNode node) -> void + # + # @raise [Error] + # + # source://spoom//lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb#155 + sig { params(node: ::Prism::CallNode).void } + def visit_extend(node); end + + # : (Prism::ClassNode | Prism::ModuleNode | Prism::SingletonClassNode) { -> void } -> void + # + # source://spoom//lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb#99 + sig do + params( + node: T.any(::Prism::ClassNode, ::Prism::ModuleNode, ::Prism::SingletonClassNode), + block: T.proc.void + ).void end + def visit_scope(node, &block); end + + # : (Prism::CallNode) -> void + # + # source://spoom//lib/spoom/sorbet/translate/sorbet_sigs_to_rbs_comments.rb#116 + sig { params(node: ::Prism::CallNode).void } + def visit_sig(node); end +end + +# Deletes all `sig` nodes from the given Ruby code. +# It doesn't handle type members and class annotations. +# +# source://spoom//lib/spoom/sorbet/translate/strip_sorbet_sigs.rb#9 +class Spoom::Sorbet::Translate::StripSorbetSigs < ::Spoom::Sorbet::Translate::Translator + # : (Prism::CallNode node) -> void + # + # source://spoom//lib/spoom/sorbet/translate/strip_sorbet_sigs.rb#12 + sig { override.params(node: ::Prism::CallNode).void } + def visit_call_node(node); end +end + +# @abstract +# +# source://spoom//lib/spoom/sorbet/translate/translator.rb#8 +class Spoom::Sorbet::Translate::Translator < ::Spoom::Visitor + abstract! + + # : (String, file: String) -> void + # + # @return [Translator] a new instance of Translator + # + # source://spoom//lib/spoom/sorbet/translate/translator.rb#10 + sig { params(ruby_contents: ::String, file: ::String).void } + def initialize(ruby_contents, file:); end + + # : -> String + # + # source://spoom//lib/spoom/sorbet/translate/translator.rb#29 + sig { returns(::String) } + def rewrite; end + + private + + # : (Integer) -> Integer + # + # source://spoom//lib/spoom/sorbet/translate/translator.rb#54 + sig { params(offset: ::Integer).returns(::Integer) } + def adjust_to_line_end(offset); end + + # : (Integer) -> Integer + # + # source://spoom//lib/spoom/sorbet/translate/translator.rb#48 + sig { params(offset: ::Integer).returns(::Integer) } + def adjust_to_line_start(offset); end + + # Consume the next blank line if any + # : (Integer) -> Integer + # + # source://spoom//lib/spoom/sorbet/translate/translator.rb#61 + sig { params(offset: ::Integer).returns(::Integer) } + def adjust_to_new_line(offset); end + + # : (Prism::CallNode node) -> bool + # + # @return [Boolean] + # + # source://spoom//lib/spoom/sorbet/translate/translator.rb#38 + sig { params(node: ::Prism::CallNode).returns(T::Boolean) } + def sorbet_sig?(node); end +end + +# This module provides a simple API to rewrite source code. +# +# Using a `Rewriter`, you can build a list of changes to apply to a source file +# and apply them all at once. Edits are applied from bottom to top, so that the +# line numbers are not remapped after each edit. +# +# The source code is represented as an array of bytes, so that it can be +# manipulated in place. The client is responsible for `string <-> bytes` +# conversions and encoding handling. +# +# ```ruby +# bytes = "def foo; end".bytes +# +# rewriter = Spoom::Source::Rewriter.new +# rewriter << Spoom::Source::Replace.new(4, 6, "baz") +# rewriter << Spoom::Source::Insert.new(0, "def bar; end\n") +# rewriter.rewrite!(bytes) +# +# puts bytes.pack("C*") # => "def bar; end\ndef baz; end" +# ``` +# +# source://spoom//lib/spoom/source/rewriter.rb#25 +module Spoom::Source; end + +# source://spoom//lib/spoom/source/rewriter.rb#113 +class Spoom::Source::Delete < ::Spoom::Source::Edit + # : (Integer, Integer) -> void + # + # @return [Delete] a new instance of Delete + # + # source://spoom//lib/spoom/source/rewriter.rb#118 + sig { params(from: ::Integer, to: ::Integer).void } + def initialize(from, to); end + + # : (Array[untyped]) -> void + # + # @raise [PositionError] + # + # source://spoom//lib/spoom/source/rewriter.rb#127 + sig { override.params(bytes: T::Array[T.untyped]).void } + def apply(bytes); end + + # : Integer + # + # source://spoom//lib/spoom/source/rewriter.rb#115 + sig { returns(::Integer) } + def from; end + + # : -> [Integer, Integer] + # + # source://spoom//lib/spoom/source/rewriter.rb#135 + sig { override.returns([::Integer, ::Integer]) } + def range; end + + # : Integer + # + # source://spoom//lib/spoom/source/rewriter.rb#115 + def to; end + + # : -> String + # + # source://spoom//lib/spoom/source/rewriter.rb#141 + sig { override.returns(::String) } + def to_s; end end -# From https://github.com/Shopify/ruby-lsp/blob/9154bfc6ef/lib/ruby_lsp/document.rb#L127 +# @abstract # -# source://spoom//lib/spoom/sorbet/sigs.rb#248 -class Spoom::Sorbet::Sigs::Scanner - # : (String source) -> void +# source://spoom//lib/spoom/source/rewriter.rb#29 +class Spoom::Source::Edit + abstract! + + # : (Array[Integer]) -> void # - # @return [Scanner] a new instance of Scanner + # @abstract # - # source://spoom//lib/spoom/sorbet/sigs.rb#252 - sig { params(source: ::String).void } - def initialize(source); end + # source://spoom//lib/spoom/source/rewriter.rb#32 + sig { abstract.params(bytes: T::Array[::Integer]).void } + def apply(bytes); end - # Finds the character index inside the source string for a given line and column - # : (Integer line, Integer character) -> Integer + # : -> [Integer, Integer] + # + # @abstract # - # source://spoom//lib/spoom/sorbet/sigs.rb#260 - # Finds the character index inside the source string for a given line and column - sig { params(line: ::Integer, character: ::Integer).returns(::Integer) } - def find_char_position(line, character); end + # source://spoom//lib/spoom/source/rewriter.rb#36 + sig { abstract.returns([::Integer, ::Integer]) } + def range; end end -# source://spoom//lib/spoom/sorbet/sigs.rb#249 -Spoom::Sorbet::Sigs::Scanner::LINE_BREAK = T.let(T.unsafe(nil), Integer) +# source://spoom//lib/spoom/source/rewriter.rb#39 +class Spoom::Source::Insert < ::Spoom::Source::Edit + # : (Integer, String) -> void + # + # @return [Insert] a new instance of Insert + # + # source://spoom//lib/spoom/source/rewriter.rb#47 + sig { params(position: ::Integer, text: ::String).void } + def initialize(position, text); end + + # : (Array[Integer]) -> void + # + # @raise [PositionError] + # + # source://spoom//lib/spoom/source/rewriter.rb#56 + sig { override.params(bytes: T::Array[::Integer]).void } + def apply(bytes); end + + # : Integer + # + # source://spoom//lib/spoom/source/rewriter.rb#41 + sig { returns(::Integer) } + def position; end + + # : -> [Integer, Integer] + # + # source://spoom//lib/spoom/source/rewriter.rb#65 + sig { override.returns([::Integer, ::Integer]) } + def range; end + + # : String + # + # source://spoom//lib/spoom/source/rewriter.rb#44 + sig { returns(::String) } + def text; end + + # : -> String + # + # source://spoom//lib/spoom/source/rewriter.rb#71 + sig { override.returns(::String) } + def to_s; end +end + +# source://spoom//lib/spoom/source/rewriter.rb#26 +class Spoom::Source::PositionError < ::Spoom::Error; end + +# source://spoom//lib/spoom/source/rewriter.rb#76 +class Spoom::Source::Replace < ::Spoom::Source::Edit + # : (Integer, Integer, String) -> void + # + # @return [Replace] a new instance of Replace + # + # source://spoom//lib/spoom/source/rewriter.rb#84 + sig { params(from: ::Integer, to: ::Integer, text: ::String).void } + def initialize(from, to, text); end + + # : (Array[Integer]) -> void + # + # @raise [PositionError] + # + # source://spoom//lib/spoom/source/rewriter.rb#94 + sig { override.params(bytes: T::Array[::Integer]).void } + def apply(bytes); end + + # : Integer + # + # source://spoom//lib/spoom/source/rewriter.rb#78 + sig { returns(::Integer) } + def from; end + + # : -> [Integer, Integer] + # + # source://spoom//lib/spoom/source/rewriter.rb#102 + sig { override.returns([::Integer, ::Integer]) } + def range; end + + # : String + # + # source://spoom//lib/spoom/source/rewriter.rb#81 + sig { returns(::String) } + def text; end -# source://spoom//lib/spoom/sorbet/sigs.rb#88 -class Spoom::Sorbet::Sigs::SigsLocator < ::RBI::Visitor + # : Integer + # + # source://spoom//lib/spoom/source/rewriter.rb#78 + def to; end + + # : -> String + # + # source://spoom//lib/spoom/source/rewriter.rb#108 + sig { override.returns(::String) } + def to_s; end +end + +# source://spoom//lib/spoom/source/rewriter.rb#146 +class Spoom::Source::Rewriter # : -> void # - # @return [SigsLocator] a new instance of SigsLocator + # @return [Rewriter] a new instance of Rewriter # - # source://spoom//lib/spoom/sorbet/sigs.rb#96 + # source://spoom//lib/spoom/source/rewriter.rb#148 sig { void } def initialize; end - # : Array[[RBI::RBSComment, (RBI::Method | RBI::Attr)]] + # : (Edit) -> void # - # source://spoom//lib/spoom/sorbet/sigs.rb#93 - sig { returns(T::Array[[::RBI::RBSComment, T.any(::RBI::Attr, ::RBI::Method)]]) } - def rbs_comments; end + # source://spoom//lib/spoom/source/rewriter.rb#153 + sig { params(other: ::Spoom::Source::Edit).void } + def <<(other); end - # : Array[[RBI::Sig, (RBI::Method | RBI::Attr)]] + # : (Array[Integer]) -> void # - # source://spoom//lib/spoom/sorbet/sigs.rb#90 - sig { returns(T::Array[[::RBI::Sig, T.any(::RBI::Attr, ::RBI::Method)]]) } - def sigs; end - - # : (RBI::Node? node) -> void - # - # source://spoom//lib/spoom/sorbet/sigs.rb#104 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end + # source://spoom//lib/spoom/source/rewriter.rb#158 + sig { params(bytes: T::Array[::Integer]).void } + def rewrite!(bytes); end end # source://spoom//lib/spoom/timeline.rb#5 @@ -6366,7 +6256,6 @@ class Spoom::Timeline # : (Array[Time] dates) -> Array[Git::Commit] # # source://spoom//lib/spoom/timeline.rb#34 - # Return one commit for each date in `dates` sig { params(dates: T::Array[::Time]).returns(T::Array[::Spoom::Git::Commit]) } def commits_for_dates(dates); end @@ -6374,7 +6263,6 @@ class Spoom::Timeline # : -> Array[Time] # # source://spoom//lib/spoom/timeline.rb#21 - # Return all months between `from` and `to` sig { returns(T::Array[::Time]) } def months; end @@ -6382,7 +6270,6 @@ class Spoom::Timeline # : -> Array[Git::Commit] # # source://spoom//lib/spoom/timeline.rb#15 - # Return one commit for each month between `from` and `to` sig { returns(T::Array[::Spoom::Git::Commit]) } def ticks; end end diff --git a/sorbet/rbi/gems/tapioca@0.16.11.rbi b/sorbet/rbi/gems/tapioca@0.17.0.rbi similarity index 68% rename from sorbet/rbi/gems/tapioca@0.16.11.rbi rename to sorbet/rbi/gems/tapioca@0.17.0.rbi index dff5feacc..f44a2bea0 100644 --- a/sorbet/rbi/gems/tapioca@0.16.11.rbi +++ b/sorbet/rbi/gems/tapioca@0.17.0.rbi @@ -12,16 +12,22 @@ end # source://tapioca//lib/tapioca/helpers/git_attributes.rb#4 class GitAttributes class << self + # : (Pathname path) -> void + # # source://tapioca//lib/tapioca/helpers/git_attributes.rb#9 sig { params(path: ::Pathname).void } def create_generated_attribute_file(path); end + # : (Pathname path) -> void + # # source://tapioca//lib/tapioca/helpers/git_attributes.rb#16 sig { params(path: ::Pathname).void } def create_vendored_attribute_file(path); end private + # : (Pathname path, String content) -> void + # # source://tapioca//lib/tapioca/helpers/git_attributes.rb#25 sig { params(path: ::Pathname, content: ::String).void } def create_gitattributes_file(path, content); end @@ -35,18 +41,18 @@ end # That's because RubyGems does alias-method-chain for Kernel#require and such, # so, if Bootsnap were to do prepend, it might end up breaking RubyGems. # -# source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#68 +# source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#64 class Module - # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#101 + # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#97 def append_features(constant); end - # source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#71 + # source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#67 def autoload(const_name, path); end - # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#111 + # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#107 def extend_object(obj); end - # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#91 + # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#87 def prepend_features(constant); end end @@ -55,19 +61,21 @@ module RBI; end # source://tapioca//lib/tapioca/rbi_ext/model.rb#5 class RBI::Tree < ::RBI::NodeWithComments - # source://rbi/0.3.1/lib/rbi/model.rb#117 + # source://rbi/0.3.3/lib/rbi/model.rb#119 def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi/0.3.1/lib/rbi/model.rb#124 + # source://rbi/0.3.3/lib/rbi/model.rb#126 def <<(node); end - # source://rbi/0.3.1/lib/rbi/rewriters/add_sig_templates.rb#63 + # source://rbi/0.3.3/lib/rbi/rewriters/add_sig_templates.rb#63 def add_sig_templates!(with_todo_comment: T.unsafe(nil)); end - # source://rbi/0.3.1/lib/rbi/rewriters/annotate.rb#46 + # source://rbi/0.3.3/lib/rbi/rewriters/annotate.rb#46 def annotate!(annotation, annotate_scopes: T.unsafe(nil), annotate_properties: T.unsafe(nil)); end - # source://tapioca//lib/tapioca/rbi_ext/model.rb#38 + # : (String name, ?superclass_name: String?) ?{ (RBI::Scope scope) -> void } -> Scope + # + # source://tapioca//lib/tapioca/rbi_ext/model.rb#32 sig do params( name: ::String, @@ -77,19 +85,27 @@ class RBI::Tree < ::RBI::NodeWithComments end def create_class(name, superclass_name: T.unsafe(nil), &block); end - # source://tapioca//lib/tapioca/rbi_ext/model.rb#45 + # : (String name, value: String) -> void + # + # source://tapioca//lib/tapioca/rbi_ext/model.rb#39 sig { params(name: ::String, value: ::String).void } def create_constant(name, value:); end - # source://tapioca//lib/tapioca/rbi_ext/model.rb#55 + # : (String name) -> void + # + # source://tapioca//lib/tapioca/rbi_ext/model.rb#49 sig { params(name: ::String).void } def create_extend(name); end - # source://tapioca//lib/tapioca/rbi_ext/model.rb#50 + # : (String name) -> void + # + # source://tapioca//lib/tapioca/rbi_ext/model.rb#44 sig { params(name: ::String).void } def create_include(name); end - # source://tapioca//lib/tapioca/rbi_ext/model.rb#90 + # : (String name, ?parameters: Array[TypedParam], ?return_type: String?, ?class_method: bool, ?visibility: RBI::Visibility, ?comments: Array[RBI::Comment]) ?{ (RBI::Method node) -> void } -> void + # + # source://tapioca//lib/tapioca/rbi_ext/model.rb#65 sig do params( name: ::String, @@ -103,19 +119,27 @@ class RBI::Tree < ::RBI::NodeWithComments 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 - # source://tapioca//lib/tapioca/rbi_ext/model.rb#60 + # : (String name) -> void + # + # source://tapioca//lib/tapioca/rbi_ext/model.rb#54 sig { params(name: ::String).void } def create_mixes_in_class_methods(name); end + # : (String name) ?{ (Scope scope) -> void } -> Scope + # # source://tapioca//lib/tapioca/rbi_ext/model.rb#25 sig { params(name: ::String, block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)).returns(::RBI::Scope) } def create_module(name, &block); end + # : (::Module constant) ?{ (Scope scope) -> void } -> Scope + # # source://tapioca//lib/tapioca/rbi_ext/model.rb#9 sig { params(constant: ::Module, block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)).returns(::RBI::Scope) } def create_path(constant, &block); end - # source://tapioca//lib/tapioca/rbi_ext/model.rb#74 + # : (String name, type: String, ?variance: Symbol, ?fixed: String?, ?upper: String?, ?lower: String?) -> void + # + # source://tapioca//lib/tapioca/rbi_ext/model.rb#59 sig do params( name: ::String, @@ -128,69 +152,73 @@ class RBI::Tree < ::RBI::NodeWithComments 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/0.3.1/lib/rbi/rewriters/deannotate.rb#38 + # source://rbi/0.3.3/lib/rbi/rewriters/deannotate.rb#38 def deannotate!(annotation); end - # source://rbi/0.3.1/lib/rbi/model.rb#130 + # source://rbi/0.3.3/lib/rbi/model.rb#132 def empty?; end - # source://rbi/0.3.1/lib/rbi/rewriters/filter_versions.rb#113 + # source://rbi/0.3.3/lib/rbi/rewriters/filter_versions.rb#113 def filter_versions!(version); end - # source://rbi/0.3.1/lib/rbi/rewriters/flatten_singleton_methods.rb#57 + # source://rbi/0.3.3/lib/rbi/rewriters/flatten_singleton_methods.rb#58 def flatten_singleton_methods!; end - # source://rbi/0.3.1/lib/rbi/rewriters/flatten_visibilities.rb#57 + # source://rbi/0.3.3/lib/rbi/rewriters/flatten_visibilities.rb#57 def flatten_visibilities!; end - # source://rbi/0.3.1/lib/rbi/rewriters/group_nodes.rb#78 + # source://rbi/0.3.3/lib/rbi/rewriters/group_nodes.rb#78 def group_nodes!; end - # source://rbi/0.3.1/lib/rbi/index.rb#64 + # source://rbi/0.3.3/lib/rbi/index.rb#64 def index; end - # source://rbi/0.3.1/lib/rbi/rewriters/merge_trees.rb#314 + # source://rbi/0.3.3/lib/rbi/rewriters/merge_trees.rb#314 def merge(other, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end - # source://rbi/0.3.1/lib/rbi/rewriters/nest_non_public_members.rb#43 + # source://rbi/0.3.3/lib/rbi/rewriters/nest_non_public_members.rb#43 def nest_non_public_members!; end - # source://rbi/0.3.1/lib/rbi/rewriters/nest_singleton_methods.rb#33 + # source://rbi/0.3.3/lib/rbi/rewriters/nest_singleton_methods.rb#33 def nest_singleton_methods!; end - # source://rbi/0.3.1/lib/rbi/rewriters/nest_top_level_members.rb#60 + # source://rbi/0.3.3/lib/rbi/rewriters/nest_top_level_members.rb#60 def nest_top_level_members!; end - # source://rbi/0.3.1/lib/rbi/model.rb#114 + # source://rbi/0.3.3/lib/rbi/model.rb#116 def nodes; end - # source://rbi/0.3.1/lib/rbi/rewriters/attr_to_methods.rb#50 + # source://rbi/0.3.3/lib/rbi/rewriters/attr_to_methods.rb#50 def replace_attributes_with_methods!; end - # source://rbi/0.3.1/lib/rbi/rewriters/sort_nodes.rb#116 + # source://rbi/0.3.3/lib/rbi/rewriters/sort_nodes.rb#118 def sort_nodes!; end - # source://rbi/0.3.1/lib/rbi/rewriters/translate_rbs_sigs.rb#82 + # source://rbi/0.3.3/lib/rbi/rewriters/translate_rbs_sigs.rb#82 def translate_rbs_sigs!; end private - # source://tapioca//lib/tapioca/rbi_ext/model.rb#123 + # : (RBI::Node node) -> RBI::Node + # + # source://tapioca//lib/tapioca/rbi_ext/model.rb#98 sig { params(node: ::RBI::Node).returns(::RBI::Node) } def create_node(node); end - # source://tapioca//lib/tapioca/rbi_ext/model.rb#118 + # : -> Hash[String, RBI::Node] + # + # source://tapioca//lib/tapioca/rbi_ext/model.rb#93 sig { returns(T::Hash[::String, ::RBI::Node]) } def nodes_cache; end end -# source://tapioca//lib/tapioca/rbi_ext/model.rb#133 +# source://tapioca//lib/tapioca/rbi_ext/model.rb#108 class RBI::TypedParam < ::T::Struct const :param, ::RBI::Param const :type, ::String class << self - # source://sorbet-runtime/0.5.11965/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.12123/lib/types/struct.rb#13 def inherited(s); end end end @@ -367,6 +395,8 @@ module T::Types::Simple::NamePatch def qualified_name_of(constant); end end +# : UnboundMethod +# # source://tapioca//lib/tapioca/sorbet_ext/name_patch.rb#8 T::Types::Simple::NamePatch::NAME_METHOD = T.let(T.unsafe(nil), UnboundMethod) @@ -387,18 +417,16 @@ end # source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#4 module Tapioca class << self - # source://tapioca//lib/tapioca.rb#20 - sig do - type_parameters(:Result) - .params( - blk: T.proc.returns(T.type_parameter(:Result)) - ).returns(T.type_parameter(:Result)) - end + # : [Result] { -> Result } -> Result + # + # source://tapioca//lib/tapioca.rb#16 def silence_warnings(&blk); end end end -# source://tapioca//lib/tapioca.rb#39 +# : String +# +# source://tapioca//lib/tapioca.rb#35 Tapioca::BINARY_FILE = T.let(T.unsafe(nil), String) # source://tapioca//lib/tapioca/bundler_ext/auto_require_hook.rb#5 @@ -412,7 +440,9 @@ module Tapioca::BundlerExt; end module Tapioca::BundlerExt::AutoRequireHook requires_ancestor { Bundler::Dependency } - # source://tapioca//lib/tapioca/bundler_ext/auto_require_hook.rb#46 + # : -> untyped + # + # source://tapioca//lib/tapioca/bundler_ext/auto_require_hook.rb#41 sig { returns(T.untyped) } def autorequire; end @@ -422,11 +452,15 @@ module Tapioca::BundlerExt::AutoRequireHook # source://tapioca//lib/tapioca/bundler_ext/auto_require_hook.rb#26 def enabled?; end + # : (untyped name) -> bool + # # source://tapioca//lib/tapioca/bundler_ext/auto_require_hook.rb#22 sig { params(name: T.untyped).returns(T::Boolean) } def excluded?(name); end - # source://tapioca//lib/tapioca/bundler_ext/auto_require_hook.rb#36 + # : [Result] (exclude: Array[String]) { -> Result } -> Result + # + # source://tapioca//lib/tapioca/bundler_ext/auto_require_hook.rb#31 sig do type_parameters(:Result) .params( @@ -438,13 +472,13 @@ module Tapioca::BundlerExt::AutoRequireHook end end -# source://tapioca//lib/tapioca.rb#62 +# source://tapioca//lib/tapioca.rb#55 Tapioca::CENTRAL_REPO_ANNOTATIONS_DIR = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca.rb#61 +# source://tapioca//lib/tapioca.rb#54 Tapioca::CENTRAL_REPO_INDEX_PATH = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca.rb#60 +# source://tapioca//lib/tapioca.rb#53 Tapioca::CENTRAL_REPO_ROOT_URI = T.let(T.unsafe(nil), String) # source://tapioca//lib/tapioca/cli.rb#5 @@ -508,14 +542,20 @@ Tapioca::Cli::FILE_HEADER_OPTION_DESC = T.let(T.unsafe(nil), String) module Tapioca::CliHelper requires_ancestor { Thor::Shell } + # : (Hash[Symbol, untyped] options) -> String? + # # source://tapioca//lib/tapioca/helpers/cli_helper.rb#33 sig { params(options: T::Hash[::Symbol, T.untyped]).returns(T.nilable(::String)) } def netrc_file(options); end + # : (Hash[Symbol, untyped] options) -> RBIFormatter + # # source://tapioca//lib/tapioca/helpers/cli_helper.rb#26 sig { params(options: T::Hash[::Symbol, T.untyped]).returns(::Tapioca::RBIFormatter) } def rbi_formatter(options); end + # : (?String message, *(Symbol | Array[Symbol]) color) -> void + # # source://tapioca//lib/tapioca/helpers/cli_helper.rb#12 sig { params(message: ::String, color: T.any(::Symbol, T::Array[::Symbol])).void } def say_error(message = T.unsafe(nil), *color); end @@ -533,7 +573,9 @@ class Tapioca::Commands::AbstractDsl < ::Tapioca::Commands::CommandWithoutTracke abstract! - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#34 + # : (requested_constants: Array[String], requested_paths: Array[Pathname], outpath: Pathname, only: Array[String], exclude: Array[String], file_header: bool, tapioca_path: String, ?skip_constant: Array[String], ?quiet: bool, ?verbose: bool, ?number_of_workers: Integer?, ?auto_strictness: bool, ?gem_dir: String, ?rbi_formatter: RBIFormatter, ?app_root: String, ?halt_upon_load_error: bool, ?compiler_options: Hash[String, untyped], ?lsp_addon: bool) -> void + # + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#13 sig do params( requested_constants: T::Array[::String], @@ -560,15 +602,21 @@ class Tapioca::Commands::AbstractDsl < ::Tapioca::Commands::CommandWithoutTracke private - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#107 + # : -> Array[String] + # + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#86 sig { returns(T::Array[::String]) } def all_requested_constants; end - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#313 + # : (Symbol cause, Array[String] files) -> String + # + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#282 sig { params(cause: ::Symbol, files: T::Array[::String]).returns(::String) } def build_error_for_files(cause, files); end - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#237 + # : (String constant_name, RBI::File rbi, ?outpath: Pathname, ?quiet: bool) -> Pathname? + # + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#206 sig do params( constant_name: ::String, @@ -579,75 +627,111 @@ class Tapioca::Commands::AbstractDsl < ::Tapioca::Commands::CommandWithoutTracke end def compile_dsl_rbi(constant_name, rbi, outpath: T.unsafe(nil), quiet: T.unsafe(nil)); end - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#172 + # : (Array[String] constant_names, ?ignore_missing: bool) -> Array[Module] + # + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#148 sig { params(constant_names: T::Array[::String], ignore_missing: T::Boolean).returns(T::Array[::Module]) } def constantize(constant_names, ignore_missing: T.unsafe(nil)); end - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#197 + # : (Array[String] compiler_names) -> Array[singleton(Tapioca::Dsl::Compiler)] + # + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#173 sig { params(compiler_names: T::Array[::String]).returns(T::Array[T.class_of(Tapioca::Dsl::Compiler)]) } def constantize_compilers(compiler_names); end - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#373 + # : -> Array[String] + # + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#342 sig { returns(T::Array[::String]) } def constants_from_requested_paths; end - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#133 + # : -> Tapioca::Dsl::Pipeline + # + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#109 sig { returns(::Tapioca::Dsl::Pipeline) } def create_pipeline; end - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#276 + # : (String constant_name) -> Pathname + # + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#245 sig { params(constant_name: ::String).returns(::Pathname) } def dsl_rbi_filename(constant_name); end - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#158 + # : (Array[String] requested_constants, ?path: Pathname) -> Set[Pathname] + # + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#134 sig { params(requested_constants: T::Array[::String], path: ::Pathname).returns(T::Set[::Pathname]) } def existing_rbi_filenames(requested_constants, path: T.unsafe(nil)); end - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#368 + # : (String constant) -> String + # + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#337 sig { params(constant: ::String).returns(::String) } def generate_command_for(constant); end - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#79 + # : (Pathname outpath, quiet: bool) -> Set[Pathname] + # + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#58 sig { params(outpath: ::Pathname, quiet: T::Boolean).returns(T::Set[::Pathname]) } def generate_dsl_rbi_files(outpath, quiet:); end - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#120 + # : -> void + # + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#96 sig { void } def load_application; end - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#255 + # : (Pathname dir) -> void + # + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#224 sig { params(dir: ::Pathname).void } def perform_dsl_verification(dir); end - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#115 + # : -> Tapioca::Dsl::Pipeline + # + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#91 sig { returns(::Tapioca::Dsl::Pipeline) } def pipeline; end - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#264 + # : (Set[Pathname] files) -> void + # + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#233 sig { params(files: T::Set[::Pathname]).void } def purge_stale_dsl_rbi_files(files); end - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#363 + # : (String constant) -> String + # + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#332 sig { params(constant: ::String).returns(::String) } def rbi_filename_for(constant); end - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#344 + # : (Pathname path) -> Array[Pathname] + # + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#313 sig { params(path: ::Pathname).returns(T::Array[::Pathname]) } def rbi_files_in(path); end - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#322 + # : (Hash[String, Symbol] diff, Symbol command) -> void + # + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#291 sig { params(diff: T::Hash[::String, ::Symbol], command: ::Symbol).void } def report_diff_and_exit_if_out_of_date(diff, command); end - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#217 + # : (String name) -> singleton(Tapioca::Dsl::Compiler)? + # + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#193 sig { params(name: ::String).returns(T.nilable(T.class_of(Tapioca::Dsl::Compiler))) } def resolve(name); end - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#351 + # : (String class_name) -> String + # + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#320 sig { params(class_name: ::String).returns(::String) } def underscore(class_name); end - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#281 + # : (tmp_dir: Pathname) -> Hash[String, Symbol] + # + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#250 sig { params(tmp_dir: ::Pathname).returns(T::Hash[::String, ::Symbol]) } def verify_dsl_rbi(tmp_dir:); end end @@ -661,7 +745,9 @@ class Tapioca::Commands::AbstractGem < ::Tapioca::Commands::Command abstract! - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#33 + # : (gem_names: Array[String], exclude: Array[String], include_dependencies: bool, prerequire: String?, postrequire: String, typed_overrides: Hash[String, String], outpath: Pathname, file_header: bool, include_doc: bool, include_loc: bool, include_exported_rbis: bool, ?number_of_workers: Integer?, ?auto_strictness: bool, ?dsl_dir: String, ?rbi_formatter: RBIFormatter, ?halt_upon_load_error: bool, ?lsp_addon: bool?) -> void + # + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#13 sig do params( gem_names: T::Array[::String], @@ -687,70 +773,102 @@ class Tapioca::Commands::AbstractGem < ::Tapioca::Commands::Command private - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#200 + # : -> Array[String] + # + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#180 sig { returns(T::Array[::String]) } def added_rbis; end - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#261 + # : (Symbol cause, Array[String] files) -> String + # + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#241 sig { params(cause: ::Symbol, files: T::Array[::String]).returns(::String) } def build_error_for_files(cause, files); end - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#80 + # : (Gemfile::GemSpec gem) -> void + # + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#60 sig { params(gem: ::Tapioca::Gemfile::GemSpec).void } def compile_gem_rbi(gem); end - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#195 + # : (String gem_name) -> Pathname + # + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#175 sig { params(gem_name: ::String).returns(::Pathname) } def existing_rbi(gem_name); end - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#243 + # : -> Hash[String, String] + # + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#223 sig { returns(T::Hash[::String, ::String]) } def existing_rbis; end - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#207 + # : (String gem_name) -> Pathname + # + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#187 sig { params(gem_name: ::String).returns(::Pathname) } def expected_rbi(gem_name); end - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#249 + # : -> Hash[String, String] + # + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#229 sig { returns(T::Hash[::String, ::String]) } def expected_rbis; end - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#212 + # : (String gem_name) -> bool + # + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#192 sig { params(gem_name: ::String).returns(T::Boolean) } def gem_rbi_exists?(gem_name); end - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#256 + # : (String gem_name, String version) -> Pathname + # + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#236 sig { params(gem_name: ::String, version: ::String).returns(::Pathname) } def gem_rbi_filename(gem_name, version); end - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#266 + # : (Gemfile::GemSpec gem, RBI::File file) -> void + # + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#246 sig { params(gem: ::Tapioca::Gemfile::GemSpec, file: ::RBI::File).void } def merge_with_exported_rbi(gem, file); end - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#237 + # : (Pathname old_filename, Pathname new_filename) -> void + # + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#217 sig { params(old_filename: ::Pathname, new_filename: ::Pathname).void } def move(old_filename, new_filename); end - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#147 + # : -> void + # + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#127 sig { void } def perform_additions; end - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#120 + # : -> void + # + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#100 sig { void } def perform_removals; end - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#190 + # : -> Array[String] + # + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#170 sig { returns(T::Array[::String]) } def removed_rbis; end - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#217 + # : (Hash[String, Symbol] diff, Symbol command) -> void + # + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#197 sig { params(diff: T::Hash[::String, ::Symbol], command: ::Symbol).void } def report_diff_and_exit_if_out_of_date(diff, command); end end # source://tapioca//lib/tapioca/commands/annotations.rb#6 class Tapioca::Commands::Annotations < ::Tapioca::Commands::CommandWithoutTracker - # source://tapioca//lib/tapioca/commands/annotations.rb#18 + # : (central_repo_root_uris: Array[String], ?auth: String?, ?netrc_file: String?, ?central_repo_index_path: String, ?typed_overrides: Hash[String, String]) -> void + # + # source://tapioca//lib/tapioca/commands/annotations.rb#10 sig do params( central_repo_root_uris: T::Array[::String], @@ -764,71 +882,103 @@ class Tapioca::Commands::Annotations < ::Tapioca::Commands::CommandWithoutTracke private - # source://tapioca//lib/tapioca/commands/annotations.rb#197 + # : (String name, String content) -> String + # + # source://tapioca//lib/tapioca/commands/annotations.rb#191 sig { params(name: ::String, content: ::String).returns(::String) } def add_header(name, content); end - # source://tapioca//lib/tapioca/commands/annotations.rb#217 + # : (String name, String content) -> String + # + # source://tapioca//lib/tapioca/commands/annotations.rb#211 sig { params(name: ::String, content: ::String).returns(::String) } def apply_typed_override(name, content); end - # source://tapioca//lib/tapioca/commands/annotations.rb#39 + # : -> void + # + # source://tapioca//lib/tapioca/commands/annotations.rb#32 sig { override.void } def execute; end - # source://tapioca//lib/tapioca/commands/annotations.rb#136 - sig { params(repo_uris: T::Array[::String], gem_info: ::Tapioca::GemInfo).void } + # source://tapioca//lib/tapioca/commands/annotations.rb#129 + sig { params(repo_uris: T::Array[::String], gem_info: ::Tapioca::GemInfo).returns(T::Boolean) } def fetch_annotation(repo_uris, gem_info); end - # source://tapioca//lib/tapioca/commands/annotations.rb#113 + # : (Array[GemInfo] project_gems) -> Array[String] + # + # source://tapioca//lib/tapioca/commands/annotations.rb#106 sig { params(project_gems: T::Array[::Tapioca::GemInfo]).returns(T::Array[::String]) } def fetch_annotations(project_gems); end - # source://tapioca//lib/tapioca/commands/annotations.rb#156 + # : (String repo_uri, String path) -> String? + # + # source://tapioca//lib/tapioca/commands/annotations.rb#150 sig { params(repo_uri: ::String, path: ::String).returns(T.nilable(::String)) } def fetch_file(repo_uri, path); end - # source://tapioca//lib/tapioca/commands/annotations.rb#173 + # : (String repo_uri, String path) -> String? + # + # source://tapioca//lib/tapioca/commands/annotations.rb#167 sig { params(repo_uri: ::String, path: ::String).returns(T.nilable(::String)) } def fetch_http_file(repo_uri, path); end - # source://tapioca//lib/tapioca/commands/annotations.rb#102 + # : (String repo_uri, repo_number: Integer?) -> RepoIndex? + # + # source://tapioca//lib/tapioca/commands/annotations.rb#95 sig { params(repo_uri: ::String, repo_number: T.nilable(::Integer)).returns(T.nilable(Tapioca::RepoIndex)) } def fetch_index(repo_uri, repo_number:); end - # source://tapioca//lib/tapioca/commands/annotations.rb#81 + # : -> Hash[String, RepoIndex] + # + # source://tapioca//lib/tapioca/commands/annotations.rb#74 sig { returns(T::Hash[::String, Tapioca::RepoIndex]) } def fetch_indexes; end - # source://tapioca//lib/tapioca/commands/annotations.rb#165 + # : (String repo_uri, String path) -> String? + # + # source://tapioca//lib/tapioca/commands/annotations.rb#159 sig { params(repo_uri: ::String, path: ::String).returns(T.nilable(::String)) } def fetch_local_file(repo_uri, path); end - # source://tapioca//lib/tapioca/commands/annotations.rb#229 + # : (::Gem::Version gem_version, String content) -> String + # + # source://tapioca//lib/tapioca/commands/annotations.rb#223 sig { params(gem_version: ::Gem::Version, content: ::String).returns(::String) } def filter_versions(gem_version, content); end - # source://tapioca//lib/tapioca/commands/annotations.rb#50 + # : -> Array[GemInfo] + # + # source://tapioca//lib/tapioca/commands/annotations.rb#43 sig { returns(T::Array[::Tapioca::GemInfo]) } def list_gemfile_gems; end - # source://tapioca//lib/tapioca/commands/annotations.rb#237 + # : (String gem_name, Array[String] contents) -> String? + # + # source://tapioca//lib/tapioca/commands/annotations.rb#231 sig { params(gem_name: ::String, contents: T::Array[::String]).returns(T.nilable(::String)) } def merge_files(gem_name, contents); end - # source://tapioca//lib/tapioca/commands/annotations.rb#60 + # : (Array[GemInfo] project_gems) -> void + # + # source://tapioca//lib/tapioca/commands/annotations.rb#53 sig { params(project_gems: T::Array[::Tapioca::GemInfo]).void } def remove_expired_annotations(project_gems); end - # source://tapioca//lib/tapioca/commands/annotations.rb#264 + # : -> Hash[String, String?] + # + # source://tapioca//lib/tapioca/commands/annotations.rb#258 sig { returns(T::Hash[::String, T.nilable(::String)]) } def repo_tokens; end - # source://tapioca//lib/tapioca/commands/annotations.rb#292 + # : (String path, String repo_uri, message: String) -> void + # + # source://tapioca//lib/tapioca/commands/annotations.rb#286 sig { params(path: ::String, repo_uri: ::String, message: ::String).void } def say_http_error(path, repo_uri, message:); end - # source://tapioca//lib/tapioca/commands/annotations.rb#276 + # : (String repo_uri) -> String? + # + # source://tapioca//lib/tapioca/commands/annotations.rb#270 sig { params(repo_uri: ::String).returns(T.nilable(::String)) } def token_for(repo_uri); end end @@ -838,7 +988,9 @@ class Tapioca::Commands::CheckShims < ::Tapioca::Commands::CommandWithoutTracker include ::Tapioca::SorbetHelper include ::Tapioca::RBIFilesHelper - # source://tapioca//lib/tapioca/commands/check_shims.rb#22 + # : (gem_rbi_dir: String, dsl_rbi_dir: String, annotations_rbi_dir: String, shim_rbi_dir: String, todo_rbi_file: String, payload: bool, number_of_workers: Integer?) -> void + # + # source://tapioca//lib/tapioca/commands/check_shims.rb#12 sig do params( gem_rbi_dir: ::String, @@ -854,7 +1006,9 @@ class Tapioca::Commands::CheckShims < ::Tapioca::Commands::CommandWithoutTracker private - # source://tapioca//lib/tapioca/commands/check_shims.rb#44 + # : -> void + # + # source://tapioca//lib/tapioca/commands/check_shims.rb#35 sig { override.void } def execute; end end @@ -872,21 +1026,29 @@ class Tapioca::Commands::Command abstract! + # : -> void + # # source://tapioca//lib/tapioca/commands/command.rb#20 sig { void } def initialize; end + # : Thor::Actions + # # source://thor/1.3.2/lib/thor/base.rb#155 sig { returns(::Thor::Actions) } def file_writer; end - # source://tapioca//lib/tapioca/commands/command.rb#25 + # : -> void + # + # source://tapioca//lib/tapioca/commands/command.rb#26 sig(:final) { void } def run; end private - # source://tapioca//lib/tapioca/commands/command.rb#53 + # : ((String | Pathname) path, String content, ?force: bool, ?skip: bool, ?verbose: bool) -> void + # + # source://tapioca//lib/tapioca/commands/command.rb#46 sig do params( path: T.any(::Pathname, ::String), @@ -898,17 +1060,21 @@ class Tapioca::Commands::Command end def create_file(path, content, force: T.unsafe(nil), skip: T.unsafe(nil), verbose: T.unsafe(nil)); end - # source://tapioca//lib/tapioca/commands/command.rb#37 + # : (Symbol command, *String args) -> String + # + # source://tapioca//lib/tapioca/commands/command.rb#38 sig { params(command: ::Symbol, args: ::String).returns(::String) } def default_command(command, *args); end # @abstract # - # source://tapioca//lib/tapioca/commands/command.rb#34 + # source://tapioca//lib/tapioca/commands/command.rb#35 sig { abstract.void } def execute; end - # source://tapioca//lib/tapioca/commands/command.rb#63 + # : ((String | Pathname) path, ?verbose: bool) -> void + # + # source://tapioca//lib/tapioca/commands/command.rb#51 sig { params(path: T.any(::Pathname, ::String), verbose: T::Boolean).void } def remove_file(path, verbose: T.unsafe(nil)); end end @@ -925,6 +1091,8 @@ end class Tapioca::Commands::CommandWithoutTracker < ::Tapioca::Commands::Command abstract! + # : -> void + # # source://tapioca//lib/tapioca/commands/command_without_tracker.rb#12 sig { void } def initialize; end @@ -932,37 +1100,53 @@ end # source://tapioca//lib/tapioca/commands/configure.rb#6 class Tapioca::Commands::Configure < ::Tapioca::Commands::CommandWithoutTracker - # source://tapioca//lib/tapioca/commands/configure.rb#14 + # : (sorbet_config: String, tapioca_config: String, default_postrequire: String) -> void + # + # source://tapioca//lib/tapioca/commands/configure.rb#8 sig { params(sorbet_config: ::String, tapioca_config: ::String, default_postrequire: ::String).void } def initialize(sorbet_config:, tapioca_config:, default_postrequire:); end private - # source://tapioca//lib/tapioca/commands/configure.rb#79 + # : -> void + # + # source://tapioca//lib/tapioca/commands/configure.rb#74 sig { void } def create_binstub; end - # source://tapioca//lib/tapioca/commands/configure.rb#69 + # : -> void + # + # source://tapioca//lib/tapioca/commands/configure.rb#64 sig { void } def create_post_require; end - # source://tapioca//lib/tapioca/commands/configure.rb#40 + # : -> void + # + # source://tapioca//lib/tapioca/commands/configure.rb#35 sig { void } def create_sorbet_config; end - # source://tapioca//lib/tapioca/commands/configure.rb#50 + # : -> void + # + # source://tapioca//lib/tapioca/commands/configure.rb#45 sig { void } def create_tapioca_config; end - # source://tapioca//lib/tapioca/commands/configure.rb#32 + # : -> void + # + # source://tapioca//lib/tapioca/commands/configure.rb#27 sig { override.void } def execute; end - # source://tapioca//lib/tapioca/commands/configure.rb#92 + # : -> Bundler::Installer + # + # source://tapioca//lib/tapioca/commands/configure.rb#87 sig { returns(::Bundler::Installer) } def installer; end - # source://tapioca//lib/tapioca/commands/configure.rb#97 + # : -> (Bundler::StubSpecification | ::Gem::Specification) + # + # source://tapioca//lib/tapioca/commands/configure.rb#92 sig { returns(T.any(::Bundler::StubSpecification, ::Gem::Specification)) } def spec; end end @@ -971,7 +1155,9 @@ end class Tapioca::Commands::DslCompilerList < ::Tapioca::Commands::AbstractDsl private - # source://tapioca//lib/tapioca/commands/dsl_compiler_list.rb#10 + # : -> void + # + # source://tapioca//lib/tapioca/commands/dsl_compiler_list.rb#11 sig { override.void } def execute; end end @@ -980,7 +1166,9 @@ end class Tapioca::Commands::DslGenerate < ::Tapioca::Commands::AbstractDsl private - # source://tapioca//lib/tapioca/commands/dsl_generate.rb#10 + # : -> void + # + # source://tapioca//lib/tapioca/commands/dsl_generate.rb#11 sig { override.void } def execute; end end @@ -989,7 +1177,9 @@ end class Tapioca::Commands::DslVerify < ::Tapioca::Commands::AbstractDsl private - # source://tapioca//lib/tapioca/commands/dsl_verify.rb#10 + # : -> void + # + # source://tapioca//lib/tapioca/commands/dsl_verify.rb#11 sig { override.void } def execute; end end @@ -998,11 +1188,15 @@ end class Tapioca::Commands::GemGenerate < ::Tapioca::Commands::AbstractGem private - # source://tapioca//lib/tapioca/commands/gem_generate.rb#10 + # : -> void + # + # source://tapioca//lib/tapioca/commands/gem_generate.rb#11 sig { override.void } def execute; end - # source://tapioca//lib/tapioca/commands/gem_generate.rb#74 + # : (Gemfile::GemSpec gem, ?Array[Gemfile::GemSpec] dependencies) -> Array[Gemfile::GemSpec] + # + # source://tapioca//lib/tapioca/commands/gem_generate.rb#70 sig do params( gem: ::Tapioca::Gemfile::GemSpec, @@ -1011,7 +1205,9 @@ class Tapioca::Commands::GemGenerate < ::Tapioca::Commands::AbstractGem end def gem_dependencies(gem, dependencies = T.unsafe(nil)); end - # source://tapioca//lib/tapioca/commands/gem_generate.rb#51 + # : (Array[String] gem_names) -> Array[Gemfile::GemSpec] + # + # source://tapioca//lib/tapioca/commands/gem_generate.rb#52 sig { params(gem_names: T::Array[::String]).returns(T::Array[::Tapioca::Gemfile::GemSpec]) } def gems_to_generate(gem_names); end end @@ -1020,7 +1216,9 @@ end class Tapioca::Commands::GemSync < ::Tapioca::Commands::AbstractGem private - # source://tapioca//lib/tapioca/commands/gem_sync.rb#10 + # : -> void + # + # source://tapioca//lib/tapioca/commands/gem_sync.rb#11 sig { override.void } def execute; end end @@ -1029,24 +1227,32 @@ end class Tapioca::Commands::GemVerify < ::Tapioca::Commands::AbstractGem private - # source://tapioca//lib/tapioca/commands/gem_verify.rb#10 + # : -> void + # + # source://tapioca//lib/tapioca/commands/gem_verify.rb#11 sig { override.void } def execute; end - # source://tapioca//lib/tapioca/commands/gem_verify.rb#17 + # : -> void + # + # source://tapioca//lib/tapioca/commands/gem_verify.rb#18 sig { void } def perform_sync_verification; end end # source://tapioca//lib/tapioca/commands/require.rb#6 class Tapioca::Commands::Require < ::Tapioca::Commands::CommandWithoutTracker - # source://tapioca//lib/tapioca/commands/require.rb#13 + # : (requires_path: String, sorbet_config_path: String) -> void + # + # source://tapioca//lib/tapioca/commands/require.rb#8 sig { params(requires_path: ::String, sorbet_config_path: ::String).void } def initialize(requires_path:, sorbet_config_path:); end private - # source://tapioca//lib/tapioca/commands/require.rb#23 + # : -> void + # + # source://tapioca//lib/tapioca/commands/require.rb#19 sig { override.void } def execute; end end @@ -1055,25 +1261,35 @@ end class Tapioca::Commands::Todo < ::Tapioca::Commands::CommandWithoutTracker include ::Tapioca::SorbetHelper - # source://tapioca//lib/tapioca/commands/todo.rb#26 + # : (todo_file: String, file_header: bool) -> void + # + # source://tapioca//lib/tapioca/commands/todo.rb#21 sig { params(todo_file: ::String, file_header: T::Boolean).void } def initialize(todo_file:, file_header:); end - # source://tapioca//lib/tapioca/commands/todo.rb#34 + # : -> void + # + # source://tapioca//lib/tapioca/commands/todo.rb#29 sig { void } def run_with_deprecation; end private - # source://tapioca//lib/tapioca/commands/todo.rb#44 + # : -> void + # + # source://tapioca//lib/tapioca/commands/todo.rb#40 sig { override.void } def execute; end - # source://tapioca//lib/tapioca/commands/todo.rb#68 + # : (Array[String] constants, command: String) -> RBI::File + # + # source://tapioca//lib/tapioca/commands/todo.rb#64 sig { params(constants: T::Array[::String], command: ::String).returns(::RBI::File) } def rbi(constants, command:); end - # source://tapioca//lib/tapioca/commands/todo.rb#88 + # : -> Array[String] + # + # source://tapioca//lib/tapioca/commands/todo.rb#84 sig { returns(T::Array[::String]) } def unresolved_constants; end end @@ -1085,32 +1301,46 @@ Tapioca::Commands::Todo::DEPRECATION_MESSAGE = T.let(T.unsafe(nil), String) module Tapioca::ConfigHelper requires_ancestor { Thor } + # : (?untyped args, ?untyped local_options, ?untyped config) -> void + # # source://tapioca//lib/tapioca/helpers/config_helper.rb#18 sig { params(args: T.untyped, local_options: T.untyped, config: T.untyped).void } def initialize(args = T.unsafe(nil), local_options = T.unsafe(nil), config = T.unsafe(nil)); end + # : String + # # source://tapioca//lib/tapioca/helpers/config_helper.rb#12 sig { returns(::String) } def command_name; end + # : Thor::CoreExt::HashWithIndifferentAccess + # # source://tapioca//lib/tapioca/helpers/config_helper.rb#15 sig { returns(::Thor::CoreExt::HashWithIndifferentAccess) } def defaults; end + # : -> Thor::CoreExt::HashWithIndifferentAccess + # # source://tapioca//lib/tapioca/helpers/config_helper.rb#34 sig { returns(::Thor::CoreExt::HashWithIndifferentAccess) } def options; end private - # source://tapioca//lib/tapioca/helpers/config_helper.rb#153 + # : (String msg) -> ConfigError + # + # source://tapioca//lib/tapioca/helpers/config_helper.rb#147 sig { params(msg: ::String).returns(::Tapioca::ConfigHelper::ConfigError) } def build_error(msg); end - # source://tapioca//lib/tapioca/helpers/config_helper.rb#178 + # : (String config_file, Array[ConfigError] errors) -> String + # + # source://tapioca//lib/tapioca/helpers/config_helper.rb#172 sig { params(config_file: ::String, errors: T::Array[::Tapioca::ConfigHelper::ConfigError]).returns(::String) } def build_error_message(config_file, errors); end + # : (Thor::CoreExt::HashWithIndifferentAccess options) -> Thor::CoreExt::HashWithIndifferentAccess + # # source://tapioca//lib/tapioca/helpers/config_helper.rb#56 sig do params( @@ -1119,11 +1349,15 @@ module Tapioca::ConfigHelper end def config_options(options); end + # : (Hash[Symbol, Thor::Option] options) -> void + # # source://tapioca//lib/tapioca/helpers/config_helper.rb#46 sig { params(options: T::Hash[::Symbol, ::Thor::Option]).void } def filter_defaults(options); end - # source://tapioca//lib/tapioca/helpers/config_helper.rb#196 + # : (*Thor::CoreExt::HashWithIndifferentAccess? options) -> Thor::CoreExt::HashWithIndifferentAccess + # + # source://tapioca//lib/tapioca/helpers/config_helper.rb#187 sig do params( options: T.nilable(::Thor::CoreExt::HashWithIndifferentAccess) @@ -1131,11 +1365,15 @@ module Tapioca::ConfigHelper end def merge_options(*options); end + # : (String config_file, Hash[untyped, untyped] config) -> void + # # source://tapioca//lib/tapioca/helpers/config_helper.rb#70 sig { params(config_file: ::String, config: T::Hash[T.untyped, T.untyped]).void } def validate_config!(config_file, config); end - # source://tapioca//lib/tapioca/helpers/config_helper.rb#102 + # : (Hash[Symbol, Thor::Option] command_options, String config_key, Hash[untyped, untyped] config_options) -> Array[ConfigError] + # + # source://tapioca//lib/tapioca/helpers/config_helper.rb#96 sig do params( command_options: T::Hash[::Symbol, ::Thor::Option], @@ -1146,58 +1384,74 @@ module Tapioca::ConfigHelper def validate_config_options(command_options, config_key, config_options); end end -# source://tapioca//lib/tapioca/helpers/config_helper.rb#148 +# source://tapioca//lib/tapioca/helpers/config_helper.rb#142 class Tapioca::ConfigHelper::ConfigError < ::T::Struct const :message_parts, T::Array[::Tapioca::ConfigHelper::ConfigErrorMessagePart] class << self - # source://sorbet-runtime/0.5.11965/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.12123/lib/types/struct.rb#13 def inherited(s); end end end -# source://tapioca//lib/tapioca/helpers/config_helper.rb#143 +# source://tapioca//lib/tapioca/helpers/config_helper.rb#137 class Tapioca::ConfigHelper::ConfigErrorMessagePart < ::T::Struct const :message, ::String const :colors, T::Array[::Symbol] class << self - # source://sorbet-runtime/0.5.11965/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.12123/lib/types/struct.rb#13 def inherited(s); end end end -# source://tapioca//lib/tapioca.rb#46 +# : String +# +# source://tapioca//lib/tapioca.rb#42 Tapioca::DEFAULT_ANNOTATIONS_DIR = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca.rb#42 +# : String +# +# source://tapioca//lib/tapioca.rb#38 Tapioca::DEFAULT_DSL_DIR = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca.rb#58 +# source://tapioca//lib/tapioca.rb#51 Tapioca::DEFAULT_ENVIRONMENT = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca.rb#43 +# : String +# +# source://tapioca//lib/tapioca.rb#39 Tapioca::DEFAULT_GEM_DIR = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca.rb#48 +# source://tapioca//lib/tapioca.rb#44 Tapioca::DEFAULT_OVERRIDES = T.let(T.unsafe(nil), Hash) -# source://tapioca//lib/tapioca.rb#40 +# : String +# +# source://tapioca//lib/tapioca.rb#36 Tapioca::DEFAULT_POSTREQUIRE_FILE = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca.rb#41 +# : String +# +# source://tapioca//lib/tapioca.rb#37 Tapioca::DEFAULT_RBI_DIR = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca/rbi_formatter.rb#31 +# source://tapioca//lib/tapioca/rbi_formatter.rb#25 Tapioca::DEFAULT_RBI_FORMATTER = T.let(T.unsafe(nil), Tapioca::RBIFormatter) -# source://tapioca//lib/tapioca.rb#57 +# : Hash[String, String] +# +# source://tapioca//lib/tapioca.rb#50 Tapioca::DEFAULT_RBI_MAX_LINE_LENGTH = T.let(T.unsafe(nil), Integer) -# source://tapioca//lib/tapioca.rb#44 +# : String +# +# source://tapioca//lib/tapioca.rb#40 Tapioca::DEFAULT_SHIM_DIR = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca.rb#45 +# : String +# +# source://tapioca//lib/tapioca.rb#41 Tapioca::DEFAULT_TODO_FILE = T.let(T.unsafe(nil), String) # source://tapioca//lib/tapioca/dsl/compilers.rb#5 @@ -1219,7 +1473,9 @@ class Tapioca::Dsl::Compiler ConstantType = type_member { { upper: Module } } - # source://tapioca//lib/tapioca/dsl/compiler.rb#110 + # : (Tapioca::Dsl::Pipeline pipeline, RBI::Tree root, ConstantType constant, ?Hash[String, untyped] options) -> void + # + # source://tapioca//lib/tapioca/dsl/compiler.rb#90 sig do params( pipeline: ::Tapioca::Dsl::Pipeline, @@ -1231,50 +1487,66 @@ class Tapioca::Dsl::Compiler def initialize(pipeline, root, constant, options = T.unsafe(nil)); end # NOTE: This should eventually accept an `Error` object or `Exception` rather than simply a `String`. + # : (String error) -> void # - # source://tapioca//lib/tapioca/dsl/compiler.rb#128 + # source://tapioca//lib/tapioca/dsl/compiler.rb#108 sig { params(error: ::String).void } def add_error(error); end - # source://tapioca//lib/tapioca/dsl/compiler.rb#119 + # : (String compiler_name) -> bool + # + # source://tapioca//lib/tapioca/dsl/compiler.rb#99 sig { params(compiler_name: ::String).returns(T::Boolean) } def compiler_enabled?(compiler_name); end + # : ConstantType + # # source://tapioca//lib/tapioca/dsl/compiler.rb#20 sig { returns(ConstantType) } def constant; end # @abstract # - # source://tapioca//lib/tapioca/dsl/compiler.rb#124 + # source://tapioca//lib/tapioca/dsl/compiler.rb#104 sig { abstract.void } def decorate; end + # : Hash[String, untyped] + # # source://tapioca//lib/tapioca/dsl/compiler.rb#26 sig { returns(T::Hash[::String, T.untyped]) } def options; end + # : RBI::Tree + # # source://tapioca//lib/tapioca/dsl/compiler.rb#23 sig { returns(::RBI::Tree) } def root; end private - # source://tapioca//lib/tapioca/dsl/compiler.rb#177 + # : ((Method | UnboundMethod) method_def) -> Array[RBI::TypedParam] + # + # source://tapioca//lib/tapioca/dsl/compiler.rb#152 sig { params(method_def: T.any(::Method, ::UnboundMethod)).returns(T::Array[::RBI::TypedParam]) } def compile_method_parameters_to_rbi(method_def); end - # source://tapioca//lib/tapioca/dsl/compiler.rb#213 + # : ((Method | UnboundMethod) method_def) -> String + # + # source://tapioca//lib/tapioca/dsl/compiler.rb#188 sig { params(method_def: T.any(::Method, ::UnboundMethod)).returns(::String) } def compile_method_return_type_to_rbi(method_def); end - # source://tapioca//lib/tapioca/dsl/compiler.rb#167 + # : (RBI::Scope scope, (Method | UnboundMethod) method_def, ?class_method: bool) -> void + # + # source://tapioca//lib/tapioca/dsl/compiler.rb#142 sig { params(scope: ::RBI::Scope, method_def: T.any(::Method, ::UnboundMethod), class_method: T::Boolean).void } def create_method_from_def(scope, method_def, class_method: T.unsafe(nil)); end # Get the types of each parameter from a method signature + # : ((Method | UnboundMethod) method_def, untyped signature) -> Array[String] # - # source://tapioca//lib/tapioca/dsl/compiler.rb#141 + # source://tapioca//lib/tapioca/dsl/compiler.rb#116 sig { params(method_def: T.any(::Method, ::UnboundMethod), signature: T.untyped).returns(T::Array[::String]) } def parameters_types_from_signature(method_def, signature); end @@ -1285,33 +1557,47 @@ class Tapioca::Dsl::Compiler sig { abstract.returns(T::Enumerable[::Module]) } def gather_constants; end + # : (Module constant) -> bool + # # source://tapioca//lib/tapioca/dsl/compiler.rb#34 sig { params(constant: ::Module).returns(T::Boolean) } def handles?(constant); end + # : -> Set[Module] + # # source://tapioca//lib/tapioca/dsl/compiler.rb#42 sig { returns(T::Set[::Module]) } def processable_constants; end - # source://tapioca//lib/tapioca/dsl/compiler.rb#50 + # : (Array[Module] constants) -> void + # + # source://tapioca//lib/tapioca/dsl/compiler.rb#47 sig { params(constants: T::Array[::Module]).void } def requested_constants=(constants); end - # source://tapioca//lib/tapioca/dsl/compiler.rb#55 + # : -> void + # + # source://tapioca//lib/tapioca/dsl/compiler.rb#52 sig { void } def reset_state; end private - # source://tapioca//lib/tapioca/dsl/compiler.rb#82 + # : -> T::Enumerable[Class[top]] + # + # source://tapioca//lib/tapioca/dsl/compiler.rb#75 sig { returns(T::Enumerable[T::Class[T.anything]]) } def all_classes; end - # source://tapioca//lib/tapioca/dsl/compiler.rb#90 + # : -> T::Enumerable[Module] + # + # source://tapioca//lib/tapioca/dsl/compiler.rb#80 sig { returns(T::Enumerable[::Module]) } def all_modules; end - # source://tapioca//lib/tapioca/dsl/compiler.rb#68 + # : [U] ((Class[top] & U) klass) -> Array[U] + # + # source://tapioca//lib/tapioca/dsl/compiler.rb#61 sig do type_parameters(:U) .params( @@ -1337,7 +1623,9 @@ Tapioca::Dsl::Compilers::NAMESPACES = T.let(T.unsafe(nil), Array) # source://tapioca//lib/tapioca/dsl/pipeline.rb#6 class Tapioca::Dsl::Pipeline - # source://tapioca//lib/tapioca/dsl/pipeline.rb#40 + # : (requested_constants: Array[Module], ?requested_paths: Array[Pathname], ?requested_compilers: Array[singleton(Compiler)], ?excluded_compilers: Array[singleton(Compiler)], ?error_handler: ^(String error) -> void, ?skipped_constants: Array[Module], ?number_of_workers: Integer?, ?compiler_options: Hash[String, untyped], ?lsp_addon: bool) -> void + # + # source://tapioca//lib/tapioca/dsl/pipeline.rb#28 sig do params( requested_constants: T::Array[::Module], @@ -1353,39 +1641,57 @@ class Tapioca::Dsl::Pipeline end def initialize(requested_constants:, requested_paths: T.unsafe(nil), requested_compilers: T.unsafe(nil), excluded_compilers: T.unsafe(nil), error_handler: T.unsafe(nil), skipped_constants: T.unsafe(nil), number_of_workers: T.unsafe(nil), compiler_options: T.unsafe(nil), lsp_addon: T.unsafe(nil)); end + # : T::Enumerable[singleton(Compiler)] + # # source://tapioca//lib/tapioca/dsl/pipeline.rb#10 sig { returns(T::Enumerable[T.class_of(Tapioca::Dsl::Compiler)]) } def active_compilers; end - # source://tapioca//lib/tapioca/dsl/pipeline.rb#110 + # : (String error) -> void + # + # source://tapioca//lib/tapioca/dsl/pipeline.rb#92 sig { params(error: ::String).void } def add_error(error); end - # source://tapioca//lib/tapioca/dsl/pipeline.rb#115 + # : (String compiler_name) -> bool + # + # source://tapioca//lib/tapioca/dsl/pipeline.rb#97 sig { params(compiler_name: ::String).returns(T::Boolean) } def compiler_enabled?(compiler_name); end - # source://tapioca//lib/tapioca/dsl/pipeline.rb#124 + # : -> Array[singleton(Compiler)] + # + # source://tapioca//lib/tapioca/dsl/pipeline.rb#106 sig { returns(T::Array[T.class_of(Tapioca::Dsl::Compiler)]) } def compilers; end + # : ^(String error) -> void + # # source://tapioca//lib/tapioca/dsl/pipeline.rb#22 sig { returns(T.proc.params(error: ::String).void) } def error_handler; end + # : Array[String] + # # source://tapioca//lib/tapioca/dsl/pipeline.rb#25 sig { returns(T::Array[::String]) } def errors; end + # : Array[Module] + # # source://tapioca//lib/tapioca/dsl/pipeline.rb#13 sig { returns(T::Array[::Module]) } def requested_constants; end + # : Array[Pathname] + # # source://tapioca//lib/tapioca/dsl/pipeline.rb#16 sig { returns(T::Array[::Pathname]) } def requested_paths; end - # source://tapioca//lib/tapioca/dsl/pipeline.rb#70 + # : [T] { (Module constant, RBI::File rbi) -> T } -> Array[T] + # + # source://tapioca//lib/tapioca/dsl/pipeline.rb#52 sig do type_parameters(:T) .params( @@ -1394,21 +1700,29 @@ class Tapioca::Dsl::Pipeline end def run(&blk); end + # : Array[Module] + # # source://tapioca//lib/tapioca/dsl/pipeline.rb#19 sig { returns(T::Array[::Module]) } def skipped_constants; end private - # source://tapioca//lib/tapioca/dsl/pipeline.rb#231 + # : -> void + # + # source://tapioca//lib/tapioca/dsl/pipeline.rb#199 sig { void } def abort_if_pending_migrations!; end - # source://tapioca//lib/tapioca/dsl/pipeline.rb#177 + # : (Set[Module] constants) -> Set[Module] + # + # source://tapioca//lib/tapioca/dsl/pipeline.rb#145 sig { params(constants: T::Set[::Module]).returns(T::Set[::Module]) } def filter_anonymous_and_reloaded_constants(constants); end - # source://tapioca//lib/tapioca/dsl/pipeline.rb#141 + # : (Array[singleton(Compiler)] requested_compilers, Array[singleton(Compiler)] excluded_compilers) -> T::Enumerable[singleton(Compiler)] + # + # source://tapioca//lib/tapioca/dsl/pipeline.rb#115 sig do params( requested_compilers: T::Array[T.class_of(Tapioca::Dsl::Compiler)], @@ -1417,7 +1731,9 @@ class Tapioca::Dsl::Pipeline end def gather_active_compilers(requested_compilers, excluded_compilers); end - # source://tapioca//lib/tapioca/dsl/pipeline.rb#155 + # : (Array[Module] requested_constants, Array[Pathname] requested_paths, Array[Module] skipped_constants) -> Set[Module] + # + # source://tapioca//lib/tapioca/dsl/pipeline.rb#123 sig do params( requested_constants: T::Array[::Module], @@ -1427,11 +1743,15 @@ class Tapioca::Dsl::Pipeline end def gather_constants(requested_constants, requested_paths, skipped_constants); end - # source://tapioca//lib/tapioca/dsl/pipeline.rb#206 + # : (Module constant) -> RBI::File? + # + # source://tapioca//lib/tapioca/dsl/pipeline.rb#174 sig { params(constant: ::Module).returns(T.nilable(::RBI::File)) } def rbi_for_constant(constant); end - # source://tapioca//lib/tapioca/dsl/pipeline.rb#225 + # : (String error) -> void + # + # source://tapioca//lib/tapioca/dsl/pipeline.rb#193 sig { params(error: ::String).void } def report_error(error); end end @@ -1440,6 +1760,8 @@ end module Tapioca::EnvHelper requires_ancestor { Thor } + # : (Hash[Symbol, untyped] options) -> void + # # source://tapioca//lib/tapioca/helpers/env_helper.rb#12 sig { params(options: T::Hash[::Symbol, T.untyped]).void } def set_environment(options); end @@ -1449,11 +1771,15 @@ class Tapioca::Error < ::StandardError; end # source://tapioca//lib/tapioca/executor.rb#5 class Tapioca::Executor + # : (Array[untyped] queue, ?number_of_workers: Integer?) -> void + # # source://tapioca//lib/tapioca/executor.rb#11 sig { params(queue: T::Array[T.untyped], number_of_workers: T.nilable(::Integer)).void } def initialize(queue, number_of_workers: T.unsafe(nil)); end - # source://tapioca//lib/tapioca/executor.rb#28 + # : [T] { (untyped item) -> T } -> Array[T] + # + # source://tapioca//lib/tapioca/executor.rb#22 sig do type_parameters(:T) .params( @@ -1464,38 +1790,52 @@ class Tapioca::Executor private - # source://tapioca//lib/tapioca/executor.rb#37 + # : -> Integer + # + # source://tapioca//lib/tapioca/executor.rb#31 sig { returns(::Integer) } def max_processors; end end +# : Integer +# # source://tapioca//lib/tapioca/executor.rb#8 Tapioca::Executor::MINIMUM_ITEMS_PER_WORKER = T.let(T.unsafe(nil), Integer) # source://tapioca//lib/tapioca/gem/events.rb#5 module Tapioca::Gem; end -# source://tapioca//lib/tapioca/gem/events.rb#77 +# source://tapioca//lib/tapioca/gem/events.rb#80 class Tapioca::Gem::ConstNodeAdded < ::Tapioca::Gem::NodeAdded - # source://tapioca//lib/tapioca/gem/events.rb#84 + # : (String symbol, Module constant, RBI::Const node) -> void + # + # source://tapioca//lib/tapioca/gem/events.rb#87 sig { params(symbol: ::String, constant: ::Module, node: ::RBI::Const).void } def initialize(symbol, constant, node); end - # source://tapioca//lib/tapioca/gem/events.rb#81 + # : RBI::Const + # + # source://tapioca//lib/tapioca/gem/events.rb#84 sig { returns(::RBI::Const) } def node; end end # source://tapioca//lib/tapioca/gem/events.rb#26 class Tapioca::Gem::ConstantFound < ::Tapioca::Gem::Event - # source://tapioca//lib/tapioca/gem/events.rb#36 - sig { params(symbol: ::String, constant: ::BasicObject).void } + # : (String symbol, BasicObject constant) -> void + # + # @return [ConstantFound] a new instance of ConstantFound + # + # source://tapioca//lib/tapioca/gem/events.rb#38 def initialize(symbol, constant); end - # source://tapioca//lib/tapioca/gem/events.rb#33 - sig { returns(::BasicObject) } + # : BasicObject + # + # source://tapioca//lib/tapioca/gem/events.rb#34 def constant; end + # : String + # # source://tapioca//lib/tapioca/gem/events.rb#30 sig { returns(::String) } def symbol; end @@ -1508,18 +1848,22 @@ class Tapioca::Gem::Event abstract! end -# source://tapioca//lib/tapioca/gem/events.rb#43 +# source://tapioca//lib/tapioca/gem/events.rb#45 class Tapioca::Gem::ForeignConstantFound < ::Tapioca::Gem::ConstantFound - # source://tapioca//lib/tapioca/gem/events.rb#52 + # : (String symbol, Module constant) -> void + # + # source://tapioca//lib/tapioca/gem/events.rb#55 sig { params(symbol: ::String, constant: ::Module).void } def initialize(symbol, constant); end - # source://tapioca//lib/tapioca/gem/events.rb#47 + # : -> Module + # + # source://tapioca//lib/tapioca/gem/events.rb#50 sig { override.returns(::Module) } def constant; end end -# source://tapioca//lib/tapioca/gem/events.rb#103 +# source://tapioca//lib/tapioca/gem/events.rb#106 class Tapioca::Gem::ForeignScopeNodeAdded < ::Tapioca::Gem::ScopeNodeAdded; end # source://tapioca//lib/tapioca/gem/listeners/base.rb#6 @@ -1531,28 +1875,40 @@ module Tapioca::Gem::Listeners; end class Tapioca::Gem::Listeners::Base abstract! + # : (Pipeline pipeline) -> void + # # source://tapioca//lib/tapioca/gem/listeners/base.rb#14 sig { params(pipeline: ::Tapioca::Gem::Pipeline).void } def initialize(pipeline); end + # : (NodeAdded event) -> void + # # source://tapioca//lib/tapioca/gem/listeners/base.rb#19 sig { params(event: ::Tapioca::Gem::NodeAdded).void } def dispatch(event); end private + # : (NodeAdded event) -> bool + # # source://tapioca//lib/tapioca/gem/listeners/base.rb#49 sig { params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } def ignore?(event); end + # : (ConstNodeAdded event) -> void + # # source://tapioca//lib/tapioca/gem/listeners/base.rb#37 sig { params(event: ::Tapioca::Gem::ConstNodeAdded).void } def on_const(event); end + # : (MethodNodeAdded event) -> void + # # source://tapioca//lib/tapioca/gem/listeners/base.rb#45 sig { params(event: ::Tapioca::Gem::MethodNodeAdded).void } def on_method(event); end + # : (ScopeNodeAdded event) -> void + # # source://tapioca//lib/tapioca/gem/listeners/base.rb#41 sig { params(event: ::Tapioca::Gem::ScopeNodeAdded).void } def on_scope(event); end @@ -1565,11 +1921,15 @@ class Tapioca::Gem::Listeners::DynamicMixins < ::Tapioca::Gem::Listeners::Base private - # source://tapioca//lib/tapioca/gem/listeners/dynamic_mixins.rb#31 + # : (NodeAdded event) -> bool + # + # source://tapioca//lib/tapioca/gem/listeners/dynamic_mixins.rb#33 sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } def ignore?(event); end - # source://tapioca//lib/tapioca/gem/listeners/dynamic_mixins.rb#15 + # : (ScopeNodeAdded event) -> void + # + # source://tapioca//lib/tapioca/gem/listeners/dynamic_mixins.rb#16 sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } def on_scope(event); end end @@ -1581,15 +1941,21 @@ class Tapioca::Gem::Listeners::ForeignConstants < ::Tapioca::Gem::Listeners::Bas private - # source://tapioca//lib/tapioca/gem/listeners/foreign_constants.rb#60 + # : (NodeAdded event) -> bool + # + # source://tapioca//lib/tapioca/gem/listeners/foreign_constants.rb#58 sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } def ignore?(event); end - # source://tapioca//lib/tapioca/gem/listeners/foreign_constants.rb#55 + # : (String location) -> bool + # + # source://tapioca//lib/tapioca/gem/listeners/foreign_constants.rb#52 sig { params(location: ::String).returns(T::Boolean) } def mixed_in_by_gem?(location); end - # source://tapioca//lib/tapioca/gem/listeners/foreign_constants.rb#15 + # : (ScopeNodeAdded event) -> void + # + # source://tapioca//lib/tapioca/gem/listeners/foreign_constants.rb#16 sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } def on_scope(event); end end @@ -1603,7 +1969,9 @@ class Tapioca::Gem::Listeners::Methods < ::Tapioca::Gem::Listeners::Base private - # source://tapioca//lib/tapioca/gem/listeners/methods.rb#35 + # : (RBI::Tree tree, String module_name, Module mod, ?Array[Symbol] for_visibility, ?attached_class: Module?) -> void + # + # source://tapioca//lib/tapioca/gem/listeners/methods.rb#28 sig do params( tree: ::RBI::Tree, @@ -1615,7 +1983,9 @@ class Tapioca::Gem::Listeners::Methods < ::Tapioca::Gem::Listeners::Base end def compile_directly_owned_methods(tree, module_name, mod, for_visibility = T.unsafe(nil), attached_class: T.unsafe(nil)); end - # source://tapioca//lib/tapioca/gem/listeners/methods.rb#71 + # : (RBI::Tree tree, String symbol_name, Module constant, UnboundMethod? method, ?RBI::Visibility visibility) -> void + # + # source://tapioca//lib/tapioca/gem/listeners/methods.rb#56 sig do params( tree: ::RBI::Tree, @@ -1627,23 +1997,33 @@ class Tapioca::Gem::Listeners::Methods < ::Tapioca::Gem::Listeners::Base end def compile_method(tree, symbol_name, constant, method, visibility = T.unsafe(nil)); end - # source://tapioca//lib/tapioca/gem/listeners/methods.rb#211 + # : (NodeAdded event) -> bool + # + # source://tapioca//lib/tapioca/gem/listeners/methods.rb#192 sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } def ignore?(event); end - # source://tapioca//lib/tapioca/gem/listeners/methods.rb#204 + # : (Module constant) -> UnboundMethod? + # + # source://tapioca//lib/tapioca/gem/listeners/methods.rb#184 sig { params(constant: ::Module).returns(T.nilable(::UnboundMethod)) } def initialize_method_for(constant); end - # source://tapioca//lib/tapioca/gem/listeners/methods.rb#216 + # : (UnboundMethod method) -> untyped + # + # source://tapioca//lib/tapioca/gem/listeners/methods.rb#197 sig { params(method: ::UnboundMethod).returns(T.untyped) } def lookup_signature_of(method); end - # source://tapioca//lib/tapioca/gem/listeners/methods.rb#172 + # : (Module mod) -> Hash[Symbol, Array[Symbol]] + # + # source://tapioca//lib/tapioca/gem/listeners/methods.rb#157 sig { params(mod: ::Module).returns(T::Hash[::Symbol, T::Array[::Symbol]]) } def method_names_by_visibility(mod); end - # source://tapioca//lib/tapioca/gem/listeners/methods.rb#196 + # : (Module? attached_class, Symbol method_name) -> bool? + # + # source://tapioca//lib/tapioca/gem/listeners/methods.rb#176 sig { params(attached_class: T.nilable(::Module), method_name: ::Symbol).returns(T.nilable(T::Boolean)) } def method_new_in_abstract_class?(attached_class, method_name); end @@ -1656,16 +2036,21 @@ class Tapioca::Gem::Listeners::Methods < ::Tapioca::Gem::Listeners::Base # This method implements a better way of checking whether a constant defines a method. # It walks up the ancestor tree via the `super_method` method; if any of the super # methods are owned by the constant, it means that the constant declares the method. + # : (UnboundMethod method, Module constant) -> bool # - # source://tapioca//lib/tapioca/gem/listeners/methods.rb#158 + # source://tapioca//lib/tapioca/gem/listeners/methods.rb#143 sig { params(method: ::UnboundMethod, constant: ::Module).returns(T::Boolean) } def method_owned_by_constant?(method, constant); end - # source://tapioca//lib/tapioca/gem/listeners/methods.rb#16 + # : (ScopeNodeAdded event) -> void + # + # source://tapioca//lib/tapioca/gem/listeners/methods.rb#17 sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } def on_scope(event); end - # source://tapioca//lib/tapioca/gem/listeners/methods.rb#181 + # : (Module constant, String method_name) -> bool + # + # source://tapioca//lib/tapioca/gem/listeners/methods.rb#166 sig { params(constant: ::Module, method_name: ::String).returns(T::Boolean) } def struct_method?(constant, method_name); end end @@ -1677,7 +2062,9 @@ class Tapioca::Gem::Listeners::Mixins < ::Tapioca::Gem::Listeners::Base private - # source://tapioca//lib/tapioca/gem/listeners/mixins.rb#42 + # : (RBI::Tree tree, Module constant, Array[Module] mods, Runtime::Trackers::Mixin::Type mixin_type) -> void + # + # source://tapioca//lib/tapioca/gem/listeners/mixins.rb#36 sig do params( tree: ::RBI::Tree, @@ -1688,15 +2075,21 @@ class Tapioca::Gem::Listeners::Mixins < ::Tapioca::Gem::Listeners::Base end def add_mixins(tree, constant, mods, mixin_type); end - # source://tapioca//lib/tapioca/gem/listeners/mixins.rb#84 + # : (String mixin_name) -> bool + # + # source://tapioca//lib/tapioca/gem/listeners/mixins.rb#72 sig { params(mixin_name: ::String).returns(T::Boolean) } def filtered_mixin?(mixin_name); end - # source://tapioca//lib/tapioca/gem/listeners/mixins.rb#91 + # : (Module constant) -> Array[Module] + # + # source://tapioca//lib/tapioca/gem/listeners/mixins.rb#79 sig { params(constant: ::Module).returns(T::Array[::Module]) } def interesting_ancestors_of(constant); end - # source://tapioca//lib/tapioca/gem/listeners/mixins.rb#75 + # : (Module constant, Module mixin, Runtime::Trackers::Mixin::Type mixin_type) -> bool + # + # source://tapioca//lib/tapioca/gem/listeners/mixins.rb#63 sig do params( constant: ::Module, @@ -1706,7 +2099,9 @@ class Tapioca::Gem::Listeners::Mixins < ::Tapioca::Gem::Listeners::Base end def mixed_in_by_gem?(constant, mixin, mixin_type); end - # source://tapioca//lib/tapioca/gem/listeners/mixins.rb#15 + # : (ScopeNodeAdded event) -> void + # + # source://tapioca//lib/tapioca/gem/listeners/mixins.rb#16 sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } def on_scope(event); end end @@ -1718,11 +2113,15 @@ class Tapioca::Gem::Listeners::RemoveEmptyPayloadScopes < ::Tapioca::Gem::Listen private - # source://tapioca//lib/tapioca/gem/listeners/remove_empty_payload_scopes.rb#20 + # : (NodeAdded event) -> bool + # + # source://tapioca//lib/tapioca/gem/listeners/remove_empty_payload_scopes.rb#22 sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } def ignore?(event); end - # source://tapioca//lib/tapioca/gem/listeners/remove_empty_payload_scopes.rb#15 + # : (ScopeNodeAdded event) -> void + # + # source://tapioca//lib/tapioca/gem/listeners/remove_empty_payload_scopes.rb#16 sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } def on_scope(event); end end @@ -1731,11 +2130,15 @@ end class Tapioca::Gem::Listeners::SorbetEnums < ::Tapioca::Gem::Listeners::Base private - # source://tapioca//lib/tapioca/gem/listeners/sorbet_enums.rb#28 + # : (NodeAdded event) -> bool + # + # source://tapioca//lib/tapioca/gem/listeners/sorbet_enums.rb#30 sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } def ignore?(event); end - # source://tapioca//lib/tapioca/gem/listeners/sorbet_enums.rb#13 + # : (ScopeNodeAdded event) -> void + # + # source://tapioca//lib/tapioca/gem/listeners/sorbet_enums.rb#14 sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } def on_scope(event); end end @@ -1747,11 +2150,15 @@ class Tapioca::Gem::Listeners::SorbetHelpers < ::Tapioca::Gem::Listeners::Base private - # source://tapioca//lib/tapioca/gem/listeners/sorbet_helpers.rb#27 + # : (NodeAdded event) -> bool + # + # source://tapioca//lib/tapioca/gem/listeners/sorbet_helpers.rb#29 sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } def ignore?(event); end - # source://tapioca//lib/tapioca/gem/listeners/sorbet_helpers.rb#15 + # : (ScopeNodeAdded event) -> void + # + # source://tapioca//lib/tapioca/gem/listeners/sorbet_helpers.rb#16 sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } def on_scope(event); end end @@ -1763,11 +2170,15 @@ class Tapioca::Gem::Listeners::SorbetProps < ::Tapioca::Gem::Listeners::Base private - # source://tapioca//lib/tapioca/gem/listeners/sorbet_props.rb#33 + # : (NodeAdded event) -> bool + # + # source://tapioca//lib/tapioca/gem/listeners/sorbet_props.rb#35 sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } def ignore?(event); end - # source://tapioca//lib/tapioca/gem/listeners/sorbet_props.rb#14 + # : (ScopeNodeAdded event) -> void + # + # source://tapioca//lib/tapioca/gem/listeners/sorbet_props.rb#15 sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } def on_scope(event); end end @@ -1776,11 +2187,15 @@ end class Tapioca::Gem::Listeners::SorbetRequiredAncestors < ::Tapioca::Gem::Listeners::Base private - # source://tapioca//lib/tapioca/gem/listeners/sorbet_required_ancestors.rb#23 + # : (NodeAdded event) -> bool + # + # source://tapioca//lib/tapioca/gem/listeners/sorbet_required_ancestors.rb#25 sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } def ignore?(event); end - # source://tapioca//lib/tapioca/gem/listeners/sorbet_required_ancestors.rb#13 + # : (ScopeNodeAdded event) -> void + # + # source://tapioca//lib/tapioca/gem/listeners/sorbet_required_ancestors.rb#14 sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } def on_scope(event); end end @@ -1794,19 +2209,27 @@ class Tapioca::Gem::Listeners::SorbetSignatures < ::Tapioca::Gem::Listeners::Bas private - # source://tapioca//lib/tapioca/gem/listeners/sorbet_signatures.rb#26 + # : (untyped signature, Array[[Symbol, String]] parameters) -> RBI::Sig + # + # source://tapioca//lib/tapioca/gem/listeners/sorbet_signatures.rb#27 sig { params(signature: T.untyped, parameters: T::Array[[::Symbol, ::String]]).returns(::RBI::Sig) } def compile_signature(signature, parameters); end - # source://tapioca//lib/tapioca/gem/listeners/sorbet_signatures.rb#79 + # : (NodeAdded event) -> bool + # + # source://tapioca//lib/tapioca/gem/listeners/sorbet_signatures.rb#81 sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } def ignore?(event); end - # source://tapioca//lib/tapioca/gem/listeners/sorbet_signatures.rb#18 + # : (MethodNodeAdded event) -> void + # + # source://tapioca//lib/tapioca/gem/listeners/sorbet_signatures.rb#19 sig { override.params(event: ::Tapioca::Gem::MethodNodeAdded).void } def on_method(event); end - # source://tapioca//lib/tapioca/gem/listeners/sorbet_signatures.rb#68 + # : (untyped signature) -> bool + # + # source://tapioca//lib/tapioca/gem/listeners/sorbet_signatures.rb#69 sig { params(signature: T.untyped).returns(T::Boolean) } def signature_final?(signature); end end @@ -1821,19 +2244,27 @@ class Tapioca::Gem::Listeners::SorbetTypeVariables < ::Tapioca::Gem::Listeners:: private - # source://tapioca//lib/tapioca/gem/listeners/sorbet_type_variables.rb#27 + # : (RBI::Tree tree, Module constant) -> void + # + # source://tapioca//lib/tapioca/gem/listeners/sorbet_type_variables.rb#28 sig { params(tree: ::RBI::Tree, constant: ::Module).void } def compile_type_variable_declarations(tree, constant); end - # source://tapioca//lib/tapioca/gem/listeners/sorbet_type_variables.rb#63 + # : (NodeAdded event) -> bool + # + # source://tapioca//lib/tapioca/gem/listeners/sorbet_type_variables.rb#65 sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } def ignore?(event); end - # source://tapioca//lib/tapioca/gem/listeners/sorbet_type_variables.rb#50 + # : (Tapioca::TypeVariableModule type_variable) -> RBI::Node? + # + # source://tapioca//lib/tapioca/gem/listeners/sorbet_type_variables.rb#51 sig { params(type_variable: ::Tapioca::TypeVariableModule).returns(T.nilable(::RBI::Node)) } def node_from_type_variable(type_variable); end - # source://tapioca//lib/tapioca/gem/listeners/sorbet_type_variables.rb#15 + # : (ScopeNodeAdded event) -> void + # + # source://tapioca//lib/tapioca/gem/listeners/sorbet_type_variables.rb#16 sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } def on_scope(event); end end @@ -1842,19 +2273,27 @@ end class Tapioca::Gem::Listeners::SourceLocation < ::Tapioca::Gem::Listeners::Base private - # source://tapioca//lib/tapioca/gem/listeners/source_location.rb#41 + # : (RBI::NodeWithComments node, String? file, Integer? line) -> void + # + # source://tapioca//lib/tapioca/gem/listeners/source_location.rb#44 sig { params(node: ::RBI::NodeWithComments, file: T.nilable(::String), line: T.nilable(::Integer)).void } def add_source_location_comment(node, file, line); end - # source://tapioca//lib/tapioca/gem/listeners/source_location.rb#13 + # : (ConstNodeAdded event) -> void + # + # source://tapioca//lib/tapioca/gem/listeners/source_location.rb#14 sig { override.params(event: ::Tapioca::Gem::ConstNodeAdded).void } def on_const(event); end - # source://tapioca//lib/tapioca/gem/listeners/source_location.rb#35 + # : (MethodNodeAdded event) -> void + # + # source://tapioca//lib/tapioca/gem/listeners/source_location.rb#38 sig { override.params(event: ::Tapioca::Gem::MethodNodeAdded).void } def on_method(event); end - # source://tapioca//lib/tapioca/gem/listeners/source_location.rb#19 + # : (ScopeNodeAdded event) -> void + # + # source://tapioca//lib/tapioca/gem/listeners/source_location.rb#21 sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } def on_scope(event); end end @@ -1866,40 +2305,56 @@ class Tapioca::Gem::Listeners::Subconstants < ::Tapioca::Gem::Listeners::Base private - # source://tapioca//lib/tapioca/gem/listeners/subconstants.rb#35 + # : (NodeAdded event) -> bool + # + # source://tapioca//lib/tapioca/gem/listeners/subconstants.rb#37 sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } def ignore?(event); end - # source://tapioca//lib/tapioca/gem/listeners/subconstants.rb#15 + # : (ScopeNodeAdded event) -> void + # + # source://tapioca//lib/tapioca/gem/listeners/subconstants.rb#16 sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } def on_scope(event); end end # source://tapioca//lib/tapioca/gem/listeners/yard_doc.rb#7 class Tapioca::Gem::Listeners::YardDoc < ::Tapioca::Gem::Listeners::Base - # source://tapioca//lib/tapioca/gem/listeners/yard_doc.rb#27 + # : (Pipeline pipeline) -> void + # + # source://tapioca//lib/tapioca/gem/listeners/yard_doc.rb#24 sig { params(pipeline: ::Tapioca::Gem::Pipeline).void } def initialize(pipeline); end private + # : (String name, ?sigs: Array[RBI::Sig]) -> Array[RBI::Comment] + # # source://tapioca//lib/tapioca/gem/listeners/yard_doc.rb#55 sig { params(name: ::String, sigs: T::Array[::RBI::Sig]).returns(T::Array[::RBI::Comment]) } def documentation_comments(name, sigs: T.unsafe(nil)); end - # source://tapioca//lib/tapioca/gem/listeners/yard_doc.rb#99 + # : (NodeAdded event) -> bool + # + # source://tapioca//lib/tapioca/gem/listeners/yard_doc.rb#100 sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } def ignore?(event); end - # source://tapioca//lib/tapioca/gem/listeners/yard_doc.rb#36 + # : (ConstNodeAdded event) -> void + # + # source://tapioca//lib/tapioca/gem/listeners/yard_doc.rb#34 sig { override.params(event: ::Tapioca::Gem::ConstNodeAdded).void } def on_const(event); end + # : (MethodNodeAdded event) -> void + # # source://tapioca//lib/tapioca/gem/listeners/yard_doc.rb#46 sig { override.params(event: ::Tapioca::Gem::MethodNodeAdded).void } def on_method(event); end - # source://tapioca//lib/tapioca/gem/listeners/yard_doc.rb#41 + # : (ScopeNodeAdded event) -> void + # + # source://tapioca//lib/tapioca/gem/listeners/yard_doc.rb#40 sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } def on_scope(event); end end @@ -1907,12 +2362,16 @@ end # source://tapioca//lib/tapioca/gem/listeners/yard_doc.rb#10 Tapioca::Gem::Listeners::YardDoc::IGNORED_COMMENTS = T.let(T.unsafe(nil), Array) -# source://tapioca//lib/tapioca/gem/listeners/yard_doc.rb#24 +# : Array[String] +# +# source://tapioca//lib/tapioca/gem/listeners/yard_doc.rb#21 Tapioca::Gem::Listeners::YardDoc::IGNORED_SIG_TAGS = T.let(T.unsafe(nil), Array) -# source://tapioca//lib/tapioca/gem/events.rb#105 +# source://tapioca//lib/tapioca/gem/events.rb#108 class Tapioca::Gem::MethodNodeAdded < ::Tapioca::Gem::NodeAdded - # source://tapioca//lib/tapioca/gem/events.rb#130 + # : (String symbol, Module constant, UnboundMethod method, RBI::Method node, untyped signature, Array[[Symbol, String]] parameters) -> void + # + # source://tapioca//lib/tapioca/gem/events.rb#124 sig do params( symbol: ::String, @@ -1925,38 +2384,52 @@ class Tapioca::Gem::MethodNodeAdded < ::Tapioca::Gem::NodeAdded end def initialize(symbol, constant, method, node, signature, parameters); end - # source://tapioca//lib/tapioca/gem/events.rb#109 + # : UnboundMethod + # + # source://tapioca//lib/tapioca/gem/events.rb#112 sig { returns(::UnboundMethod) } def method; end - # source://tapioca//lib/tapioca/gem/events.rb#112 + # : RBI::Method + # + # source://tapioca//lib/tapioca/gem/events.rb#115 sig { returns(::RBI::Method) } def node; end - # source://tapioca//lib/tapioca/gem/events.rb#118 + # : Array[[Symbol, String]] + # + # source://tapioca//lib/tapioca/gem/events.rb#121 sig { returns(T::Array[[::Symbol, ::String]]) } def parameters; end - # source://tapioca//lib/tapioca/gem/events.rb#115 + # : untyped + # + # source://tapioca//lib/tapioca/gem/events.rb#118 sig { returns(T.untyped) } def signature; end end # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. # -# source://tapioca//lib/tapioca/gem/events.rb#57 +# source://tapioca//lib/tapioca/gem/events.rb#60 class Tapioca::Gem::NodeAdded < ::Tapioca::Gem::Event abstract! - # source://tapioca//lib/tapioca/gem/events.rb#70 + # : (String symbol, Module constant) -> void + # + # source://tapioca//lib/tapioca/gem/events.rb#73 sig { params(symbol: ::String, constant: ::Module).void } def initialize(symbol, constant); end - # source://tapioca//lib/tapioca/gem/events.rb#67 + # : Module + # + # source://tapioca//lib/tapioca/gem/events.rb#70 sig { returns(::Module) } def constant; end - # source://tapioca//lib/tapioca/gem/events.rb#64 + # : String + # + # source://tapioca//lib/tapioca/gem/events.rb#67 sig { returns(::String) } def symbol; end end @@ -1968,7 +2441,9 @@ class Tapioca::Gem::Pipeline include ::Tapioca::SorbetHelper include ::Tapioca::RBIHelper - # source://tapioca//lib/tapioca/gem/pipeline.rb#27 + # : (Gemfile::GemSpec gem, error_handler: ^(String error) -> void, ?include_doc: bool, ?include_loc: bool) -> void + # + # source://tapioca//lib/tapioca/gem/pipeline.rb#20 sig do params( gem: ::Tapioca::Gemfile::GemSpec, @@ -1979,49 +2454,68 @@ class Tapioca::Gem::Pipeline end def initialize(gem, error_handler:, include_doc: T.unsafe(nil), include_loc: T.unsafe(nil)); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#64 + # : -> RBI::Tree + # + # source://tapioca//lib/tapioca/gem/pipeline.rb#57 sig { returns(::RBI::Tree) } def compile; end - # source://tapioca//lib/tapioca/gem/pipeline.rb#135 + # : ((String | Symbol) name) -> bool + # + # source://tapioca//lib/tapioca/gem/pipeline.rb#116 sig { params(name: T.any(::String, ::Symbol)).returns(T::Boolean) } def constant_in_gem?(name); end + # : ^(String error) -> void + # # source://tapioca//lib/tapioca/gem/pipeline.rb#17 sig { returns(T.proc.params(error: ::String).void) } def error_handler; end + # : Gemfile::GemSpec + # # source://tapioca//lib/tapioca/gem/pipeline.rb#14 sig { returns(::Tapioca::Gemfile::GemSpec) } def gem; end - # source://tapioca//lib/tapioca/gem/pipeline.rb#153 + # : (UnboundMethod method) -> bool + # + # source://tapioca//lib/tapioca/gem/pipeline.rb#134 sig { params(method: ::UnboundMethod).returns(T::Boolean) } def method_in_gem?(method); end - # Helpers + # : (Module constant) -> String? # - # source://tapioca//lib/tapioca/gem/pipeline.rb#163 + # source://tapioca//lib/tapioca/gem/pipeline.rb#144 sig { params(constant: ::Module).returns(T.nilable(::String)) } def name_of(constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#87 + # : (String symbol, Module constant, RBI::Const node) -> void + # + # source://tapioca//lib/tapioca/gem/pipeline.rb#81 sig { params(symbol: ::String, constant: ::Module, node: ::RBI::Const).void } def push_const(symbol, constant, node); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#77 - sig { params(symbol: ::String, constant: ::BasicObject).void } + # : (String symbol, BasicObject constant) -> void + # + # source://tapioca//lib/tapioca/gem/pipeline.rb#71 def push_constant(symbol, constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#82 + # : (String symbol, Module constant) -> void + # + # source://tapioca//lib/tapioca/gem/pipeline.rb#76 sig { params(symbol: ::String, constant: ::Module).void } def push_foreign_constant(symbol, constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#101 + # : (String symbol, Module constant, RBI::Scope node) -> void + # + # source://tapioca//lib/tapioca/gem/pipeline.rb#91 sig { params(symbol: ::String, constant: ::Module, node: ::RBI::Scope).void } def push_foreign_scope(symbol, constant, node); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#115 + # : (String symbol, Module constant, UnboundMethod method, RBI::Method node, untyped signature, Array[[Symbol, String]] parameters) -> void + # + # source://tapioca//lib/tapioca/gem/pipeline.rb#96 sig do params( symbol: ::String, @@ -2034,137 +2528,185 @@ class Tapioca::Gem::Pipeline end def push_method(symbol, constant, method, node, signature, parameters); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#94 + # : (String symbol, Module constant, RBI::Scope node) -> void + # + # source://tapioca//lib/tapioca/gem/pipeline.rb#86 sig { params(symbol: ::String, constant: ::Module, node: ::RBI::Scope).void } def push_scope(symbol, constant, node); end - # Events handling + # : (String symbol) -> void # - # source://tapioca//lib/tapioca/gem/pipeline.rb#72 + # source://tapioca//lib/tapioca/gem/pipeline.rb#65 sig { params(symbol: ::String).void } def push_symbol(symbol); end - # Constants and properties filtering + # : (String symbol_name) -> bool # - # source://tapioca//lib/tapioca/gem/pipeline.rb#122 + # source://tapioca//lib/tapioca/gem/pipeline.rb#103 sig { params(symbol_name: ::String).returns(T::Boolean) } def symbol_in_payload?(symbol_name); end private - # source://tapioca//lib/tapioca/gem/pipeline.rb#456 + # : (String name) -> void + # + # source://tapioca//lib/tapioca/gem/pipeline.rb#441 sig { params(name: ::String).void } def add_to_alias_namespace(name); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#461 + # : (String name) -> bool + # + # source://tapioca//lib/tapioca/gem/pipeline.rb#446 sig { params(name: ::String).returns(T::Boolean) } def alias_namespaced?(name); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#260 + # : (String name, Module constant) -> void + # + # source://tapioca//lib/tapioca/gem/pipeline.rb#242 sig { params(name: ::String, constant: ::Module).void } def compile_alias(name, constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#246 - sig { params(symbol: ::String, constant: ::BasicObject).void } + # : (String symbol, BasicObject constant) -> void + # + # source://tapioca//lib/tapioca/gem/pipeline.rb#228 def compile_constant(symbol, constant); end - # Compiling + # : (String symbol, Module constant) -> void # - # source://tapioca//lib/tapioca/gem/pipeline.rb#235 + # source://tapioca//lib/tapioca/gem/pipeline.rb#216 sig { params(symbol: ::String, constant: ::Module).void } def compile_foreign_constant(symbol, constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#314 + # : (String name, Module constant) -> void + # + # source://tapioca//lib/tapioca/gem/pipeline.rb#297 sig { params(name: ::String, constant: ::Module).void } def compile_module(name, constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#281 - sig { params(name: ::String, value: ::BasicObject).void } + # : (String name, BasicObject value) -> void + # + # source://tapioca//lib/tapioca/gem/pipeline.rb#264 def compile_object(name, value); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#325 + # : (String name, Module constant) -> RBI::Scope + # + # source://tapioca//lib/tapioca/gem/pipeline.rb#308 sig { params(name: ::String, constant: ::Module).returns(::RBI::Scope) } def compile_scope(name, constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#339 + # : (Class[top] constant) -> String? + # + # source://tapioca//lib/tapioca/gem/pipeline.rb#322 sig { params(constant: T::Class[T.anything]).returns(T.nilable(::String)) } def compile_superclass(constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#437 + # : (Module constant, ?strict: bool) -> bool + # + # source://tapioca//lib/tapioca/gem/pipeline.rb#422 sig { params(constant: ::Module, strict: T::Boolean).returns(T::Boolean) } def defined_in_gem?(constant, strict: T.unsafe(nil)); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#193 + # : (Gem::Event event) -> void + # + # source://tapioca//lib/tapioca/gem/pipeline.rb#174 sig { params(event: ::Tapioca::Gem::Event).void } def dispatch(event); end - # Helpers + # : ((Module & T::Generic) constant) -> String # - # source://tapioca//lib/tapioca/gem/pipeline.rb#480 + # source://tapioca//lib/tapioca/gem/pipeline.rb#465 sig { params(constant: T.all(::Module, ::T::Generic)).returns(::String) } def generic_name_of(constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#449 + # : (Module constant) -> Set[String] + # + # source://tapioca//lib/tapioca/gem/pipeline.rb#434 sig { params(constant: ::Module).returns(T::Set[::String]) } def get_file_candidates(constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#178 + # : (Gemfile::GemSpec gem) -> Set[String] + # + # source://tapioca//lib/tapioca/gem/pipeline.rb#159 sig { params(gem: ::Tapioca::Gemfile::GemSpec).returns(T::Set[::String]) } def load_bootstrap_symbols(gem); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#496 + # : (Module constant, String? class_name) -> String? + # + # source://tapioca//lib/tapioca/gem/pipeline.rb#481 sig { params(constant: ::Module, class_name: T.nilable(::String)).returns(T.nilable(::String)) } def name_of_proxy_target(constant, class_name); end - # Events handling + # : -> Gem::Event # - # source://tapioca//lib/tapioca/gem/pipeline.rb#188 + # source://tapioca//lib/tapioca/gem/pipeline.rb#169 sig { returns(::Tapioca::Gem::Event) } def next_event; end - # source://tapioca//lib/tapioca/gem/pipeline.rb#216 + # : (Gem::ConstantFound event) -> void + # + # source://tapioca//lib/tapioca/gem/pipeline.rb#197 sig { params(event: ::Tapioca::Gem::ConstantFound).void } def on_constant(event); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#228 + # : (Gem::NodeAdded event) -> void + # + # source://tapioca//lib/tapioca/gem/pipeline.rb#209 sig { params(event: ::Tapioca::Gem::NodeAdded).void } def on_node(event); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#207 + # : (Gem::SymbolFound event) -> void + # + # source://tapioca//lib/tapioca/gem/pipeline.rb#188 sig { params(event: ::Tapioca::Gem::SymbolFound).void } def on_symbol(event); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#468 + # : (String name) -> void + # + # source://tapioca//lib/tapioca/gem/pipeline.rb#453 sig { params(name: ::String).void } def seen!(name); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#473 + # : (String name) -> bool + # + # source://tapioca//lib/tapioca/gem/pipeline.rb#458 sig { params(name: ::String).returns(T::Boolean) } def seen?(name); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#407 + # : (String name, Module constant) -> bool + # + # source://tapioca//lib/tapioca/gem/pipeline.rb#391 sig { params(name: ::String, constant: ::Module).returns(T::Boolean) } def skip_alias?(name, constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#395 - sig { params(name: ::String, constant: T.anything).returns(T::Boolean) } + # : (String name, top constant) -> bool + # + # @return [Boolean] + # + # source://tapioca//lib/tapioca/gem/pipeline.rb#379 def skip_constant?(name, constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#424 + # : (String name, Module constant) -> bool + # + # source://tapioca//lib/tapioca/gem/pipeline.rb#409 sig { params(name: ::String, constant: ::Module).returns(T::Boolean) } def skip_foreign_constant?(name, constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#429 + # : (String name, Module constant) -> bool + # + # source://tapioca//lib/tapioca/gem/pipeline.rb#414 sig { params(name: ::String, constant: ::Module).returns(T::Boolean) } def skip_module?(name, constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#416 - sig { params(name: ::String, constant: ::BasicObject).returns(T::Boolean) } + # : (String name, BasicObject constant) -> bool + # + # @return [Boolean] + # + # source://tapioca//lib/tapioca/gem/pipeline.rb#401 def skip_object?(name, constant); end - # Constants and properties filtering + # : (String name) -> bool # - # source://tapioca//lib/tapioca/gem/pipeline.rb#390 + # source://tapioca//lib/tapioca/gem/pipeline.rb#373 sig { params(name: ::String).returns(T::Boolean) } def skip_symbol?(name); end end @@ -2173,29 +2715,39 @@ end # "(eval at /path/to/file.rb:123)" # and we are just interested in the "/path/to/file.rb" part # -# source://tapioca//lib/tapioca/gem/pipeline.rb#132 +# source://tapioca//lib/tapioca/gem/pipeline.rb#113 Tapioca::Gem::Pipeline::EVAL_SOURCE_FILE_PATTERN = T.let(T.unsafe(nil), Regexp) +# : Array[String] +# # source://tapioca//lib/tapioca/gem/pipeline.rb#11 Tapioca::Gem::Pipeline::IGNORED_SYMBOLS = T.let(T.unsafe(nil), Array) -# source://tapioca//lib/tapioca/gem/events.rb#90 +# source://tapioca//lib/tapioca/gem/events.rb#93 class Tapioca::Gem::ScopeNodeAdded < ::Tapioca::Gem::NodeAdded - # source://tapioca//lib/tapioca/gem/events.rb#97 + # : (String symbol, Module constant, RBI::Scope node) -> void + # + # source://tapioca//lib/tapioca/gem/events.rb#100 sig { params(symbol: ::String, constant: ::Module, node: ::RBI::Scope).void } def initialize(symbol, constant, node); end - # source://tapioca//lib/tapioca/gem/events.rb#94 + # : RBI::Scope + # + # source://tapioca//lib/tapioca/gem/events.rb#97 sig { returns(::RBI::Scope) } def node; end end # source://tapioca//lib/tapioca/gem/events.rb#13 class Tapioca::Gem::SymbolFound < ::Tapioca::Gem::Event + # : (String symbol) -> void + # # source://tapioca//lib/tapioca/gem/events.rb#20 sig { params(symbol: ::String).void } def initialize(symbol); end + # : String + # # source://tapioca//lib/tapioca/gem/events.rb#17 sig { returns(::String) } def symbol; end @@ -2203,24 +2755,34 @@ end # source://tapioca//lib/tapioca/helpers/gem_helper.rb#5 module Tapioca::GemHelper + # : ((String | Pathname) app_dir, String full_gem_path) -> bool + # # source://tapioca//lib/tapioca/helpers/gem_helper.rb#9 sig { params(app_dir: T.any(::Pathname, ::String), full_gem_path: ::String).returns(T::Boolean) } def gem_in_app_dir?(app_dir, full_gem_path); end + # : (String full_gem_path) -> bool + # # source://tapioca//lib/tapioca/helpers/gem_helper.rb#17 sig { params(full_gem_path: ::String).returns(T::Boolean) } def gem_in_bundle_path?(full_gem_path); end + # : (String full_gem_path) -> bool + # # source://tapioca//lib/tapioca/helpers/gem_helper.rb#22 sig { params(full_gem_path: ::String).returns(T::Boolean) } def gem_in_ruby_path?(full_gem_path); end + # : ((String | Pathname) path) -> String + # # source://tapioca//lib/tapioca/helpers/gem_helper.rb#27 sig { params(path: T.any(::Pathname, ::String)).returns(::String) } def to_realpath(path); end private + # : ((Pathname | String) path, (Pathname | String) dir) -> bool + # # source://tapioca//lib/tapioca/helpers/gem_helper.rb#36 sig { params(path: T.any(::Pathname, ::String), dir: T.any(::Pathname, ::String)).returns(T::Boolean) } def path_in_dir?(path, dir); end @@ -2232,68 +2794,94 @@ class Tapioca::GemInfo < ::T::Struct const :version, ::Gem::Version class << self + # : (Bundler::LazySpecification spec) -> GemInfo + # # source://tapioca//lib/tapioca/gem_info.rb#13 sig { params(spec: ::Bundler::LazySpecification).returns(::Tapioca::GemInfo) } def from_spec(spec); end - # source://sorbet-runtime/0.5.11965/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.12123/lib/types/struct.rb#13 def inherited(s); end end end # source://tapioca//lib/tapioca/gemfile.rb#7 class Tapioca::Gemfile + # : (Array[String] excluded_gems) -> void + # # source://tapioca//lib/tapioca/gemfile.rb#27 sig { params(excluded_gems: T::Array[::String]).void } def initialize(excluded_gems); end + # : Bundler::Definition + # # source://tapioca//lib/tapioca/gemfile.rb#18 sig { returns(::Bundler::Definition) } def definition; end + # : Array[GemSpec] + # # source://tapioca//lib/tapioca/gemfile.rb#21 sig { returns(T::Array[::Tapioca::Gemfile::GemSpec]) } def dependencies; end + # : (String gem_name) -> GemSpec? + # # source://tapioca//lib/tapioca/gemfile.rb#40 sig { params(gem_name: ::String).returns(T.nilable(::Tapioca::Gemfile::GemSpec)) } def gem(gem_name); end + # : Array[String] + # # source://tapioca//lib/tapioca/gemfile.rb#24 sig { returns(T::Array[::String]) } def missing_specs; end + # : -> void + # # source://tapioca//lib/tapioca/gemfile.rb#45 sig { void } def require_bundle; end private + # : -> String + # # source://tapioca//lib/tapioca/gemfile.rb#101 sig { returns(::String) } def dir; end + # : File + # # source://tapioca//lib/tapioca/gemfile.rb#54 sig { returns(::File) } def gemfile; end + # : -> Array[Symbol] + # # source://tapioca//lib/tapioca/gemfile.rb#96 sig { returns(T::Array[::Symbol]) } def groups; end + # : -> [Array[GemSpec], Array[String]] + # # source://tapioca//lib/tapioca/gemfile.rb#57 sig { returns([T::Array[::Tapioca::Gemfile::GemSpec], T::Array[::String]]) } def load_dependencies; end - # @return [File] + # : File # # source://tapioca//lib/tapioca/gemfile.rb#54 def lockfile; end + # : -> [T::Enumerable[Spec], Array[String]] + # # source://tapioca//lib/tapioca/gemfile.rb#68 sig { returns([T::Enumerable[T.any(::Bundler::StubSpecification, ::Gem::Specification)], T::Array[::String]]) } def materialize_deps; end + # : -> Bundler::Runtime + # # source://tapioca//lib/tapioca/gemfile.rb#91 sig { returns(::Bundler::Runtime) } def runtime; end @@ -2303,111 +2891,157 @@ end class Tapioca::Gemfile::GemSpec include ::Tapioca::GemHelper - # source://tapioca//lib/tapioca/gemfile.rb#145 + # : (Spec spec) -> void + # + # source://tapioca//lib/tapioca/gemfile.rb#139 sig { params(spec: T.any(::Bundler::StubSpecification, ::Gem::Specification)).void } def initialize(spec); end - # source://tapioca//lib/tapioca/gemfile.rb#155 + # : (BasicObject other) -> bool + # + # source://tapioca//lib/tapioca/gemfile.rb#149 sig { params(other: ::BasicObject).returns(T::Boolean) } def ==(other); end - # source://tapioca//lib/tapioca/gemfile.rb#180 + # : (String path) -> bool + # + # source://tapioca//lib/tapioca/gemfile.rb#174 sig { params(path: ::String).returns(T::Boolean) } def contains_path?(path); end - # source://tapioca//lib/tapioca/gemfile.rb#170 + # : -> Array[::Gem::Dependency] + # + # source://tapioca//lib/tapioca/gemfile.rb#164 sig { returns(T::Array[::Gem::Dependency]) } def dependencies; end - # source://tapioca//lib/tapioca/gemfile.rb#210 + # : -> bool + # + # source://tapioca//lib/tapioca/gemfile.rb#204 sig { returns(T::Boolean) } def export_rbi_files?; end - # source://tapioca//lib/tapioca/gemfile.rb#205 + # : -> Array[String] + # + # source://tapioca//lib/tapioca/gemfile.rb#199 sig { returns(T::Array[::String]) } def exported_rbi_files; end - # source://tapioca//lib/tapioca/gemfile.rb#215 + # : -> RBI::MergeTree + # + # source://tapioca//lib/tapioca/gemfile.rb#209 sig { returns(::RBI::MergeTree) } def exported_rbi_tree; end - # source://tapioca//lib/tapioca/gemfile.rb#142 + # : Array[Pathname] + # + # source://tapioca//lib/tapioca/gemfile.rb#136 sig { returns(T::Array[::Pathname]) } def files; end - # source://tapioca//lib/tapioca/gemfile.rb#139 + # : String + # + # source://tapioca//lib/tapioca/gemfile.rb#133 sig { returns(::String) } def full_gem_path; end - # source://tapioca//lib/tapioca/gemfile.rb#160 + # : (String gemfile_dir) -> bool + # + # source://tapioca//lib/tapioca/gemfile.rb#154 sig { params(gemfile_dir: ::String).returns(T::Boolean) } def ignore?(gemfile_dir); end - # source://tapioca//lib/tapioca/gemfile.rb#165 + # : -> String + # + # source://tapioca//lib/tapioca/gemfile.rb#159 sig { returns(::String) } def name; end - # source://tapioca//lib/tapioca/gemfile.rb#189 + # : -> void + # + # source://tapioca//lib/tapioca/gemfile.rb#183 sig { void } def parse_yard_docs; end - # source://tapioca//lib/tapioca/gemfile.rb#175 + # : -> String + # + # source://tapioca//lib/tapioca/gemfile.rb#169 sig { returns(::String) } def rbi_file_name; end - # source://tapioca//lib/tapioca/gemfile.rb#227 + # : (Pathname file) -> Pathname + # + # source://tapioca//lib/tapioca/gemfile.rb#221 sig { params(file: ::Pathname).returns(::Pathname) } def relative_path_for(file); end - # @return [String] + # : String # - # source://tapioca//lib/tapioca/gemfile.rb#139 + # source://tapioca//lib/tapioca/gemfile.rb#133 def version; end private - # source://tapioca//lib/tapioca/gemfile.rb#238 + # : -> Array[Pathname] + # + # source://tapioca//lib/tapioca/gemfile.rb#232 sig { returns(T::Array[::Pathname]) } def collect_files; end - # source://tapioca//lib/tapioca/gemfile.rb#253 + # : -> bool? + # + # source://tapioca//lib/tapioca/gemfile.rb#247 sig { returns(T.nilable(T::Boolean)) } def default_gem?; end - # source://tapioca//lib/tapioca/gemfile.rb#312 + # : -> bool + # + # source://tapioca//lib/tapioca/gemfile.rb#303 sig { returns(T::Boolean) } def gem_ignored?; end - # source://tapioca//lib/tapioca/gemfile.rb#291 + # : (String path) -> bool + # + # source://tapioca//lib/tapioca/gemfile.rb#282 sig { params(path: ::String).returns(T::Boolean) } def has_parent_gemspec?(path); end - # source://tapioca//lib/tapioca/gemfile.rb#258 + # : -> Regexp + # + # source://tapioca//lib/tapioca/gemfile.rb#252 sig { returns(::Regexp) } def require_paths_prefix_matcher; end - # source://tapioca//lib/tapioca/gemfile.rb#270 + # : (String file) -> Pathname + # + # source://tapioca//lib/tapioca/gemfile.rb#261 sig { params(file: ::String).returns(::Pathname) } def resolve_to_ruby_lib_dir(file); end - # source://tapioca//lib/tapioca/gemfile.rb#284 + # : -> String + # + # source://tapioca//lib/tapioca/gemfile.rb#275 sig { returns(::String) } def version_string; end class << self + # : -> Hash[String, Gemfile::GemSpec] + # # source://tapioca//lib/tapioca/gemfile.rb#113 sig { returns(T::Hash[::String, ::Tapioca::Gemfile::GemSpec]) } def spec_lookup_by_file_path; end end end -# source://tapioca//lib/tapioca/gemfile.rb#125 +# source://tapioca//lib/tapioca/gemfile.rb#122 Tapioca::Gemfile::GemSpec::IGNORED_GEMS = T.let(T.unsafe(nil), Array) # source://tapioca//lib/tapioca/gemfile.rb#10 Tapioca::Gemfile::Spec = T.type_alias { T.any(::Bundler::StubSpecification, ::Gem::Specification) } -# source://tapioca//lib/tapioca.rb#33 +# : String +# +# source://tapioca//lib/tapioca.rb#29 Tapioca::LIB_ROOT_DIR = T.let(T.unsafe(nil), String) # source://tapioca//lib/tapioca/loaders/loader.rb#5 @@ -2415,7 +3049,9 @@ module Tapioca::Loaders; end # source://tapioca//lib/tapioca/loaders/dsl.rb#6 class Tapioca::Loaders::Dsl < ::Tapioca::Loaders::Loader - # source://tapioca//lib/tapioca/loaders/dsl.rb#74 + # : (tapioca_path: String, ?eager_load: bool, ?app_root: String, ?halt_upon_load_error: bool) -> void + # + # source://tapioca//lib/tapioca/loaders/dsl.rb#66 sig do params( tapioca_path: ::String, @@ -2426,40 +3062,56 @@ class Tapioca::Loaders::Dsl < ::Tapioca::Loaders::Loader end def initialize(tapioca_path:, eager_load: T.unsafe(nil), app_root: T.unsafe(nil), halt_upon_load_error: T.unsafe(nil)); end - # source://tapioca//lib/tapioca/loaders/dsl.rb#36 + # : -> void + # + # source://tapioca//lib/tapioca/loaders/dsl.rb#30 sig { override.void } def load; end - # source://tapioca//lib/tapioca/loaders/dsl.rb#43 + # : -> void + # + # source://tapioca//lib/tapioca/loaders/dsl.rb#37 sig { void } def load_dsl_extensions_and_compilers; end - # source://tapioca//lib/tapioca/loaders/dsl.rb#49 + # : -> void + # + # source://tapioca//lib/tapioca/loaders/dsl.rb#43 sig { void } def reload_custom_compilers; end protected - # source://tapioca//lib/tapioca/loaders/dsl.rb#120 + # : -> void + # + # source://tapioca//lib/tapioca/loaders/dsl.rb#112 sig { void } def load_application; end - # source://tapioca//lib/tapioca/loaders/dsl.rb#100 + # : -> void + # + # source://tapioca//lib/tapioca/loaders/dsl.rb#92 sig { void } def load_dsl_compilers; end - # source://tapioca//lib/tapioca/loaders/dsl.rb#85 + # : -> void + # + # source://tapioca//lib/tapioca/loaders/dsl.rb#77 sig { void } def load_dsl_extensions; end private - # source://tapioca//lib/tapioca/loaders/dsl.rb#136 + # : -> void + # + # source://tapioca//lib/tapioca/loaders/dsl.rb#128 sig { void } def load_custom_dsl_compilers; end class << self - # source://tapioca//lib/tapioca/loaders/dsl.rb#20 + # : (tapioca_path: String, ?eager_load: bool, ?app_root: String, ?halt_upon_load_error: bool) -> void + # + # source://tapioca//lib/tapioca/loaders/dsl.rb#13 sig do params( tapioca_path: ::String, @@ -2474,7 +3126,9 @@ end # source://tapioca//lib/tapioca/loaders/gem.rb#6 class Tapioca::Loaders::Gem < ::Tapioca::Loaders::Loader - # source://tapioca//lib/tapioca/loaders/gem.rb#49 + # : (bundle: Gemfile, prerequire: String?, postrequire: String, default_command: String, halt_upon_load_error: bool) -> void + # + # source://tapioca//lib/tapioca/loaders/gem.rb#34 sig do params( bundle: ::Tapioca::Gemfile, @@ -2486,22 +3140,30 @@ class Tapioca::Loaders::Gem < ::Tapioca::Loaders::Loader end def initialize(bundle:, prerequire:, postrequire:, default_command:, halt_upon_load_error:); end - # source://tapioca//lib/tapioca/loaders/gem.rb#34 + # : -> void + # + # source://tapioca//lib/tapioca/loaders/gem.rb#27 sig { override.void } def load; end protected - # source://tapioca//lib/tapioca/loaders/gem.rb#80 + # : (String file, LoadError error) -> void + # + # source://tapioca//lib/tapioca/loaders/gem.rb#65 sig { params(file: ::String, error: ::LoadError).void } def explain_failed_require(file, error); end - # source://tapioca//lib/tapioca/loaders/gem.rb#60 + # : -> void + # + # source://tapioca//lib/tapioca/loaders/gem.rb#45 sig { void } def require_gem_file; end class << self - # source://tapioca//lib/tapioca/loaders/gem.rb#21 + # : (bundle: Gemfile, prerequire: String?, postrequire: String, default_command: String, halt_upon_load_error: bool) -> void + # + # source://tapioca//lib/tapioca/loaders/gem.rb#13 sig do params( bundle: ::Tapioca::Gemfile, @@ -2541,23 +3203,25 @@ class Tapioca::Loaders::Loader # The `eager_load_paths` method still exists, but doesn't return all paths anymore and causes Tapioca to miss some # engine paths. The following commit is the change: # https://github.com/rails/rails/commit/ebfca905db14020589c22e6937382e6f8f687664 + # : (singleton(Rails::Engine) engine) -> Array[String] # - # @param engine [T.class_of(Rails::Engine)] - # @return [Array<String>] - # - # source://tapioca//lib/tapioca/loaders/loader.rb#234 + # source://tapioca//lib/tapioca/loaders/loader.rb#222 def eager_load_paths(engine); end - # source://tapioca//lib/tapioca/loaders/loader.rb#199 + # : -> void + # + # source://tapioca//lib/tapioca/loaders/loader.rb#186 sig { void } def eager_load_rails_app; end - # @return [Array<T.class_of(Rails::Engine)>] + # : -> Array[singleton(Rails::Engine)] # - # source://tapioca//lib/tapioca/loaders/loader.rb#178 + # source://tapioca//lib/tapioca/loaders/loader.rb#165 def engines; end - # source://tapioca//lib/tapioca/loaders/loader.rb#29 + # : (Tapioca::Gemfile gemfile, String? initialize_file, String? require_file, bool halt_upon_load_error) -> void + # + # source://tapioca//lib/tapioca/loaders/loader.rb#22 sig do params( gemfile: ::Tapioca::Gemfile, @@ -2568,15 +3232,21 @@ class Tapioca::Loaders::Loader end def load_bundle(gemfile, initialize_file, require_file, halt_upon_load_error); end - # source://tapioca//lib/tapioca/loaders/loader.rb#136 + # : -> void + # + # source://tapioca//lib/tapioca/loaders/loader.rb#122 sig { void } def load_engines_in_classic_mode; end - # source://tapioca//lib/tapioca/loaders/loader.rb#114 + # : -> void + # + # source://tapioca//lib/tapioca/loaders/loader.rb#100 sig { void } def load_engines_in_zeitwerk_mode; end - # source://tapioca//lib/tapioca/loaders/loader.rb#49 + # : (?environment_load: bool, ?eager_load: bool, ?app_root: String, ?halt_upon_load_error: bool) -> void + # + # source://tapioca//lib/tapioca/loaders/loader.rb#35 sig do params( environment_load: T::Boolean, @@ -2587,26 +3257,36 @@ class Tapioca::Loaders::Loader end def load_rails_application(environment_load: T.unsafe(nil), eager_load: T.unsafe(nil), app_root: T.unsafe(nil), halt_upon_load_error: T.unsafe(nil)); end - # source://tapioca//lib/tapioca/loaders/loader.rb#89 + # : -> void + # + # source://tapioca//lib/tapioca/loaders/loader.rb#75 sig { void } def load_rails_engines; end - # source://tapioca//lib/tapioca/loaders/loader.rb#220 + # : (String? file) -> void + # + # source://tapioca//lib/tapioca/loaders/loader.rb#207 sig { params(file: T.nilable(::String)).void } def require_helper(file); end - # source://tapioca//lib/tapioca/loaders/loader.rb#103 + # source://tapioca//lib/tapioca/loaders/loader.rb#89 def run_initializers; end - # source://tapioca//lib/tapioca/loaders/loader.rb#192 + # : (String path) -> void + # + # source://tapioca//lib/tapioca/loaders/loader.rb#179 sig { params(path: ::String).void } def safe_require(path); end - # source://tapioca//lib/tapioca/loaders/loader.rb#161 + # : { -> void } -> void + # + # source://tapioca//lib/tapioca/loaders/loader.rb#147 sig { params(blk: T.proc.void).void } def with_rails_application(&blk); end - # source://tapioca//lib/tapioca/loaders/loader.rb#154 + # : -> bool + # + # source://tapioca//lib/tapioca/loaders/loader.rb#140 sig { returns(T::Boolean) } def zeitwerk_mode?; end end @@ -2616,7 +3296,9 @@ module Tapioca::RBIFilesHelper requires_ancestor { Tapioca::SorbetHelper } requires_ancestor { Thor::Shell } - # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#48 + # : (RBI::Index index, shim_rbi_dir: String, todo_rbi_file: String) -> Hash[String, Array[RBI::Node]] + # + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#42 sig do params( index: ::RBI::Index, @@ -2626,19 +3308,27 @@ module Tapioca::RBIFilesHelper end def duplicated_nodes_from_index(index, shim_rbi_dir:, todo_rbi_file:); end + # : (RBI::Index index, String kind, String file) -> void + # # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#13 sig { params(index: ::RBI::Index, kind: ::String, file: ::String).void } def index_rbi(index, kind, file); end + # : (RBI::Index index, String kind, String dir, number_of_workers: Integer?) -> void + # # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#25 sig { params(index: ::RBI::Index, kind: ::String, dir: ::String, number_of_workers: T.nilable(::Integer)).void } def index_rbis(index, kind, dir, number_of_workers:); end - # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#65 + # : (RBI::Loc loc, path_prefix: String?) -> String + # + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#59 sig { params(loc: ::RBI::Loc, path_prefix: T.nilable(::String)).returns(::String) } def location_to_payload_url(loc, path_prefix:); end - # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#86 + # : (command: String, gem_dir: String, dsl_dir: String, auto_strictness: bool, ?gems: Array[Gemfile::GemSpec], ?compilers: T::Enumerable[singleton(Dsl::Compiler)]) -> void + # + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#71 sig do params( command: ::String, @@ -2653,27 +3343,15 @@ module Tapioca::RBIFilesHelper private - # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#223 - sig { params(nodes: T::Array[::RBI::Node]).returns(T::Array[::RBI::Scope]) } - def extract_empty_scopes(nodes); end - - # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#228 + # : (Array[RBI::Node] nodes) -> Array[(RBI::Method | RBI::Attr)] + # + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#249 sig { params(nodes: T::Array[::RBI::Node]).returns(T::Array[T.any(::RBI::Attr, ::RBI::Method)]) } def extract_methods_and_attrs(nodes); end - # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#238 - sig { params(nodes: T::Array[::RBI::Node]).returns(T::Array[T.any(::RBI::Mixin, ::RBI::RequiresAncestor)]) } - def extract_mixins(nodes); end - - # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#248 - sig do - params( - nodes: T::Array[T.any(::RBI::Attr, ::RBI::Method)] - ).returns(T::Array[T.any(::RBI::Attr, ::RBI::Method)]) - end - def extract_nodes_with_sigs(nodes); end - - # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#216 + # : (Array[RBI::Node] nodes, shim_rbi_dir: String, todo_rbi_file: String) -> Array[RBI::Node] + # + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#242 sig do params( nodes: T::Array[::RBI::Node], @@ -2683,30 +3361,61 @@ module Tapioca::RBIFilesHelper end def extract_shims_and_todos(nodes, shim_rbi_dir:, todo_rbi_file:); end - # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#280 + # : (String path) -> String + # + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#286 sig { params(path: ::String).returns(::String) } def gem_name_from_rbi_path(path); end - # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#155 + # : (Array[RBI::Node] nodes, Array[RBI::Node] shims_or_todos) -> bool + # + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#210 + sig { params(nodes: T::Array[::RBI::Node], shims_or_todos: T::Array[::RBI::Node]).returns(T::Boolean) } + def has_duplicated_methods_and_attrs?(nodes, shims_or_todos); end + + # : (Array[RBI::Node] shims_or_todos) -> bool + # + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#202 + sig { params(shims_or_todos: T::Array[::RBI::Node]).returns(T::Boolean) } + def has_duplicated_mixins?(shims_or_todos); end + + # : (Array[RBI::Node], Array[RBI::Node]) -> bool + # + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#174 + sig { params(all_nodes: T::Array[::RBI::Node], shims_or_todos: T::Array[::RBI::Node]).returns(T::Boolean) } + def has_duplicated_scopes?(all_nodes, shims_or_todos); end + + # : (RBI::Index index, Array[String] files, number_of_workers: Integer?) -> void + # + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#140 sig { params(index: ::RBI::Index, files: T::Array[::String], number_of_workers: T.nilable(::Integer)).void } def parse_and_index_files(index, files, number_of_workers:); end - # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#171 + # Do the list of `nodes` sharing the same name have duplicates? + # : (Array[RBI::Node] nodes, shim_rbi_dir: String, todo_rbi_file: String) -> bool + # + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#157 sig { params(nodes: T::Array[::RBI::Node], shim_rbi_dir: ::String, todo_rbi_file: ::String).returns(T::Boolean) } def shims_or_todos_have_duplicates?(nodes, shim_rbi_dir:, todo_rbi_file:); end - # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#253 + # : (Array[Spoom::Sorbet::Errors::Error] errors, String gem_dir) -> void + # + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#259 sig { params(errors: T::Array[::Spoom::Sorbet::Errors::Error], gem_dir: ::String).void } def update_gem_rbis_strictnesses(errors, gem_dir); end end # source://tapioca//lib/tapioca/rbi_formatter.rb#5 class Tapioca::RBIFormatter < ::RBI::Formatter - # source://tapioca//lib/tapioca/rbi_formatter.rb#24 + # : (RBI::File file) -> void + # + # source://tapioca//lib/tapioca/rbi_formatter.rb#18 sig { params(file: ::RBI::File).void } def write_empty_body_comment!(file); end - # source://tapioca//lib/tapioca/rbi_formatter.rb#15 + # : (RBI::File file, String command, ?reason: String?) -> void + # + # source://tapioca//lib/tapioca/rbi_formatter.rb#9 sig { params(file: ::RBI::File, command: ::String, reason: T.nilable(::String)).void } def write_header!(file, command, reason: T.unsafe(nil)); end end @@ -2717,60 +3426,88 @@ module Tapioca::RBIHelper extend ::Tapioca::SorbetHelper extend ::Tapioca::RBIHelper - # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#91 + # : (String type) -> String + # + # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#83 sig { params(type: ::String).returns(::String) } def as_nilable_type(type); end - # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#100 + # : (String type) -> String + # + # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#92 sig { params(type: ::String).returns(::String) } def as_non_nilable_type(type); end - # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#72 + # : (String name, type: String) -> RBI::TypedParam + # + # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#64 sig { params(name: ::String, type: ::String).returns(::RBI::TypedParam) } def create_block_param(name, type:); end - # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#62 + # : (String name, type: String, default: String) -> RBI::TypedParam + # + # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#54 sig { params(name: ::String, type: ::String, default: ::String).returns(::RBI::TypedParam) } def create_kw_opt_param(name, type:, default:); end - # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#57 + # : (String name, type: String) -> RBI::TypedParam + # + # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#49 sig { params(name: ::String, type: ::String).returns(::RBI::TypedParam) } def create_kw_param(name, type:); end - # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#67 + # : (String name, type: String) -> RBI::TypedParam + # + # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#59 sig { params(name: ::String, type: ::String).returns(::RBI::TypedParam) } def create_kw_rest_param(name, type:); end - # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#47 + # : (String name, type: String, default: String) -> RBI::TypedParam + # + # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#39 sig { params(name: ::String, type: ::String, default: ::String).returns(::RBI::TypedParam) } def create_opt_param(name, type:, default:); end - # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#42 + # : (String name, type: String) -> RBI::TypedParam + # + # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#34 sig { params(name: ::String, type: ::String).returns(::RBI::TypedParam) } def create_param(name, type:); end - # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#52 + # : (String name, type: String) -> RBI::TypedParam + # + # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#44 sig { params(name: ::String, type: ::String).returns(::RBI::TypedParam) } def create_rest_param(name, type:); end - # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#77 + # : (RBI::Param param, String type) -> RBI::TypedParam + # + # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#69 sig { params(param: ::RBI::Param, type: ::String).returns(::RBI::TypedParam) } def create_typed_param(param, type); end - # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#82 + # : (String sig_string) -> String + # + # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#74 sig { params(sig_string: ::String).returns(::String) } def sanitize_signature_types(sig_string); end - # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#109 + # : (String name) -> bool + # + # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#101 sig { params(name: ::String).returns(T::Boolean) } def valid_method_name?(name); end - # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#114 + # : (String name) -> bool + # + # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#106 sig { params(name: ::String).returns(T::Boolean) } def valid_parameter_name?(name); end class << self - # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#23 + # : (String type, Symbol variance, String? fixed, String? upper, String? lower) -> String + # + # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#15 sig do params( type: ::String, @@ -2786,27 +3523,39 @@ end # source://tapioca//lib/tapioca/repo_index.rb#5 class Tapioca::RepoIndex + # : -> void + # # source://tapioca//lib/tapioca/repo_index.rb#26 sig { void } def initialize; end + # : (String gem_name) -> void + # # source://tapioca//lib/tapioca/repo_index.rb#31 sig { params(gem_name: ::String).void } def <<(gem_name); end + # : -> T::Enumerable[String] + # # source://tapioca//lib/tapioca/repo_index.rb#36 sig { returns(T::Enumerable[::String]) } def gems; end + # : (String gem_name) -> bool + # # source://tapioca//lib/tapioca/repo_index.rb#41 sig { params(gem_name: ::String).returns(T::Boolean) } def has_gem?(gem_name); end class << self + # : (Hash[String, Hash[untyped, untyped]] hash) -> RepoIndex + # # source://tapioca//lib/tapioca/repo_index.rb#18 sig { params(hash: T::Hash[::String, T::Hash[T.untyped, T.untyped]]).returns(Tapioca::RepoIndex) } def from_hash(hash); end + # : (String json) -> RepoIndex + # # source://tapioca//lib/tapioca/repo_index.rb#13 sig { params(json: ::String).returns(Tapioca::RepoIndex) } def from_json(json); end @@ -2821,8 +3570,9 @@ module Tapioca::Runtime; end # available, it implements finding the attached class of a singleton # class by iterating through ObjectSpace. module Tapioca::Runtime::AttachedClassOf + # : (Class singleton_class) -> Module? + # # source://tapioca//lib/tapioca/runtime/attached_class_of_32.rb#14 - sig { params(singleton_class: ::Class).returns(T.nilable(::Module)) } def attached_class_of(singleton_class); end end @@ -2831,63 +3581,81 @@ class Tapioca::Runtime::DynamicMixinCompiler include ::Tapioca::Runtime::AttachedClassOf include ::Tapioca::Runtime::Reflection + # : (Module constant) -> void + # # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#20 sig { params(constant: ::Module).void } def initialize(constant); end - # @return [Array<Symbol>] + # : Array[Symbol] # # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#14 def class_attribute_predicates; end + # : Array[Symbol] + # # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#14 sig { returns(T::Array[::Symbol]) } def class_attribute_readers; end - # @return [Array<Symbol>] + # : Array[Symbol] # # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#14 def class_attribute_writers; end + # : (RBI::Tree tree) -> void + # # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#137 sig { params(tree: ::RBI::Tree).void } def compile_class_attributes(tree); end + # : (RBI::Tree tree) -> [Array[Module], Array[Module]] + # # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#180 sig { params(tree: ::RBI::Tree).returns([T::Array[::Module], T::Array[::Module]]) } def compile_mixes_in_class_methods(tree); end + # : Array[Module] + # # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#11 sig { returns(T::Array[::Module]) } def dynamic_extends; end - # @return [Array<Module>] + # : Array[Module] # # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#11 def dynamic_includes; end + # : -> bool + # # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#132 sig { returns(T::Boolean) } def empty_attributes?; end + # : (String qualified_mixin_name) -> bool + # # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#222 sig { params(qualified_mixin_name: ::String).returns(T::Boolean) } def filtered_mixin?(qualified_mixin_name); end - # @return [Array<Symbol>] + # : Array[Symbol] # # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#17 def instance_attribute_predicates; end + # : Array[Symbol] + # # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#17 sig { returns(T::Array[::Symbol]) } def instance_attribute_readers; end - # @return [Array<Symbol>] + # : Array[Symbol] # # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#17 def instance_attribute_writers; end + # : (Module mod, Array[Module] dynamic_extends) -> bool + # # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#215 sig { params(mod: ::Module, dynamic_extends: T::Array[::Module]).returns(T::Boolean) } def module_included_by_another_dynamic_extend?(mod, dynamic_extends); end @@ -2914,11 +3682,15 @@ end # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#23 module Tapioca::Runtime::GenericTypeRegistry class << self - # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#80 + # : (Object instance) -> bool + # + # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#75 sig { params(instance: ::Object).returns(T::Boolean) } def generic_type_instance?(instance); end - # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#85 + # : (Module constant) -> Array[TypeVariableModule]? + # + # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#80 sig { params(constant: ::Module).returns(T.nilable(T::Array[::Tapioca::TypeVariableModule])) } def lookup_type_variables(constant); end @@ -2933,8 +3705,9 @@ module Tapioca::Runtime::GenericTypeRegistry # 2 hash lookups (for the other two `Foo[Integer]`s). # # This method returns the created or cached clone of the constant. + # : (untyped constant, untyped types) -> Module # - # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#65 + # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#60 sig { params(constant: T.untyped, types: T.untyped).returns(::Module) } def register_type(constant, types); end @@ -2947,34 +3720,45 @@ module Tapioca::Runtime::GenericTypeRegistry # # Finally, the original `type_variable` is returned from this method, so that the caller # can return it from the original methods as well. + # : (untyped constant, TypeVariableModule type_variable) -> void # - # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#104 + # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#94 sig { params(constant: T.untyped, type_variable: ::Tapioca::TypeVariableModule).void } def register_type_variable(constant, type_variable); end private - # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#113 + # : (Module constant, String name) -> Module + # + # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#103 sig { params(constant: ::Module, name: ::String).returns(::Module) } def create_generic_type(constant, name); end - # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#155 + # : (Class[top] constant) -> Class[top] + # + # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#145 sig { params(constant: T::Class[T.anything]).returns(T::Class[T.anything]) } def create_safe_subclass(constant); end - # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#182 + # : (Module constant) -> Array[TypeVariableModule] + # + # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#172 sig { params(constant: ::Module).returns(T::Array[::Tapioca::TypeVariableModule]) } def lookup_or_initialize_type_variables(constant); end end end -# source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#34 +# source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#28 class Tapioca::Runtime::GenericTypeRegistry::GenericType < ::T::Types::Simple - # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#38 + # : (Module raw_type, Module underlying_type) -> void + # + # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#32 sig { params(raw_type: ::Module, underlying_type: ::Module).void } def initialize(raw_type, underlying_type); end - # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#45 + # : (untyped obj) -> bool + # + # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#40 sig { override.params(obj: T.untyped).returns(T::Boolean) } def valid?(obj); end end @@ -2984,34 +3768,43 @@ module Tapioca::Runtime::Reflection extend ::Tapioca::Runtime::AttachedClassOf extend ::Tapioca::Runtime::Reflection - # source://tapioca//lib/tapioca/runtime/reflection.rb#207 - sig { params(constant: ::Module).returns(T.untyped) } + # : (Module constant) -> untyped + # + # source://tapioca//lib/tapioca/runtime/reflection.rb#199 def abstract_type_of(constant); end - # source://tapioca//lib/tapioca/runtime/reflection.rb#77 - sig { params(constant: ::Module).returns(T::Array[::Module]) } + # : (Module constant) -> Array[Module] + # + # source://tapioca//lib/tapioca/runtime/reflection.rb#73 def ancestors_of(constant); end - # source://tapioca//lib/tapioca/runtime/reflection.rb#92 - sig { params(object: ::BasicObject, other: ::BasicObject).returns(T::Boolean) } + # : (BasicObject object, BasicObject other) -> bool + # + # @return [Boolean] + # + # source://tapioca//lib/tapioca/runtime/reflection.rb#88 def are_equal?(object, other); end - # source://tapioca//lib/tapioca/runtime/reflection.rb#56 - sig { params(object: ::BasicObject).returns(T::Class[T.anything]) } + # : (BasicObject object) -> Class[top] + # + # source://tapioca//lib/tapioca/runtime/reflection.rb#52 def class_of(object); end - # @param constant [BasicObject] + # : (BasicObject constant) -> bool + # # @return [Boolean] # - # source://tapioca//lib/tapioca/runtime/reflection.rb#38 + # source://tapioca//lib/tapioca/runtime/reflection.rb#39 def constant_defined?(constant); end - # source://tapioca//lib/tapioca/runtime/reflection.rb#49 - sig { params(symbol: ::String, inherit: T::Boolean, namespace: ::Module).returns(::BasicObject) } + # : (String symbol, ?inherit: bool, ?namespace: Module) -> BasicObject + # + # source://tapioca//lib/tapioca/runtime/reflection.rb#45 def constantize(symbol, inherit: T.unsafe(nil), namespace: T.unsafe(nil)); end - # source://tapioca//lib/tapioca/runtime/reflection.rb#61 - sig { params(constant: ::Module).returns(T::Array[::Symbol]) } + # : (Module constant) -> Array[Symbol] + # + # source://tapioca//lib/tapioca/runtime/reflection.rb#57 def constants_of(constant); end # Returns an array with all classes that are < than the supplied class. @@ -3027,169 +3820,217 @@ module Tapioca::Runtime::Reflection # # class D < C; end # descendants_of(C) # => [B, A, D] + # : [U] ((Class[top] & U) klass) -> Array[U] # - # source://tapioca//lib/tapioca/runtime/reflection.rb#172 - sig do - type_parameters(:U) - .params( - klass: T.all(T.type_parameter(:U), T::Class[T.anything]) - ).returns(T::Array[T.type_parameter(:U)]) - end + # source://tapioca//lib/tapioca/runtime/reflection.rb#164 def descendants_of(klass); end - # source://tapioca//lib/tapioca/runtime/reflection.rb#200 - sig { params(constant: ::Module).returns(T::Set[::String]) } + # : (Module constant) -> Set[String] + # + # source://tapioca//lib/tapioca/runtime/reflection.rb#192 def file_candidates_for(constant); end - # source://tapioca//lib/tapioca/runtime/reflection.rb#213 - sig { params(constant: ::Module).returns(T::Boolean) } + # : (Module constant) -> bool + # + # @return [Boolean] + # + # source://tapioca//lib/tapioca/runtime/reflection.rb#205 def final_module?(constant); end - # source://tapioca//lib/tapioca/runtime/reflection.rb#112 - sig { params(constant: ::Module).returns(T::Array[::Module]) } + # : (Module constant) -> Array[Module] + # + # source://tapioca//lib/tapioca/runtime/reflection.rb#108 def inherited_ancestors_of(constant); end - # source://tapioca//lib/tapioca/runtime/reflection.rb#150 - sig { params(constant: ::Module, method: ::Symbol).returns(::Method) } + # : (Module constant, Symbol method) -> Method + # + # source://tapioca//lib/tapioca/runtime/reflection.rb#146 def method_of(constant, method); end - # source://tapioca//lib/tapioca/runtime/reflection.rb#66 - sig { params(constant: ::Module).returns(T.nilable(::String)) } + # : (Module constant) -> String? + # + # source://tapioca//lib/tapioca/runtime/reflection.rb#62 def name_of(constant); end - # source://tapioca//lib/tapioca/runtime/reflection.rb#145 - sig { params(type: ::T::Types::Base).returns(::String) } + # : (T::Types::Base type) -> String + # + # source://tapioca//lib/tapioca/runtime/reflection.rb#141 def name_of_type(type); end - # source://tapioca//lib/tapioca/runtime/reflection.rb#87 - sig { params(object: ::BasicObject).returns(::Integer) } + # : (BasicObject object) -> Integer + # + # source://tapioca//lib/tapioca/runtime/reflection.rb#83 def object_id_of(object); end - # source://tapioca//lib/tapioca/runtime/reflection.rb#107 - sig { params(constant: ::Module).returns(T::Array[::Symbol]) } + # : (Module constant) -> Array[Symbol] + # + # source://tapioca//lib/tapioca/runtime/reflection.rb#103 def private_instance_methods_of(constant); end - # source://tapioca//lib/tapioca/runtime/reflection.rb#102 - sig { params(constant: ::Module).returns(T::Array[::Symbol]) } + # : (Module constant) -> Array[Symbol] + # + # source://tapioca//lib/tapioca/runtime/reflection.rb#98 def protected_instance_methods_of(constant); end - # source://tapioca//lib/tapioca/runtime/reflection.rb#97 - sig { params(constant: ::Module).returns(T::Array[::Symbol]) } + # : (Module constant) -> Array[Symbol] + # + # source://tapioca//lib/tapioca/runtime/reflection.rb#93 def public_instance_methods_of(constant); end - # source://tapioca//lib/tapioca/runtime/reflection.rb#121 - sig { params(constant: ::Module).returns(T.nilable(::String)) } + # : (Module constant) -> String? + # + # source://tapioca//lib/tapioca/runtime/reflection.rb#117 def qualified_name_of(constant); end # Examines the call stack to identify the closest location where a "require" is performed # by searching for the label "<top (required)>" or "block in <class:...>" in the # case of an ActiveSupport.on_load hook. If none is found, it returns the location # labeled "<main>", which is the original call site. + # : (Array[Thread::Backtrace::Location]? locations) -> String # - # source://tapioca//lib/tapioca/runtime/reflection.rb#185 - sig { params(locations: T.nilable(T::Array[::Thread::Backtrace::Location])).returns(::String) } + # source://tapioca//lib/tapioca/runtime/reflection.rb#177 def resolve_loc(locations); end - # source://tapioca//lib/tapioca/runtime/reflection.rb#218 - sig { params(constant: ::Module).returns(T::Boolean) } + # : (Module constant) -> bool + # + # @return [Boolean] + # + # source://tapioca//lib/tapioca/runtime/reflection.rb#210 def sealed_module?(constant); end - # source://tapioca//lib/tapioca/runtime/reflection.rb#138 - sig { params(method: T.any(::Method, ::UnboundMethod)).returns(T.untyped) } + # : ((UnboundMethod | Method) method) -> untyped + # + # source://tapioca//lib/tapioca/runtime/reflection.rb#134 def signature_of(method); end - # source://tapioca//lib/tapioca/runtime/reflection.rb#133 - sig { params(method: T.any(::Method, ::UnboundMethod)).returns(T.untyped) } + # : ((UnboundMethod | Method) method) -> untyped + # + # source://tapioca//lib/tapioca/runtime/reflection.rb#129 def signature_of!(method); end - # source://tapioca//lib/tapioca/runtime/reflection.rb#72 - sig { params(constant: ::Module).returns(T::Class[T.anything]) } + # : (Module constant) -> Class[top] + # + # source://tapioca//lib/tapioca/runtime/reflection.rb#68 def singleton_class_of(constant); end - # source://tapioca//lib/tapioca/runtime/reflection.rb#82 - sig { params(constant: T::Class[T.anything]).returns(T.nilable(T::Class[T.anything])) } + # : (Class[top] constant) -> Class[top]? + # + # source://tapioca//lib/tapioca/runtime/reflection.rb#78 def superclass_of(constant); end private - # source://tapioca//lib/tapioca/runtime/reflection.rb#255 - sig { params(parent: ::Module, name: ::String).returns(T.nilable(::Module)) } + # : (Module parent, String name) -> Module? + # + # source://tapioca//lib/tapioca/runtime/reflection.rb#247 def child_module_for_parent_with_name(parent, name); end - # source://tapioca//lib/tapioca/runtime/reflection.rb#271 - sig { params(name: ::String).returns(T::Boolean) } + # : (String name) -> bool + # + # @return [Boolean] + # + # source://tapioca//lib/tapioca/runtime/reflection.rb#263 def has_aliased_namespace?(name); end - # source://tapioca//lib/tapioca/runtime/reflection.rb#266 - sig { params(method: ::UnboundMethod).returns(T::Boolean) } + # : (UnboundMethod method) -> bool + # + # @return [Boolean] + # + # source://tapioca//lib/tapioca/runtime/reflection.rb#258 def method_defined_by_forwardable_module?(method); end - # source://tapioca//lib/tapioca/runtime/reflection.rb#241 - sig { params(constant: ::Module).returns(T::Array[::UnboundMethod]) } + # : (Module constant) -> Array[UnboundMethod] + # + # source://tapioca//lib/tapioca/runtime/reflection.rb#233 def methods_for(constant); end - # source://tapioca//lib/tapioca/runtime/reflection.rb#225 - sig { params(constant: ::Module).returns(T::Array[::UnboundMethod]) } + # : (Module constant) -> Array[UnboundMethod] + # + # source://tapioca//lib/tapioca/runtime/reflection.rb#217 def relevant_methods_for(constant); end end +# : UnboundMethod +# # source://tapioca//lib/tapioca/runtime/reflection.rb#25 Tapioca::Runtime::Reflection::ANCESTORS_METHOD = T.let(T.unsafe(nil), UnboundMethod) +# : UnboundMethod +# # source://tapioca//lib/tapioca/runtime/reflection.rb#21 Tapioca::Runtime::Reflection::CLASS_METHOD = T.let(T.unsafe(nil), UnboundMethod) +# : UnboundMethod +# # source://tapioca//lib/tapioca/runtime/reflection.rb#22 Tapioca::Runtime::Reflection::CONSTANTS_METHOD = T.let(T.unsafe(nil), UnboundMethod) +# : UnboundMethod +# # source://tapioca//lib/tapioca/runtime/reflection.rb#28 Tapioca::Runtime::Reflection::EQUAL_METHOD = T.let(T.unsafe(nil), UnboundMethod) +# : UnboundMethod +# # source://tapioca//lib/tapioca/runtime/reflection.rb#32 Tapioca::Runtime::Reflection::METHOD_METHOD = T.let(T.unsafe(nil), UnboundMethod) +# : UnboundMethod +# # source://tapioca//lib/tapioca/runtime/reflection.rb#23 Tapioca::Runtime::Reflection::NAME_METHOD = T.let(T.unsafe(nil), UnboundMethod) +# : UnboundMethod +# # source://tapioca//lib/tapioca/runtime/reflection.rb#27 Tapioca::Runtime::Reflection::OBJECT_ID_METHOD = T.let(T.unsafe(nil), UnboundMethod) +# : UnboundMethod +# # source://tapioca//lib/tapioca/runtime/reflection.rb#31 Tapioca::Runtime::Reflection::PRIVATE_INSTANCE_METHODS_METHOD = T.let(T.unsafe(nil), UnboundMethod) +# : UnboundMethod +# # source://tapioca//lib/tapioca/runtime/reflection.rb#30 Tapioca::Runtime::Reflection::PROTECTED_INSTANCE_METHODS_METHOD = T.let(T.unsafe(nil), UnboundMethod) +# : UnboundMethod +# # source://tapioca//lib/tapioca/runtime/reflection.rb#29 Tapioca::Runtime::Reflection::PUBLIC_INSTANCE_METHODS_METHOD = T.let(T.unsafe(nil), UnboundMethod) +# : Array[String] +# # source://tapioca//lib/tapioca/runtime/reflection.rb#35 Tapioca::Runtime::Reflection::REQUIRED_FROM_LABELS = T.let(T.unsafe(nil), Array) +# : UnboundMethod +# # source://tapioca//lib/tapioca/runtime/reflection.rb#24 Tapioca::Runtime::Reflection::SINGLETON_CLASS_METHOD = T.let(T.unsafe(nil), UnboundMethod) +# : UnboundMethod +# # source://tapioca//lib/tapioca/runtime/reflection.rb#26 Tapioca::Runtime::Reflection::SUPERCLASS_METHOD = T.let(T.unsafe(nil), UnboundMethod) # source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#6 module Tapioca::Runtime::Trackers class << self - # source://tapioca//lib/tapioca/runtime/trackers.rb#34 - sig { void } + # : -> void + # + # source://tapioca//lib/tapioca/runtime/trackers.rb#30 def disable_all!; end - # source://tapioca//lib/tapioca/runtime/trackers.rb#39 - sig { params(tracker: ::Tapioca::Runtime::Trackers::Tracker).void } + # : (Tracker tracker) -> void + # + # source://tapioca//lib/tapioca/runtime/trackers.rb#35 def register_tracker(tracker); end - # source://tapioca//lib/tapioca/runtime/trackers.rb#21 - sig do - type_parameters(:Return) - .params( - blk: T.proc.returns(T.type_parameter(:Return)) - ).returns(T.type_parameter(:Return)) - end + # : [Return] { -> Return } -> Return + # + # source://tapioca//lib/tapioca/runtime/trackers.rb#17 def with_trackers_enabled(&blk); end end end @@ -3199,21 +4040,19 @@ module Tapioca::Runtime::Trackers::Autoload extend ::Tapioca::Runtime::Trackers::Tracker class << self + # : -> void + # # source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#19 - sig { void } def eager_load_all!; end + # : (String constant_name) -> void + # # source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#31 - sig { params(constant_name: ::String).void } def register(constant_name); end - # source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#42 - sig do - type_parameters(:Result) - .params( - block: T.proc.returns(T.type_parameter(:Result)) - ).returns(T.type_parameter(:Result)) - end + # : [Result] { -> Result } -> Result + # + # source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#38 def with_disabled_exits(&block); end end end @@ -3253,59 +4092,39 @@ module Tapioca::Runtime::Trackers::Mixin extend ::Tapioca::Runtime::Trackers::Tracker class << self - # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#56 - sig do - params( - mixin: ::Module - ).returns(T::Hash[::Tapioca::Runtime::Trackers::Mixin::Type, T::Hash[::Module, ::String]]) - end + # : (Module mixin) -> Hash[Type, Hash[Module, String]] + # + # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#52 def constants_with_mixin(mixin); end - # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#61 - sig do - params( - mixin: ::Module, - mixin_type: ::Tapioca::Runtime::Trackers::Mixin::Type, - constant: ::Module - ).returns(T.nilable(::String)) - end + # : (Module mixin, Type mixin_type, Module constant) -> String? + # + # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#57 def mixin_location(mixin, mixin_type, constant); end - # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#35 - sig { params(constant: ::Module, mixin: ::Module, mixin_type: ::Tapioca::Runtime::Trackers::Mixin::Type).void } + # : (Module constant, Module mixin, Type mixin_type) -> void + # + # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#31 def register(constant, mixin, mixin_type); end - # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#43 + # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#39 def resolve_to_attached_class(constant, mixin, mixin_type); end - # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#30 - sig do - type_parameters(:Result) - .params( - block: T.proc.returns(T.type_parameter(:Result)) - ).returns(T.type_parameter(:Result)) - end + # : [Result] { -> Result } -> Result + # + # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#26 def with_disabled_registration(&block); end private - # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#76 - sig do - params( - mixin: ::Module - ).returns(T::Hash[::Tapioca::Runtime::Trackers::Mixin::Type, T::Hash[::Module, ::String]]) - end + # : (Module mixin) -> Hash[Type, Hash[Module, String]] + # + # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#72 def find_or_initialize_mixin_lookup(mixin); end - # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#68 - sig do - params( - constant: ::Module, - mixin: ::Module, - mixin_type: ::Tapioca::Runtime::Trackers::Mixin::Type, - location: ::String - ).void - end + # : (Module constant, Module mixin, Type mixin_type, String location) -> void + # + # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#64 def register_with_location(constant, mixin, mixin_type, location); end end end @@ -3323,16 +4142,19 @@ module Tapioca::Runtime::Trackers::RequiredAncestor extend ::Tapioca::Runtime::Trackers::Tracker class << self + # : (T::Helpers requiring, ^-> void block) -> void + # # source://tapioca//lib/tapioca/runtime/trackers/required_ancestor.rb#15 - sig { params(requiring: ::T::Helpers, block: T.proc.void).void } def register(requiring, block); end + # : (Module mod) -> Array[^-> void] + # # source://tapioca//lib/tapioca/runtime/trackers/required_ancestor.rb#23 - sig { params(mod: ::Module).returns(T::Array[T.proc.void]) } def required_ancestors_blocks_by(mod); end + # : (Module mod) -> Array[untyped] + # # source://tapioca//lib/tapioca/runtime/trackers/required_ancestor.rb#28 - sig { params(mod: ::Module).returns(T::Array[T.untyped]) } def required_ancestors_by(mod); end end end @@ -3341,8 +4163,9 @@ end module Tapioca::Runtime::Trackers::Tracker abstract! + # : -> void + # # source://tapioca//lib/tapioca/runtime/trackers/tracker.rb#26 - sig { void } def disable!; end # @return [Boolean] @@ -3354,79 +4177,110 @@ module Tapioca::Runtime::Trackers::Tracker def with_disabled_tracker(&block); end class << self + # : ((Tracker & Module) base) -> void + # # source://tapioca//lib/tapioca/runtime/trackers/tracker.rb#17 - sig { params(base: T.all(::Module, ::Tapioca::Runtime::Trackers::Tracker)).void } def extended(base); end end end -# source://tapioca//lib/tapioca.rb#35 +# : String +# +# source://tapioca//lib/tapioca.rb#31 Tapioca::SORBET_CONFIG_FILE = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca.rb#34 +# : String +# +# source://tapioca//lib/tapioca.rb#30 Tapioca::SORBET_DIR = T.let(T.unsafe(nil), String) # source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#5 module Tapioca::SorbetHelper - # source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#32 + # : (*String sorbet_args) -> Spoom::ExecResult + # + # source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#23 sig { params(sorbet_args: ::String).returns(::Spoom::ExecResult) } def sorbet(*sorbet_args); end - # source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#37 + # : -> String + # + # source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#28 sig { returns(::String) } def sorbet_path; end - # source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#44 + # : (Symbol feature, ?version: ::Gem::Version?) -> bool + # + # source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#35 sig { params(feature: ::Symbol, version: T.nilable(::Gem::Version)).returns(T::Boolean) } def sorbet_supports?(feature, version: T.unsafe(nil)); end end -# source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#24 +# source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#18 Tapioca::SorbetHelper::FEATURE_REQUIREMENTS = T.let(T.unsafe(nil), Hash) -# source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#13 +# : Pathname +# +# source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#10 Tapioca::SorbetHelper::SORBET_BIN = T.let(T.unsafe(nil), Pathname) -# source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#18 +# source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#12 Tapioca::SorbetHelper::SORBET_EXE_PATH_ENV_VAR = T.let(T.unsafe(nil), String) +# : ::Gem::Specification +# # source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#8 Tapioca::SorbetHelper::SORBET_GEM_SPEC = T.let(T.unsafe(nil), Gem::Specification) -# source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#20 +# source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#14 Tapioca::SorbetHelper::SORBET_PAYLOAD_URL = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#22 +# : Spoom::Context +# +# source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#16 Tapioca::SorbetHelper::SPOOM_CONTEXT = T.let(T.unsafe(nil), Spoom::Context) # source://tapioca//lib/tapioca/helpers/source_uri.rb#7 class Tapioca::SourceURI < ::URI::File - # source://tapioca//lib/tapioca/helpers/source_uri.rb#72 + # : (String? v) -> bool + # + # source://tapioca//lib/tapioca/helpers/source_uri.rb#62 sig { params(v: T.nilable(::String)).returns(T::Boolean) } def check_host(v); end - # source://tapioca//lib/tapioca/helpers/source_uri.rb#55 + # : -> String? + # + # source://tapioca//lib/tapioca/helpers/source_uri.rb#45 sig { returns(T.nilable(::String)) } def gem_name; end - # source://tapioca//lib/tapioca/helpers/source_uri.rb#29 + # : String? + # + # source://tapioca//lib/tapioca/helpers/source_uri.rb#26 sig { returns(T.nilable(::String)) } def gem_version; end - # source://tapioca//lib/tapioca/helpers/source_uri.rb#60 + # : -> String? + # + # source://tapioca//lib/tapioca/helpers/source_uri.rb#50 sig { returns(T.nilable(::String)) } def line_number; end - # source://tapioca//lib/tapioca/helpers/source_uri.rb#65 + # : (String? v) -> void + # + # source://tapioca//lib/tapioca/helpers/source_uri.rb#55 sig { params(v: T.nilable(::String)).void } def set_path(v); end - # source://tapioca//lib/tapioca/helpers/source_uri.rb#84 + # : -> String + # + # source://tapioca//lib/tapioca/helpers/source_uri.rb#74 sig { returns(::String) } def to_s; end class << self - # source://tapioca//lib/tapioca/helpers/source_uri.rb#42 + # : (gem_name: String, gem_version: String?, path: String, line_number: String?) -> instance + # + # source://tapioca//lib/tapioca/helpers/source_uri.rb#32 sig do params( gem_name: ::String, @@ -3448,7 +4302,7 @@ Tapioca::SourceURI::COMPONENT = T.let(T.unsafe(nil), Array) # handling to select a parser that doesn't emit deprecations. While it was backported to Ruby 3.1, users may # have the uri gem in their own bundle and thus not use a compatible version. # -# source://tapioca//lib/tapioca/helpers/source_uri.rb#26 +# source://tapioca//lib/tapioca/helpers/source_uri.rb#23 Tapioca::SourceURI::PARSER = T.let(T.unsafe(nil), URI::RFC2396_Parser) # source://tapioca//lib/tapioca/static/symbol_table_parser.rb#5 @@ -3456,28 +4310,40 @@ module Tapioca::Static; end # source://tapioca//lib/tapioca/static/requires_compiler.rb#6 class Tapioca::Static::RequiresCompiler + # : (String sorbet_path) -> void + # # source://tapioca//lib/tapioca/static/requires_compiler.rb#10 sig { params(sorbet_path: ::String).void } def initialize(sorbet_path); end + # : -> String + # # source://tapioca//lib/tapioca/static/requires_compiler.rb#15 sig { returns(::String) } def compile; end private + # : (Spoom::Sorbet::Config config) -> Array[String] + # # source://tapioca//lib/tapioca/static/requires_compiler.rb#29 sig { params(config: ::Spoom::Sorbet::Config).returns(T::Array[::String]) } def collect_files(config); end + # : (String file_path) -> T::Enumerable[String] + # # source://tapioca//lib/tapioca/static/requires_compiler.rb#44 sig { params(file_path: ::String).returns(T::Enumerable[::String]) } def collect_requires(file_path); end + # : (Spoom::Sorbet::Config config, Pathname file_path) -> bool + # # source://tapioca//lib/tapioca/static/requires_compiler.rb#51 sig { params(config: ::Spoom::Sorbet::Config, file_path: ::Pathname).returns(T::Boolean) } def file_ignored_by_sorbet?(config, file_path); end + # : (Pathname path) -> Array[String] + # # source://tapioca//lib/tapioca/static/requires_compiler.rb#80 sig { params(path: ::Pathname).returns(T::Array[::String]) } def path_parts(path); end @@ -3490,30 +4356,40 @@ module Tapioca::Static::SymbolLoader extend ::Tapioca::Runtime::Reflection class << self + # : (Gemfile::GemSpec gem) -> Set[String] + # # source://tapioca//lib/tapioca/static/symbol_loader.rb#23 sig { params(gem: ::Tapioca::Gemfile::GemSpec).returns(T::Set[::String]) } def engine_symbols(gem); end + # : (Gemfile::GemSpec gem) -> Set[String] + # # source://tapioca//lib/tapioca/static/symbol_loader.rb#48 sig { params(gem: ::Tapioca::Gemfile::GemSpec).returns(T::Set[::String]) } def gem_symbols(gem); end + # : -> Set[String] + # # source://tapioca//lib/tapioca/static/symbol_loader.rb#13 sig { returns(T::Set[::String]) } def payload_symbols; end + # : (Array[Pathname] paths) -> Set[String] + # # source://tapioca//lib/tapioca/static/symbol_loader.rb#53 sig { params(paths: T::Array[::Pathname]).returns(T::Set[::String]) } def symbols_from_paths(paths); end private - # @return [Array<T.class_of(Rails::Engine)>] + # : -> Array[singleton(Rails::Engine)] # - # source://tapioca//lib/tapioca/static/symbol_loader.rb#71 + # source://tapioca//lib/tapioca/static/symbol_loader.rb#72 def engines; end - # source://tapioca//lib/tapioca/static/symbol_loader.rb#84 + # : (String input, ?table_type: String) -> String + # + # source://tapioca//lib/tapioca/static/symbol_loader.rb#82 sig { params(input: ::String, table_type: ::String).returns(::String) } def symbol_table_json_from(input, table_type: T.unsafe(nil)); end end @@ -3521,36 +4397,52 @@ end # source://tapioca//lib/tapioca/static/symbol_table_parser.rb#6 class Tapioca::Static::SymbolTableParser + # : -> void + # # source://tapioca//lib/tapioca/static/symbol_table_parser.rb#30 sig { void } def initialize; end + # : (String name) -> String + # # source://tapioca//lib/tapioca/static/symbol_table_parser.rb#65 sig { params(name: ::String).returns(::String) } def fully_qualified_name(name); end + # : (Hash[String, untyped] object) -> void + # # source://tapioca//lib/tapioca/static/symbol_table_parser.rb#36 sig { params(object: T::Hash[::String, T.untyped]).void } def parse_object(object); end + # : Set[String] + # # source://tapioca//lib/tapioca/static/symbol_table_parser.rb#27 sig { returns(T::Set[::String]) } def symbols; end class << self + # : (String json_string) -> Set[String] + # # source://tapioca//lib/tapioca/static/symbol_table_parser.rb#15 sig { params(json_string: ::String).returns(T::Set[::String]) } def parse_json(json_string); end end end +# : Array[String] +# # source://tapioca//lib/tapioca/static/symbol_table_parser.rb#9 Tapioca::Static::SymbolTableParser::SKIP_PARSE_KINDS = T.let(T.unsafe(nil), Array) -# source://tapioca//lib/tapioca.rb#37 +# : String +# +# source://tapioca//lib/tapioca.rb#33 Tapioca::TAPIOCA_CONFIG_FILE = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca.rb#36 +# : String +# +# source://tapioca//lib/tapioca.rb#32 Tapioca::TAPIOCA_DIR = T.let(T.unsafe(nil), String) # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#108 @@ -3574,7 +4466,9 @@ end # # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#122 class Tapioca::TypeVariableModule < ::Module - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#146 + # : (Module context, Type type, Symbol variance, (^-> Hash[Symbol, untyped])? bounds_proc) -> void + # + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#139 sig do params( context: ::Module, @@ -3585,33 +4479,47 @@ class Tapioca::TypeVariableModule < ::Module end def initialize(context, type, variance, bounds_proc); end - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#181 + # : -> Tapioca::TypeVariable + # + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#175 sig { returns(::Tapioca::TypeVariable) } def coerce_to_type_variable; end - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#161 + # : -> bool + # + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#155 sig { returns(T::Boolean) } def fixed?; end - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#155 + # : -> String? + # + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#149 sig { returns(T.nilable(::String)) } def name; end - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#166 + # : -> String + # + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#160 sig { returns(::String) } def serialize; end + # : Type + # # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#136 sig { returns(::Tapioca::TypeVariableModule::Type) } def type; end private - # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#188 + # : -> Hash[Symbol, untyped] + # + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#182 sig { returns(T::Hash[::Symbol, T.untyped]) } def bounds; end end +# : ^-> Hash[Symbol, untyped] +# # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#133 Tapioca::TypeVariableModule::DEFAULT_BOUNDS_PROC = T.let(T.unsafe(nil), Proc)