Created
December 15, 2009 23:54
-
-
Save tomdale/257420 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// ========================================================================== | |
// Project: Currencyconverter.converterController | |
// Copyright: ©2009 My Company, Inc. | |
// ========================================================================== | |
/*globals Currencyconverter */ | |
/** @class | |
Converts one form of currency to another. | |
@extends SC.Object | |
*/ | |
Currencyconverter.converterController = SC.Object.create( | |
/** @scope Currencyconverter.converterController.prototype */ { | |
/** | |
The current exchange rate. | |
@type Number | |
*/ | |
exchange: 1.15, | |
/** | |
The amount in dollars to convert. | |
@type Number | |
*/ | |
dollar: 50, | |
/** | |
Returns the amount after being converted. | |
@type Number | |
*/ | |
amount: function() { | |
return this.get('exchange') * this.get('dollar'); | |
}.property().cacheable('exchange', 'dollar') | |
}) ; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment