Class: Tlb::RunData::Suite
- Inherits:
-
Struct
- Object
- Struct
- Tlb::RunData::Suite
- Defined in:
- lib/tlb/run_data.rb
Constant Summary collapse
- MILLS_PER_SEC =
1000
Instance Attribute Summary collapse
-
#end_time ⇒ Object
Returns the value of attribute end_time.
-
#failed ⇒ Object
Returns the value of attribute failed.
-
#identity ⇒ Object
Returns the value of attribute identity.
-
#start_time ⇒ Object
Returns the value of attribute start_time.
Instance Method Summary collapse
- #for_id?(new_identity) ⇒ Boolean
-
#initialize(identity, start_time) ⇒ Suite
constructor
A new instance of Suite.
- #report_to_tlb ⇒ Object
- #run_time ⇒ Object
Constructor Details
#initialize(identity, start_time) ⇒ Suite
Returns a new instance of Suite.
7 8 9 |
# File 'lib/tlb/run_data.rb', line 7 def initialize(identity, start_time) super(identity, start_time, start_time, false) end |
Instance Attribute Details
#end_time ⇒ Object
Returns the value of attribute end_time
4 5 6 |
# File 'lib/tlb/run_data.rb', line 4 def end_time @end_time end |
#failed ⇒ Object
Returns the value of attribute failed
4 5 6 |
# File 'lib/tlb/run_data.rb', line 4 def failed @failed end |
#identity ⇒ Object
Returns the value of attribute identity
4 5 6 |
# File 'lib/tlb/run_data.rb', line 4 def identity @identity end |
#start_time ⇒ Object
Returns the value of attribute start_time
4 5 6 |
# File 'lib/tlb/run_data.rb', line 4 def start_time @start_time end |
Instance Method Details
#for_id?(new_identity) ⇒ Boolean
15 16 17 |
# File 'lib/tlb/run_data.rb', line 15 def for_id? new_identity identity == new_identity end |
#report_to_tlb ⇒ Object
19 20 21 22 |
# File 'lib/tlb/run_data.rb', line 19 def report_to_tlb Tlb.suite_time(identity, run_time) Tlb.suite_result(identity, failed) end |
#run_time ⇒ Object
11 12 13 |
# File 'lib/tlb/run_data.rb', line 11 def run_time ((end_time - start_time)*MILLS_PER_SEC).to_i end |