Represent Register behaviors in ruby code (To form the logic of a better register design)