Exception: SyntaxError
- Inherits:
-
Exception
- Object
- Exception
- SyntaxError
- Defined in:
- lib/sus/file.rb
Overview
Extension to SyntaxError to extract line numbers from error messages.
Instance Method Summary collapse
-
#lineno ⇒ Object
Extract the line number from the error message.
Instance Method Details
#lineno ⇒ Object
Extract the line number from the error message.
18 19 20 21 22 |
# File 'lib/sus/file.rb', line 18 def lineno if =~ /:(\d+):/ $1.to_i end end |