Class: Steep::Diagnostic::Ruby::ProcTypeExpected

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:, type:) ⇒ ProcTypeExpected

Returns a new instance of ProcTypeExpected.



733
734
735
736
# File 'lib/steep/diagnostic/ruby.rb', line 733

def initialize(node:, type:)
  super(node: node)
  @type = type
end

Instance Attribute Details

#typeObject (readonly)

Returns the value of attribute type.



731
732
733
# File 'lib/steep/diagnostic/ruby.rb', line 731

def type
  @type
end

Instance Method Details

#header_lineObject



738
739
740
# File 'lib/steep/diagnostic/ruby.rb', line 738

def header_line
  "Proc type is expected but `#{type.to_s}` is specified"
end