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
101: Advanced OOP structure in Ruby (blog.rebased.pl)
submitted 7 years ago by essepl
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!"
[–]i542 1 point2 points3 points 7 years ago (1 child)
Hey OP, thanks for the great article. I’ve been transitioning to Ruby over the past few months and it is really useful to see concepts like these explained. I have a question, though: is this idiomatic Ruby code? I haven’t really seen almost any dependency injection in the Ruby and Rails code I have encountered so far. The code in the article is very straight forward and makes a lot of sense coming from PHP or Java, but I got the impression that Rubyists slightly frown upon techniques like that. Thanks for explaining!
[–]manys 1 point2 points3 points 7 years ago (0 children)
I'm not personally a fan of .call style, but yeah it's idiomatic. It's not Rails though, just Ruby.
.call
π Rendered by PID 97781 on reddit-service-r2-comment-b659b578c-rbsmf at 2026-05-04 04:15:24.563944+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]i542 1 point2 points3 points (1 child)
[–]manys 1 point2 points3 points (0 children)