rares/option — pull request #4 by camertron (2014-03-10 19:19:56+00:00)
Title: Adding scala-style matching

This PR adds scala-style matching to options so you can do stuff like this:

```ruby
result = Option(variable).match do |matcher|
matcher.case(Some[Fixnum]) { |val| val * 2 }
matcher.case(Some[String]) { |val| val.length }
end

result # => 10 when variable is 5, 6, when variable is "option"
```

You can also match without types:

```ruby
Option(variable).match do |matcher|
matcher.case(Some) { |val| puts val }
matcher.case(None) { |val| raise StandardError }
end
```

Finally, the `OptionMatcher` also supports `else`:

```ruby
Option(variable).match do |matcher|
matcher.case(Some[String]) { ... }
matcher.else { |val| ... }
end
```