0
why did They use end two times in this program?
class Person def initialize puts "Hi there" end end p1 = Person.new p2 = Person.new # Output: # "Hi there" # "Hi there"
1 Odpowiedź
0
one end encloses the class and second encloses initialize
class Person def initialize puts "Hi there" end end p1 = Person.new p2 = Person.new # Output: # "Hi there" # "Hi there"