Exception: Apricot::CompileError
- 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
-
#initialize(filename, line, msg) ⇒ CompileError
constructor
A new instance of CompileError.
- #to_s ⇒ Object
Constructor Details
#initialize(filename, line, msg) ⇒ CompileError
Returns a new instance of CompileError.
24 25 26 27 28 |
# File 'lib/apricot/errors.rb', line 24 def initialize(filename, line, msg) @filename = filename @line = line @msg = msg end |
Instance Attribute Details
#filename ⇒ Object (readonly)
Returns the value of attribute filename.
22 23 24 |
# File 'lib/apricot/errors.rb', line 22 def filename @filename end |
#line ⇒ Object (readonly)
Returns the value of attribute line.
22 23 24 |
# File 'lib/apricot/errors.rb', line 22 def line @line end |
#msg ⇒ Object (readonly)
Returns the value of attribute msg.
22 23 24 |
# File 'lib/apricot/errors.rb', line 22 def msg @msg end |
Instance Method Details
#to_s ⇒ Object
30 31 32 |
# File 'lib/apricot/errors.rb', line 30 def to_s "#{@filename}:#{@line}: #{@msg}" end |