write a method to return true if the input string equals 'cool' otherwise return false in ruby

main.rb
def is_cool(string)
  if string == 'cool'
    return true
  else
    return false
  end
end
92 chars
8 lines

This method named is_cool takes in a string as an argument and uses a conditional statement to compare if that string equals the word 'cool'. If the string is 'cool', then the method returns true, otherwise it returns false.

gistlibby LogSnag