Class: RBS::Environment::ClassEntry

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

Constant Summary

Constants inherited from MultiEntry

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



100
101
102
103
104
105
# File 'lib/rbs/environment.rb', line 100

def primary
  @primary ||= begin
                 validate_type_params
                 decls.find {|d| d.decl.super_class } || decls.first or raise("decls cannot be empty")
               end
end