Class: Spex::Scenario
- Inherits:
-
Object
- Object
- Spex::Scenario
- Includes:
- Enumerable
- Defined in:
- lib/spex/scenario.rb
Defined Under Namespace
Classes: Builder
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #<<(execution) ⇒ Object
- #each(&block) ⇒ Object
- #executions ⇒ Object
-
#initialize(name, &block) ⇒ Scenario
constructor
A new instance of Scenario.
Constructor Details
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/spex/scenario.rb', line 5 def name @name end |
Instance Method Details
#<<(execution) ⇒ Object
15 16 17 |
# File 'lib/spex/scenario.rb', line 15 def <<(execution) executions << execution end |
#each(&block) ⇒ Object
19 20 21 |
# File 'lib/spex/scenario.rb', line 19 def each(&block) executions.each(&block) end |
#executions ⇒ Object
11 12 13 |
# File 'lib/spex/scenario.rb', line 11 def executions @executions ||= [] end |