Class: Steep::Diagnostic::Signature::ModuleSelfTypeError
- Includes:
- ResultPrinter2
- Defined in:
- lib/steep/diagnostic/signature.rb
Instance Attribute Summary collapse
-
#ancestor ⇒ Object
readonly
Returns the value of attribute ancestor.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#result ⇒ Object
readonly
Returns the value of attribute result.
Attributes inherited from Base
Instance Method Summary collapse
- #header_line ⇒ Object
-
#initialize(name:, ancestor:, result:, location:) ⇒ ModuleSelfTypeError
constructor
A new instance of ModuleSelfTypeError.
- #relation ⇒ Object
Methods included from ResultPrinter2
Methods inherited from Base
#detail_lines, #diagnostic_code, #path
Methods included from Helper
Constructor Details
#initialize(name:, ancestor:, result:, location:) ⇒ ModuleSelfTypeError
Returns a new instance of ModuleSelfTypeError.
259 260 261 262 263 264 265 |
# File 'lib/steep/diagnostic/signature.rb', line 259 def initialize(name:, ancestor:, result:, location:) super(location: location) @name = name @ancestor = ancestor @result = result end |
Instance Attribute Details
#ancestor ⇒ Object (readonly)
Returns the value of attribute ancestor.
254 255 256 |
# File 'lib/steep/diagnostic/signature.rb', line 254 def ancestor @ancestor end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
253 254 255 |
# File 'lib/steep/diagnostic/signature.rb', line 253 def name @name end |
#result ⇒ Object (readonly)
Returns the value of attribute result.
255 256 257 |
# File 'lib/steep/diagnostic/signature.rb', line 255 def result @result end |
Instance Method Details
#header_line ⇒ Object
271 272 273 |
# File 'lib/steep/diagnostic/signature.rb', line 271 def header_line "Module self type constraint in type `#{name}` doesn't satisfy: `#{relation}`" end |
#relation ⇒ Object
267 268 269 |
# File 'lib/steep/diagnostic/signature.rb', line 267 def relation result.relation end |