Class: Homebrew::Style::LineLocation Private

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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.



294
295
296
297
# File 'style.rb', line 294

def initialize(json)
  @line = json["line"]
  @column = json["column"]
end

Instance Attribute Details

#columnObject (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.



292
293
294
# File 'style.rb', line 292

def column
  @column
end

#lineObject (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.



292
293
294
# File 'style.rb', line 292

def line
  @line
end

Instance Method Details

#to_sString

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:



300
301
302
# File 'style.rb', line 300

def to_s
  "#{line}: col #{column}"
end