disposable
disposable copied to clipboard
Implement :struct options for properties.
Hello, @apotonick! I really appreciate stuff you build (Reform, Roar, etc), it's really game-changing!
I read a post about Reform 2.0 where you mentioned :struct
option for properties which I found very useful in my tasks. However, I haven't found it implemented nor in Reform neither in Disposable. This patch fills this gap!
The problem here is that Disposable::Twin::Struct
adds :sync
method assuming that class already got Sync
feature. Maybe I should propose this change to Reform::Form
that has Sync
already?
Thanks! :grin:
The Sync
part is not a big problem, and this should go into Disposable as Reform is form-only.
We should also add a test that tests the struct: true
. I still want to keep the old tests, though.