Class: RBS::Environment::ModuleEntry

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

Instance Attribute Summary

Attributes inherited from MultiEntry

#decls, #name

Instance Method Summary collapse

Methods inherited from MultiEntry

#initialize, #insert, #type_params, #validate_type_params

Constructor Details

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

Instance Method Details

#primaryObject



68
69
70
71
72
73
# File 'lib/rbs/environment.rb', line 68

def primary
  @primary ||= begin
                 validate_type_params
                 decls.first
               end
end

#self_typesObject



62
63
64
65
66
# File 'lib/rbs/environment.rb', line 62

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