README.md in spank-0.0.2 vs README.md in spank-0.0.1369197478
- old
+ new
@@ -1,9 +1,11 @@
# Spank
A simple light weight inversion of control container written in ruby.
+[![Build Status](https://travis-ci.org/mokhan/spank.png)](https://travis-ci.org/mokhan/spank)
+
## Installation
Add this line to your application's Gemfile:
gem 'spank'
@@ -21,15 +23,13 @@
Register a single component and resolve it.
```ruby
container = Container.new
- container.register(:item) do
+ container.register(:item) do |container|
"ITEM"
end
- container.register(:pants) { jeans }
- container.register(:pants) { dress_pants }
item = container.resolve(:item)
```
Register multiple items, and resolve them.
@@ -37,11 +37,11 @@
```ruby
container = Container.new
container.register(:pants) { jeans }
container.register(:pants) { dress_pants }
- pants = container.resolve_all(:item)
+ pants = container.resolve_all(:pants)
```
Register a singleton.
@@ -96,10 +96,10 @@
```ruby
container = Container.new
Spank::IOC.bind_to(container)
- Spank::IOC.resolve(:item)
+ item = Spank::IOC.resolve(:item)
```
Enjoy!