384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
|
# File 'lib/rbs/definition.rb', line 384
def each_type(&block)
if block
methods.each_value do |method|
if method.defined_in == type_name
method.method_types.each do |method_type|
method_type.each_type(&block)
end
end
end
instance_variables.each_value do |var|
if var.declared_in == type_name
yield var.type
end
end
class_variables.each_value do |var|
if var.declared_in == type_name
yield var.type
end
end
else
enum_for :each_type
end
end
|