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 #14

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

Panda level #14

wants to merge 1 commit into from

Conversation

mjmaley
Copy link

@mjmaley mjmaley commented May 15, 2012

Ok... playing catchup....

@jwo
Copy link
Member

jwo commented May 16, 2012

Looks good, but wanted to highlight one thing:

class Foodbarge
    def food_for(animal)
        if animal == :panda 
            return Panda.new.acceptable_food()
        else 
            false
        end
    end
end

This code will return a panda's acceptable food... but it wouldn't return for others... I'm thinking something more like this:

class Foodbarge
    def food_for(animal)
        return animal.acceptable_food
    end
end

With this modification, the food barge will simply get the acceptable_food from the animal and return it to the person that asked (zoo_keeper).

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