Created
March 9, 2017 15:25
-
-
Save uday-rayala/a41562bf8de299e18cf78d9087e6bb47 to your computer and use it in GitHub Desktop.
ExperimentalEngine
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
class ExperimentalEngine | |
include Scientist | |
def estimate(p1, p2, p3) | |
science "PriceEstimate" |e| | |
e.context p1: p1, p2: p2, p3: p3 | |
e.use { LocalPricingEngine.new.estimate(p1, p2, p3) } | |
e.try { PricingServiceEngine.new.estimate(p1, p2, p3) } | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment