Oleksii Fedorov
Oleksii Fedorov
Sheldon, There is a RespondTo contract for that, see the documentation. You can also define several RespondTo contracts as roles. For example: ``` ruby DuckRole = RespondTo[:quack, :swim] Contract DuckRole...
Hi Alexander , When you actually call that function, does it work or fail (regardless of its type)? I'm asking since I am assuming that we are wrapping returned proc...
:+1: Sounds good to me too! ## Best Regards, Oleksii Fedorov, Sr Ruby, Clojure, Crystal, Golang Developer, Microservices Backend Engineer, +49 15757 486 476 On Sat, Jan 9, 2016 at...
Propose a syntax then :) Other way: just use private method, that doesn't depend on `self`. Like this: ``` ruby class Person Contract Drink => String def sell(drink) _sell(self, drink)...
How about: ``` ruby Contract Contracts::Receiver[Underaged], Drink => String ``` ?
It will cause this problem in any case. On Jul 29, 2015 3:04 PM, "Volodymyr Shatsky" [email protected] wrote: > You know better, but won't it cause difficulties to distinguish whether...
It is if you wrap everything in parenthesis and use .>> instead of => ;-) But on the other issue we agreed that we don't want to expose Ruby people...
This code is not a block now, but normal hash, probably you want something: ``` ruby Contract { [ ArrayOf[Num] => Maybe[Or[This, That]] ] } ```
@egonSchiele @sfcgeorge @robnormal What do you think about the last idea from @nixpulvis?
Then `{ [A, B => C] }` ? Or anything else you can see?