Reputation: 3764
I downloaded a project from site. It contains a method called find.
def find(value)
if value == :decimal
return true
else
return false
end
end
I tried with so many values but the condition is not matching. Could you please explain the purpose of value == :decimal??
Upvotes: 0
Views: 584
Reputation: 160833
This method returns true
if value
is the symbol :decimal
, otherwise return false
.
find(:decimal) # true
Test whether value
is symbol :decimal
is the only purpose.
Upvotes: 2