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.
-
#render ⇒ Object
Returns the value of attribute render.
-
#test_method ⇒ Object
readonly
Returns the value of attribute test_method.
-
#tnum ⇒ Object
Returns the value of attribute tnum.
-
#unit ⇒ Object
Returns the value of attribute unit.
Instance Method Summary collapse
-
#initialize(test_method) ⇒ Limits
constructor
A new instance of Limits.
- #render? ⇒ Boolean
- #set_hi_limit(val) ⇒ Object
- #set_lo_limit(val) ⇒ Object
- #to_atp_attributes ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(test_method) ⇒ Limits
Returns a new instance of Limits.
16 17 18 19 20 |
# File 'lib/origen_testers/smartest_based_tester/base/test_methods/limits.rb', line 16 def initialize(test_method) @test_method = test_method @tnum = '' @render = true 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 |
#render ⇒ Object
Returns the value of attribute render.
10 11 12 |
# File 'lib/origen_testers/smartest_based_tester/base/test_methods/limits.rb', line 10 def render @render 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 |
#tnum ⇒ Object
Returns the value of attribute tnum.
9 10 11 |
# File 'lib/origen_testers/smartest_based_tester/base/test_methods/limits.rb', line 9 def tnum @tnum 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
#render? ⇒ Boolean
68 69 70 |
# File 'lib/origen_testers/smartest_based_tester/base/test_methods/limits.rb', line 68 def render? @render end |
#set_hi_limit(val) ⇒ Object
53 54 55 |
# File 'lib/origen_testers/smartest_based_tester/base/test_methods/limits.rb', line 53 def set_hi_limit(val) self.hi_limit = val end |
#set_lo_limit(val) ⇒ Object
49 50 51 |
# File 'lib/origen_testers/smartest_based_tester/base/test_methods/limits.rb', line 49 def set_lo_limit(val) self.lo_limit = val end |
#to_atp_attributes ⇒ Object
57 58 59 60 61 62 63 64 65 66 |
# File 'lib/origen_testers/smartest_based_tester/base/test_methods/limits.rb', line 57 def to_atp_attributes r = [] if lo_limit r << { value: lo_limit, rule: 'LE', units: unit } end if hi_limit r << { value: hi_limit, rule: 'GE', units: unit } end r end |
#to_s ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/origen_testers/smartest_based_tester/base/test_methods/limits.rb', line 33 def to_s if !lo_limit && !hi_limit if tnum == '' "\"#{test_name}\"" + ' = "":"NA":"":"NA":"":"":""' else "\"#{test_name}\"" + " = \"\":\"NA\":\"\":\"NA\":\"\":\"#{tnum}\":\"0\"" end elsif !lo_limit "\"#{test_name}\"" + " = \"\":\"NA\":\"#{hi_limit}\":\"LE\":\"#{unit}\":\"#{tnum}\":\"0\"" elsif !hi_limit "\"#{test_name}\"" + " = \"#{lo_limit}\":\"GE\":\"\":\"NA\":\"#{unit}\":\"#{tnum}\":\"0\"" else "\"#{test_name}\"" + " = \"#{lo_limit}\":\"GE\":\"#{hi_limit}\":\"LE\":\"#{unit}\":\"#{tnum}\":\"0\"" end end |