Class: RBehave::Scenario
- Inherits:
-
Object
- Object
- RBehave::Scenario
- Defined in:
- lib/rbehave/scenario.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#name ⇒ Object
Returns the value of attribute name.
-
#story ⇒ Object
Returns the value of attribute story.
Instance Method Summary collapse
-
#initialize(story, name, &body) ⇒ Scenario
constructor
A new instance of Scenario.
Constructor Details
#initialize(story, name, &body) ⇒ Scenario
Returns a new instance of Scenario.
5 6 7 8 9 10 |
# File 'lib/rbehave/scenario.rb', line 5 def initialize(story, name, &body) raise ArgumentError, 'Scenario must have a body' unless block_given? @story = story @name = name @body = body end |
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
3 4 5 |
# File 'lib/rbehave/scenario.rb', line 3 def body @body end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/rbehave/scenario.rb', line 3 def name @name end |
#story ⇒ Object
Returns the value of attribute story.
3 4 5 |
# File 'lib/rbehave/scenario.rb', line 3 def story @story end |