0
why this is no output?
class Person attr_accessor :name , :age , :sex @name="hello" @age=15 @sex='M' end p = Person.new() puts p.name puts p.age puts p.sex #why there is no output
1 Respuesta
+ 2
You need to surround your assignments with a
def initialize
<code>
end