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 Tiger Eagle - Done #25

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Conversation

var114
Copy link

@var114 var114 commented Nov 6, 2013

Hey Jesse,

Just completed everything...thanks for you comments, implemented them to this pull request.

Thanks,
Patil

puts "------------------------"

puts "Which day do you want to watch the show?"
day = gets.chomp().capitalize
Copy link
Member

Choose a reason for hiding this comment

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

Side note --- calling gets.chomp() is fine... but the () it optional. You could just call

day = gets.chomp.capitalize

or, if it suits you:

day = gets().chomp().capitalize()

It doesn't matter much -- though I recommend you pick a style and go with it for a codebase. Having devs each write differently makes code hard to understand at a glance.

@jwo
Copy link
Member

jwo commented Nov 6, 2013

Awesome stuff!

OK, last thing -- in Ruby, you can compose things very easily, like so: Coffee.all.to_a.select{|coffee| coffee == cof}.each do |coffee|

However, this can begin to get a little hard to read (as I'm sure you noticed). So, you can:

Coffee
  .all
  .to_a
  .select{|coffee| coffee == cof}
  .each do |coffee|
    puts coffe
  end

All up to you on what looks best. My "rule" if its 3 or more compositions, move to a new line.

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