| 1 |
/* |
| 2 |
Copyright 2015 Google Inc. All rights reserved. |
| 3 |
|
| 4 |
Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 |
you may not use this file except in compliance with the License. |
| 6 |
You may obtain a copy of the License at |
| 7 |
|
| 8 |
http://www.apache.org/licenses/LICENSE-2.0 |
| 9 |
|
| 10 |
Unless required by applicable law or agreed to in writing, software |
| 11 |
distributed under the License is distributed on an "AS IS" BASIS, |
| 12 |
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 |
See the License for the specific language governing permissions and |
| 14 |
limitations under the License. |
| 15 |
*/ |
| 16 |
|
| 17 |
local sours = import 'sours-oo.jsonnet'; |
| 18 |
|
| 19 |
local RemoveGarnish = { |
| 20 |
// Not technically removed, but made hidden. |
| 21 |
garnish:: super.garnish, |
| 22 |
}; |
| 23 |
|
| 24 |
// Make virgin cocktails |
| 25 |
local NoAlcohol = { |
| 26 |
local Substitute(ingredient) = |
| 27 |
local k = ingredient.kind; |
| 28 |
local bitters = 'Angustura Bitters'; |
| 29 |
if k == 'Whiskey' then [ |
| 30 |
{ kind: 'Water', qty: ingredient.qty }, |
| 31 |
{ kind: bitters, qty: 'tsp' }, |
| 32 |
] else if k == 'Banks 7 Rum' then [ |
| 33 |
{ kind: 'Water', qty: ingredient.qty }, |
| 34 |
{ kind: 'Vanilla Essence', qty: 'dash' }, |
| 35 |
{ kind: bitters, qty: 'dash' }, |
| 36 |
] else [ |
| 37 |
ingredient, |
| 38 |
], |
| 39 |
ingredients: std.flattenArrays([ |
| 40 |
Substitute(i) |
| 41 |
for i in super.ingredients |
| 42 |
]), |
| 43 |
}; |
| 44 |
|
| 45 |
local PartyMode = { |
| 46 |
served: 'In a plastic cup', |
| 47 |
}; |
| 48 |
|
| 49 |
{ |
| 50 |
'Whiskey Sour': |
| 51 |
sours['Whiskey Sour'] |
| 52 |
+ RemoveGarnish + PartyMode, |
| 53 |
|
| 54 |
'Virgin Whiskey Sour': |
| 55 |
sours['Whiskey Sour'] + NoAlcohol, |
| 56 |
|
| 57 |
'Virgin Daiquiri': |
| 58 |
sours.Daiquiri + NoAlcohol, |
| 59 |
|
| 60 |
} |