Exception: RBS::DuplicatedInterfaceMethodDefinitionError
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
DefinitionError ,
BaseError ,
StandardError
|
|
Instance Chain:
|
|
Inherits: |
RBS::DefinitionError
|
Defined in: | lib/rbs/errors.rb |
Class Method Summary
Instance Attribute Summary
- #member readonly
- #method_name readonly
- #type readonly
Instance Method Summary
Constructor Details
.new(type:, method_name:, member:) ⇒ DuplicatedInterfaceMethodDefinitionError
# File 'lib/rbs/errors.rb', line 299
def initialize(type:, method_name:, member:) @type = type @method_name = method_name @member = member super "#{member.location}: Duplicated method definition: #{qualified_method_name}" end
Instance Attribute Details
#member (readonly)
[ GitHub ]# File 'lib/rbs/errors.rb', line 297
attr_reader :member
#method_name (readonly)
[ GitHub ]# File 'lib/rbs/errors.rb', line 296
attr_reader :method_name
#type (readonly)
[ GitHub ]# File 'lib/rbs/errors.rb', line 295
attr_reader :type
Instance Method Details
#location
[ GitHub ]# File 'lib/rbs/errors.rb', line 307
def location member.location end
#qualified_method_name
[ GitHub ]# File 'lib/rbs/errors.rb', line 311
def qualified_method_name case type when Types::ClassSingleton "#{type.name}.#{method_name}" else "#{type.name}##{method_name}" end end
#type_name
[ GitHub ]# File 'lib/rbs/errors.rb', line 320
def type_name type.name end