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.
304 305 306 307 308 309 310 |
# File 'lib/steep/diagnostic/signature.rb', line 304 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.
300 301 302 |
# File 'lib/steep/diagnostic/signature.rb', line 300 def class_name @class_name end |
#other_class_name ⇒ Object (readonly)
Returns the value of attribute other_class_name.
301 302 303 |
# File 'lib/steep/diagnostic/signature.rb', line 301 def other_class_name @other_class_name end |
#variable_name ⇒ Object (readonly)
Returns the value of attribute variable_name.
302 303 304 |
# File 'lib/steep/diagnostic/signature.rb', line 302 def variable_name @variable_name end |
Instance Method Details
#header_line ⇒ Object
312 313 314 |
# File 'lib/steep/diagnostic/signature.rb', line 312 def header_line "Class variable definition `#{variable_name}` in `#{class_name}` may be overtaken by `#{other_class_name}`" end |