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.



480
481
482
483
484
485
# File 'lib/rbs/errors.rb', line 480

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.



477
478
479
# File 'lib/rbs/errors.rb', line 477

def alias_names
  @alias_names
end

#locationObject (readonly)

Returns the value of attribute location.



478
479
480
# File 'lib/rbs/errors.rb', line 478

def location
  @location
end

Instance Method Details

#nameObject



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

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