tapioca 0.17.3 → 0.17.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/ruby_lsp/tapioca/addon.rb +1 -1
- data/lib/ruby_lsp/tapioca/server_addon.rb +9 -7
- data/lib/tapioca/bundler_ext/auto_require_hook.rb +1 -4
- data/lib/tapioca/cli.rb +2 -2
- data/lib/tapioca/commands/abstract_dsl.rb +1 -2
- data/lib/tapioca/commands/abstract_gem.rb +1 -2
- data/lib/tapioca/commands/annotations.rb +1 -1
- data/lib/tapioca/commands/command.rb +4 -6
- data/lib/tapioca/commands/command_without_tracker.rb +1 -4
- data/lib/tapioca/dsl/compiler.rb +8 -10
- data/lib/tapioca/dsl/compilers/aasm.rb +1 -2
- data/lib/tapioca/dsl/compilers/action_controller_helpers.rb +1 -2
- data/lib/tapioca/dsl/compilers/action_mailer.rb +1 -2
- data/lib/tapioca/dsl/compilers/action_text.rb +1 -2
- data/lib/tapioca/dsl/compilers/active_job.rb +1 -2
- data/lib/tapioca/dsl/compilers/active_model_attributes.rb +1 -4
- data/lib/tapioca/dsl/compilers/active_model_secure_password.rb +1 -4
- data/lib/tapioca/dsl/compilers/active_model_validations_confirmation.rb +1 -10
- data/lib/tapioca/dsl/compilers/active_record_associations.rb +1 -2
- data/lib/tapioca/dsl/compilers/active_record_columns.rb +1 -2
- data/lib/tapioca/dsl/compilers/active_record_delegated_types.rb +1 -2
- data/lib/tapioca/dsl/compilers/active_record_enum.rb +1 -2
- data/lib/tapioca/dsl/compilers/active_record_fixtures.rb +1 -1
- data/lib/tapioca/dsl/compilers/active_record_relations.rb +54 -90
- data/lib/tapioca/dsl/compilers/active_record_scope.rb +1 -2
- data/lib/tapioca/dsl/compilers/active_record_secure_token.rb +1 -2
- data/lib/tapioca/dsl/compilers/active_record_store.rb +1 -2
- data/lib/tapioca/dsl/compilers/active_record_typed_store.rb +1 -2
- data/lib/tapioca/dsl/compilers/active_resource.rb +1 -2
- data/lib/tapioca/dsl/compilers/active_storage.rb +1 -9
- data/lib/tapioca/dsl/compilers/active_support_concern.rb +1 -2
- data/lib/tapioca/dsl/compilers/active_support_current_attributes.rb +1 -2
- data/lib/tapioca/dsl/compilers/active_support_time_ext.rb +1 -2
- data/lib/tapioca/dsl/compilers/config.rb +1 -2
- data/lib/tapioca/dsl/compilers/frozen_record.rb +1 -2
- data/lib/tapioca/dsl/compilers/graphql_input_object.rb +1 -2
- data/lib/tapioca/dsl/compilers/graphql_mutation.rb +1 -2
- data/lib/tapioca/dsl/compilers/identity_cache.rb +1 -2
- data/lib/tapioca/dsl/compilers/json_api_client_resource.rb +1 -2
- data/lib/tapioca/dsl/compilers/kredis.rb +1 -4
- data/lib/tapioca/dsl/compilers/mixed_in_class_attributes.rb +1 -2
- data/lib/tapioca/dsl/compilers/protobuf.rb +1 -2
- data/lib/tapioca/dsl/compilers/rails_generators.rb +1 -2
- data/lib/tapioca/dsl/compilers/sidekiq_worker.rb +1 -2
- data/lib/tapioca/dsl/compilers/smart_properties.rb +21 -18
- data/lib/tapioca/dsl/compilers/state_machines.rb +1 -2
- data/lib/tapioca/dsl/compilers/url_helpers.rb +1 -2
- data/lib/tapioca/gem/events.rb +2 -6
- data/lib/tapioca/gem/listeners/base.rb +1 -4
- data/lib/tapioca/helpers/cli_helper.rb +1 -4
- data/lib/tapioca/helpers/config_helper.rb +1 -4
- data/lib/tapioca/helpers/env_helper.rb +1 -4
- data/lib/tapioca/helpers/rbi_files_helper.rb +2 -5
- data/lib/tapioca/helpers/test/content.rb +1 -4
- data/lib/tapioca/helpers/test/dsl_compiler.rb +1 -4
- data/lib/tapioca/helpers/test/isolation.rb +2 -7
- data/lib/tapioca/helpers/test/template.rb +1 -4
- data/lib/tapioca/loaders/loader.rb +4 -6
- data/lib/tapioca/repo_index.rb +0 -2
- data/lib/tapioca/runtime/attached_class_of_legacy.rb +1 -4
- data/lib/tapioca/runtime/trackers/tracker.rb +1 -4
- data/lib/tapioca/version.rb +1 -1
- metadata +1 -1
@@ -54,11 +54,10 @@ module Tapioca
|
|
54
54
|
# def year?; end
|
55
55
|
# end
|
56
56
|
# ~~~
|
57
|
+
#: [ConstantType = singleton(::ActiveResource::Base)]
|
57
58
|
class ActiveResource < Compiler
|
58
59
|
extend T::Sig
|
59
60
|
|
60
|
-
ConstantType = type_member { { fixed: T.class_of(::ActiveResource::Base) } }
|
61
|
-
|
62
61
|
# @override
|
63
62
|
#: -> void
|
64
63
|
def decorate
|
@@ -38,18 +38,10 @@ module Tapioca
|
|
38
38
|
# def photo=(attachable); end
|
39
39
|
# end
|
40
40
|
# ~~~
|
41
|
+
#: [ConstantType = (Module & ::ActiveStorage::Reflection::ActiveRecordExtensions::ClassMethods)]
|
41
42
|
class ActiveStorage < Compiler
|
42
43
|
extend T::Sig
|
43
44
|
|
44
|
-
ConstantType = type_member do
|
45
|
-
{
|
46
|
-
fixed: T.all(
|
47
|
-
Module,
|
48
|
-
::ActiveStorage::Reflection::ActiveRecordExtensions::ClassMethods,
|
49
|
-
),
|
50
|
-
}
|
51
|
-
end
|
52
|
-
|
53
45
|
# @override
|
54
46
|
#: -> void
|
55
47
|
def decorate
|
@@ -37,11 +37,10 @@ module Tapioca
|
|
37
37
|
# mixes_in_class_methods(::Foo::ClassMethods)
|
38
38
|
# end
|
39
39
|
# ~~~
|
40
|
+
#: [ConstantType = Module]
|
40
41
|
class ActiveSupportConcern < Compiler
|
41
42
|
extend T::Sig
|
42
43
|
|
43
|
-
ConstantType = type_member { { fixed: Module } }
|
44
|
-
|
45
44
|
# @override
|
46
45
|
#: -> void
|
47
46
|
def decorate
|
@@ -59,11 +59,10 @@ module Tapioca
|
|
59
59
|
# end
|
60
60
|
# end
|
61
61
|
# ~~~
|
62
|
+
#: [ConstantType = singleton(::ActiveSupport::CurrentAttributes)]
|
62
63
|
class ActiveSupportCurrentAttributes < Compiler
|
63
64
|
extend T::Sig
|
64
65
|
|
65
|
-
ConstantType = type_member { { fixed: T.class_of(::ActiveSupport::CurrentAttributes) } }
|
66
|
-
|
67
66
|
# @override
|
68
67
|
#: -> void
|
69
68
|
def decorate
|
@@ -34,11 +34,10 @@ module Tapioca
|
|
34
34
|
# end
|
35
35
|
# end
|
36
36
|
# ```
|
37
|
+
#: [ConstantType = singleton(::Time)]
|
37
38
|
class ActiveSupportTimeExt < Compiler
|
38
39
|
extend T::Sig
|
39
40
|
|
40
|
-
ConstantType = type_member { { fixed: T.class_of(::Time) } }
|
41
|
-
|
42
41
|
# @override
|
43
42
|
#: -> void
|
44
43
|
def decorate
|
@@ -40,13 +40,12 @@ module Tapioca
|
|
40
40
|
# def github=(value); end
|
41
41
|
# end
|
42
42
|
# ```
|
43
|
+
#: [ConstantType = Module]
|
43
44
|
class Config < Compiler
|
44
45
|
extend T::Sig
|
45
46
|
|
46
47
|
CONFIG_OPTIONS_SUFFIX = "ConfigOptions"
|
47
48
|
|
48
|
-
ConstantType = type_member { { fixed: Module } }
|
49
|
-
|
50
49
|
# @override
|
51
50
|
#: -> void
|
52
51
|
def decorate
|
@@ -58,11 +58,10 @@ module Tapioca
|
|
58
58
|
# end
|
59
59
|
# end
|
60
60
|
# ~~~
|
61
|
+
#: [ConstantType = (singleton(::FrozenRecord::Base) & Extensions::FrozenRecord)]
|
61
62
|
class FrozenRecord < Compiler
|
62
63
|
extend T::Sig
|
63
64
|
|
64
|
-
ConstantType = type_member { { fixed: T.all(T.class_of(::FrozenRecord::Base), Extensions::FrozenRecord) } }
|
65
|
-
|
66
65
|
# @override
|
67
66
|
#: -> void
|
68
67
|
def decorate
|
@@ -34,11 +34,10 @@ module Tapioca
|
|
34
34
|
# def post_id; end
|
35
35
|
# end
|
36
36
|
# ~~~
|
37
|
+
#: [ConstantType = singleton(GraphQL::Schema::InputObject)]
|
37
38
|
class GraphqlInputObject < Compiler
|
38
39
|
extend T::Sig
|
39
40
|
|
40
|
-
ConstantType = type_member { { fixed: T.class_of(GraphQL::Schema::InputObject) } }
|
41
|
-
|
42
41
|
# @override
|
43
42
|
#: -> void
|
44
43
|
def decorate
|
@@ -35,11 +35,10 @@ module Tapioca
|
|
35
35
|
# def resolve(body:, post_id:); end
|
36
36
|
# end
|
37
37
|
# ~~~
|
38
|
+
#: [ConstantType = singleton(GraphQL::Schema::Mutation)]
|
38
39
|
class GraphqlMutation < Compiler
|
39
40
|
extend T::Sig
|
40
41
|
|
41
|
-
ConstantType = type_member { { fixed: T.class_of(GraphQL::Schema::Mutation) } }
|
42
|
-
|
43
42
|
# @override
|
44
43
|
#: -> void
|
45
44
|
def decorate
|
@@ -55,13 +55,12 @@ module Tapioca
|
|
55
55
|
# def fetch_by_title_and_review_date(title, review_date, includes: nil); end
|
56
56
|
# end
|
57
57
|
# ~~~
|
58
|
+
#: [ConstantType = singleton(::ActiveRecord::Base)]
|
58
59
|
class IdentityCache < Compiler
|
59
60
|
extend T::Sig
|
60
61
|
|
61
62
|
COLLECTION_TYPE = ->(type) { "T::Array[::#{type}]" } #: ^((Module | String) type) -> String
|
62
63
|
|
63
|
-
ConstantType = type_member { { fixed: T.class_of(::ActiveRecord::Base) } }
|
64
|
-
|
65
64
|
# @override
|
66
65
|
#: -> void
|
67
66
|
def decorate
|
@@ -79,11 +79,10 @@ module Tapioca
|
|
79
79
|
# end
|
80
80
|
# end
|
81
81
|
# ~~~
|
82
|
+
#: [ConstantType = singleton(::JsonApiClient::Resource)]
|
82
83
|
class JsonApiClientResource < Compiler
|
83
84
|
extend T::Sig
|
84
85
|
|
85
|
-
ConstantType = type_member { { fixed: T.class_of(::JsonApiClient::Resource) } }
|
86
|
-
|
87
86
|
# @override
|
88
87
|
#: -> void
|
89
88
|
def decorate
|
@@ -63,13 +63,10 @@ module Tapioca
|
|
63
63
|
# end
|
64
64
|
# end
|
65
65
|
# ~~~
|
66
|
+
#: [ConstantType = (Class[::Kredis::Attributes] & ::Kredis::Attributes::ClassMethods & Extensions::Kredis)]
|
66
67
|
class Kredis < Compiler
|
67
68
|
extend T::Sig
|
68
69
|
|
69
|
-
ConstantType = type_member do
|
70
|
-
{ fixed: T.all(T::Class[::Kredis::Attributes], ::Kredis::Attributes::ClassMethods, Extensions::Kredis) }
|
71
|
-
end
|
72
|
-
|
73
70
|
# @override
|
74
71
|
#: -> void
|
75
72
|
def decorate
|
@@ -64,6 +64,7 @@ module Tapioca
|
|
64
64
|
# ~~~
|
65
65
|
# --ignore=/path/to/proto/cart_pb.rb
|
66
66
|
# ~~~
|
67
|
+
#: [ConstantType = Class[top]]
|
67
68
|
class Protobuf < Compiler
|
68
69
|
class Field < T::Struct
|
69
70
|
prop :name, String
|
@@ -74,8 +75,6 @@ module Tapioca
|
|
74
75
|
|
75
76
|
extend T::Sig
|
76
77
|
|
77
|
-
ConstantType = type_member { { fixed: T::Class[T.anything] } }
|
78
|
-
|
79
78
|
FIELD_RE = /^[a-z_][a-zA-Z0-9_]*$/
|
80
79
|
|
81
80
|
# @override
|
@@ -33,13 +33,12 @@ module Tapioca
|
|
33
33
|
# def skip_comments; end
|
34
34
|
# end
|
35
35
|
# ~~~
|
36
|
+
#: [ConstantType = singleton(::Rails::Generators::Base)]
|
36
37
|
class RailsGenerators < Compiler
|
37
38
|
extend T::Sig
|
38
39
|
|
39
40
|
BUILT_IN_MATCHER = /::(ActionMailbox|ActionText|ActiveRecord|Rails)::Generators/
|
40
41
|
|
41
|
-
ConstantType = type_member { { fixed: T.class_of(::Rails::Generators::Base) } }
|
42
|
-
|
43
42
|
# @override
|
44
43
|
#: -> void
|
45
44
|
def decorate
|
@@ -41,11 +41,10 @@ module Tapioca
|
|
41
41
|
# as accepted values for the `interval` parameter:
|
42
42
|
# * `self.perform_at` will also accept a `ActiveSupport::TimeWithZone` value
|
43
43
|
# * `self.perform_in` will also accept a `ActiveSupport::Duration` value
|
44
|
+
#: [ConstantType = singleton(::Sidekiq::Worker)]
|
44
45
|
class SidekiqWorker < Compiler
|
45
46
|
extend T::Sig
|
46
47
|
|
47
|
-
ConstantType = type_member { { fixed: T.class_of(::Sidekiq::Worker) } }
|
48
|
-
|
49
48
|
# @override
|
50
49
|
#: -> void
|
51
50
|
def decorate
|
@@ -29,36 +29,39 @@ module Tapioca
|
|
29
29
|
# # post.rbi
|
30
30
|
# # typed: true
|
31
31
|
# class Post
|
32
|
-
#
|
33
|
-
# def title; end
|
32
|
+
# include SmartPropertiesGeneratedMethods
|
34
33
|
#
|
35
|
-
#
|
36
|
-
#
|
34
|
+
# module SmartPropertiesGeneratedMethods
|
35
|
+
# sig { returns(T.nilable(::String)) }
|
36
|
+
# def title; end
|
37
37
|
#
|
38
|
-
#
|
39
|
-
#
|
38
|
+
# sig { params(title: T.nilable(::String)).returns(T.nilable(::String)) }
|
39
|
+
# def title=(title); end
|
40
40
|
#
|
41
|
-
#
|
42
|
-
#
|
41
|
+
# sig { returns(::String) }
|
42
|
+
# def description; end
|
43
43
|
#
|
44
|
-
#
|
45
|
-
#
|
44
|
+
# sig { params(description: ::String).returns(::String) }
|
45
|
+
# def description=(description); end
|
46
46
|
#
|
47
|
-
#
|
48
|
-
#
|
47
|
+
# sig { returns(T.nilable(T::Boolean)) }
|
48
|
+
# def published?; end
|
49
49
|
#
|
50
|
-
#
|
51
|
-
#
|
50
|
+
# sig { params(published: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) }
|
51
|
+
# def published=(published); end
|
52
52
|
#
|
53
|
-
#
|
54
|
-
#
|
53
|
+
# sig { returns(T.nilable(T::Boolean)) }
|
54
|
+
# def enabled; end
|
55
|
+
#
|
56
|
+
# sig { params(enabled: T.nilable(T::Boolean)).returns(T.nilable(T::Boolean)) }
|
57
|
+
# def enabled=(enabled); end
|
58
|
+
# end
|
55
59
|
# end
|
56
60
|
# ~~~
|
61
|
+
#: [ConstantType = singleton(::SmartProperties)]
|
57
62
|
class SmartProperties < Compiler
|
58
63
|
extend T::Sig
|
59
64
|
|
60
|
-
ConstantType = type_member { { fixed: T.class_of(::SmartProperties) } }
|
61
|
-
|
62
65
|
# @override
|
63
66
|
#: -> void
|
64
67
|
def decorate
|
@@ -109,11 +109,10 @@ module Tapioca
|
|
109
109
|
# end
|
110
110
|
# end
|
111
111
|
# ~~~
|
112
|
+
#: [ConstantType = (Module & ::StateMachines::ClassMethods)]
|
112
113
|
class StateMachines < Compiler
|
113
114
|
extend T::Sig
|
114
115
|
|
115
|
-
ConstantType = type_member { { fixed: T.all(Module, ::StateMachines::ClassMethods) } }
|
116
|
-
|
117
116
|
# @override
|
118
117
|
#: -> void
|
119
118
|
def decorate
|
@@ -78,11 +78,10 @@ module Tapioca
|
|
78
78
|
# include GeneratedUrlHelpersModule
|
79
79
|
# end
|
80
80
|
# ~~~
|
81
|
+
#: [ConstantType = Module]
|
81
82
|
class UrlHelpers < Compiler
|
82
83
|
extend T::Sig
|
83
84
|
|
84
|
-
ConstantType = type_member { { fixed: Module } }
|
85
|
-
|
86
85
|
# @override
|
87
86
|
#: -> void
|
88
87
|
def decorate
|
data/lib/tapioca/gem/events.rb
CHANGED
@@ -3,11 +3,9 @@
|
|
3
3
|
|
4
4
|
module Tapioca
|
5
5
|
module Gem
|
6
|
+
# @abstract
|
6
7
|
class Event
|
7
8
|
extend T::Sig
|
8
|
-
extend T::Helpers
|
9
|
-
|
10
|
-
abstract!
|
11
9
|
end
|
12
10
|
|
13
11
|
class SymbolFound < Event
|
@@ -57,12 +55,10 @@ module Tapioca
|
|
57
55
|
end
|
58
56
|
end
|
59
57
|
|
58
|
+
# @abstract
|
60
59
|
class NodeAdded < Event
|
61
|
-
extend T::Helpers
|
62
60
|
extend T::Sig
|
63
61
|
|
64
|
-
abstract!
|
65
|
-
|
66
62
|
#: String
|
67
63
|
attr_reader :symbol
|
68
64
|
|
@@ -2,12 +2,9 @@
|
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
4
|
module Tapioca
|
5
|
+
# @requires_ancestor: Thor::Shell
|
5
6
|
module CliHelper
|
6
7
|
extend T::Sig
|
7
|
-
extend T::Helpers
|
8
|
-
|
9
|
-
requires_ancestor { Thor::Shell }
|
10
|
-
|
11
8
|
#: (?String message, *(Symbol | Array[Symbol]) color) -> void
|
12
9
|
def say_error(message = "", *color)
|
13
10
|
# Thor has its own `say_error` now, but it has two problems:
|
@@ -2,12 +2,9 @@
|
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
4
|
module Tapioca
|
5
|
+
# @requires_ancestor: Thor
|
5
6
|
module EnvHelper
|
6
7
|
extend T::Sig
|
7
|
-
extend T::Helpers
|
8
|
-
|
9
|
-
requires_ancestor { Thor }
|
10
|
-
|
11
8
|
#: (Hash[Symbol, untyped] options) -> void
|
12
9
|
def set_environment(options) # rubocop:disable Naming/AccessorMethodName
|
13
10
|
ENV["RAILS_ENV"] = ENV["RACK_ENV"] = options[:environment]
|
@@ -2,13 +2,10 @@
|
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
4
|
module Tapioca
|
5
|
+
# @requires_ancestor: Thor::Shell
|
6
|
+
# @requires_ancestor: SorbetHelper
|
5
7
|
module RBIFilesHelper
|
6
8
|
extend T::Sig
|
7
|
-
extend T::Helpers
|
8
|
-
|
9
|
-
requires_ancestor { Thor::Shell }
|
10
|
-
requires_ancestor { SorbetHelper }
|
11
|
-
|
12
9
|
#: (RBI::Index index, String kind, String file) -> void
|
13
10
|
def index_rbi(index, kind, file)
|
14
11
|
return unless File.exist?(file)
|
@@ -10,16 +10,13 @@ require "tapioca/helpers/sorbet_helper"
|
|
10
10
|
module Tapioca
|
11
11
|
module Helpers
|
12
12
|
module Test
|
13
|
+
# @requires_ancestor: Kernel
|
13
14
|
module DslCompiler
|
14
15
|
extend T::Sig
|
15
|
-
extend T::Helpers
|
16
|
-
|
17
16
|
include Isolation
|
18
17
|
include Content
|
19
18
|
include Template
|
20
19
|
|
21
|
-
requires_ancestor { Kernel }
|
22
|
-
|
23
20
|
#: (singleton(Tapioca::Dsl::Compiler) compiler_class) -> void
|
24
21
|
def use_dsl_compiler(compiler_class)
|
25
22
|
@context = CompilerContext.new(compiler_class) #: CompilerContext?
|
@@ -28,12 +28,9 @@ module Tapioca
|
|
28
28
|
Marshal.load(serialized)
|
29
29
|
end
|
30
30
|
|
31
|
+
# @requires_ancestor: Kernel
|
31
32
|
module Forking
|
32
33
|
extend T::Sig
|
33
|
-
extend T::Helpers
|
34
|
-
|
35
|
-
requires_ancestor { Kernel }
|
36
|
-
|
37
34
|
#: ?{ (?) -> untyped } -> String
|
38
35
|
def run_in_isolation(&_blk)
|
39
36
|
read, write = IO.pipe
|
@@ -73,11 +70,9 @@ module Tapioca
|
|
73
70
|
end
|
74
71
|
end
|
75
72
|
|
73
|
+
# @requires_ancestor: Kernel
|
76
74
|
module Subprocess
|
77
75
|
extend T::Sig
|
78
|
-
extend T::Helpers
|
79
|
-
|
80
|
-
requires_ancestor { Kernel }
|
81
76
|
|
82
77
|
ORIG_ARGV = ARGV.dup #: Array[String]
|
83
78
|
|
@@ -4,12 +4,9 @@
|
|
4
4
|
module Tapioca
|
5
5
|
module Helpers
|
6
6
|
module Test
|
7
|
+
# @requires_ancestor: Kernel
|
7
8
|
module Template
|
8
9
|
extend T::Sig
|
9
|
-
extend T::Helpers
|
10
|
-
|
11
|
-
requires_ancestor { Kernel }
|
12
|
-
|
13
10
|
ERB_SUPPORTS_KVARGS = ::ERB.instance_method(:initialize).parameters.assoc(:key) #: [Symbol, Symbol]?
|
14
11
|
|
15
12
|
#: (String selector) -> bool
|
@@ -3,18 +3,16 @@
|
|
3
3
|
|
4
4
|
module Tapioca
|
5
5
|
module Loaders
|
6
|
+
# @abstract
|
6
7
|
class Loader
|
7
8
|
extend T::Sig
|
8
|
-
extend T::Helpers
|
9
|
-
|
10
9
|
include Thor::Base
|
11
10
|
include CliHelper
|
12
11
|
include Tapioca::GemHelper
|
13
12
|
|
14
|
-
abstract
|
15
|
-
|
16
|
-
|
17
|
-
def load; end
|
13
|
+
# @abstract
|
14
|
+
#: -> void
|
15
|
+
def load = raise NotImplementedError, "Abstract method called"
|
18
16
|
|
19
17
|
private
|
20
18
|
|
data/lib/tapioca/repo_index.rb
CHANGED
@@ -7,12 +7,9 @@ module Tapioca
|
|
7
7
|
# older than 3.2. Because the Class#attached_object method is not
|
8
8
|
# available, it implements finding the attached class of a singleton
|
9
9
|
# class by iterating through ObjectSpace.
|
10
|
+
# @requires_ancestor: Tapioca::Runtime::Reflection
|
10
11
|
module AttachedClassOf
|
11
12
|
extend T::Sig
|
12
|
-
extend T::Helpers
|
13
|
-
|
14
|
-
requires_ancestor { Tapioca::Runtime::Reflection }
|
15
|
-
|
16
13
|
#: (Class singleton_class) -> Module?
|
17
14
|
def attached_class_of(singleton_class)
|
18
15
|
# https://stackoverflow.com/a/36622320/98634
|
data/lib/tapioca/version.rb
CHANGED