Class: OrigenTesters::SmartestBasedTester::Base::TestMethods::Limits
- Inherits:
-
Object
- Object
- OrigenTesters::SmartestBasedTester::Base::TestMethods::Limits
- Defined in:
- lib/origen_testers/smartest_based_tester/base/test_methods/limits.rb
Instance Attribute Summary collapse
-
#hi_limit ⇒ Object
(also: #hi)
Returns the value of attribute hi_limit.
-
#lo_limit ⇒ Object
(also: #lo)
Returns the value of attribute lo_limit.
-
#test_method ⇒ Object
readonly
Returns the value of attribute test_method.
-
#unit ⇒ Object
Returns the value of attribute unit.
Instance Method Summary collapse
-
#initialize(test_method) ⇒ Limits
constructor
A new instance of Limits.
- #set_hi_limit(val) ⇒ Object
- #set_lo_limit(val) ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(test_method) ⇒ Limits
Returns a new instance of Limits.
14 15 16 |
# File 'lib/origen_testers/smartest_based_tester/base/test_methods/limits.rb', line 14 def initialize(test_method) @test_method = test_method end |
Instance Attribute Details
#hi_limit ⇒ Object Also known as: hi
Returns the value of attribute hi_limit.
7 8 9 |
# File 'lib/origen_testers/smartest_based_tester/base/test_methods/limits.rb', line 7 def hi_limit @hi_limit end |
#lo_limit ⇒ Object Also known as: lo
Returns the value of attribute lo_limit.
7 8 9 |
# File 'lib/origen_testers/smartest_based_tester/base/test_methods/limits.rb', line 7 def lo_limit @lo_limit end |
#test_method ⇒ Object (readonly)
Returns the value of attribute test_method.
6 7 8 |
# File 'lib/origen_testers/smartest_based_tester/base/test_methods/limits.rb', line 6 def test_method @test_method end |
#unit ⇒ Object
Returns the value of attribute unit.
8 9 10 |
# File 'lib/origen_testers/smartest_based_tester/base/test_methods/limits.rb', line 8 def unit @unit end |
Instance Method Details
#set_hi_limit(val) ⇒ Object
45 46 47 |
# File 'lib/origen_testers/smartest_based_tester/base/test_methods/limits.rb', line 45 def set_hi_limit(val) self.hi_limit = val end |
#set_lo_limit(val) ⇒ Object
41 42 43 |
# File 'lib/origen_testers/smartest_based_tester/base/test_methods/limits.rb', line 41 def set_lo_limit(val) self.lo_limit = val end |
#to_s ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/origen_testers/smartest_based_tester/base/test_methods/limits.rb', line 29 def to_s if !lo_limit && !hi_limit "\"#{test_name}\"" + ' = "":"NA":"":"NA":"":"":""' elsif !lo_limit "\"#{test_name}\"" + " = \"\":\"NA\":\"#{hi_limit}\":\"LE\":\"#{unit}\":\"\":\"0\"" elsif !hi_limit "\"#{test_name}\"" + " = \"#{lo_limit}\":\"GE\":\"\":\"NA\":\"#{unit}\":\"\":\"0\"" else "\"#{test_name}\"" + " = \"#{lo_limit}\":\"GE\":\"#{hi_limit}\":\"LE\":\"#{unit}\":\"\":\"0\"" end end |