Purely out of curiosity, is there a more elegant way to simply get the substring after the first =
symbol in a string? The following works to give back name=b
You can use a regular expression with positive lookbehind to find your match. For example:
string = "option=name=bob"
string.match /(?<==).*/
# => #
Even if you haven't assigned the match data to a variable, Ruby will store it in special match variables for you.
$&
# => "name=bob"