Ruby tricks for junior developers
25-Jan-2019 2575
As a junior developer who started his professional coding journey fairly recently I realized that I only used a limited number of methods and ruby capabilities. Since I got started at Drivy, I have discovered several ruby tricks that helped me make my code more readable and efficient.The dig methodThe dig method can be used on hashes (and Arrays) to, as its name suggests, dig through the potential multiple layers in the object and retrieve the value corresponding to the argument provided to the method.By using dig you find yourself able to nicely shorten your code and improve overall readability:.
Ruby tricks for junior developers #ruby #rubydeveloper #rubyonrails #tricks #junior #developers #developers https://rubyonrails.ba/link/ruby-tricks-for-junior-developers