Class: RBS::Environment::ModuleEntry

Inherits:
MultiEntry show all
Defined in:
lib/rbs/environment.rb

Constant Summary

Constants inherited from MultiEntry

RBS::Environment::MultiEntry::D

Instance Attribute Summary

Attributes inherited from MultiEntry

#decls, #name

Instance Method Summary collapse

Methods inherited from MultiEntry

#compatible_params?, #initialize, #insert, #type_params, #validate_type_params

Constructor Details

This class inherits a constructor from RBS::Environment::MultiEntry

Instance Method Details

#primaryObject



92
93
94
95
96
97
# File 'lib/rbs/environment.rb', line 92

def primary
  @primary ||= begin
                 validate_type_params
                 decls.first or raise("decls cannot be empty")
               end
end

#self_typesObject



86
87
88
89
90
# File 'lib/rbs/environment.rb', line 86

def self_types
  decls.flat_map do |d|
    d.decl.self_types
  end.uniq
end