Class: Steep::Diagnostic::Ruby::UnexpectedSuper
- Defined in:
- lib/steep/diagnostic/ruby.rb
Instance Attribute Summary collapse
-
#method ⇒ Object
readonly
Returns the value of attribute method.
Attributes inherited from Base
Instance Method Summary collapse
- #header_line ⇒ Object
-
#initialize(node:, method:) ⇒ UnexpectedSuper
constructor
A new instance of UnexpectedSuper.
Methods inherited from Base
#detail_lines, #diagnostic_code
Methods included from Helper
Constructor Details
#initialize(node:, method:) ⇒ UnexpectedSuper
Returns a new instance of UnexpectedSuper.
553 554 555 556 |
# File 'lib/steep/diagnostic/ruby.rb', line 553 def initialize(node:, method:) super(node: node) @method = method end |
Instance Attribute Details
#method ⇒ Object (readonly)
Returns the value of attribute method.
551 552 553 |
# File 'lib/steep/diagnostic/ruby.rb', line 551 def method @method end |
Instance Method Details
#header_line ⇒ Object
558 559 560 561 562 563 564 |
# File 'lib/steep/diagnostic/ruby.rb', line 558 def header_line if method "No superclass method `#{method}` defined" else "`super` is not allowed from outside of method" end end |