Class: Steep::Diagnostic::Ruby::UnexpectedTypeArgument

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(type_arg:, method_type:, location:) ⇒ UnexpectedTypeArgument

Returns a new instance of UnexpectedTypeArgument.



854
855
856
857
858
# File 'lib/steep/diagnostic/ruby.rb', line 854

def initialize(type_arg:, method_type:, location:)
  super(node: nil, location: location)
  @type_arg = type_arg
  @method_type = method_type
end

Instance Attribute Details

#method_typeObject (readonly)

Returns the value of attribute method_type.



852
853
854
# File 'lib/steep/diagnostic/ruby.rb', line 852

def method_type
  @method_type
end

#type_argObject (readonly)

Returns the value of attribute type_arg.



852
853
854
# File 'lib/steep/diagnostic/ruby.rb', line 852

def type_arg
  @type_arg
end

Instance Method Details

#header_lineObject



860
861
862
# File 'lib/steep/diagnostic/ruby.rb', line 860

def header_line
  "Unexpected type arg is given to method type `#{method_type.to_s}`"
end