It is very common to set a default value for a class_attribute. Before Rails 5.2, to specify a default value for a class_attribute, we needed to write like this. 1class ActivityLogger 2class_attribute :logger 3class_attribute :settings 4 5self.logger = Logger.new(STDOUT) 6self.settings = {} 7endCopy As we can see above, it requires additional keystrokes to set a default value for each class_attrib