Skip to content

Panda,tiger and eagle#28

Open
noahpatterson wants to merge 4 commits into
RubyoffRails:masterfrom
noahpatterson:master
Open

Panda,tiger and eagle#28
noahpatterson wants to merge 4 commits into
RubyoffRails:masterfrom
noahpatterson:master

Conversation

@noahpatterson

Copy link
Copy Markdown

Thanks!

Comment thread models/recipe.rb Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ruby provides a "each_with_index" that is handy here.

steps.split(".").each_with_index do |step, step_num|
  puts "#{step_num+1}: #{step}\n"
end

It's +1 because indexes are 0 based, but most human stuff is 1 based.

@jwo

jwo commented Jan 2, 2014

Copy link
Copy Markdown
Member

Cooool!

@jwo

jwo commented Jan 2, 2014

Copy link
Copy Markdown
Member

Updated to_s looks great 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants