Created
March 7, 2012 15:54
-
-
Save maxenglander/1993934 to your computer and use it in GitHub Desktop.
TotalPriceComparison
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 TotalPriceGreaterThan | |
def display | |
"Customer spent more than #{threshold}" | |
end | |
def evaluate | |
receipt().total_price() > threshold() | |
end | |
def purchase | |
@purchase | |
end | |
def purchase= purchase | |
@purchase = purchase | |
end | |
def threshold | |
@threshold | |
end | |
def threshold= threshold | |
@threshold = threshold | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment