How can I know if a file has been attached?

How can I test if the variable "file" is empty or not?
Thank you!

Answer should be somewhere here: http://www.tutorialspoint.com/ruby/ruby_methods.htm