Class: ReVIEW::Location
Instance Attribute Summary collapse
-
#filename ⇒ Object
readonly
Returns the value of attribute filename.
Instance Method Summary collapse
-
#initialize(filename, f) ⇒ Location
constructor
A new instance of Location.
- #lineno ⇒ Object
- #string ⇒ Object (also: #to_s)
Constructor Details
#initialize(filename, f) ⇒ Location
Returns a new instance of Location.
11 12 13 14 |
# File 'lib/review/location.rb', line 11 def initialize(filename, f) @filename = filename @f = f end |
Instance Attribute Details
#filename ⇒ Object (readonly)
Returns the value of attribute filename.
16 17 18 |
# File 'lib/review/location.rb', line 16 def filename @filename end |
Instance Method Details
#lineno ⇒ Object
18 19 20 |
# File 'lib/review/location.rb', line 18 def lineno @f.lineno end |
#string ⇒ Object Also known as: to_s
22 23 24 25 26 27 28 |
# File 'lib/review/location.rb', line 22 def string begin "#{@filename}:#{@f.lineno}" rescue StandardError "#{@filename}:nil" end end |