Toppatea/test.rb

6 lines
No EOL
169 B
Ruby

route = {"hello/:hi" => "goodbye"}
p route["hello:hi"]
if route.keys[0].include?(":")
route = {route.keys[0].split(":")[0].concat("") => route.values[0]}
end
p route