class RBS::DuplicatedInterfaceMethodDefinitionError

Attributes

member[R]
method_name[R]
type[R]

Public Class Methods

new(type:, method_name:, member:) click to toggle source
Calls superclass method
# File rbs-3.2.1/lib/rbs/errors.rb, line 291
def initialize(type:, method_name:, member:)
  @type = type
  @method_name = method_name
  @member = member

  super "#{member.location}: Duplicated method definition: #{qualified_method_name}"
end

Public Instance Methods

location() click to toggle source
# File rbs-3.2.1/lib/rbs/errors.rb, line 299
def location
  member.location
end
qualified_method_name() click to toggle source
# File rbs-3.2.1/lib/rbs/errors.rb, line 303
def qualified_method_name
  case type
  when Types::ClassSingleton
    "#{type.name}.#{method_name}"
  else
    "#{type.name}##{method_name}"
  end
end
type_name() click to toggle source
# File rbs-3.2.1/lib/rbs/errors.rb, line 312
def type_name
  type.name
end