Created
January 16, 2014 22:06
-
-
Save mbj/8464399 to your computer and use it in GitHub Desktop.
morpher hybrid mode
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
module Morpher | |
class Hybrid | |
include Evaluator::Unary | |
def call(input) | |
Evaluation.success( | |
:input => input, | |
:output => node.call(input) | |
) | |
rescue Morpher::TransformError | |
node.evaluation(input) | |
end | |
end # Hybrid | |
end # Morpher |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment