Exception: RBS::DuplicatedDeclarationError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/rbs/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#declsObject (readonly)

Returns the value of attribute decls.



328
329
330
# File 'lib/rbs/errors.rb', line 328

def decls
  @decls
end

#nameObject (readonly)

Returns the value of attribute name.



327
328
329
# File 'lib/rbs/errors.rb', line 327

def name
  @name
end