Permalink
Browse files

Updates README with common methods

  • Loading branch information...
1 parent 094b53c commit 366301dc90c34ea6f19474806b18e57ee5ad2495 @cadwallion cadwallion committed May 10, 2012
Showing with 19 additions and 3 deletions.
  1. +19 −2 README.md
  2. +0 −1 bracket_tree.gemspec
View
@@ -1,6 +1,23 @@
# BracketTree
-BracketTree::Bracket
+BracketTree::Bracket is a binary tree-based bracket system.
+
+## Usage
+
+
+*add* (position, data)
+
+This adds a Node to the bracket containing `data`.
+
+*nodes*
+
+Returns an Array of Nodes sorted by insertion order, preserving the binary tree.
+
+*to_h*
+
+Returns a Hash representing the binary tree of the bracket.
+
+## Example
```
seats = [4,2,6,1,3,5,7]
@@ -10,7 +27,7 @@ seats.each do |position|
bracket.add position, { login: "TestPlayer#{position}" }
end
-bracket.to_h.inspect
+bracket.to_h
{
:payload => {
View
@@ -20,5 +20,4 @@ Gem::Specification.new do |s|
# specify any dependencies here; for example:
s.add_development_dependency "rspec"
s.add_development_dependency "rake"
- # s.add_runtime_dependency "rest-client"
end

0 comments on commit 366301d

Please sign in to comment.