News


What not to forget when implementing a pattern-matching in Ruby for custom objects
Nevertheless, in the wake of Ruby 3.2 upcoming release, between my daywork, family, and volunteering, I have some time now to slowly return to writing about Ruby. So you might want to follow me on Substack.Here is a small(ish) practical article ab...

Fantastic global methods in Ruby and where to find them
Many languages allow defining methods globally, which makes them available everywhere. Ruby is not different: you can define a method on the “top–level” and it behave like a global one. However, everything in Ruby is class, which means that these ...

Spin up your Hanami apps easily with Hanamismith | Hanami Mastery
I was always a fan of having an easy way to spin up scaffold rails applications with a single console command. For people like me, who test out every week a new idea, getting rid of all the manual work related to the repeatable configuration can m...




Comments for Ruby Code (Usage, Single, and Multi-Line)
Comments in your Ruby code are notes and annotations meant to be read by other programmers. The comments themselves are ignored by the Ruby interpreter, so the text inside the comments isn't subject to any restrictions.It's usually good form to pu...

Leverage Regular Instance Variable to Resolve Thread-Safety Issue on Rails ActiveRecord model
Owing to the superpowers of the Rails ActiveRecord module, developers can sometimes forget that, under the hood, our AR models are just regular Ruby objects. This allows us to make use of standard instance variables on the objects to adapt their b...

Advanced CLI tools with Ruby and dry-cli! | Hanami Mastery
Recently I watched an amazing tutorial from GoRails, made by Collin Jilbert, about writing simple ruby scripts for console tools.It was a great introduction to CLI in Ruby, and it inspired me to write a follow-up on this topic because I also use r...