Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/cyberarm/recipe
- Owner: cyberarm
- License: mit
- Created: 2014-12-12T22:13:55.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2014-12-12T22:26:10.000Z (almost 10 years ago)
- Last Synced: 2023-03-11T22:03:25.933Z (over 1 year ago)
- Language: Ruby
- Size: 262 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
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'
enddef instruction_0
'Place bread in toaster.'
endend
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