Module: Riml::ErrorWithoutNodeAvailable
- Included in:
- ParseError, SyntaxError
- Defined in:
- lib/riml/errors.rb
Instance Attribute Summary collapse
-
#filename ⇒ Object
Returns the value of attribute filename.
-
#lineno ⇒ Object
Returns the value of attribute lineno.
Instance Method Summary collapse
Instance Attribute Details
#filename ⇒ Object
Returns the value of attribute filename.
27 28 29 |
# File 'lib/riml/errors.rb', line 27 def filename @filename end |
#lineno ⇒ Object
Returns the value of attribute lineno.
27 28 29 |
# File 'lib/riml/errors.rb', line 27 def lineno @lineno end |
Instance Method Details
#initialize(msg = nil, filename = nil, lineno = nil) ⇒ Object
28 29 30 31 32 |
# File 'lib/riml/errors.rb', line 28 def initialize(msg = nil, filename = nil, lineno = nil) super(msg, nil) @filename = filename @lineno = lineno end |
#location_info ⇒ Object
34 35 36 37 38 39 40 |
# File 'lib/riml/errors.rb', line 34 def location_info if @filename || @lineno "#{@filename}:#{@lineno}" else Constants::UNKNOWN_LOCATION_INFO end end |