It would be great to have something similar to this:
class MyClass
property :foo
property :bar
end
c = MyClass.new(foo: 'foo', bar: 'bar')
c.foo # => 'foo'
c.bar # => 'bar'
c[:foo] # => undef method []
c.foo = 'foofoo'
c.foo # => 'foofoo'
c.to_hash # => {foo: 'foo', bar: 'bar'}
It would be great to have something similar to this: