Skip to content

Instantly share code, notes, and snippets.

@gabrielfroes
Last active December 1, 2021 15:45
Show Gist options
  • Save gabrielfroes/390263ccf6817c083ad89945c03cacd5 to your computer and use it in GitHub Desktop.
Save gabrielfroes/390263ccf6817c083ad89945c03cacd5 to your computer and use it in GitHub Desktop.
Recipe for Developer Daily Capuccino
<?php
/**
* Recipe for Developer Daily Capuccino
*
* @author Gabriel Froes & Vanessa Weber <contato@codigofonte.com.br>
* @version 1.0
* @copyright GPL © 2018, youtube.com/codigofontetv
* @access public
* @package CDFTV\Recipes
* @example Classe CapuccinoDev.
* @video https://youtu.be/UcXpOcF-T6k
*/
class CapuccinoDev extends Recipes {
public function index() {
// Load ingredients
$Ingredients[] = $this->ingredients->load('powdered milk', 400, 'grams');
$Ingredients[] = $this->ingredients->load('sugar', 400, 'grams');
$Ingredients[] = $this->ingredients->load('chocolate powder', 5, 'soup spoon');
$Ingredients[] = $this->ingredients->load('instant coffee', 100, 'grams');
$Ingredients[] = $this->ingredients->load('cinnamon powder', 1, 'teaspoon');
$Ingredients[] = $this->ingredients->load('baking soda', 1, 'teaspoon');
// Mix the ingredients
$CapuccinoPowder = $this->actions->mix($Ingredients[]);
// Fill Cup of Coffee or Mug
$HotWater = $this->ingredients->load('hot water', 400, 'milliliters');
$Mug = $this->recipients->get('mug', 1);
$this->actions->fill($Mug, $HotWater);
$this->actions->fill($Mug, $this->ingredients->load($CapuccinoPowder, 3, 'soup spoon'));
// Mix the Beverage
$this->actions->mix($Mug->content);
// Done, let's drink!
$this->actions->scream('The capuccino is ready!!! Devs, let\'s drink!!!');
while ($this->recipients->isEmpty($Mug) == false) {
$this->actions->drink($Mug->content);
}
return true;
}
}
?>
@carlosbazilio
Copy link

Bacana mesmo! Sou professor e recentemente divulguei um livro com analogias entre programação e cozinha. Acho que curtirão: https://carlosbazilio.gitbooks.io/programando-na-cozinha/content/pt-br/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment