Class: OrigenTesters::SmartestBasedTester::Base::TestMethods::BaseTml

Inherits:
Object
  • Object
show all
Defined in:
lib/origen_testers/smartest_based_tester/base/test_methods/base_tml.rb

Overview

Base class of all test method libraries

Direct Known Subclasses

AcTml, CustomTml, DcTml

Instance Attribute Summary collapse

Instance Method Summary collapse

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_methodsObject (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

#definitionsObject



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

#platformObject



27
28
29
# File 'lib/origen_testers/smartest_based_tester/base/test_methods/base_tml.rb', line 27

def platform
  Origen.interface.platform
end