| 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 |
{ |
| 18 |
cocktails: { |
| 19 |
"Bee's Knees": { |
| 20 |
// Construct the ingredients by using |
| 21 |
// 4/3 oz of each element in the given |
| 22 |
// list. |
| 23 |
ingredients: [ // Array comprehension. |
| 24 |
{ kind: kind, qty: 4 / 3 } |
| 25 |
for kind in [ |
| 26 |
'Honey Syrup', |
| 27 |
'Lemon Juice', |
| 28 |
'Farmers Gin', |
| 29 |
] |
| 30 |
], |
| 31 |
garnish: 'Lemon Twist', |
| 32 |
served: 'Straight Up', |
| 33 |
}, |
| 34 |
} + { // Object comprehension. |
| 35 |
[sd.name + 'Screwdriver']: { |
| 36 |
ingredients: [ |
| 37 |
{ kind: 'Vodka', qty: 1.5 }, |
| 38 |
{ kind: sd.fruit, qty: 3 }, |
| 39 |
], |
| 40 |
served: 'On The Rocks', |
| 41 |
} |
| 42 |
for sd in [ |
| 43 |
{ name: 'Yellow ', fruit: 'Lemonade' }, |
| 44 |
{ name: '', fruit: 'Orange Juice' }, |
| 45 |
] |
| 46 |
}, |
| 47 |
} |