class.allocate() â obj
Instance Public methods
Allocates space for a new object of class's class and does not call initialize on the new instance. The returned object must be an instance of class.
1 2 3 4 5 6 7 8 9 10 11 | klass = Class . new do def initialize(*args) @initialized = true end def initialized? @initialized || false end end klass.allocate.initialized? #=> false |
Please login to continue.