
var IngredientParser = function(text) {
  this.text = text;

  this.patterns = [
    new Pattern("{ingredient} to taste"),
    new Pattern("{ingredient} as desired"),
    new Pattern("{quantity} {unit} of {ingredient}"), // 2 sticks of butter, 2-3 tablespoons of sugar
    new Pattern("{quantity} {unit} {ingredient}"), //1 cup flour
    new Pattern("{quantity} {ingredient}"), //an egg, 
  ];

  this.matchingPattern = this.patterns
    .find(function(pattern) {
      return pattern.matches(this.text);
    }.bind(this));

  this.amount = this.matchingPattern.parse(this.text);

  this.scale = function(scalingFactor) {
    return new AmountPresenter(this.matchingPattern, this.amount.amountByScaling(scalingFactor)).stringForDisplay;
  }.bind(this);

};

@@ -487,21 +487,16 @@
 matches(
-this.
 text);%0A 
@@ -499,27 +499,16 @@
 );%0A    %7D
-.bind(this)
 );%0A%0A  th

simplify code