Ruby gotchas Part 1

Duck-typed means an object is considered a "Duck" if it has methods of a duck: it walks like a duck, it quacks like a duck.For example, if 123 has odd? and even? methods, then it must be an Integer?! Use respond_to? to check whether an object is able to do / has something, instead of using .methods everytime.
Ruby gotchas Part 1 #ruby #rubydeveloper #rubyonrails https://www.rubyonrails.ba/single/ruby-gotchas-part-1

Nezir Zahirovic

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

related articles