Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updates README with common methods

  • Loading branch information...
commit 366301dc90c34ea6f19474806b18e57ee5ad2495 1 parent 094b53c
@cadwallion cadwallion authored
Showing with 19 additions and 3 deletions.
  1. +19 −2 README.md
  2. +0 −1  bracket_tree.gemspec
View
21 README.md
@@ -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
1  bracket_tree.gemspec
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.