12 ways to call a method in Ruby

Today during a chat with one of my colleagues we discussed agreeing on certain ways to write our Python code. We joked about how Python follows this idea of having exactly one way to do each thing (which is usually followed by the language, but not necessarily by libraries). It made me think about Ruby, which has opposite philosophy - everything can be done in many different ways.This led me to a random idea of checking in how many different ways I can call a single method in Ruby. I ended up with 12 different ways (a couple are a bit of cheating). Prepare for some surprises below - especially the last one is mind blowing!.
12 ways to call a method in Ruby #ruby #rubydeveloper #rubyonrails https://rubyonrails.ba/single/12-ways-to-call-a-method-in-ruby

Nezir Zahirovic

Contractor Ruby On Rails (8+ years) / MCPD .Net / C# / Asp.Net / CSS / SQL / (11 years)

related articles