I thought that this question ( How to do attr_accessor_with_default in ruby? ) answered my question, but I’m not using ActiveRecord and after_initialize depends on it.
What’s the Ruby best practice for implementing a default value for an attr_accessor? Is this the closest thing to documentation about it? Should I stop using attr_accessor since it is private?
1 Answer