Possible Duplicate:
What does !! mean in ruby?
I'm learning ruby/rails and found a tutorial with the following code example:
def role?(role)
return !!self.roles.find_by_name(role.to_s.camelize)
end
I don't have any idea for what the !!
do, neither the !!self
do.
I really googled about that, but doesn't find anything.
Can anyone give a short explanation? Thanks in advance.