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.



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

#declsObject (readonly)

Returns the value of attribute decls.



147
148
149
# File 'lib/rbs/errors.rb', line 147

def decls
  @decls
end

#nameObject (readonly)

Returns the value of attribute name.



146
147
148
# File 'lib/rbs/errors.rb', line 146

def name
  @name
end