Class: Mustang::Errors

Inherits:
Array
  • Object
show all
Defined in:
lib/mustang/errors.rb

Overview

Javascript errors container. Its objects keeps list of errors encountered during code evaluation.

Defined Under Namespace

Classes: Error

Instance Method Summary collapse

Constructor Details

#initialize(runtime) ⇒ Errors

Returns a new instance of Errors.



10
11
12
13
# File 'lib/mustang/errors.rb', line 10

def initialize(runtime)
  @runtime = runtime
  super()
end

Instance Method Details

#push(errinfo) ⇒ Object



15
16
17
18
19
# File 'lib/mustang/errors.rb', line 15

def push(errinfo)
  errinfo = Error.new(errinfo)
  print_error(errinfo) if @runtime.debug?
  super(errinfo)
end