Sha256: 3c12b4be39d784b5459ff37952ffe5473b69c69f9c002a3c7a3a3cbf84f6534b
Contents?: true
Size: 441 Bytes
Versions: 70
Compression:
Stored size: 441 Bytes
Contents
/** * Here is an example solution for the Bob exercise */ component { function response( input ) { input = input .trim() .reReplaceNoCase( '[^a-z?]', '' ); if( !input.len() ) { return 'Fine. Be that way!'; } if( input.reFindNoCase( '[a-z]' ) && compare( input, input.uCase() ) == 0 ) { return 'Whoa, chill out!'; } if( input.right( 1 ) == '?' ) { return 'Sure.'; } return 'Whatever.'; } }
Version data entries
70 entries across 69 versions & 1 rubygems