Method: Feature#initialize

Defined in:
lib/feature.rb

#initialize(hash = {}) ⇒ Feature

Returns a new instance of Feature.



8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/feature.rb', line 8

def initialize(hash={})
  @title                  = hash[:title]
  @body                   = hash[:body]
  @parent                 = hash[:parent]
  @keyword                = hash[:keyword] || "Feature:"
  @scenario_keyword       = hash[:scenario_keyword] || "Scenario:"
  @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