Created
January 25, 2012 20:05
-
-
Save etsai/1678350 to your computer and use it in GitHub Desktop.
Story Presenter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Elaines-MacBook-Air:madlib elainetsai$ git pull github ruby_version | |
From github.com:etsai/madlib | |
* branch ruby_version -> FETCH_HEAD | |
Auto-merging views/story_presenter.rb | |
CONFLICT (content): Merge conflict in views/story_presenter.rb | |
Automatic merge failed; fix conflicts and then commit the result. | |
class StoryPresenter | |
attr_reader :story | |
def initialize story | |
@story = story | |
end | |
# <Say> I once went walking along a </Say><Play> asfadsgas.dasfdasmai.mp3</Play> <Say>when I ...</Say> | |
def telling_xml | |
xml = "" | |
@story.telling.each do |phrase| | |
case phrase | |
when String | |
<<<<<<< HEAD | |
xml.Say phrase | |
======= | |
xml << "<Say>#{phrase}</Say>" | |
>>>>>>> c8ad3498046eba39cf6e303379531ba2cfb16199 | |
when Word | |
xml << "<Play>#{phrase.url}</Play>" | |
end | |
end | |
xml | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment