Class: Homebrew::SourceLocation 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 location in source code.
Instance Attribute Summary collapse
-
#column ⇒ Integer?
readonly
private
-
#line ⇒ Integer
readonly
private
Instance Method Summary collapse
-
#initialize(line, column = T.unsafe(nil)) ⇒ void
constructor
private
-
#to_s ⇒ String
private
Constructor Details
#initialize(line, column = T.unsafe(nil)) ⇒ 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.
16 17 18 19 |
# File 'source_location.rb', line 16 def initialize(line, column = T.unsafe(nil)) @line = line @column = column end |
Instance Attribute Details
#column ⇒ Integer? (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.
13 14 15 |
# File 'source_location.rb', line 13 def column @column end |
#line ⇒ Integer (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.
10 11 12 |
# File 'source_location.rb', line 10 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.
22 23 24 |
# File 'source_location.rb', line 22 def to_s "#{line}#{column&.to_s&.prepend(":")}" end |