While I was studying CompSci in college, I have this mindset that you won’t ever be successful if you don’t know how to build a …
While I was studying CompSci in college, I have this mindset that you won’t ever be successful if you don’t know how to build a …
When i search items in an array in Ruby, I usually go with the select method, and get the first item it finds. result = [3, 5, 1.3, ‘sample text’, nil, 7].select{|item| item.is_a?(Integer) }.first The problem I have with using select is it always …
Blogged it here at Forrst.