Exception: RBS::InvalidOverloadMethodError
- Inherits:
-
DefinitionError
- Object
- StandardError
- ErrorBase
- DefinitionError
- RBS::InvalidOverloadMethodError
- 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.
Constructor Details
#initialize(type_name:, method_name:, kind:, members:) ⇒ InvalidOverloadMethodError
Returns a new instance of InvalidOverloadMethodError.
308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 |
# File 'lib/rbs/errors.rb', line 308 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.
305 306 307 |
# File 'lib/rbs/errors.rb', line 305 def kind @kind end |
#members ⇒ Object (readonly)
Returns the value of attribute members.
306 307 308 |
# File 'lib/rbs/errors.rb', line 306 def members @members end |
#method_name ⇒ Object (readonly)
Returns the value of attribute method_name.
304 305 306 |
# File 'lib/rbs/errors.rb', line 304 def method_name @method_name end |
#type_name ⇒ Object (readonly)
Returns the value of attribute type_name.
303 304 305 |
# File 'lib/rbs/errors.rb', line 303 def type_name @type_name end |