Exception: RBS::RecursiveTypeAliasError

Inherits:
BaseError
  • Object
show all
Includes:
DetailedMessageable
Defined in:
lib/rbs/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from DetailedMessageable

#detailed_message

Constructor Details

#initialize(alias_names:, location:) ⇒ RecursiveTypeAliasError

Returns a new instance of RecursiveTypeAliasError.



488
489
490
491
492
493
# File 'lib/rbs/errors.rb', line 488

def initialize(alias_names:, location:)
  @alias_names = alias_names
  @location = location

  super "#{Location.to_string location}: Recursive type alias definition found for: #{name}"
end

Instance Attribute Details

#alias_namesObject (readonly)

Returns the value of attribute alias_names.



485
486
487
# File 'lib/rbs/errors.rb', line 485

def alias_names
  @alias_names
end

#locationObject (readonly)

Returns the value of attribute location.



486
487
488
# File 'lib/rbs/errors.rb', line 486

def location
  @location
end

Instance Method Details

#nameObject



495
496
497
# File 'lib/rbs/errors.rb', line 495

def name
  @alias_names.map(&:name).join(', ')
end