Created
February 16, 2009 02:14
-
-
Save kamal/64955 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MacBook-Pro:zoecity-app(master) kamal$ irb | |
irb(main):001:0> require "rubygems" | |
=> true | |
irb(main):002:0> require "addressable/uri" | |
=> true | |
irb(main):003:0> a = Addressable::URI.heuristic_parse("www.google.com ") | |
=> #<Addressable::URI:0xc3300c URI:http://www.google.com > | |
irb(main):004:0> a.normalize! | |
=> #<Addressable::URI:0xc3300c URI:http://www.google.com/> | |
irb(main):005:0> a.host | |
=> "www.google.com" | |
irb(main):006:0> a.to_s | |
=> "http://www.google.com/" | |
irb(main):007:0> a.scheme | |
=> "http" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment