Exception: RBS::InvalidOverloadMethodError
- Inherits:
-
DefinitionError
- Object
- StandardError
- BaseError
- DefinitionError
- RBS::InvalidOverloadMethodError
- Includes:
- DetailedMessageable
- Defined in:
- lib/rbs/errors.rb
Instance Attribute Summary collapse
-
#kind ⇒ Object
readonly
Returns the value of attribute kind.
-
#members ⇒ Object
readonly
Returns the value of attribute members.
-
#method_name ⇒ Object
readonly
Returns the value of attribute method_name.
-
#type_name ⇒ Object
readonly
Returns the value of attribute type_name.
Instance Method Summary collapse
-
#initialize(type_name:, method_name:, kind:, members:) ⇒ InvalidOverloadMethodError
constructor
A new instance of InvalidOverloadMethodError.
- #location ⇒ Object
Methods included from DetailedMessageable
Constructor Details
#initialize(type_name:, method_name:, kind:, members:) ⇒ InvalidOverloadMethodError
Returns a new instance of InvalidOverloadMethodError.
354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 |
# File 'lib/rbs/errors.rb', line 354 def initialize(type_name:, method_name:, kind:, members:) @type_name = type_name @method_name = method_name @kind = kind @members = members delimiter = case kind when :instance "#" when :singleton "." end super "#{Location.to_string members[0].location}: Invalid method overloading: #{type_name}#{delimiter}#{method_name}" end |
Instance Attribute Details
#kind ⇒ Object (readonly)
Returns the value of attribute kind.
351 352 353 |
# File 'lib/rbs/errors.rb', line 351 def kind @kind end |
#members ⇒ Object (readonly)
Returns the value of attribute members.
352 353 354 |
# File 'lib/rbs/errors.rb', line 352 def members @members end |
#method_name ⇒ Object (readonly)
Returns the value of attribute method_name.
350 351 352 |
# File 'lib/rbs/errors.rb', line 350 def method_name @method_name end |
#type_name ⇒ Object (readonly)
Returns the value of attribute type_name.
349 350 351 |
# File 'lib/rbs/errors.rb', line 349 def type_name @type_name end |
Instance Method Details
#location ⇒ Object
370 371 372 |
# File 'lib/rbs/errors.rb', line 370 def location members[0].location end |