Topic: My questions as I (try to) learn ruby
I am, as the title states, trying to learn ruby; and as with HTML, I tend to learn by asking questions.
I'm using: Beginning Ruby From Novice to Professional
and my first question would have to be with an error I am getting.
class Dog attr_accessor :color, :age end a_dog = Dog.new puts "How old is the dog?" a_dog.age = gets() puts "WOW, it's just a baby!" if a_dog.age < 5
the error has to be with the comparison of a string with 5 using <.
Now I tried then creating a variable age and assigning it equal to a_dog.age and then doing if age < 5 but I get the same error
thanks for willing to help out, and sorry for all the basic questions I'll have