============================================================================= CLASSBUILDER FLUENT API METHODS ============================================================================= Constructor sets the constructor function for the class MODIFIED FOR SCHEME C: Now uses new constructor signatur
(fn ClassConstructorFunc)
| 160 | // MODIFIED FOR SCHEME C: Now uses new constructor signature |
| 161 | // The constructor function will be called with pre-created instance |
| 162 | func (cb *ClassBuilder) Constructor(fn ClassConstructorFunc) *ClassBuilder { |
| 163 | cb.constructor = fn |
| 164 | return cb |
| 165 | } |
| 166 | |
| 167 | // Method adds an instance method to the class - unchanged |
| 168 | // Instance methods are called on object instances |
no outgoing calls