Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Ekhoo committed Oct 18, 2015
1 parent 396ac56 commit 13d57b4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,17 @@ CommandBus is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:

```ruby
pod "CommandBus", '~> 0.0.2'
pod "CommandBus", '~> 0.0.3'
```

# Usage
- First, you have to create a json mapping file in order to associate yours Commands with their handler:

```json
{
"{ModuleName}.{CommandName}": "{ModuleName}.{CommandHandlerName}"
"{CommandNameA}": "{CommandHandlerNameA}",
"{CommandNameB}": "{CommandHandlerNameB}",
"{CommandNameC}": "{CommandHandlerNameC}"
}
```

Expand All @@ -45,7 +47,7 @@ class ViewController: UIViewController {
NSNotificationCenter.defaultCenter().addObserver(self, selector: "onCommandHandled:", name:"COMMAND_DONE", object: nil)

/*** Create the CommandBus ***/
let commandBus: CommandBus = try! CommandBus(configurationFileName: "configuration")
let commandBus: CommandBus = CommandBus(configurationFileName: "configuration")!

/*** Create your own CommandHandler ***/
let customCommand: CustomCommand = CustomCommand()
Expand Down

0 comments on commit 13d57b4

Please sign in to comment.