Class: Homebrew::Style::LineLocation Private

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Defined in:
brew/Library/Homebrew/style.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

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. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of LineLocation.



289
290
291
292
# File 'brew/Library/Homebrew/style.rb', line 289

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

Instance Attribute Details

#columnObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



287
288
289
# File 'brew/Library/Homebrew/style.rb', line 287

def column
  @column
end

#lineObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



287
288
289
# File 'brew/Library/Homebrew/style.rb', line 287

def line
  @line
end

Instance Method Details

#to_sString

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:



295
296
297
# File 'brew/Library/Homebrew/style.rb', line 295

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