Exception: RBS::DuplicatedInterfaceMethodDefinitionError
- Inherits:
-
StandardError
- Object
- StandardError
- RBS::DuplicatedInterfaceMethodDefinitionError
- Defined in:
- lib/rbs/errors.rb
Instance Attribute Summary collapse
-
#member ⇒ Object
readonly
Returns the value of attribute member.
-
#method_name ⇒ Object
readonly
Returns the value of attribute method_name.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(type:, method_name:, member:) ⇒ DuplicatedInterfaceMethodDefinitionError
constructor
A new instance of DuplicatedInterfaceMethodDefinitionError.
- #qualified_method_name ⇒ Object
Constructor Details
#initialize(type:, method_name:, member:) ⇒ DuplicatedInterfaceMethodDefinitionError
Returns a new instance of DuplicatedInterfaceMethodDefinitionError.
217 218 219 220 221 222 223 |
# File 'lib/rbs/errors.rb', line 217 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 ⇒ Object (readonly)
Returns the value of attribute member.
215 216 217 |
# File 'lib/rbs/errors.rb', line 215 def member @member end |
#method_name ⇒ Object (readonly)
Returns the value of attribute method_name.
214 215 216 |
# File 'lib/rbs/errors.rb', line 214 def method_name @method_name end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
213 214 215 |
# File 'lib/rbs/errors.rb', line 213 def type @type end |
Instance Method Details
#qualified_method_name ⇒ Object
225 226 227 228 229 230 231 232 |
# File 'lib/rbs/errors.rb', line 225 def qualified_method_name case type when Types::ClassSingleton "#{type.name}.#{method_name}" else "#{type.name}##{method_name}" end end |