Re:Show HN: Nothing.js – A chainable mock object which alway...
by vemv on Saturday March 31, 2018 @04:10PM
(#16724941)
Ruby equivalent:
Sample usage:
[ Parent
| on HN ]
Re:Show HN: Nothing.js – A chainable mock object which alway...
by slmgc on Saturday March 31, 2018 @04:13PM
(#16724953)
Yep, it's way easier to implement in some other languages. Btw, is it callable as well? Can you do Whatever.new().foo.bar().baz with it?
Re:Show HN: Nothing.js – A chainable mock object which alway...
by baddox on Saturday March 31, 2018 @04:17PM
(#16724977)
Nope. Ruby doesn’t support the function call paren syntax for anything other than methods. You could do stuff like Whatever.new().foo.().bar[] though.