Exception: Apricot::SyntaxError
- Defined in:
- lib/apricot/errors.rb
Instance Attribute Summary collapse
-
#filename ⇒ Object
readonly
Returns the value of attribute filename.
-
#line ⇒ Object
readonly
Returns the value of attribute line.
-
#msg ⇒ Object
readonly
Returns the value of attribute msg.
Instance Method Summary collapse
- #incomplete? ⇒ Boolean
-
#initialize(filename, line, msg, incomplete = false) ⇒ SyntaxError
constructor
A new instance of SyntaxError.
- #to_s ⇒ Object
Constructor Details
#initialize(filename, line, msg, incomplete = false) ⇒ SyntaxError
Returns a new instance of SyntaxError.
5 6 7 8 9 10 |
# File 'lib/apricot/errors.rb', line 5 def initialize(filename, line, msg, incomplete = false) @filename = filename @line = line @msg = msg @incomplete = incomplete end |
Instance Attribute Details
#filename ⇒ Object (readonly)
Returns the value of attribute filename.
3 4 5 |
# File 'lib/apricot/errors.rb', line 3 def filename @filename end |
#line ⇒ Object (readonly)
Returns the value of attribute line.
3 4 5 |
# File 'lib/apricot/errors.rb', line 3 def line @line end |
#msg ⇒ Object (readonly)
Returns the value of attribute msg.
3 4 5 |
# File 'lib/apricot/errors.rb', line 3 def msg @msg end |
Instance Method Details
#incomplete? ⇒ Boolean
12 13 14 |
# File 'lib/apricot/errors.rb', line 12 def incomplete? @incomplete end |
#to_s ⇒ Object
16 17 18 |
# File 'lib/apricot/errors.rb', line 16 def to_s "#{@filename}:#{@line}: #{@msg}" end |