mardi 26 avril 2016

Usage of semi colon for string matching in Ruby?

I am trying to understand if we can use ; inside string match ? Even though the below code doesn't seem to work ..but i am trying to understand what previous developer wanted to do.

if param.type == 'Team'
  search_url += '/type-Team'
elsif param.type == 'Agent;Team;Office'
  search_url += '/type-Agent;Team;Office'
end

Aucun commentaire:

Enregistrer un commentaire