Rubinschnur zu boolean
def true?(obj)
obj.to_s.downcase == "true"
end
Lioruby
def true?(obj)
obj.to_s.downcase == "true"
end
!!(1) # true
!!(nil) # false