Exception: RBS::VariableDuplicationError
- Inherits:
-
DefinitionError
- Object
- StandardError
- BaseError
- DefinitionError
- RBS::VariableDuplicationError
- Includes:
- DetailedMessageable
- Defined in:
- lib/rbs/errors.rb
Direct Known Subclasses
ClassInstanceVariableDuplicationError, InstanceVariableDuplicationError
Instance Attribute Summary collapse
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#type_name ⇒ Object
readonly
Returns the value of attribute type_name.
-
#variable_name ⇒ Object
readonly
Returns the value of attribute variable_name.
Instance Method Summary collapse
-
#initialize(type_name:, variable_name:, location:) ⇒ VariableDuplicationError
constructor
A new instance of VariableDuplicationError.
Methods included from DetailedMessageable
Constructor Details
#initialize(type_name:, variable_name:, location:) ⇒ VariableDuplicationError
Returns a new instance of VariableDuplicationError.
332 333 334 335 336 337 338 |
# File 'lib/rbs/errors.rb', line 332 def initialize(type_name:, variable_name:, location:) @type_name = type_name @variable_name = variable_name @location = location super "#{Location.to_string location}: Duplicated #{kind} variable name `#{variable_name}` in `#{type_name}`" end |
Instance Attribute Details
#location ⇒ Object (readonly)
Returns the value of attribute location.
330 331 332 |
# File 'lib/rbs/errors.rb', line 330 def location @location end |
#type_name ⇒ Object (readonly)
Returns the value of attribute type_name.
328 329 330 |
# File 'lib/rbs/errors.rb', line 328 def type_name @type_name end |
#variable_name ⇒ Object (readonly)
Returns the value of attribute variable_name.
329 330 331 |
# File 'lib/rbs/errors.rb', line 329 def variable_name @variable_name end |