Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updates README about Brewscribe::Document

  • Loading branch information...
commit ede6176ee1d018875cf3e40ce6ea70f8f9db3e79 1 parent 8309f4f
@cadwallion authored
Showing with 12 additions and 3 deletions.
  1. +12 −3 README.md
View
15 README.md
@@ -9,8 +9,9 @@ Brewscribe is a Beersmith2 (.bsmx) file parser.
## Usage
To start, you can import your .bsmx file with `Brewscribe.import(file)` where file
-is any object that responds to `#read`. This will return an array of Brewscribe::Recipe
-objects. You now have a parsed version of the recipe files.
+is any object that responds to `#read`. This will return a `Brewscribe::Document`
+object, containing all the parsed information within the file. Currently, only Recipe
+objects will be parsed.
By default, Brewscribe will set a text property for each attribute of the recipe, and
if it has a parser object it will attempt to further parse the data.
@@ -18,7 +19,8 @@ if it has a parser object it will attempt to further parse the data.
An example of this is found in `Brewscribe::IngredientList`:
```
-recipe = Brewscribe.import File.read './spec/support/recipe.bsmx'
+document = Brewscribe.import File.read './spec/support/recipe.bsmx'
+recipe = document.recipes.first
recipe.ingredients.class # => Brewscribe::IngredientList
recipe.ingredients.grains.class # => Array
recipe.ingredients.grains.first.class # => Brewscribe::Grain
@@ -35,6 +37,13 @@ I <3 Contributions.
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request
+## TODO
+
+* More detailed Brewscribe::Recipe parsing. Mash info especially
+* Beersmith Style parsing
+* Writing back to .bsmx
+* More documentation
+
## Author
Created by [Andrew Nordman](https://github.com/cadwallion/).
Please sign in to comment.
Something went wrong with that request. Please try again.