avdi/naught — pull request #64 by alexpeachey (2014-07-28 00:42:09+00:00)
Title: Support for NullProxy

As requested in Issue #6.

I'm completely open to name changes. I just picked some reasonable names to start with.

It doesn't mention it in Issue #6 but we need some way to get the actual result or , otherwise all you have is the proxy. I chose to go with a method called `__object__`. I'm not thrilled with this name but I also didn't want to pick something that might exist on the wrapped object. Could go with something like `__value__` as well.

I also gave it the option to accept a specific type of null object for the default.

Usage:

```ruby
require 'naught'

NullProxy([]).first.address.country.__object__ # =>
NullProxy([1]).first.abs.__object__ # => 1

null = Naught.build do |config|
config.define_explicit_conversions
end

NullProxy([], null).first.abs.__object__.to_i # => 0
```