Class: Homebrew::Style::LineLocation Private

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



273
274
275
276
# File 'brew/Library/Homebrew/style.rb', line 273

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.



271
272
273
# File 'brew/Library/Homebrew/style.rb', line 271

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.



271
272
273
# File 'brew/Library/Homebrew/style.rb', line 271

def line
  @line
end

Instance Method Details

#to_sObject

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.



278
279
280
# File 'brew/Library/Homebrew/style.rb', line 278

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