Module: OrigenTesters::ProgramGenerators::ClassMethods
- Defined in:
- lib/origen_testers/program_generators.rb
Instance Method Summary collapse
-
#new(*args, &block) ⇒ Object
Ensures that the correct generator is loaded before initialize is called.
-
#supports?(tester_instance) ⇒ Boolean
Returns true if the interface class supports the given tester instance.
Instance Method Details
#new(*args, &block) ⇒ Object
Ensures that the correct generator is loaded before initialize is called
20 21 22 23 24 25 |
# File 'lib/origen_testers/program_generators.rb', line 20 def new(*args, &block) x = allocate x._load_generator x.send(:initialize, *args, &block) x end |
#supports?(tester_instance) ⇒ Boolean
Returns true if the interface class supports the given tester instance
29 30 31 |
# File 'lib/origen_testers/program_generators.rb', line 29 def supports?(tester_instance) PLATFORMS.include?(tester_instance.class) end |