Class: Steep::Diagnostic::Signature::ClassVariableDuplicationError
- Defined in:
- lib/steep/diagnostic/signature.rb
Instance Attribute Summary collapse
-
#class_name ⇒ Object
readonly
Returns the value of attribute class_name.
-
#other_class_name ⇒ Object
readonly
Returns the value of attribute other_class_name.
-
#variable_name ⇒ Object
readonly
Returns the value of attribute variable_name.
Attributes inherited from Base
Instance Method Summary collapse
- #header_line ⇒ Object
-
#initialize(class_name:, other_class_name:, variable_name:, location:) ⇒ ClassVariableDuplicationError
constructor
A new instance of ClassVariableDuplicationError.
Methods inherited from Base
#detail_lines, #diagnostic_code, #path
Methods included from Helper
Constructor Details
#initialize(class_name:, other_class_name:, variable_name:, location:) ⇒ ClassVariableDuplicationError
Returns a new instance of ClassVariableDuplicationError.
281 282 283 284 285 286 287 |
# File 'lib/steep/diagnostic/signature.rb', line 281 def initialize(class_name:, other_class_name:, variable_name:, location:) super(location: location) @class_name = class_name @other_class_name = other_class_name @variable_name = variable_name end |
Instance Attribute Details
#class_name ⇒ Object (readonly)
Returns the value of attribute class_name.
277 278 279 |
# File 'lib/steep/diagnostic/signature.rb', line 277 def class_name @class_name end |
#other_class_name ⇒ Object (readonly)
Returns the value of attribute other_class_name.
278 279 280 |
# File 'lib/steep/diagnostic/signature.rb', line 278 def other_class_name @other_class_name end |
#variable_name ⇒ Object (readonly)
Returns the value of attribute variable_name.
279 280 281 |
# File 'lib/steep/diagnostic/signature.rb', line 279 def variable_name @variable_name end |
Instance Method Details
#header_line ⇒ Object
289 290 291 |
# File 'lib/steep/diagnostic/signature.rb', line 289 def header_line "Class variable definition `#{variable_name}` in `#{class_name}` may be overtaken by `#{other_class_name}`" end |