Class: UberTask::Location

Inherits:
Object
  • Object
show all
Defined in:
lib/uber_task/location.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path:, line:) ⇒ Location

Returns a new instance of Location.



8
9
10
11
# File 'lib/uber_task/location.rb', line 8

def initialize(path:, line:)
  @path = Internal::Path.shorten(path)
  @line = line
end

Instance Attribute Details

#lineObject

Returns the value of attribute line.



5
6
7
# File 'lib/uber_task/location.rb', line 5

def line
  @line
end

#pathObject

Returns the value of attribute path.



5
6
7
# File 'lib/uber_task/location.rb', line 5

def path
  @path
end

Instance Method Details

#to_sObject



13
14
15
# File 'lib/uber_task/location.rb', line 13

def to_s
  "#{path}:#{line}"
end