the-hypermedia-project/representor-swift — pull request #3 by kylef (2014-12-21 15:26:42+00:00)
Title: Store URIs as URITemplates

I'm unsure about this change and would love to get your opinions. Basically means that URI's are also internally stored as URITemplate structures instead of Strings directly. This is because a few of the hypermedia specifications uses URI Templates and it would make sense to provide a unified interface with the format used abstracted away.

Thus, they must always be expanded. They would be used as the following:

```swift
if let list = representor.transitions["list"] {
println("You can list with the URI: \(list.uri).")
let uri = list.uri.expand(["author": "kyle"])
}
```

You can also determine if there are no variables to expand, thus expansion isn't needed:

```swift
if let list = representor.transitions["list"] {
println("You can list with the URI: \(list.uri).")

if list.uri.variables.count == 0 {
println("We don't need to substitute any variables.")
}
}
```

/cc @fosrias @smizell @zdne