Method: Scenario#initialize
- Defined in:
- lib/scenario.rb
#initialize(hash) ⇒ Scenario
Returns a new instance of Scenario.
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/scenario.rb', line 5 def initialize(hash) @title = hash[:title] @body = hash[:body] @parent = hash[:parent] @given_scenario_keyword = hash[:given_scenario_keyword] || "GivenScenario:" @follow_up_keyword = hash[:follow_up_keyword] || "And" raise "No title given" unless title raise "No body given" unless body end |