Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panda Level--No exceptions #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

habutai
Copy link

@habutai habutai commented Mar 12, 2013

Made it state movie not found and ask if the user would like to search again.

This one was pretty fun. I might go back to do the other levels when I have more time :]

-J

score: struct.ratings["critics_score"]
)
if struct.title.nil?
else
Copy link
Member

Choose a reason for hiding this comment

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

here you're returning nil if the struct has no title. One other way you can do this in ruby:

unless struct.title
  Movie.new # continue rest
end

@jwo
Copy link
Member

jwo commented Mar 12, 2013

Looks great!! Nice use of break in the loop and nailing the panda requirement.

@habutai
Copy link
Author

habutai commented Mar 12, 2013

I always forget about unless.

I don't suppose you have a recommendation for a book that's like a quick
reference/pocket reference for syntax commands?

On Tue, Mar 12, 2013 at 10:28 AM, Jesse Wolgamott
notifications@github.comwrote:

Looks great!! Nice use of break in the loop and nailing the panda
requirement.


Reply to this email directly or view it on GitHubhttps://github.com//pull/16#issuecomment-14789883
.

@jwo
Copy link
Member

jwo commented Mar 13, 2013

@habutai I took a look around and couldnt' find a syntax for ruby. Mostly because you figure out how ruby works by using it (it's "defined by its implementation").

Maybe I should create one!

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