Exception: RBS::DuplicatedDeclarationError
- Inherits:
-
LoadingError
- Object
- StandardError
- BaseError
- LoadingError
- 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.
398 399 400 401 402 403 404 |
# File 'lib/rbs/errors.rb', line 398 def initialize(name, *decls) @name = name @decls = decls last_decl = decls.last or raise super "#{Location.to_string last_decl.location}: Duplicated declaration: #{name}" end |
Instance Attribute Details
#decls ⇒ Object (readonly)
Returns the value of attribute decls.
396 397 398 |
# File 'lib/rbs/errors.rb', line 396 def decls @decls end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
395 396 397 |
# File 'lib/rbs/errors.rb', line 395 def name @name end |