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.



339
340
341
342
# File 'style.rb', line 339

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.



337
338
339
# File 'style.rb', line 337

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.



337
338
339
# File 'style.rb', line 337

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:



345
346
347
# File 'style.rb', line 345

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