Exception: Glossarist::ParseError
- Defined in:
- lib/glossarist/error/parse_error.rb
Instance Attribute Summary collapse
-
#filename ⇒ Object
Returns the value of attribute filename.
-
#line ⇒ Object
Returns the value of attribute line.
Instance Method Summary collapse
-
#initialize(filename:, line: nil) ⇒ ParseError
constructor
A new instance of ParseError.
- #to_s ⇒ Object
Constructor Details
#initialize(filename:, line: nil) ⇒ ParseError
Returns a new instance of ParseError.
5 6 7 8 9 10 |
# File 'lib/glossarist/error/parse_error.rb', line 5 def initialize(filename:, line: nil) @filename = filename @line = line super() end |
Instance Attribute Details
#filename ⇒ Object
Returns the value of attribute filename.
3 4 5 |
# File 'lib/glossarist/error/parse_error.rb', line 3 def filename @filename end |
#line ⇒ Object
Returns the value of attribute line.
3 4 5 |
# File 'lib/glossarist/error/parse_error.rb', line 3 def line @line end |
Instance Method Details
#to_s ⇒ Object
12 13 14 |
# File 'lib/glossarist/error/parse_error.rb', line 12 def to_s "Unable to parse file: #{filename}, error on line: #{line}" end |