Exception: RBS::MethodDefinitionConflictWithInterfaceMixinError

Inherits:
StandardError
  • Object
show all
Includes:
MethodNameHelper
Defined in:
lib/rbs/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from MethodNameHelper

#method_name_string

Constructor Details

#initialize(type_name:, method_name:, kind:, mixin_member:, entries:) ⇒ MethodDefinitionConflictWithInterfaceMixinError

Returns a new instance of MethodDefinitionConflictWithInterfaceMixinError.



227
228
229
230
231
232
233
234
235
# File 'lib/rbs/errors.rb', line 227

def initialize(type_name:, method_name:, kind:, mixin_member:, entries:)
  @type_name = type_name
  @method_name = method_name
  @kind = kind
  @mixin_member = mixin_member
  @entries = entries

  super "#{entries[0].decl.location}: Duplicated method with interface mixin: #{method_name_string}"
end

Instance Attribute Details

#entriesObject (readonly)

Returns the value of attribute entries.



225
226
227
# File 'lib/rbs/errors.rb', line 225

def entries
  @entries
end

#kindObject (readonly)

Returns the value of attribute kind.



223
224
225
# File 'lib/rbs/errors.rb', line 223

def kind
  @kind
end

#method_nameObject (readonly)

Returns the value of attribute method_name.



222
223
224
# File 'lib/rbs/errors.rb', line 222

def method_name
  @method_name
end

#mixin_memberObject (readonly)

Returns the value of attribute mixin_member.



224
225
226
# File 'lib/rbs/errors.rb', line 224

def mixin_member
  @mixin_member
end

#type_nameObject (readonly)

Returns the value of attribute type_name.



221
222
223
# File 'lib/rbs/errors.rb', line 221

def type_name
  @type_name
end