Class: Steep::Diagnostic::Signature::InstanceVariableTypeError
- Defined in:
- lib/steep/diagnostic/signature.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#parent_type ⇒ Object
readonly
Returns the value of attribute parent_type.
-
#var_type ⇒ Object
readonly
Returns the value of attribute var_type.
Attributes inherited from Base
Instance Method Summary collapse
- #header_line ⇒ Object
-
#initialize(name:, location:, var_type:, parent_type:) ⇒ InstanceVariableTypeError
constructor
A new instance of InstanceVariableTypeError.
Methods inherited from Base
#detail_lines, #diagnostic_code, #path
Methods included from Helper
Constructor Details
#initialize(name:, location:, var_type:, parent_type:) ⇒ InstanceVariableTypeError
Returns a new instance of InstanceVariableTypeError.
322 323 324 325 326 327 328 |
# File 'lib/steep/diagnostic/signature.rb', line 322 def initialize(name:, location:, var_type:, parent_type:) super(location: location) @name = name @var_type = var_type @parent_type = parent_type end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
318 319 320 |
# File 'lib/steep/diagnostic/signature.rb', line 318 def name @name end |
#parent_type ⇒ Object (readonly)
Returns the value of attribute parent_type.
320 321 322 |
# File 'lib/steep/diagnostic/signature.rb', line 320 def parent_type @parent_type end |
#var_type ⇒ Object (readonly)
Returns the value of attribute var_type.
319 320 321 |
# File 'lib/steep/diagnostic/signature.rb', line 319 def var_type @var_type end |
Instance Method Details
#header_line ⇒ Object
330 331 332 |
# File 'lib/steep/diagnostic/signature.rb', line 330 def header_line "Instance variable cannot have different type with parents: #{var_type} <=> #{parent_type}" end |