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.
149 150 151 152 153 154 |
# File 'lib/rbs/errors.rb', line 149 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.
147 148 149 |
# File 'lib/rbs/errors.rb', line 147 def decls @decls end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
146 147 148 |
# File 'lib/rbs/errors.rb', line 146 def name @name end |