Duplicating Rails model for a form with meta-programming
Few things I have noted in your design are listed below. Beware all of this is purely from a design perspective rather than application.


Source is defined as attr_accessor which essentially violates encapsulation. Inject it from outside in constructor call.(I am not able to understand why you have not gone for attr_reader instead of accessor.
Ideally self.compose can be split into different method calls. It is violating SRP by doing too many things at one place. That is same for other methods as well.
Speaking from a puritan view, the branched if condition is also a smell.


In general, metaprogramming is considered to be something which must be avoided unless you have enough justification to keep it.