| 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 lib = import 'library-tla.libsonnet'; |
| 18 |
|
| 19 |
// Here is the top-level function, note brunch |
| 20 |
// now has a default value. |
| 21 |
function(prefix, brunch=false) { |
| 22 |
|
| 23 |
[prefix + 'Pina Colada']: { |
| 24 |
ingredients: [ |
| 25 |
{ kind: 'Rum', qty: 3 }, |
| 26 |
{ kind: 'Pineapple Juice', qty: 6 }, |
| 27 |
{ kind: 'Coconut Cream', qty: 2 }, |
| 28 |
{ kind: 'Ice', qty: 12 }, |
| 29 |
], |
| 30 |
garnish: 'Pineapple slice', |
| 31 |
served: 'Frozen', |
| 32 |
}, |
| 33 |
|
| 34 |
[if brunch then prefix + 'Bloody Mary']: { |
| 35 |
ingredients: [ |
| 36 |
{ kind: 'Vodka', qty: 1.5 }, |
| 37 |
{ kind: 'Tomato Juice', qty: 3 }, |
| 38 |
{ kind: 'Lemon Juice', qty: 1.5 }, |
| 39 |
{ kind: 'Worcestershire', qty: 0.25 }, |
| 40 |
{ kind: 'Tobasco Sauce', qty: 0.15 }, |
| 41 |
], |
| 42 |
garnish: 'Celery salt & pepper', |
| 43 |
served: 'Tall', |
| 44 |
}, |
| 45 |
|
| 46 |
[prefix + 'Mimosa']: lib.Mimosa(brunch), |
| 47 |
} |