40 likes | 157 Vues
Explore the concepts of class initialization in Ruby's Counter class, learn about the types of instances created, and decipher the outcomes of Counter.new.m. Dive deep into Ruby programming with this informative guide.
E N D
Question • Counter class>>new • | inst | • inst := super new. • inst initialize. • ^ inst • What is the class of inst? • Why?
Question (II) • Counter>>m • ^ self class == super class • What is the result of Counter new m