Class: And
- Includes:
- Sapphire::Testing::Executable
- Defined in:
- lib/sapphire/DSL/Scenarios/and.rb
Instance Attribute Summary collapse
-
#block ⇒ Object
readonly
Returns the value of attribute block.
-
#parent ⇒ Object
readonly
Returns the value of attribute parent.
-
#results ⇒ Object
readonly
Returns the value of attribute results.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
- #AddResult(result) ⇒ Object
-
#initialize(parent, text, &block) ⇒ And
constructor
A new instance of And.
Methods included from Sapphire::Testing::Executable
Constructor Details
#initialize(parent, text, &block) ⇒ And
Returns a new instance of And.
12 13 14 15 16 17 18 |
# File 'lib/sapphire/DSL/Scenarios/and.rb', line 12 def initialize(parent, text, &block) @block = block @text = text.to_s @value = text @parent = parent @results = [] end |
Instance Attribute Details
#block ⇒ Object (readonly)
Returns the value of attribute block.
7 8 9 |
# File 'lib/sapphire/DSL/Scenarios/and.rb', line 7 def block @block end |
#parent ⇒ Object (readonly)
Returns the value of attribute parent.
9 10 11 |
# File 'lib/sapphire/DSL/Scenarios/and.rb', line 9 def parent @parent end |
#results ⇒ Object (readonly)
Returns the value of attribute results.
10 11 12 |
# File 'lib/sapphire/DSL/Scenarios/and.rb', line 10 def results @results end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
6 7 8 |
# File 'lib/sapphire/DSL/Scenarios/and.rb', line 6 def text @text end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
8 9 10 |
# File 'lib/sapphire/DSL/Scenarios/and.rb', line 8 def value @value end |
Instance Method Details
#AddResult(result) ⇒ Object
20 21 22 23 24 |
# File 'lib/sapphire/DSL/Scenarios/and.rb', line 20 def AddResult(result) result.item = self @results << result self.parent.results.last.AddChild(result) end |