Ruby implementation of CDA R2