Module: Origen::Tester::ClassMethods

Defined in:
lib/origen/tester.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#new(*args, &block) ⇒ Object

This overrides the new method of any class which includes this module to force the newly created instance to be registered as a tester with Origen



37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/origen/tester.rb', line 37

def new(*args, &block) # :nodoc:
  if Origen.app.with_doc_tester?
    x = Origen::Tester::Doc.allocate
    if Origen.app.with_html_doc_tester?
      x.html_mode = true
    end
  else
    x = allocate
  end
  x.send(:initialize, *args, &block)
  x.register_tester
  x
end