Created
June 11, 2015 23:02
-
-
Save apotonick/2a507ceccc36ec1875af to your computer and use it in GitHub Desktop.
Infer representer from contract (Reform 2)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
contract_class = ... | |
representer_class = Disposable::Twin::Schema.from(contract_class, | |
include: [Roar::JSON], | |
superclass: Representable::Decorator, | |
representer_from: lambda { |inline| inline.representer_class }, | |
options_from: :deserializer | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment