Class: Steep::Diagnostic::Ruby::MultipleAssignmentConversionError

Inherits:
Base
  • Object
show all
Defined in:
lib/steep/diagnostic/ruby.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#location, #node

Instance Method Summary collapse

Methods inherited from Base

#detail_lines, #diagnostic_code

Methods included from Helper

#error_name, #full_message

Constructor Details

#initialize(node:, original_type:, returned_type:) ⇒ MultipleAssignmentConversionError

Returns a new instance of MultipleAssignmentConversionError.



746
747
748
749
750
751
752
# File 'lib/steep/diagnostic/ruby.rb', line 746

def initialize(node:, original_type:, returned_type:)
  super(node: node)

  @node = node
  @original_type = original_type
  @returned_type = returned_type
end

Instance Attribute Details

#original_typeObject (readonly)

Returns the value of attribute original_type.



744
745
746
# File 'lib/steep/diagnostic/ruby.rb', line 744

def original_type
  @original_type
end

#returned_typeObject (readonly)

Returns the value of attribute returned_type.



744
745
746
# File 'lib/steep/diagnostic/ruby.rb', line 744

def returned_type
  @returned_type
end

Instance Method Details

#header_lineObject



754
755
756
# File 'lib/steep/diagnostic/ruby.rb', line 754

def header_line
  "Cannot convert `#{original_type}` to Array or tuple (`#to_ary` returns `#{returned_type}`)"
end