Class: RBS::Environment::UseMap::Table
Relationships & Source Files | |
Inherits: | Object |
Defined in: | lib/rbs/environment/use_map.rb |
Class Method Summary
- .new ⇒ Table constructor
Instance Attribute Summary
- #children readonly
- #known_types readonly
Instance Method Summary
Constructor Details
.new ⇒ Table
# File 'lib/rbs/environment/use_map.rb', line 9
def initialize @known_types = Set[] @children = {} end
Instance Attribute Details
#children (readonly)
[ GitHub ]# File 'lib/rbs/environment/use_map.rb', line 7
attr_reader :known_types, :children
#known_types (readonly)
[ GitHub ]# File 'lib/rbs/environment/use_map.rb', line 7
attr_reader :known_types, :children
Instance Method Details
#compute_children
[ GitHub ]# File 'lib/rbs/environment/use_map.rb', line 14
def compute_children children.clear known_types.each do |type| unless type.namespace.empty? children[type.namespace] ||= Set[] children[type.namespace] << type end end self end