when matching on the final segment of a string, e.g for a file extension, you could use a regular expression:
but of course in ruby there’s a much more expressive way
you can even pass multiple suffixes as arguments:
oh Ruby how I love you so.
when matching on the final segment of a string, e.g for a file extension, you could use a regular expression:
but of course in ruby there’s a much more expressive way
you can even pass multiple suffixes as arguments:
oh Ruby how I love you so.