Class: TCLibrary
- Inherits:
-
Object
- Object
- TCLibrary
- Defined in:
- lib/TCLib.rb
Instance Method Summary collapse
-
#initialize(name, tc) ⇒ TCLibrary
constructor
A new instance of TCLibrary.
Constructor Details
#initialize(name, tc) ⇒ TCLibrary
Returns a new instance of TCLibrary.
24 25 26 27 |
# File 'lib/TCLib.rb', line 24 def initialize(name, tc) @framework, @unit = name.split(".") @integration = tc.integration end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(meth, *args, &blk) ⇒ Object (private)
30 31 32 33 34 35 36 37 38 39 |
# File 'lib/TCLib.rb', line 30 def method_missing(meth, *args, &blk) raise("Test Complete is already Running a test") if(@integration.IsRunning) @integration.RunRoutineEx(@framework, @unit, meth.to_s, WIN32OLE_VARIANT.new(args.map{|a| a.is_a?(String) ? WIN32OLE_VARIANT.new(a, VT_BSTR) : WIN32OLE_VARIANT.new(a, VT_VARIANT|VT_BYREF)} )) while @integration.IsRunning sleep(1) end @integration.RoutineResult end |