Exception: RBS::DuplicatedDeclarationError
- Inherits:
-
StandardError
- Object
- StandardError
- RBS::DuplicatedDeclarationError
- Defined in:
- lib/rbs/errors.rb
Instance Attribute Summary collapse
-
#decls ⇒ Object
readonly
Returns the value of attribute decls.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, *decls) ⇒ DuplicatedDeclarationError
constructor
A new instance of DuplicatedDeclarationError.
Constructor Details
#initialize(name, *decls) ⇒ DuplicatedDeclarationError
Returns a new instance of DuplicatedDeclarationError.
330 331 332 333 334 335 |
# File 'lib/rbs/errors.rb', line 330 def initialize(name, *decls) @name = name @decls = decls super "#{Location.to_string decls.last.location}: Duplicated declaration: #{name}" end |
Instance Attribute Details
#decls ⇒ Object (readonly)
Returns the value of attribute decls.
328 329 330 |
# File 'lib/rbs/errors.rb', line 328 def decls @decls end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
327 328 329 |
# File 'lib/rbs/errors.rb', line 327 def name @name end |