A bi-directional Ruby DSL for casting objects using a functional DSL