File tree Expand file tree Collapse file tree 1 file changed +1
-11
lines changed Expand file tree Collapse file tree 1 file changed +1
-11
lines changed Original file line number Diff line number Diff line change @@ -11,15 +11,6 @@ module ClassInterface # rubocop:disable Metrics/ModuleLength
11
11
include Types ::Type
12
12
include Types ::Builder
13
13
14
- # @param [Class] klass
15
- def inherited ( klass )
16
- super
17
-
18
- unless klass . name . eql? ( "Dry::Struct::Value" )
19
- klass . extend ( Core ::DescendantsTracker )
20
- end
21
- end
22
-
23
14
# Adds an attribute for this {Struct} with given `name` and `type`
24
15
# and modifies {.schema} accordingly.
25
16
#
@@ -189,8 +180,7 @@ def attributes(new_schema)
189
180
190
181
@attribute_names = nil
191
182
192
- direct_descendants = descendants . select { |d | d . superclass == self }
193
- direct_descendants . each do |d |
183
+ subclasses . each do |d |
194
184
inherited_attrs = new_schema . reject { |k , _ | d . has_attribute? ( k . to_s . chomp ( "?" ) . to_sym ) }
195
185
d . attributes ( inherited_attrs )
196
186
end
You can’t perform that action at this time.
0 commit comments