Search code examples
rubyhashsavon

savon ruby colon inside hash


Is it possible somehow in Ruby to write in hash something like this:

"xmlns:soap"

So it will something like

:xmlns:soap

Solution

  • :"xmlns:soap"
    

    will create a Symbol out of your String, regardless of the containing characters. This is the same as writing:

    "xmlns:soap".to_sym