Class: Steep::Diagnostic::Signature::MixinClassError
- Defined in:
- lib/steep/diagnostic/signature.rb
Instance Attribute Summary collapse
-
#member ⇒ Object
readonly
Returns the value of attribute member.
-
#type_name ⇒ Object
readonly
Returns the value of attribute type_name.
Attributes inherited from Base
Instance Method Summary collapse
- #header_line ⇒ Object
-
#initialize(location:, member:, type_name:) ⇒ MixinClassError
constructor
A new instance of MixinClassError.
Methods inherited from Base
#detail_lines, #diagnostic_code, #path
Methods included from Helper
Constructor Details
#initialize(location:, member:, type_name:) ⇒ MixinClassError
Returns a new instance of MixinClassError.
339 340 341 342 343 |
# File 'lib/steep/diagnostic/signature.rb', line 339 def initialize(location:, member:, type_name:) super(location: location) @member = member @type_name = type_name end |
Instance Attribute Details
#member ⇒ Object (readonly)
Returns the value of attribute member.
336 337 338 |
# File 'lib/steep/diagnostic/signature.rb', line 336 def member @member end |
#type_name ⇒ Object (readonly)
Returns the value of attribute type_name.
337 338 339 |
# File 'lib/steep/diagnostic/signature.rb', line 337 def type_name @type_name end |
Instance Method Details
#header_line ⇒ Object
345 346 347 348 349 350 351 352 353 |
# File 'lib/steep/diagnostic/signature.rb', line 345 def header_line member_name = case member when RBS::AST::Members::Include, RBS::AST::Members::Extend, RBS::AST::Members::Prepend member.name when RBS::AST::Ruby::Members::IncludeMember, RBS::AST::Ruby::Members::ExtendMember, RBS::AST::Ruby::Members::PrependMember member.module_name end "Cannot #{mixin_name} a class `#{member_name}` in the definition of `#{type_name}`" end |