Alex Fedorov
Alex Fedorov
@egonSchiele This does not work, I have tried it before. Even if `Contract(Underage)` returns callable object, ruby parser can't handle `something(args) more, args`. And callable objects (such as method, proc,...
@egonSchiele What about using a word instead of a symbol, ie: `Contract(Underage).with Foo => Bar`? Or any other short word, which means the same: "Underage with args: Foo and returns...
Not a problem. We need to switch on fact if there is a hash in arguments to `Contract` or not. If yes: it is an old syntax and we just...
Ok. I'm definitely up for `Contract(Underaged).with Drink => String`
I think you are correct. Though I wanted to see this happening in more incremental way. (of course bearing in mind that all 3 should be implemented eventually and not...
Hm, not really: ``` 2.2.1 :001 > def Contract(*, &blk) 2.2.1 :002?> end => :Contract 2.2.1 :003 > Contract { [ String => String ] } => nil ```
You are wrong here, it is still possible to shape this project if it is worth it. We had long conversation on gitter some time ago about this and arrived...
Yeah, of course =) Not really a big of a problem. And remember, we can always break an API, especially if we find some better API than current one (I...
Supporting current API and block-based one, not really a big deal, since it is totally different calls and may even result in instantiating totally different decorator classes for instance.
How about `Contract { A >= B }` ? :) This is a valid ruby code, and I see how to implement it. Even so it looks strange