moger777/missingly — pull request #1 by Arcath (2013-07-09 12:27:32+00:00)
Title: Attr Missingly

Adds 3 new class methods `missingly_reader`, `missingly_writer` and `missingly_accessor`.

These methods would be used when all you wanted was to map methods to a hash.

An example:

```ruby
class Customer
include Missingly::Matchers

missingly_reader [:customer_id], @hash
missingly_accessor [:name, :address1, :address2, :town, :postcode], @hash

def initialize(hash_from_api)
@hash = hash_from_api
end
end
```

This would then allow you to interact with the hash with a minimal foot print on your class, without harming any of missingly's current functionality.

Obviously it only takes a couple of lines to make this work anyway, I just think this makes classes look as nice as if I had used attr_accessor but provides exactly the functionality I need.