→ Obj-C vs Ruby

24 April 2008

In Objective-C:

NSString* amount = [[NSString alloc] initWithFormat:@"%.02f", 
  [converter convertCurrency]];

In Ruby:

amount = "%.02f" % converter.convert_currency

That’s all.