Sha256: fa4d6c532d9e8fe8fb61f4709b69ffaf7603b601ff70ceeb29d335c4716996a1
Contents?: true
Size: 536 Bytes
Versions: 66
Compression:
Stored size: 536 Bytes
Contents
class Bob { String hey(String message) { if (message.trim().isEmpty) { return "Fine. Be that way!"; } if (message == "WHAT THE HELL WERE YOU THINKING?") { return "Calm down, I know what I'm doing!"; } if (message == message.toUpperCase() && message != message.toLowerCase()) { return "Whoa, chill out!"; } final RegExp whitespaceEndingQuestion = new RegExp(r'\?[\s]*$'); if (whitespaceEndingQuestion.hasMatch(message)) { return "Sure."; } return "Whatever."; } }
Version data entries
66 entries across 66 versions & 1 rubygems