Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/cyberarm/recipe

A DSL for cooking recipes
https://github.com/cyberarm/recipe

Last synced: about 9 hours ago
JSON representation

A DSL for cooking recipes

Awesome Lists containing this project

README

        

# Recipe

A DSL for cooking recipes.

Describe your recipe, then use a Recipe::Printer to render it however you would like.

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'recipe'
```

And then execute:

$ bundle

Or install it yourself as:

$ gem install recipe

## Usage

``` ruby
require "recipe"

Recipe::DSL.new do |recipe|
recipe.name "Example Recipe"

recipe.mix "Toast"
recipe.ingredient "Bread", "2 slices"
recipe.instruction "Place bread in toaster."

recipe.printer Recipe::RubyistPrinter # TODO: Add more printers
end
```

Output of Recipe::RubyistPrinter:
``` ruby
class Recipe
class Toast
def bread
'2 slices'
end

def instruction_0
'Place bread in toaster.'
end

end

end
```

## Contributing

1. Fork it ( https://github.com/cyberarm/recipe/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request