→ Obj-C vs Ruby

Thursday, April 24, 2008

In Objective-C:

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

In Ruby:


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

That’s all.