2 ms·
Any ruby experts know why the AttributeScope class is required ? Cant the functionality be included in the containing class ?
by thewarrior 12y ago
Any ruby experts know why the AttributeScope class is required ?
Cant the functionality be included in the containing class ?
- likeclockwork 12y agoAttributeScope provides the common language for defining attributes. It's shared functionality, validation rules for the attributes. If it were included in the containing class it would only be available to that class. Company or Employee specific attribute-creation methods could be placed on CompanyScope or EmployeeScope.