Class: Sapphire::Testing::ScenarioResult
- Defined in:
- lib/sapphire/Testing/ScenarioResult.rb
Instance Attribute Summary collapse
-
#myId ⇒ Object
Returns the value of attribute myId.
-
#parent ⇒ Object
readonly
Returns the value of attribute parent.
-
#results ⇒ Object
readonly
Returns the value of attribute results.
-
#time ⇒ Object
readonly
Returns the value of attribute time.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #AddChild(result) ⇒ Object
-
#initialize(text) ⇒ ScenarioResult
constructor
A new instance of ScenarioResult.
- #set_id(id) ⇒ Object
- #set_type(type) ⇒ Object
Constructor Details
#initialize(text) ⇒ ScenarioResult
Returns a new instance of ScenarioResult.
11 12 13 14 15 16 17 18 |
# File 'lib/sapphire/Testing/ScenarioResult.rb', line 11 def initialize(text) @text = text @results = [] @leaf = true @myId = -1 @type = 'pass' @time = 0 end |
Instance Attribute Details
#myId ⇒ Object
Returns the value of attribute myId.
6 7 8 |
# File 'lib/sapphire/Testing/ScenarioResult.rb', line 6 def myId @myId end |
#parent ⇒ Object (readonly)
Returns the value of attribute parent.
9 10 11 |
# File 'lib/sapphire/Testing/ScenarioResult.rb', line 9 def parent @parent end |
#results ⇒ Object (readonly)
Returns the value of attribute results.
5 6 7 |
# File 'lib/sapphire/Testing/ScenarioResult.rb', line 5 def results @results end |
#time ⇒ Object (readonly)
Returns the value of attribute time.
8 9 10 |
# File 'lib/sapphire/Testing/ScenarioResult.rb', line 8 def time @time end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
7 8 9 |
# File 'lib/sapphire/Testing/ScenarioResult.rb', line 7 def type @type end |
Instance Method Details
#AddChild(result) ⇒ Object
20 21 22 23 24 |
# File 'lib/sapphire/Testing/ScenarioResult.rb', line 20 def AddChild(result) result.parent = self @results << result @time += result.time end |
#set_id(id) ⇒ Object
26 27 28 |
# File 'lib/sapphire/Testing/ScenarioResult.rb', line 26 def set_id(id) @myId = id end |
#set_type(type) ⇒ Object
30 31 32 |
# File 'lib/sapphire/Testing/ScenarioResult.rb', line 30 def set_type(type) @type = type end |