Class: Homebrew::Style::LineLocation Private
- Inherits:
-
Object
- Object
- Homebrew::Style::LineLocation
- Extended by:
- T::Sig
- Defined in:
- style.rb
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.
Source location of a style offense.
Instance Attribute Summary collapse
-
#column ⇒ Object
readonly
private
-
#line ⇒ Object
readonly
private
Instance Method Summary collapse
-
#initialize(json) ⇒ LineLocation
constructor
private
A new instance of LineLocation.
-
#to_s ⇒ String
private
Constructor Details
#initialize(json) ⇒ LineLocation
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.
Returns a new instance of LineLocation.
333 334 335 336 |
# File 'style.rb', line 333 def initialize(json) @line = json["line"] @column = json["column"] end |
Instance Attribute Details
#column ⇒ Object (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.
331 332 333 |
# File 'style.rb', line 331 def column @column end |
#line ⇒ Object (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.
331 332 333 |
# File 'style.rb', line 331 def line @line end |
Instance Method Details
#to_s ⇒ String
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.
339 340 341 |
# File 'style.rb', line 339 def to_s "#{line}: col #{column}" end |