Skip to content

Instantly share code, notes, and snippets.

@tomdale
Created December 15, 2009 23:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomdale/257420 to your computer and use it in GitHub Desktop.
Save tomdale/257420 to your computer and use it in GitHub Desktop.
// ==========================================================================
// 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