Exception: Apricot::CompileError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/apricot/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#filenameObject (readonly)

Returns the value of attribute filename.



22
23
24
# File 'lib/apricot/errors.rb', line 22

def filename
  @filename
end

#lineObject (readonly)

Returns the value of attribute line.



22
23
24
# File 'lib/apricot/errors.rb', line 22

def line
  @line
end

#msgObject (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_sObject



30
31
32
# File 'lib/apricot/errors.rb', line 30

def to_s
  "#{@filename}:#{@line}: #{@msg}"
end