Panda level #14

Open
wants to merge 1 commit into from

2 participants

@mjmaley

Ok... playing catchup....

@jwo
Ruby Off Rails member

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