Class: Location

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(file, line) ⇒ Location

Returns a new instance of Location.



2
3
4
5
# File 'lib/envandle/location.rb', line 2

def initialize(file, line)
  @file = file
  @line = line
end

Instance Attribute Details

#fileObject (readonly)

Returns the value of attribute file.



7
8
9
# File 'lib/envandle/location.rb', line 7

def file
  @file
end

#lineObject (readonly)

Returns the value of attribute line.



7
8
9
# File 'lib/envandle/location.rb', line 7

def line
  @line
end

Instance Method Details

#to_sObject



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

def to_s
  "#{@file}:#{@line}"
end