Class: Homebrew::Style::Offense Private
Overview
This class is part of a private API. This class may only be used in the Homebrew/brew repository. Third parties should avoid using this class if possible, as it may be removed or changed without warning.
A style offense.
Instance Attribute Summary collapse
- #cop_name ⇒ String? readonly private
- #corrected ⇒ Boolean readonly private
- #location ⇒ SourceLocation readonly private
- #message ⇒ String readonly private
- #severity ⇒ String? readonly private
Instance Method Summary collapse
- #corrected? ⇒ Boolean private
- #initialize(json) ⇒ void constructor private
Constructor Details
#initialize(json) ⇒ void
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
476 477 478 479 480 481 482 483 |
# File 'style.rb', line 476 def initialize(json) @severity = T.let(json["severity"], T.nilable(String)) @message = T.let(json.fetch("message"), String) @cop_name = T.let(json["cop_name"], T.nilable(String)) @corrected = T.let(json["corrected"], T::Boolean) location = json.fetch("location") @location = T.let(SourceLocation.new(location.fetch("line"), location["column"]), SourceLocation) end |
Instance Attribute Details
#cop_name ⇒ String? (readonly)
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
467 468 469 |
# File 'style.rb', line 467 def cop_name @cop_name end |
#corrected ⇒ Boolean (readonly)
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
470 471 472 |
# File 'style.rb', line 470 def corrected @corrected end |
#location ⇒ SourceLocation (readonly)
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
473 474 475 |
# File 'style.rb', line 473 def location @location end |
#message ⇒ String (readonly)
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
464 465 466 |
# File 'style.rb', line 464 def @message end |
#severity ⇒ String? (readonly)
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
467 468 469 |
# File 'style.rb', line 467 def severity @severity end |
Instance Method Details
#corrected? ⇒ Boolean
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
486 487 488 |
# File 'style.rb', line 486 def corrected? @corrected end |