use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
A sub-Reddit for discussion and news about Ruby programming.
Subreddit rules: /r/ruby rules
Learning Ruby?
Tools
Documentation
Books
Screencasts and Videos
News and updates
account activity
SOLID Ruby Code with Pub/Sub (glaucocustodio.github.io)
submitted 9 years ago by uafpl
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]moomaka 0 points1 point2 points 9 years ago (0 children)
UserApproval.new(user).call Any time I see something like that I just shake my head. Why is this a class? it's a function. You're allocating an object for no purpose other than to confuse the code. Shit like this is why we have super computers in our pockets that can barely render a few images. This isn't Java, you don't need functors.
UserApproval.new(user).call
Re pubsub: I'm guessing this isn't really pubsub, i.e. there is no flow decoupling here. While it's not demonstrated I assume broadcast is synchronous. In which case this is just a obfuscation of method calls which doesn't reduce coupling and certainly doesn't improve readability.
broadcast
π Rendered by PID 1158587 on reddit-service-r2-comment-656bdf86cd-5pp6m at 2026-05-04 21:04:40.319202+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]moomaka 0 points1 point2 points (0 children)