Extract anchor from ruby ​​url

I looked through the documentation

+7
source share
1 answer

The URI module provides a fragment attribute. eg:

 >> uri = URI("http://example.com/index.php?q=something#anchor") >> uri.fragment => "anchor" 
+9
source

All Articles