Exception: RSX::SyntaxError
Overview
Raised when a .rsx file cannot be transformed into Ruby.
Instance Attribute Summary collapse
-
#column ⇒ Object
readonly
Returns the value of attribute column.
-
#line ⇒ Object
readonly
Returns the value of attribute line.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
-
#initialize(message, path: nil, line: nil, column: nil) ⇒ SyntaxError
constructor
A new instance of SyntaxError.
Constructor Details
#initialize(message, path: nil, line: nil, column: nil) ⇒ SyntaxError
Returns a new instance of SyntaxError.
10 11 12 13 14 15 16 |
# File 'lib/rsx/errors.rb', line 10 def initialize(, path: nil, line: nil, column: nil) @path = path @line = line @column = column location = [path || "(rsx)", line, column].compact.join(":") super("#{location}: #{}") end |
Instance Attribute Details
#column ⇒ Object (readonly)
Returns the value of attribute column.
8 9 10 |
# File 'lib/rsx/errors.rb', line 8 def column @column end |
#line ⇒ Object (readonly)
Returns the value of attribute line.
8 9 10 |
# File 'lib/rsx/errors.rb', line 8 def line @line end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
8 9 10 |
# File 'lib/rsx/errors.rb', line 8 def path @path end |