gamache / hyperresource

A self-inflating Ruby client for hypermedia APIs. Not under active development.
http://hyperresource.com/doc
MIT License
304 stars 29 forks source link

Properly define accessor methods for nil attributes #27

Closed fancyremarker closed 10 years ago

fancyremarker commented 10 years ago

This pull request adds a test and code to handle cases where an attribute has a null value. After this change, calling resource.attr will return nil, instead of raising an exception. LMK if this is desired behavior.

gamache commented 10 years ago

Thanks for this! And sorry it took me a while to get to it. I've merged these changes in as part of today's release of 0.9.