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"

15th Sep 2018, 12:07 PM
Eshwar . E
Eshwar . E - avatar
1 Odpowiedź
0
one end encloses the class and second encloses initialize
15th Sep 2018, 12:16 PM
magicalKhachapuri
magicalKhachapuri - avatar