------art_100425_10066691.1174146201761
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On 3/17/07, Corey Konrad <0011 / hush.com> wrote:
>
> how come this doesnt worh though?
>
> class Animal
>   attr_accessor :color
>   attr_accessor :size
>
>   def initialize(color, size)
>   @color  olor
>   @size  ize
>   end
> end
>
> animal  nimal.new


 ArgumentError: wrong number of arguments (0 for 2)

Your Animal.new is expecting you to pass in color and size.

animal  nimal.new("brown", "big")

animal.color  brown"
> puts "The color of the animal is #{animal.color}"
> animal.color  red"
> puts "Now the animal is #{animal.color}"
> animal.size  big"
> puts "The size of the animal is #{animal.size}"
>
>
>
> thanks
>
> --
> Posted via http://www.ruby-forum.com/.
>
>

------art_100425_10066691.1174146201761--