// ========================================================================== | |
// 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