Class: OrigenTesters::SmartestBasedTester::Base::TestMethods::BaseTml
- Inherits:
-
Object
- Object
- OrigenTesters::SmartestBasedTester::Base::TestMethods::BaseTml
- Defined in:
- lib/origen_testers/smartest_based_tester/base/test_methods/base_tml.rb
Overview
Base class of all test method libraries
Instance Attribute Summary collapse
-
#test_methods ⇒ Object
readonly
Returns the test_methods object for the current flow.
Instance Method Summary collapse
- #definitions ⇒ Object
-
#initialize(test_methods) ⇒ BaseTml
constructor
A new instance of BaseTml.
- #method_missing(method, *args, &block) ⇒ Object
- #platform ⇒ Object
Constructor Details
#initialize(test_methods) ⇒ BaseTml
Returns a new instance of BaseTml.
10 11 12 |
# File 'lib/origen_testers/smartest_based_tester/base/test_methods/base_tml.rb', line 10 def initialize(test_methods) @test_methods = test_methods end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/origen_testers/smartest_based_tester/base/test_methods/base_tml.rb', line 14 def method_missing(method, *args, &block) if definitions[method] instantiate_test_method(method, args) else method = method.to_s.underscore.to_sym if definitions[method] instantiate_test_method(method, args) else super end end end |
Instance Attribute Details
#test_methods ⇒ Object (readonly)
Returns the test_methods object for the current flow
8 9 10 |
# File 'lib/origen_testers/smartest_based_tester/base/test_methods/base_tml.rb', line 8 def test_methods @test_methods end |
Instance Method Details
#definitions ⇒ Object
31 32 33 |
# File 'lib/origen_testers/smartest_based_tester/base/test_methods/base_tml.rb', line 31 def definitions @definitions || self.class::TEST_METHODS end |
#platform ⇒ Object
27 28 29 |
# File 'lib/origen_testers/smartest_based_tester/base/test_methods/base_tml.rb', line 27 def platform Origen.interface.platform end |