module PDF module Storycards class Story def initialize(title, narrative) @title = title @narrative = narrative def @narrative.to_sentence self.sub(/^\s*I want/, ", I want").gsub(/^\s*So that/, ", so that").split($/).join(" ").gsub(' ,',',').squeeze(" ") end @scenarios = [] end attr_accessor :title, :narrative def add_scenario(scenario) @scenarios << scenario end def current_scenario @scenarios.last end end end end