Ruby 2.4 Let's say that we have a string Projects::CategoriesController and we want to remove Controller. We can use chomp method. 1irb> "Projects::CategoriesController".chomp("Controller") 2=> "Projects::Categories"Copy However if we want to remove Projects:: from the string then there is no corresponding method of chomp. We need to resort to sub. Naotoshi Seo did not like using regular expressio
![Ruby 2.5 added delete_prefix and delete_suffix methods](https://cdn-ak-scissors.b.st-hatena.com/image/square/df7dcf3e382d2d4b018ba79fc6642260e3fa7070/height=288;version=1;width=512/https%3A%2F%2Fres.cloudinary.com%2Fdpc4i4bdx%2Fimage%2Fupload%2Fbigbinary_blogs%2Fdefault_blog_image.png)