Yaks maps in two steps, Model <-> Yaks::Resource <-> Message Format. The second part could be made bidirectional since it's a one-to-one mapping. The first part could be made bidirectional as long as only declarative features are used. For "dynamic" attribute the user would have to code the reverse mapping. For example this code is problematic
class PersonMapper
attributes :full_name
def full_name
"#{object.first_name} #{object.last_name}"
end
end
Two-way mapping is something I've kept at the back of my head but is not currently supported and would require quite a few changes.
Leaving this here in answer to https://twitter.com/jamesotron/status/470652904605368320 and for future reference.
Yaks maps in two steps, Model <-> Yaks::Resource <-> Message Format. The second part could be made bidirectional since it's a one-to-one mapping. The first part could be made bidirectional as long as only declarative features are used. For "dynamic" attribute the user would have to code the reverse mapping. For example this code is problematic
Two-way mapping is something I've kept at the back of my head but is not currently supported and would require quite a few changes.