Exception: Voodoo::Compiler::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/voodoo/compiler.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(errors) ⇒ Error

Returns a new instance of Error.



13
14
15
# File 'lib/voodoo/compiler.rb', line 13

def initialize errors
  @errors = errors
end

Instance Attribute Details

#errorsObject (readonly)

Returns the value of attribute errors.



17
18
19
# File 'lib/voodoo/compiler.rb', line 17

def errors
  @errors
end

Instance Method Details

#messageObject



19
20
21
22
23
# File 'lib/voodoo/compiler.rb', line 19

def message
  msg = ""
  @errors.each {|e| msg << e.message << "\n"}
  msg
end