Remove a exclamation mark from the end of string

From codewars.com by Edxael  (that’s me)

Description:

  • Remove a exclamation mark from the end of string. For a beginner kata, you can assume that the input data is always a string, no need to verify it.
  • Examples

My solution:

Note:  The following code is not written by me, it was created by another user of codewars.com it belongs to the user: “cyberplanner” enjoy.

 

 



Copyright 2017. All rights reserved.

Posted December 31, 2016 by Edmundo in category "Ruby Examples