Class: OrigenTesters::IGXLBasedTester::Base::TestInstances::CustomTil
- Inherits:
-
Object
- Object
- OrigenTesters::IGXLBasedTester::Base::TestInstances::CustomTil
- Defined in:
- lib/origen_testers/igxl_based_tester/base/test_instances/custom_til.rb
Overview
Custom Test Instance library
Instance Attribute Summary collapse
-
#definitions ⇒ Object
readonly
Returns the value of attribute definitions.
-
#test_instances ⇒ Object
readonly
Returns the test_instances object for the current flow.
Instance Method Summary collapse
-
#initialize(test_instances, definitions) ⇒ CustomTil
constructor
A new instance of CustomTil.
- #method_missing(method, *args, &block) ⇒ Object
- #platform ⇒ Object
Constructor Details
#initialize(test_instances, definitions) ⇒ CustomTil
Returns a new instance of CustomTil.
11 12 13 14 |
# File 'lib/origen_testers/igxl_based_tester/base/test_instances/custom_til.rb', line 11 def initialize(test_instances, definitions) @test_instances = test_instances @definitions = definitions end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/origen_testers/igxl_based_tester/base/test_instances/custom_til.rb', line 16 def method_missing(method, *args, &block) if definitions[method] name = args.shift ti = platform::CustomTestInstance.new name, methods: definitions[method].dup, attrs: (args.first || {}), type: method, library: self test_instances.add(nil, ti) ti else super end end |
Instance Attribute Details
#definitions ⇒ Object (readonly)
Returns the value of attribute definitions.
9 10 11 |
# File 'lib/origen_testers/igxl_based_tester/base/test_instances/custom_til.rb', line 9 def definitions @definitions end |
#test_instances ⇒ Object (readonly)
Returns the test_instances object for the current flow
8 9 10 |
# File 'lib/origen_testers/igxl_based_tester/base/test_instances/custom_til.rb', line 8 def test_instances @test_instances end |
Instance Method Details
#platform ⇒ Object
30 31 32 |
# File 'lib/origen_testers/igxl_based_tester/base/test_instances/custom_til.rb', line 30 def platform test_instances.platform end |