Class: Location
- Inherits:
-
Object
- Object
- Location
- Defined in:
- lib/envandle/location.rb
Instance Attribute Summary collapse
-
#file ⇒ Object
readonly
Returns the value of attribute file.
-
#line ⇒ Object
readonly
Returns the value of attribute line.
Instance Method Summary collapse
-
#initialize(file, line) ⇒ Location
constructor
A new instance of Location.
- #to_s ⇒ Object
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
#file ⇒ Object (readonly)
Returns the value of attribute file.
7 8 9 |
# File 'lib/envandle/location.rb', line 7 def file @file end |
#line ⇒ Object (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_s ⇒ Object
9 10 11 |
# File 'lib/envandle/location.rb', line 9 def to_s "#{@file}:#{@line}" end |